Silicon ChipLow-Power Car/Bike USB Charger - May 2010 SILICON CHIP
  1. Outer Front Cover
  2. Contents
  3. Publisher's Letter: Saving energy is not the issue
  4. Feature: Slash Your Factory/Office Lighting Bill by Leo Simpson
  5. Feature: A Look At The TDA7377 Quad 12V Amplifier IC by Nicholas Vinen
  6. Project: A Solar-Powered Lighting System by John Clarke
  7. Project: Build A Compact 12V 20W Stereo Amplifier by Nicholas Vinen
  8. Project: Low-Power Car/Bike USB Charger by Nicholas Vinen
  9. Project: Digital Audio Signal Generator, Pt.3 by Nicholas VInen
  10. Review: Tektronix DMM4050 6½-Digit Multimeter by Nicholas Vinen
  11. Book Store
  12. Vintage Radio: How AGC works and why it’s necessary by Rodney Champness
  13. Advertising Index
  14. Outer Back Cover

This is only a preview of the May 2010 issue of Silicon Chip.

You can view 29 of the 96 pages in the full issue, including the advertisments.

For full access, purchase the issue for $10.00 or subscribe for access to the latest issues.

Items relevant to "A Solar-Powered Lighting System":
  • Solar-powered Lighting System PCB [16105101] (AUD $10.00)
  • PIC16F88-I/P programmed for the Solar Powered Lighting Controller [1610510A.HEX] (Programmed Microcontroller, AUD $15.00)
  • PIC16F88 firmware and source code for the Solar Powered Lighting Controller [0610510A.HEX] (Software, Free)
  • Solar-Powered Lighting System PCB pattern (PDF download) [16105101] (Free)
Articles in this series:
  • A Solar-Powered Lighting System (May 2010)
  • A Solar-Powered Lighting System, Pt.2 (June 2010)
Items relevant to "Build A Compact 12V 20W Stereo Amplifier":
  • Compact 12V 20W Stereo Amplifier PCB [01104101] (AUD $7.50)
  • Compact 12V 20W Stereo Amplifier PCB pattern (PDF download) [01104101] (Free)
  • Compact 12V 20W Stereo Amplifier front panel artwork (PDF download) (Free)
Items relevant to "Low-Power Car/Bike USB Charger":
  • Low-Power Car/Bike USB Charger PCB [14105101] (AUD $5.00)
  • Low-Power Car/Bike USB Charger PCB pattern (PDF download) [14105101] (Free)
  • Low Power Car/Bike USB Charger front panel artwork (PDF download) (Free)
Items relevant to "Digital Audio Signal Generator, Pt.3":
  • Digital Audio Signal Generator main PCB (to suit Jaycar case - 04203101] (AUD $10.00)
  • Digital Audio Signal Generator main PCB (to suit Altronics case - 04203103] (AUD $10.00)
  • Digital Audio Signal Generator control PCB [04203102] (AUD $7.50)
  • dsPIC33FJ64GP802-I/SP programmed for the Digital Audio Signal Generator [0420310C.HEX] (Programmed Microcontroller, AUD $25.00)
  • dsPIC33 firmware and source code for the S/PDIF Digital Audio Signal Generator [0420310C.HEX] (Software, Free)
  • S/PDIF Digital Audio Signal Generator main PCB pattern for Jaycar case (PDF download) [04203101] (Free)
  • S/PDIF Digital Audio Signal Generator main PCB pattern for Altronics case (PDF download) [04203103] (Free)
  • S/PDIF Digital Audio Signal Generator display/control PCB pattern (PDF download) [04203102] (Free)
  • S/PDIF Digital Audio Signal Generator front panel label artwork (PDF download) (Panel Artwork, Free)
  • S/PDIF Digital Audio Signal Generator top panel label artwork for Jaycar case (PDF download) (Panel Artwork, Free)
  • S/PDIF Digital Audio Signal Generator top panel label artwork for Altronics case (PDF download) (Panel Artwork, Free)
Articles in this series:
  • Digital Audio Signal Generator, Pt.1 (March 2010)
  • Digital Audio Signal Generator, Pt.2 (April 2010)
  • Digital Audio Signal Generator, Pt.3 (May 2010)
