6

I have been working on a circuit design that would allow me to charge my iPhone/iPod classic 120 GB from my car. I am going to use power from the back of the cigar lighter sockets and put it into this circuit.

The plan is that it will step the voltage down the a usable charging voltage for the iPod. I have also had to use a voltage divider to provide power to the D+ and D- pins on the USB plug, apparently the phone will not charge with out it.

There is also an audio out section there that will basically use the GND, L Audio and R Audio and this will be wired into a 3.5 mm plug to go to my car sound system. There is also a 1 M Ohm resistor going from pin 21 on the iPod to GND to tell the iPod to shutdown when power is lost.

I am unable to breadboard this ATM as I don't have the voltage regulator or any rated capacitors. I have drawn up the breadboard design with Fritzing (see below). Now to the question, can anyone see any issues with my design? I am a little worried about how hot the LM7805 will get and also concerned about if the common ground is going to mess with my audio? For reference here is the iPod Pin out.

Breadboard layout Breadboard layout

Schematic Schematic

Parts list

12-14v power   Car Battery
C1             4.7uF 50V Electrolytic Capacitor
C2             0.1uF 50V Electrolytic Capacitor
J1             Generic female header - 10 pins (Ipod)
J2             Generic female header - 3 pins (Audio)
LM7805         LM7805
R1             1MΩ Resistor
R2             47kΩ Resistor
R3             47Ω Resistor
R4             150kΩ Resistor
R5             100kΩ Resistor

PCB layout PCB layout

PeterJ
  • 17,131
  • 37
  • 56
  • 91
  • I'm essentially in the same project at my place too. When I get it done I'll try to remember to let you know, and if you have some time, let me know too!!! (I am however hoping to read the CAN bus, and eventually find a way to control my iPod with my steering wheel controls, not sure how yet) – onaclov2000 Aug 18 '10 at 19:27

2 Answers2

3

You're on the right track. You could use a switching regulator for better efficiency and less heat. Adafruit has the official recharging resistor values in their FAQ.

Your schematic is drawn pretty confusingly, though, so I'm not sure if it's right. Can you label the pin numbers of the dock connector? Generally a linear regulator is drawn like this:

enter image description here

Of course the function is the same no matter how you draw it, but readability counts. :) (Also, in a real AC-to-DC power supply, you need to lay out the PCB in this specific way, or you can have issues with ground current noise getting through to the output.)

Your car voltage will be varying due to different things using the battery at different times, possibly with a fast enough variation to be in the audible frequencies. Your regulator will be dumping current to ground in order to keep the output at a stable voltage. Since the difference between the stable output voltage and the fluctuating input voltage is not constant, the current it shunts to ground will also be fluctuating. Since copper is not a perfect conductor, this ground current flowing through ground traces back into the battery causes the different points along that trace to be at slightly different voltages, varying at audible frequencies. If another part of the circuit uses a point along that trace as its ground reference, it will see that slight voltage variance as a signal, and the noise will get into the audio (small buzzes or whines or clicks at low volume). This is why the layout of PCB traces matters. The ground traces should be laid out in the same shape as the schematic, and your other circuitry should only be connected "after" the output filter capacitor C2:

enter image description here

There's also noise from the iPod. It draws a lot of current while charging, up to 1 A peak, but like any digital/computer device, the current is intermittent (repetitive spikes from refreshing the screen, moving the hard drive head, etc.) In your schematic, this isn't a problem, since the audio ground is separate and not touching the charging ground.

PeterJ
  • 17,131
  • 37
  • 56
  • 91
endolith
  • 28,494
  • 23
  • 117
  • 181
  • Thanks for the feedback. I have redone the schematic here the link http://dl.dropbox.com/u/5434831/Ipod/Schematic_v2.png I may have a look at the LM317 as an alternative as it seems to be better suited to the higher currents. Can you explain the Capacitors? I dont really know what size to use, only thing I can work out is make sure that the are voltage rated and bigger uF is better in this situation??? I also dont understand the ground noise current? any links? –  Jun 11 '10 at 05:50
  • Ok, where did you get those iPod pinouts? They're reversed from the manufacturer's pinouts. http://ipodlinux.org/wiki/Dock_Connector Otherwise that schematic looks good. As for ground currents, I'll put that in my answer. – endolith Jun 11 '10 at 14:19
  • if you read what is written in his link they say they have numbered the pins opposite of what it says if you open the iPod. They made a reference and then realized it was opposite of apple, but instead of updating their site just said, pay attention to pins be opposite. – Kortuk Jun 11 '10 at 14:51
  • Yeah, the capacitor rating just needs to be higher than the voltage they will see. The alternator can supply up to 14 V, so the input cap needs to be at least 16 V rating. The output cap just needs to be at least 6.3 V rating. Anything higher will work, too. – endolith Jun 11 '10 at 15:08
2

This looks proper. If you pull the D+ and D- lines to the proper voltage, as it seems you are, it tells the iPod/iPhone to pull current.

When I look at the list of the pins, the ones you linked. It tells me that pin 21 needs to be connected to 68k for the iphone to know how to map out audio. Otherwise I do not think that the iphone will output audio through the connector. Otherwise you will need to use the headphone jack.

Kortuk
  • 13,362
  • 8
  • 60
  • 85
  • Hi Kortuk, thanks for the response. I have had a look at that and pin 21 is going to be hooked to a 1MOhm resistor so taht when I turn the car power off it will shut the iPod/iPhone off. There is a bit up further on that page about Pin 11, if its put to ground then the audio will go out through pin 3 and 4. Im hoping that this will work, if not I will keep fiddling. Thanks again. Ben –  Jun 11 '10 at 06:02
  • should work if it says so! – Kortuk Jun 11 '10 at 12:52