Saturday, August 2, 2008

iPhone 9V (PP3) battery charger

I've had an iPhone since the price dropped on the first model. I think the first time I became aware of hacks was when that kid from NY hacked the SIM card. Anyway, I started reading and realized there were quite few opportunities to develop some cool iPhone accessories. I am aware that there are already implementations of some hardware like iPod controls built into cars and those boombox iPod players. I want to do it from scratch because I learn better that way...I attribute that to the idea that I'm more likely to learn from my own mistakes than someone else's.

Lastnight I created the mobile battery charger on a breadboard and got the iPhone to enable its internal charging circuit and start charging. This is probably the simplest thing you can do. I chose a 9V battery and drop it down to 5V using a linear regulator. AA batteries would probably last longer than the 9V but you need four of them and that's three more batteries than I was interested in. You only need four pins out of the thirty for this to work (the connector that comes with the iPhone has 5/30 pins, the extra being the accessory indicator/serial enable pin).

If you leave the USB data pins floating, the charging circuit on-board the iPhone will not enable. Apparently, a chip (LTC4066) within the circuit senses these pins to detect when it is time to use USB power instead of battery power. I just split the 5V down to 2.5V using 470k resistors and fed this to both USB data pins. I am not sure if the 4066 has a minimum input current requirement (for on-board pull-down resistors) but it is working with the 470k resistors. If you are worried about the resistor or voltage value, you could probe (mine is out of batteries ATM) between the data pins and GND of your Apple wall-wart. It appears that as long as these voltages are above 1.225V the circuit will engage.

The next thing I will try are the audio outputs.

0 comments: