Rockbox Technical Forums

Support and General Use => Plugins/Viewers => Topic started by: blackbasset on May 25, 2010, 07:35:01 AM

Title: [iPod] Plugin controlling current output (or similar) from Dock Connector?
Post by: blackbasset on May 25, 2010, 07:35:01 AM
Hello there,

i am an excited user of Rockbox on both my iPod Mini as well as my iPod Video - as well as a noob on hardware-related topics concerning rockbox, so please forgive me if my idea is foolish or was already discussed.
I am planning a little diy-project, whose main issue at this moment is an intervalometer, something that closes a circuit constantly over a certain interval of time.
my idea was the following, as i thought that this would be the cheapest (and somehow most unusal) idea:
Writing (or using if already available) a simple plugin for rockbox that makes use of the dock connector and the currents found there (to power certain ipod accessoires), sending that current for a short time to a transistor, which then closes the actual circuit...
i dont know anyhting about the structure (and language) used for the rockbox plugin, but i guess the main structure of such a plugin/the whole process would be something simple as this:

1) the variable T is an inverval set by the user via a simple input in rockbox
2) the plugin then waits T seconds (or equivalent)
3) the plugin sends the current via dock connector to the transistor
4) the transistor closes the circuit for a short time
5) the plugin returns to 2)
6) the plugin continues until the user presses a button or a certain pre-set count is reached

I guess programming and so on would not be a big problem for such a simple thing (even for me, whose biggest programming accomplishments would be some stupid java thingies back in my days of school), as long as there actually IS a way to send a current (or control this current) via a rockbox plugin..?

Thanks!

Rob
Title: Re: [iPod] Plugin controlling current output (or similar) from Dock Connector?
Post by: torne on May 25, 2010, 08:34:42 AM
There's a setting which turns the accessory power pin on and off. You could modify Rockbox to allow this to be controlled programatically via the plugin API, yes.
Title: Re: [iPod] Plugin controlling current output (or similar) from Dock Connector?
Post by: blackbasset on May 25, 2010, 10:07:52 AM
Thanks for the quick answer!
So this would require recompiling if I understand you right?
Is this feature documented somewhere?

Rob
Title: Re: [iPod] Plugin controlling current output (or similar) from Dock Connector?
Post by: torne on May 25, 2010, 11:12:34 AM
The feature doesn't exist yet, you would have to implement it, as I said....
Title: Re: [iPod] Plugin controlling current output (or similar) from Dock Connector?
Post by: blackbasset on May 25, 2010, 12:17:31 PM
Okay - I think that's too much for my skills, although i tried understanding the source code of rockbox, it would be a long way that i actually could implement a new feature... so i think i will go with a NE555 and a circuit to do the job, even though it is less fancy :D
But thanks for the information!
Title: Re: [iPod] Plugin controlling current output (or similar) from Dock Connector?
Post by: torne on May 25, 2010, 04:31:55 PM
If you are sufficiently good at programming that you can figure out how to write a Rockbox plugin, then you can probably work out how to extend the plugin API for your requirements, maybe with a bit of help from the developers.

But, I suspect you'll find it easier to use a small discrete-logic circuit, yes ;)