Articles in this series:
  • How AGC works and why it’s necessary (May 2010)
  • How AGC works and why it’s necessary, Pt.2 (June 2010)

Purchase a printed copy of this issue for $10.00.

By NICHOLAS VINEN Low-Power Car/Bike USB Charger Looking for an efficient USB charger that can operate from a 12V car battery? This unit functions at up to 89% efficiency and can charge USB devices at currents up to 525mA. Best of all, it won’t flatten the battery if it’s left permanently connected, as long as you remember to unplug the USB device. T HERE ARE LOTS of USB chargers on the market but this device has two stand-out features: high efficiency and low standby current. In fact, its standby current is just 160µA, a figure that’s well below the self-discharge current of most lead-acid batteries. This means that you can leave the device permanently connected and it will not cause that battery to go flat (or at least, not much faster than it would of its own accord). Why is this useful? Well, in September 2009’s “Ask SILICON CHIP” section, D. E. of Ainslie, ACT asked if it was possible to connect a 12V-to-5V USB charger directly to the battery on a motorbike. His reason for wanting to do this is that doing anything else might void the warranty. Our reply was that it is possible but that it would need to 66  Silicon Chip have a quiescent current (IQ) of less than 1mA to avoid draining the battery between uses. While USB car chargers are cheap and plentiful, finding one with a low enough quiescent current for permanent battery attachment is difficult. Even those marketed as “low idle power” devices don’t specify how much current they draw on standby. We tested a regular charger and found that it consumed 13mA with no load. Like many others, it has an integrated power LED and that would contribute significantly to the standby current consumption. However, since the cigarette lighter socket is only powered when the engine is running, there is no real reason for the designers of these car supplies to keep the quiescent current low. Cigarette lighter plugs are also pretty lousy DC connectors. They often don’t fit well and can easily fall out. With this project, you can use whatever type of connector is most convenient. In many cases, this will mean input wires terminated in spade or eyelet lugs. While this may seem like a very specific application, there are many other uses for a low-quiescent current 12V DC to 5V DC converter. For example, remote monitoring stations often run from a 12V SLA battery topped up by a solar panel. These stations invariably contain a microcontroller and other circuitry which needs a 3.3V-5V supply. The current consumption in these devices will be low most of the time but occasionally the microcontroller will wake up and activate a radio siliconchip.com.au 5.05 100% 90% 80% Efficiency % 60% 50% 5.00 40% 30% Output Voltage (V) 70% 20% 10% 0% 0 100 200 300 400 Output Current (mA) 500 4.95 600 Fig.1: this graph plots the efficiency and output voltage over the full output current range. As shown, the efficiency is over 80% for any output current above 10mA. module or other circuitry which can draw more current. This charger can deliver that current – up to 500mA – while still being miserly with battery power when the load is light. In addition, because its efficiency is high (up to 89%), hardly any battery power is wasted even when the load is drawing 500mA. What is quiescent current? So what exactly is quiescent (or standby) current? This term often comes up in IC data sheets. Its simple meaning is “idle current”, although when talking about regulators, it sometimes refers to the current consumed by the device itself, rather than by what it is supplying. In most fixed regulators, this is the same as the “ground pin current”. There are typically two current flows in a regulator – from the input to the output and from the input to ground. The ground pin current is the power consumed by the regulator itself. At higher currents, most regulators consume more current than they do at idle. As a result, the quiescent current may be specified for different output currents, including the no-load case. Although the device is arguably no longer “quiescent” when it is delivering an output, the term is often used this way. Since we primarily want to minimise power consumption with no USB device attached, the idle current is critical for this design. What’s more, siliconchip.com.au a device with low idle current will usually also have low ground pin current at higher loads. This is just what we want since the overall efficiency is determined by the combination of the conversion efficiency and ground pin current. USB charging issues Basically, this device is a DC-DC converter. You feed 12V DC (or there­ abouts) in at one end and it delivers a 5V DC output at the other end. It complies with the USB 2.0 specifications with regard to power, ie, it supplies at least 500mA at 4.75-5.25V. However, for some devices, this current level is insufficient for them to operate and charge their battery simultaneously. Many of these devices require a custom cable or special USB data pin connection arrangement before they will attempt to draw more than 500mA so that they can do both at the same time. This shouldn’t be a big problem since such devices should be able to operate without simultaneously charging the battery. The battery can then be charged when they are switched off (ie, no longer being used). Unfortunately, many USB-powered devices provide no way to switch modes like that. However, if your device can operate normally from a computer’s USB port, it should work fine with this charger, since they supply the same amount of power. There’s just one wrinkle here. If your USB device switches to a data transfer mode when plugged into a computer USB port, it may behave the same way when connected to this charger, even though the data lines (D+ and D-) aren’t connected. Its battery will still charge but the device may have to be unplugged to be used. Devices which typically behave in this manner are car GPS units. Plug them into a PC’s USB port and they immediately switch to data transfer mode (ie, for downloading software upgrades and map updates). This doesn’t stop the internal battery from charging via the USB port – it’s just the the device must be unplugged in order to use it as a GPS. Design considerations The first step in designing this device was to find an appropriate switchmode regulator IC. One candidate that satisfies all the requirements is the Linear Technology LTC1174HV. The HV (high-voltage) version can run from 6-17.5V (for 5V output) and consumes only 130µA at idle, with a maximum output of around 500mA (this is also the most current that can be drawn from a single USB port). The LTC1174HV is quite efficient too. Unfortunately, it’s hard to get the HV version in a DIP package. None of our usual vendors stock it, so we had to order the low-voltage version, which has an absolute maximum rating of only 13.5V. This problem was solved by adding a low quiescent current linear preregulator to the design. This prevents the IC’s supply from exceeding 13V, regardless of the battery voltage. The only drawback is that it reduces the efficiency slightly at higher battery voltages, although it doesn’t add much to the idle current. However, since the battery will only be above 13V while it is being charged, the loss of efficiency under this condition doesn’t really matter. The other issue is that while the data sheet says that switching will occur at around 100kHz with the components we are using, at light loads the burst mode causes switching to occur at much lower frequencies – in some cases, well into the audio range. As a result, the inductor used in the circuit makes some noise with light loads. We managed to tweak the design to minimise this noise. If you listen carefully you can hear it but once the May 2010  67 C A 3 LB IN 1N5819 GND 4 K VFB 1 D2 1N5819 IC1 LTC1174 100nF USB CHARGER FOR CARS & BIKES SC C – 12V IN E B 1M Q2 BC549 C 10M B Q3 BC559 E TVS1 1.5KA 36CA + CON1 2010 VR1 200k 2x 22 µF 470nF 270k 2 A ZD2 12V A ZD1 15V Fig.2: the circuit is based on an LTC1174 switching regulator IC (IC1), while Mosfet Q1 and transistors Q2 & Q3 form a pre-regulator circuit. The pre-regulator prevents the supply to IC1 from exceeding 13V, regardless of battery voltage. A A K 5 SW LB OUT 6 7 8 VIN SHTDWN IPGM 2.2M 1k K G K Output voltage: 4.75-5.25V Output current: approximately 525mA Input voltage range: 6-16V DC Input current requirement: maximum 300mA at 12.0V Input current with output shorted: 4.3mA Output ripple: 110mV p-p, 30mV RMS at 500mA Load regulation: 50mV at 12V, 0-500mA (1%) Line regulation: 16mV at 450mA, 7.0V-13.0V (0.32%) No load input current: 160µA Efficiency: up to 89% (see Fig.1) Switching frequency: 10Hz – 120kHz K ZD1, ZD2 470nF E B BC549, BC559 2x 47 µF 110k 330k G D S CON2 IRF9540 D USB TYPE A SOCKET OUTPUT – + CON3 L1 100 µH A K D3 1N5819 CON4 D Q1 IRF9540 S K A D1 1N5819 68  Silicon Chip Performance board is mounted in a box and placed in a moving vehicle, it will be inaudible. Circuit description Refer now to Fig.2 for the circuit details. IC1 is the main switching regulator IC, while Mosfet Q1 and its associated parts form the pre-regulator circuit. Power from the external 12V DC source is fed in via CON1. Immediately following this, a 36V AC transient voltage suppressor (TVS1) across the input damps any positive voltage spikes that may appear on the supply line (eg, due to devices switching on or off). Diode D1 then provides reverse polarity and negative spike protection. The pre-regulator circuit (based on Q1) was published previously in Circuit Notebook for March 2010. It is a low quiescent current Mosfetbased design, especially developed for this type of application. Its operation was fully explained in the Circuit Notebook entry, so we’ll just cover the basics here. Essentially, the transconductance of the Mosfet Q1 is controlled so that the voltage at its drain will not exceed a preset value. This is done using zener diode ZD2, trimpot VR1 and transistors Q2 & Q3. In this case, the voltage on Q1’s drain is set to 13V and VR1 allows you to trim this value. We need to make sure the LTC1174 can’t be damaged and this provides a small safety region (ie, 0.5V) between its supply voltage and its maximum rating. The circuit works as follows. When power is applied, Q1’s gate is pulled low via a 1MΩ resistor, turning it on. Q1’s output voltage then rises until ZD1, a 12V zener diode, begins to conduct and pass current to trimpot VR1. Once VR1’s wiper exceeds 0.65V, Q2 turns on and this then turns on Q3. As a result, current now flows though Q3 and the 1MΩ resistor. This in turn increases Q1’s gate voltage and switches it off. By suitably adjusting VR1, Q1’s output can be accurately set to 13V. siliconchip.com.au The nominal 13V supply from the pre-regulator is decoupled using two 22µF 16V tantalum capacitors and a 470nF MKT capacitor. Tantalum capacitors were chosen for two reasons: (1) they have much lower leakage than aluminium electrolytics and (2) they have a lower ESR at high frequencies than other electrolytics. Any capacitor leakage across the input or output of the switchmode regulator adds to the quiescent current of the circuit and we want to keep leakage to a minimum. The switchmode circuit can operate at frequencies in excess of 100kHz (occasionally as high as 1MHz) in burst mode, so we need to make sure the capacitors will be effective at high frequencies. The switchmode regulator section is based on the schematic shown in the LTC1174 data sheet (“High Efficiency 3.3V Regulator”). However, the 50µH inductor has been increased to 100µH and we’ve added a voltage divider since we need a 5.0V output instead of 3.3V. Pins 7 & 8 of IC1 are tied to the positive supply rail. Keeping pin 8 high ensures that the IC is always enabled, while pulling pin 7 high selects the higher peak current limit (600mA). That way, the current limiting will not kick in until an average of almost exactly 500mA is being supplied. The 330kΩ and 110kΩ resistors across the output form a 4:1 voltage divider. This sets the output voltage. In operation, the LTC1174 adjusts its output voltage so as to keep its VFB pin (pin 1) at 1.25V. This means that the output voltage will be 1.25 x 4 = 5.0V. If you want to change the output voltage, use the formula R3 = R4 x ((VOUT/1.25) - 1), where R4 is 110kΩ. For example, to set the output to 3.3V, replace R3 with 180kΩ. In this case, the output would be taken from CON3 (which is a polarised 2-pin header) rather than from the USB socket. The 2.2MΩ and 270kΩ resistors form a voltage divider which is applied to the LBIN (Low Battery Input) pin of IC1. If the supply falls below 11V, pin 2 will sink current (ie, it goes low). Header CON4 enables a high-bright­ness LED to be fitted to indicate the low-battery condition but note that once it comes on, it will then run the battery flat even faster! In short, this LED is optional and should be left out unless you have a specific reason for using it. siliconchip.com.au By contrast, diode D3 is necessary. It’s included to protect IC1 from an input supply short circuit – as unlikely as that may be. Without it, if an input short were to occur, IC1 could be destroyed. Following L1 (which serves as the switchmode energy storage element), the output voltage is filtered by two 47µF tantalum capacitors and a parallel 470nF MKT capacitor. This is not a great deal of capacitance but thanks to the good high-frequency performance of tantalum capacitors, the output ripple is typically no more than 110mV peak-to-peak and 30mV RMS. Larger capacitors could be used here but their leakage currents would be higher. The 5V output is fed to two different output sockets connected in parallel. CON2 is a Type A USB socket for recharging USB devices. For other devices, the output can be taken from 2-pin polarised header CON3. Note that the operating temperature range for the LTC1174CN8 is specified as 0-70°C. If you live in a cold or extremely hot climate and will be using this device outdoors (eg, mounted outside the cabin of a vehicle), then you may need to use the LTC1174IN8 IC instead. This can operate from -40°C to 85°C. Input limitations Normally, the supply voltage will be in the range of 12-14.4V. However, the regulator will operate just fine over a range of at least 9-15.6V. In a vehicle, it is not unusual to get short-term voltage spikes in both directions. TVS1, D1 and the pre-regulator combine to protect the device from these spikes. Voltages between -36V and 0V will not harm the regulator since D1 will not conduct. D1’s reverse breakdown voltage is -40V but TVS1 should absorb spikes below -36V anyway. Above 15.6V, the regulator will continue to operate normally, all the way up to 36V at which point the TVS clamps the supply voltage. We tested the regulator to 30V and it ran normally. However, if you were to run the regulator at high current and high voltage, Q1 would eventually overheat since it has no heatsink. This means that while the regulator will run off voltages above 15.6V, as can happen in a vehicle from time to time, it must not be run at high voltages for extended periods. With a maximum input current of about 220mA at up to Parts List 1 PC board, code 14105101, 62 x 49mm 1 2-pin terminal block (5.08mm pitch) 1 PC-mount horizontal Type A USB socket (Jaycar PS0916, Altronics P1300) 2 2-pin polarised headers (2.54mm pitch) 2 2-pin polarised header connectors (2.54mm pitch) 1 100µH high-frequency 1.13A bobbin inductor (Altronics L6222) 1 small rubber grommet 1 M3 x 6mm machine screw 1 M3 star washer 1 M3 nut 1 8-pin machine tooled socket (optional) 1 200kΩ horizontal single-turn trimpot (VR1) Semiconductors 1 LTC1174CN8 (IC1) (available from Farnell) 1 IRF9540 Mosfet (Q1) 1 BC549 transistor (Q2) 1 BC559 transistor (Q3) 1 1.5KE36CA transient voltage suppressor (TVS1) 1 12V 1W zener diode (ZD1) 1 15V 1W zener diode (ZD2) 3 1N5819 Schottky diodes (D1-D3) Capacitors 2 47µF 16V tantalum 2 22µF 16V tantalum 2 470nF MKT 1 100nF MKT Resistors 1 10MΩ 1 300kΩ* 1 2.2MΩ 1 270kΩ 1 1MΩ 1 110kΩ 1 360kΩ* 1 1kΩ 1 330kΩ * May be necessary to adjust regulator output – see text 15.6V, Mosfet Q1’s dissipation will not normally exceed 572mW. Buck regulation The LTC1174 has several modes but works similarly to a normal “buck converter” at high output currents. A “buck converter” is the most common type of step-down DC/DC May 2010  69 SWITCH S1 There are losses in this process, which is why switchmode regulator efficiency is never 100%. However, it is still a great deal better than linear regulation. With a 13V input, a 5V output and 500mA output current, the input current is around 220mA. This gives an efficiency of (5 x 0.5)/(13 x 0.22) = 87%. A linear regulator under these conditions would have just 5/13 = 38.5% efficiency (assuming that the input and output currents are equal). If the instantaneous current through the inductor exceeds the IC’s internal current limit (nominally 600mA), the internal transistor switches off and the switch off-time is extended from 4µs to around 12µs. This gives the inductor time to discharge if the output is shorted. One reason for this current limit, apart from stopping IC1’s internal transistor from overheating, is that inductors with non-air cores can “saturate”. Essentially, the core can only hold a certain amount of magnetic flux and its inductance rapidly drops when that level is reached. When it drops far enough, the inductor is essentially just a wire and if the switch is still on, a lot of current can flow through it. Because the current through the inductor is ramping up and down as the transistor switches, the average current is less than the peak current. That is why, with a 600mA limit, we can only draw up to 500mA. The current limit kicks in soon after that and the output voltage drops until the current draw decreases below the limit. This protects against short-circuits INDUCTOR L1 + + iL PATH 1 DIODE D1 VIN PATH 2 C1 VOUT LOAD Fig.3: basic scheme for a switchmode buck converter. Voltage regulation is achieved by rapidly switching S1 and varying its duty cycle. Current flows via path 1 when S1 is closed and path 2 when it is open. converter. It requires a single switch (normally a transistor), an inductor and a capacitor. Fig.3 shows the basic scheme and it works as follows. When the switch is closed, current flows through inductor L1 into the load (Path 1). This current slowly builds up from zero to a peak value. When this peak current is reached, the switch opens and current flows through diode D1 to discharge the inductor’s energy into the load (Path 2). C1 is included to act as a reservoir, to smooth out the voltage produced across the load. This voltage is dependent on the load and duty cycle of switch S1 (ie, the time that it is closed compared to the time that it is open). It’s also dependent on the peak current through L1 and the input voltage. This type of circuit can be very efficient because voltage control is achieved by rapidly switching the input. The small amount of power dissipated is mainly due to voltage losses in the switching device (in practice, S1 is a switching transistor or Mosfet) and in L1 and D1. The USB Charger operates in similar fashion but in this case the the switching is performed inside IC1 (LTC1174). Many buck regulators operate at a fixed frequency, using PWM to control the switch duty cycle and thus the output voltage. By contrast, the LTC1174 has a “fixed off-time” configuration. It varies the switch duty cycle by controlling the length of the “on-time”, ie, how long the switch is kept on for each pulse. This is a power saving feature – it means that the frequency drops at light loads and the less the internal Mosfet has to switch, the less power is consumed by the IC itself. When the internal Mosfet switches on, current flows from VIN (pin 6) to SW (pin 5) and through inductor L1, charging the output capacitors. During this period, the magnetic field generated by the inductor increases. Conversely, when the internal Mosfet switches off, the magnetic field collapses and this continues driving current into the output capacitors. Since the internal transistor is off, the current instead flows from ground through D2 and then through the inductor. It is this charging and discharging of the inductor’s magnetic field which allows for efficient voltage conversion. When the internal transistor is on, the inductor nominally has 12V at its switch end and 5V at the output end. If the inductor was a resistor, then more than half the power would be wasted as heat. Table 2: Capacitor Codes Value µF Value IEC Code EIA Code 470nF 0.47µF 470n 474 100nF 0.1µF 100n 104 Table 1: Resistor Colour Codes o o o o o o o o o o No.   1   1   1   1   1   1   1   1   1 70  Silicon Chip Value 10MΩ 2.2MΩ 1MΩ 360kΩ 330kΩ 300kΩ 270kΩ 110kΩ 1kΩ 4-Band Code (1%) brown black blue brown red red green brown brown black green brown orange blue yellow brown orange orange yellow brown orange black yellow brown red violet yellow brown brown brown yellow brown brown black red brown 5-Band Code (1%) brown black black green brown red red black yellow brown brown black black yellow brown orange blue black orange brown orange orange black orange brown orange black black orange brown red violet black orange brown brown brown black orange brown brown black black brown brown siliconchip.com.au ZD1 15V Q2 Q3 BC559 D2 D3 L1 100 µH 5819 5819 BC549 VR1 200k 1 3 2 4 100nF + + 47 µF CON3 330k IC1 LTC1174 5819 10M 1M + 12V TVS1 1.5KA D1 1k 2.2M 110k CON1 270k + 10150141 CON2 470nF CON4 + Q1 IRF9540 – B SU ra C 12V IN 22 µF 22 µF USB OUTPUT SOCKET 47 µF 470nF ZD2 © 0102 Fig.4: follow this parts layout diagram and the accompanying photo to assemble the PC board. Make sure that all polarised parts are correctly oriented and don’t get the transistors mixed up. at the output as well as inductor saturation. Burst mode At lower currents, the IC goes into “burst mode”. What it does is deliver several very fast pulses of current to the inductor over a short period, bringing the output voltage slightly above 5V. It then switches off and waits for the output voltage to drop below 5V and then starts pulsing again. As it is waiting for the voltage to drop, the IC is in “sleep mode” and consumes very little power. The result is that at light loads, ground pin current is substantially lower than it would otherwise be without this burst mode. While the delay between the bursts makes the effective frequency of operation much lower than at full power, the frequency of the bursts themselves is actually quite high. We measured frequencies as high as 1MHz. This means that the noise generated by the inductor is a sub-harmonic of the switching frequency and is caused by magnetostriction of the inductor’s core. If there is nothing attached to the regulator’s output, the feedback volt- age divider becomes the only load. Because the output voltage decays very slowly, the period during which the IC sleeps in burst mode becomes several hundred milliseconds. It is this long sleep period which allows the regulator to have a very low quiescent current with light loads or no load (approximately 140µA). Construction Building this unit is easy. All the parts mount on a small PC board coded 14105101 (62 x 49mm) and this snaps into the integral channels in a standard UB5 plastic box. The USB socket is accessed through a hole cut in one side of the box, while a hole at one end provides access to the input screw-terminal block. If you want something that’s a bit more robust, a small IP67-rated box can be used instead. In this case, the board can be mounted on M3 x 12mm tapped stand-offs and secured using M3 x 6mm machine screws and washers. Note that because this unit is likely to be exposed to a lot of vibration, we have not specified a socket for the IC. You can use one if you prefer but make sure it is a machine-tooled type, as the IC is less likely to work its way loose. Before starting the assembly, carefully check the PC board for defects. Most of the underside is covered by a ground plane. Make sure that there are no unintentional connections between this ground plane and any of the other tracks, as could occur if the board is under-etched. If you are going to install the board in a UB5 case, check that it fits correctly by snapping it into place. It may be necessary to file the edges slightly if it is too large. Even if it’s just 0.1mm too wide, that can make the plastic case bulge slightly when it is in place. Once you are satisfied the board is OK, install the resistors. Check each resistor with a DMM before installing it on the board, to ensure the values are correct. That done, install the diodes, starting with the two zeners (ZD1 & ZD2), then the three 1N5819 diodes (D1-D3). Don’t mix them up and be careful with their orientation. Next, bend the Mosfet’s leads down by 90° exactly 5mm from its body and mount it on the PC board. Check that its tab mounting hole lines up with the board, then fasten it to the board using a 3mm machine screw from the top and a star washer and M3 nut on 82 6 7 12 28.5 15 (SIDE OF UB5 BOX) ALL DIMENSIONS IN MILLIMETRES Fig.5: this diagram can be copied and used as a drilling template for the USB socket cut-out in the side of the case. siliconchip.com.au May 2010  71 Fig.6: this shows the output voltage (yellow) and switching (green) waveforms at 10mA. The long off-time relative to the on-time can be seen. The device is operating in discontinuous mode – the inductor current falls to zero, causing the oscillations in the green trace. the underside. Do the nut up firmly, then solder and trim the leads. Note: don’t solder the Mosfet’s leads first. If you do, you could stress and crack the the copper tracks on the PC board as the mounting screw is tightened. Always install the mounting screw before soldering. Next, install the IC socket if you have decided to use one. Follow this with the transient voltage suppressor (TVS1) – its orientation doesn’t matter – then install the two small-signal transistors (Q2 & Q3). Note that Q2 & Q3 are different types, so don’t get them mixed up. Q2 is a BC549 NPN transistor, while Q3 is a BC559 PNP type. Fig.7: this scope shot shows the output voltage waveform at 450mA. The device is switching continuously and so the frequency is much higher. There is evidence of occasional burst-mode operation, as can be seen near the centre of the trace. If their leads are too close to fit through the holes, bend them outwards near the body of the transistor using small pliers, then back down again. The PC-mount USB socket (CON2) is next on the list. Be sure to press it down firmly so that it sits flush against the board, then solder its two metal tabs to secure it in place. That done, solder the four pins, taking care to avoid bridging them. Trimpot VR1 and the three MKT capacitors can now go in, followed by the four tantalum capacitors, inductor L1 (this can go in either way around) and the screw terminal block (CON1). Push the terminal block down firmly onto the board and make sure its entry holes face outwards before soldering its pins. Be careful also with the orientation of the tantalum capacitors. A “+” will be printed on the case above the positive lead – just line it up with the “+” sign on the board overlay. Vibration proofing If the unit is to be used in a vehicle, it’s a good idea to apply some silicone sealant around the base of each tantalum capacitor and TO-92 transistor. The idea is to glue them to the PC board so that they can’t vibrate and break their leads. Be sure to use neutral-cure silicone Recharging Apple USB Devices +5V +5V +5V 27k 22k 2.5V D– 2.0V 22k D+ Vcc USB TYPE A SOCKET GND 16k ~3.3V 1 2 3 4 0V 18k 0V Fig.8: the data pin biasing arrangement for iPOD NANO 2nd generation players. Some USB devices require their D+ and D- pins to be biased for charging to occur. These devices include the iPOD NANO 1st generation and 2nd generation music 72  Silicon Chip 30k D– D+ Vcc GND USB TYPE A SOCKET 2.8V 1 2 3 4 D– 2.0V 47k 10k 0V 33k 33k D+ Vcc USB TYPE A SOCKET GND 1 2 3 4 22k 0V Fig.9: the biasing arrangement for iPOD NANO 1st generation players and 5th generation iPOD video. Fig.10: the biasing arrangement for the iPhone 3G and iPOD Touch 2nd generation player. players, the 5th Generation iPOD video, the iPhone 3G and the iPOD Touch 2nd generation player. This biasing can be achieved using resistors, as shown in the accompanying diagrams. All resistors are 0.25W and they can be installed by adding them to the copper side of the PC board. siliconchip.com.au sealant (ie, the stuff without acetic acid). Set-up & testing Before soldering in the IC, it’s a good idea to adjust the pre-regulator voltage. To do this, connect a power supply which can provide somewhere between 14-30V to the input terminal block, with an ammeter in series. It’s best to start at the lower end of that voltage range. Turn on the supply and check the current. It should be less than 1mA. If it is more than 1mA, then something is wrong – turn it off and check for assembly errors. Now check the voltage between pads 8 & 4 for IC1. It should be in the range of 12-14V. Adjust trimpot VR1 until it reads 13V (or just under). If you want to be extra cautious, you can set it to 12.5V for a slight loss in efficiency. Once the reading is correct, disconnect the power and install the IC to the PC board. Make sure it goes in the right way around! Now power the board using a 9-16V supply and check the output voltage. The easiest way to do this is to check the voltage across pin header CON3. The output should be very close to 5.0V, or if you have changed the output divider, your target voltage. It will be moving up and down slightly due to the burst mode regulation but should not vary by more 0.2V. If it is not being properly regulated to 5V, disconnect the power and check for faults. It’s possible that the output voltage could be below 4.85V, due to a combination of the tolerance of the voltage feedback divider resistors and the tolerance of the LTC1174’s internal reference voltage. If this is a case, replace the 330kΩ feedback resistor with a 360kΩ resistor. This will increase the output voltage by 6.8%, ensuring that it never drops below the minimum USB supply limit of 4.75V. Conversely, if the output is above 5.2V, replace the 330kΩ feedback resistor with a 300kΩ resistor, to reduce the output voltage by 6.8%. However, in most cases, the output will be within 50mV of the programmed voltage with the recommended 330kΩ resistor. Installation If you are going to install the board siliconchip.com.au The PC board snaps into the side channels of a standard UB5 plastic case. A blob of hot-melt glue can be used to stop the grommet for the input leads from working loose. Fig.11: this shows the output voltage during standby operation. Note the low frequency of operation due to the long sleep time and burst mode. in a UB5 box, you will first need to make a cut-out for the USB socket. Fig.5 shows the cutting details and this diagram can be copied and used as a template. You will also have to drill a hole in one end of the box to accept a grommet for the input leads or connector. After that, the board should simply snap into place. It’s best to introduce the side with the USB socket first and then gently push the board into place. Alternatively, as previously stated, you can mount the board in the case of your choice and secure it on threaded standoffs using M3 x 6mm machine screws. A 500mA in-line fuse on the input side is a good idea, although the IC’s current limiting should normally protect the power supply. As a final check, once the supply is wired up, it’s a good idea to use a multimeter to measure the voltage at the USB socket before attaching any devices. There are four pins in the USB socket – touch the multimeter probes to the two outer pins, being careful to avoid shorting them to adjacent pins or the surround. If the multimeter reads close to 5.0V (or your target voltage), then it’s working properly. That’s it! If you are using the USB Charger to power USB devices in a vehicle, don’t forget to unplug them when they are not in use, or you could still flatten the battery. Alternatively, if you power the device via the cigarette lighter socket, it will be automatically switched off when the ignition is switched off. SC May 2010  73