Step 2SMPS
We want between 8 and 30 volts to charge an iPod through the firewire port. Lets design this SMPS for 12 volts output. This is not an immediately deadly voltage, but well within the firewire voltage range.
Microcontroller
There are several single chip solutions that can boost the voltage from a few batteries to 12 (or more) volts. This project is NOT based on one of these. Instead, we will use a programmable microcontroller from Microchip, the PIC 12F683. This lets us design the SMPS with junk-box parts, and keeps us close to the hardware. A single chip solution would obfuscate most of the operation of the SMPS and promote vendor lock-in. The 8 pin PIC 12F682 was chosen for its small size and cost (less than $1). Any microcontroller can be used (PIC/AVR) that has a hardware pulse width modulator (PWM), two analog digital converters (ADC), and a voltage reference option (internal or external Vref). I love the 8 pin 12F683 and use it for everything. On occasion I have used it as a precision 8 Mhz external clock source for older PICs. I wish Microchip would send me a whole tube of them.
Voltage Reference
The device is battery powered. Battery discharge and temperature change will result in voltage drift. In order for the PIC to maintain a set output voltage (12 volts) a stable voltage reference is needed. This needs to be a very low voltage reference so it is effective over the range of output from 3 AA batteries. A 2.7 volt zener diode was originally planned, but the local electronics shop had a 2 volt "stabistor" diode. It was used the same as a zener reference, but inserted "backwards" (actually forwards). The stabistor seems to be quite rare (and expensive, ~0.75 euro cents), so we made a second version with a 2.5 volt reference from microchip (MCP1525). If you don't have access to the stabistor or Microchip (or other TO-92) reference, a 2.7 volt zener could be used.
Voltage Feedback
There are two voltage feedback circuits that connect to ADC pins on the PIC. The first allows the PIC to sense output voltage. The PIC pulses the transistor in response to these measurements, maintaining a desired numerical reading on the ADC (I call this the 'set-point'). The PIC measures battery voltage through the second (I will call this supply voltage or Vsupply). Optimal inductor on-time depends on the supply voltage. The PIC firmware reads the ADC value and calculates the optimal on-time for the transistor and inductor (the period/duty cycle values of the PWM). It is possible to enter exact values into your PIC, but if the power supply is changed the values are no longer optimal. While running from batteries, the voltage will decrease as the batteries discharge, necessitating a longer on-time. My solution was to let the PIC calculate all of this and set its own values.
Both dividers were designed so that the range of voltages is well under the 2.5 volt reference. The supply voltage is divided by a 100K and 22K resistor, giving 0.81 at 4.5 volts (fresh batteries) to 0.54 at 3 volts (dead batteries). The output/high voltage is divided through 100K and 10K resistors (22K for USB output). We eliminated the trimmer resistor used in the nixie SMPS. This makes the initial adjustment a little spotty, but eliminates a large component. At 12 volts output the feedback is approximately 1 volt.
FET/Switch
FETs are the standard 'switch' in SMPSs. FETs switch most efficiently at voltages higher than that supplied by 3 AA batteries. A Darlington transistor was used instead because it is a current switched device. The TIP121 has a gain of 1000 minimum – any similar transistor can probably be used. A simple diode (1N4148) and resistor (1K) protect the PIC PWM pin from any stray voltage coming from the transistor base.
Inductor Coil
I am quite fond of the C&D power inductors available at Mouser. They are small and dirt cheap. For the USB version of the charger a 220uH inductor was used (22R224C). The firewire version uses a 680 uH inductor (22R684C). These values were chosen through experimentation. Theoretically, any value inductor should work if the PIC firmware is configured properly. In reality, however, the coil buzzed with values less than 680uH in the firewire version. This is probably related to the use of a transistor, instead of a FET, as the switch. I would greatly appreciate any expert advice in this area.
Rectifier Diode
A cheap super/ultra fast 100 volt 1 amp rectifier from Mouser (see part list) was used. Other low voltage rectifiers can be used. Make sure your diode has a low forward voltage and fast recovery (30ns seems to work well). The right Schottky should work great, but watch out for heat, ringing, and EMI. Joe on the switchmode mailing list suggested: (website:http://groups.yahoo.com/group/switchmode/ )
"I think since Schottky's are faster and have high junction capacitance like you were saying, you could get a little more ringing and EMI. But, it would be more efficient. Hmm, I wonder if you used a 1N5820, the 20v breakdown could replace your Zener diode if you require low current for your Ipod."
Input/Output Capacitors and Protection
A 100uf/25v electrolytic input capacitor stores energy for the inductor. A 47uf/63v electrolytic and 0.1uf/50V metal film capacitor smooth the output voltage.
A 1 watt 5.1 volt zener is placed between the input voltage and ground. In normal use 3 AAs should never provide 5.1 volts. If the user manages to over power the board, the zener will clamp the supply to 5.1 volts. This will protect the PIC from damage – until the zener burns out. A resistor could replace the jumper wire to make a true zener voltage regulator, but would be less efficient (see PCB section).
To protect the iPod, a 24 volt 1 watt zener diode was added between the output and ground. In normal use this diode should do nothing. If something goes horribly wrong (output voltage rises to 24) this diode should clamp the supply at 24 volts (well below the firewire max of 30 volts). The inductor used outputs max ~0.8 watts at 20 volts, so a 1watt zener should dissipate any excess voltage without burning out.
| « Previous Step | Download PDFView All Steps | Next Step » |
![]() |
Add Comment
|











































