Step 1: Physically hack an ipod remote
Take an ipod remote that looks like the one below and pop open the cover to look at the circuit. Note that there are lots of ipod remotes out there, and I'm not sure how many of them will work with this project -- I've only used this one.


Find the pins labeled GND, VCC, and AUD, which correspond, respectfully to ground, power, and serial out. With a soldering iron, gently free the wires connection to these three pins by touching the heated iron to the existing solder. The important word here is "gentle" - the wires are thin and delicate, and you don't want to break off the part that's soldered. If by chance you do break that part, you have two options - 1) try to strip the wire to get to a solderable part or 2) throw that remote away and start over. I've made several remotes, and I've never been able to fix one once I've broken the soldered end -- the wires are tiny threads and really difficult to strip.
Once you've got those wires free, you want to re-solder to make connections to a more sturdy, thicker gauge wire. At some point (it's not important when), you need to also desolder the remaining three wires, but you won't need those. You can now discard the severed end of the remote.
Step 2: The Circuit
Now you need to build the circuit. I've mainly just used a breadboard for easy access and changes, but for a sturdier version I'd recommend actually soldering your circuit. If you're familiar with the arduino, this should be easy. (I know, I shouldn't say that - whenever I read that something's "easy" it means that it's probably impossible, but I'm going to feel like an idiot for not being able to do it.) When I originally started this project, I was using a previous arduino that used the atmega8 chip, not the newer atmega168, and if you can find an older one, definitely use it, as I've had some problems with the serial output of the atmega168s. Or if you'e so inclined, you can troubleshoot the code for the atmega168s and drop me a line telling me what the problem was, and I'll happily post it.
The schematic is below for those of you who are electrical engineer types.

For the rest of us who like directions in the vernacular and lots of pictures. You need to give your breadboard power and ground from the arduino and connect the remote power and ground wires accordingly. Take the wire that was previously soldered to the AUD pin and connect it to the TX pin of your arduino so it can transfer serial data to the ipod.
The next part depends on how many remote functions you want. For the adapted remote I created for Hannah, I only wanted two - play/pause and forward, thus my circuit only includes two digital inputs. If you want to add more or fewer or use analog inputs instead, go for it. For this part of the circuit, I'm going to refer you to the very wise Tom Igoe, who wrote a digital input/output tutorial for our physical computing class. (It includes both schematics and photos of the circuit).
In my first iteration of the remote, I used two momentary (pushbutton) switches to reduce the number of components to troubleshoot. I'd recommend this for most people unless you're super-confident about your circuit. In the next phase I replaced the switches with input jacks so that switches could be easily...well...switched to allow for more flexibility. The photo on the right is my two jack setup secured with a fair amount of hot glue.Step 3: The Code
I've already posted the complete code for controlling your ipod with an arduino, so I'm not going to copy and paste here.
So there you have it - you're now ready to take control of your ipod. Go forth into the world.
0 comments:
Post a Comment