Easily control your iPod using Arduino

iPod

Easily control your iPod with Arduino using serial commands. This instructable includes the schematic, the code and some extra info; everything you need to make this work.

USB,battery or wall power supply powered.

iPod

Step 1: What you need

Parts:
5x  1K ohm resistors
2x  1M ohm resistors
1x  12K ohm resistors
1x  1.5K ohm resistors
4x  normaly opened push buttons
wire
protoboard (optional)
3.5mm audio jack

Arduino Uno or similar    http://arduino.cc/
recycled iPod Dock or PodBreakout ( you can buy it here http://www.sparkfun.com/products/8295)

Step 2: Schematic

In the protoboard.
Arduino serial is 5v while iPod logic level is 3.3v. Because of it we need to add a voltage divider.
The two 1M ohm resistors are required to make a 500k to select the device.
The dectect cable is conected to iPod TX pin and use to let the arduino know when an ipod is conected.

Step 3: Code info

Basic comunication protocol. Dont worry, everything is in the code file.

My sources:
http://web.student.tuwien.ac.at/~e0026607/ipod_remote/ipod_ap_new.html
http://www.adriangame.co.uk/ipod-acc-pro.html
http://pinouts.ru/Devices/ipod_pinout.shtml

Arduino with iPod circuit

Step 4: Download the program

Here is the arduino code:

/*
By Daniel Solis
Licensed under Creative Commons Attribution-ShareAlike 3.0 Unported
http://creativecommons.org/licenses/by-sa/3.0/

You are able to modify this code as well as the hardware. If you
have a better code or make any changes that improve the performa
nce please share them

Analog pin 4: ipod TX(to detect ipod)
Analog pin 0: button detection
Digital pin 1: arduino TX
*/

byte mode2[]={0xFF,0x55,0x03,0x00,0x01,0x02,0xFA};//mode 2 command
byte nobutton[]={0xFF,0x55,0x03,0x02,0x00,0x00,0xFB};//button release command
int release=200;
//commands
byte playxpause=0x01;
byte nextsong=0x08;
byte prevsong=0x10;
byte shuffle[]={0xFF,0x55,0x04,0x02,0x00,0x00,0x80,0x7A};
int long time;//
int butbefore=1023;
int dockbef=0;

void setup()
{
Serial.begin(19200);//sets serial com
for(int p=0; p<7; p++)
{Serial.print(mode2[p],HEX);}//sends mode2 command
}

Read more: Easily control your iPod using Arduino

Leave a Comment

Your email address will not be published. Required fields are marked *