Silicon ChipUSB Power Injector For External Hard Drives - June 2008 SILICON CHIP
  1. Outer Front Cover
  2. Contents
  3. Publisher's Letter: New Zealanders can legally do their own wiring - why can't Australians?
  4. Feature: DIY Electrical Work: Are Aussies Dumber Than Kiwis? by Ross Tester
  5. Feature: A Look At Crash Test Dummies by Peter Holtham
  6. Project: DSP Musicolour Light Show by Mauro Grassi
  7. Project: PIC-Based Flexitimer Mk.4 by Jim Rowe
  8. Project: USB Power Injector For External Hard Drives by Greg Swain
  9. Project: Balanced/Unbalanced Converter For Audio Signals by John Clarke
  10. Review: Altitude 3500-SS Stereo Valve Amplifier by Leo Simpson
  11. Project: A Quick’n’Easy Digital Slide Scanner by Brian Coulson
  12. Vintage Radio: The Pye TRP-1 portable HF transceiver by Rodney Champness
  13. Book Store
  14. Advertising Index
  15. Outer Back Cover

This is only a preview of the June 2008 issue of Silicon Chip.

You can view 34 of the 104 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 "DSP Musicolour Light Show":
  • dsPIC30F4011-30I/P programmed for the DSP Musicolour [1010708A.HEX] (Programmed Microcontroller, AUD $20.00)
  • dsPIC30F4011 firmware and source code for the DSP Musicolour [1010708A.HEX] (Software, Free)
  • DSP Musicolour User Manual (PDF download) (Software, Free)
  • DSP Musicolour Infrared Remote Control PCB pattern (PDF download) [10107083] (Free)
  • DSP Musicolour main PCB pattern (PDF download) [10107081] (Free)
  • DSP Musicolour display PCB pattern (PDF download) [10107082] (Free)
  • DSP Musicolour front & rear panel artwork (PDF download) (Free)
Articles in this series:
  • DSP Musicolour Light Show (June 2008)
  • DSP Musicolour Light Show (June 2008)
  • DSP Musicolour Light Show; Pt.2 (July 2008)
  • DSP Musicolour Light Show; Pt.2 (July 2008)
  • DSP Musicolour Light Show; Pt.3 (August 2008)
  • DSP Musicolour Light Show; Pt.3 (August 2008)
  • DSP Musicolour Light Show; Pt.4 (September 2008)
  • DSP Musicolour Light Show; Pt.4 (September 2008)
Items relevant to "USB Power Injector For External Hard Drives":
  • USB Power Injector PCB [07110041] (AUD $5.00)
  • USB Power Injector PCB pattern (PDF download) [07110041] (Free)
  • USB Power Injector front panel artwork (PDF download) (Free)
Items relevant to "Balanced/Unbalanced Converter For Audio Signals":
  • Balanced/Unbalanced Converter PCB [01106081] (AUD $5.00)
  • Unbalanced to Balanced Converter PCB pattern (PDF download) [01106082] (Free)
  • Balanced-Unbalanced Converter PCB pattern (PDF download) [01106081] (Free)

Purchase a printed copy of this issue for $10.00.

By Greg Swain USB power injector for external hard drives A portable USB hard drive is a great way to back up data but what if your USB ports are unable to supply enough “juice” to power the drive? A modified version of the SILICON CHIP USB Power Injector is the answer. F OR SOME TIME NOW, the author has used a portable USB hard drive to back up data at work. As with most such drives, it is powered directly from the USB port, so it doesn’t require an external plugpack supply. POWER ONLY DATA + POWER An external USB hard drive is usually powered by plugging two connectors at one end of a special USB cable into adjacent USB ports on the computer. This allows power to be sourced from both ports. 58  Silicon Chip In fact, the device is powered from two USB ports, since one port is incapable of supplying sufficient current. That’s done using a special USB cable that’s supplied with the drive. It has two connectors fitted to one end, forming what is basically a “Y” configuration (see photo). One connector is wired for both power and data while the other connector has just the power supply connections. In use, the two connectors are plugged into adjacent USB ports, so that power for the drive is simultaneously sourced from both ports. According to the USB specification, USB ports are rated to supply up to 500mA at 5V DC, so two connected in parallel should be quite capable of powering a portable USB hard drive – at least in theory. Unfortunately, in my case, it didn’t quite work out that way. Although the USB drive worked fine with several work computers, it was a “no-go” on my home machine. Instead, when it was plugged into the front-panel USB ports, the drive repeatedly emitted a distinctive chirping sound as it unsuccessfully tried to spin up. During this process, Windows XP did recognise that a device had been plugged in but that’s as far as it went – it couldn’t identify the device and certainly didn’t recognise the drive. Plugging the drive into the rearpanel ports gave exactly the same result. The problem wasn’t just confined to this particular drive either. A newly-acquired Maxtor OneTouch4 Mini drive also failed to power up correctly on my home computer, despite working perfectly on several work computers. That clearly indicated that the fault lay in my home computer. However, the USB ports on this machine worked fine with my WiFi transmitter, a printer and various flash drives, so what was the problem? From the symptoms, it was apparent that the USB ports on my home machine were incapable of supplying sufficient current to power USB hard drives, even though the computer is siliconchip.com.au D5 1N4004 K Q2 IRF9540 D2 1N5819 CON3 A 6V DC INPUT K S 1000 µF 16V REG1 LM2940CT-5 D OUT IN LED GND G 10k A K 22 µF 16V 10 µF A 820Ω 22k CON1 USB SKT TYPE B 10k 1 Vbus 4 GND USB IN FROM PC SC 2004 B 2 D– 3 D+ C A Q1 PN100 λ E K LED1 USB POWER CON2 USB SKT TYPE A 2 3 LM2940CT-5 USB POWER INJECTOR REV USB OUT TO PERIPHERAL 4 D 1N5819 IN GND IRF9540 1 G OUT D S A K Fig.1: the revised USB Power Injector is essentially a switch and a 5V regulator. The Vbus supply from USB socket CON1 turns on transistor Q1 which then turns on power Mosfet Q2. This then feeds a 6V DC regulated supply from an external plugpack to regulator REG1 which in turn supplies 5V to USB socket CON2. only about three years old and uses a well-known brand of motherboard. For some reason, its USB ports were below specification, so it was necessary to find another way to power my USB hard drives. USB power injector A powered USB hub would be one way of tackling this problem. However, without knowing the hub’s output current specifications, there was no guarantee that this would work. Another option was to use the “USB Power Injector” described by Jim Rowe in the October 2004 issue of SILICON CHIP. This device is powered from an external plugpack and is designed to connect in series between the PC’s USB port and the peripheral. In practice, the device is connected via two onboard USB sockets. When it detects 5V DC coming from the PC’s USB port (or from a hub), it switches power from the plugpack through to a 5V regulator which then powers the peripheral. So the peripheral is no longer powered directly from the PC’s USB port but by the injector instead. Conversely, the data (D+ & D-) and ground connections are run straight though from the input USB socket siliconchip.com.au to the output socket. Only the Vbus line is broken to switch the regulator on and off, with the regulator providing the new 5V Vbus line. This seemed to be the way to go so a USB Power Injector kit was obtained from Altronics and assembled. This was teamed with a 9V AC 1A plugpack and it worked. Once connected, the injector could successfully power either USB drive and they could now be used with my home computer. Note that only the USB plug with both the power and data connections at the “Y-connector” end of the cable is connected to the USB Power Injector. The connector with just the supply connections is left disconnected. How do you know which connector is which? Well, sometimes, the connectors are labelled. If not, then the straight-through connector is invariably the one with both the power and data connections. Alternatively, you can dispense with the “Y-cable” and use a conventional single-ended cable to connect the drive to the USB Power Injector. It gets too hot Unfortunately, that wasn’t the end USB hard drives like this Maxtor OneTouch4 Mini typically draw between 350mA and 750mA. Used with a 6V regulated DC plugpack, the modified USB Power Injector is ideal for powering this type of drive if your PC’s USB ports aren’t up to the task. of the story. Although, this arrangement worked, the 5V regulator on the USB Power Injector board quickly became much too hot for comfort whenever power was applied. In fact, it was getting so hot that there was a June 2008  59 REGULATED 6V DC INPUT 1N5819 CON3 LINK 1000 µF 16V R E W OP B S U R OT CEJ NI 4 1 – REG1 LM2940 CT-5 10k 22k CON1 USB IN 2 D2 + 3 CON2 10k USB OUT 1 + D5 4002 © Q1 PN100 3 2 22 µF 14001170 Q2 IRF9540 4 820Ω 1N4004 LED1 A + 10 µF Fig.2: follow this parts layout diagram and the photo at right to assemble the PC board. Don’t get Q2 and REG1 mixed up – they look the same! danger that its inbuilt thermal overload protection circuitry would shut the device down. It’s not hard to figure out why. After rectification and filtering, a 9V AC plugpack delivers about 13V DC to the input of the regulator (REG1) which means that there is about 8V across it. In addition, a quick check of the Maxtor drive revealed that it draws between about 350mA and 750mA or more, depending on the amount of disk activity. In fact, these figures were measured on a DMM, so the peak current draw is probably in excess of 800mA (eg, when the disk is copying large files). Assuming an average current of 500mA (0.5A), this meant that the regulator was dissipating around 4W (ie, 8V x 0.5A = 4W). No wonder it was getting hot! Substituting a regulated 9V DC plugpack is not the answer either. Although this drops the voltage on the regulator’s input to about 7.7V (after allowing for the two diode drops in the bridge rectifier), the regulator still dissipates 2.7V x 0.5A = 1.35W. That’s much better than 4W of course but the regulator isn’t fitted with a heatsink and still gets much too hot. So, as it stood, the USB Power Injector was not really up to the job of powering an external USB drive over any length of time – especially as these drives can draw 750mA or more. In fact, the original project was not designed to supply that sort of current and so was never intended for this particular task. Keeping it cool OK, that’s the bad news. The good news is that it’s easy to make a few simple changes to the USB Power Injector so that it can supply the extra current while keeping its cool. The trick is to get the dissipation in the regulator right down. We did that by making the following changes: (1) Using a 6V DC 2.2A regulated plugpack instead of a 9V plugpack (we used a switchmode design from Jaycar, Cat. MP-3482); (2) Removing the bridge rectifier and substituting a 1N5819 Schottky diode (a 1N4004 would drop too much voltage); and Choosing A Regulated Plugpack Supply To keep the dissipation in the regulator to a minimum, it’s important to use a 6V DC regulated plugpack. If you intend powering a USB hard drive, then we recommend the Jaycar MP-3482 plugpack which is rated at 2.2A, although any other 6V DC regulated plugpack rated at 1A or more would also be suitable. For devices which draw less than say 600mA maximum, then the Jaycar MP-3145 which is rated at 800mA could be used. However, it will be marginal at best for use with USB hard drives which have peak currents of 800mA or more. 60  Silicon Chip (3) Replacing the 7805 with an LM2940CT-5 low-dropout regulator and increasing the 100nF ouput capacitor to 22mF to ensure stability. In practice, the 6V plugpack we used has an output of about 6.1V. The Schottky diode drops this by about 0.4V, while the drop across the switching Mosfet in series with the regulator is negligible at about 0.05V (for 500mA). That leaves about 5.65V at the input to the regulator which now dissipates just 0.65 x 0.5 = 0.325W (or 325mW). That’s easily handled by the regulator’s metal tab and by the earth pattern at the back of the PC board which provides a modest amount of heatsinking. In practice, the regulator now runs only slightly warm to the touch when powering a USB hard drive. Circuit details Fig.1 shows the revised circuit of the USB Power Injector. As can be seen, power from the 6V regulated DC plugpack is applied via Schottky diode D2. This diode serves two purposes: (1) it provides reverse polarity protection; and (2) as indicated above, it drops the plugpack voltage by 400mV to reduce the dissipation in the regulator (REG1). A 1000mF electrolytic capacitor is used to filter the resulting 5.6V supply rail which is then applied to the source of power Mosfet Q2. CON1 is a USB “Type B” socket and this is used as the input port on the injector. This is connected to a USB port on the PC (or a hub) via a standard “Type A” to “Type B” USB cable. As shown, its two data lines (D+ & D-) are fed straight through to CON2, a “Type A” USB socket which is used as the siliconchip.com.au The PC board is mounted inside the case on four M3 x 9mm tapped spacers and secured using machine screws. Note how the 1000µF electrolytic capacitor is mounted. output port. Similarly, CON1’s ground pin (pin 4) is connected straight through to CON2’s ground pin. CON2 connects to the USB peripheral (eg, a hard drive) via another standard USB cable. As a result, USB data can pass straight through the injector (ie, between the PC and the peripheral) in either direction. The +5V (Vbus) line from CON1 is not fed through to CON2, however. Instead, it’s used to control transistor Q1. As shown, the Vbus line drives Q1’s base via a 22kW resistor. When the input cable is disconnected, Q1’s base is held low via a 10kW resistor. As a result, Q1 is off and so Mosfet Q2 is also off and no power flows through to regulator REG1. Conversely, when the input cable is connected (and the PC is on), +5V appears on pin 1 of CON1 and this turns transistor Q1 on. This pulls Q2’s gate low and so Q2 now switches on and feeds the voltage at the output of D2 through to low-dropout voltage regulator REG1. REG1 is turn provides a nominal +5V output to pin 1 of CON2 to power the external USB device. Note that when Q2 turns on, it becomes a very low resistance – somewhere around 0.1W. As a result, the voltage across it for a current drain of 500mA is just .05V. In addition, when Q2 turns on, LED1 also turns on to indicate that power is present at USB output socket (CON2). An 820W resistor is series with LED1 limits the LED’s current to around 7mA. Diode D5 protects regulator REG1 siliconchip.com.au from reverse voltage damage when the power is turned off (it’s probably not needed with the LM2940CT-5 but was included in the original circuit). The 10mF and 22mF capacitors provide additional filtering to ensure stable operation of REG1. Construction The PC board used is the same as for the previous version. It is coded 07110041 and measures 76 x 41mm. Fig.2 shows the parts layout. Note that the 1N5819 Schottky diode is fitted to the D2 position (instead of the 1N4004 previously used there), while diode D3 is replaced by a wire link. The other two diodes previously used in the bridge rectifier, D1 & D4, are left out of circuit. Begin the assembly by installing the resistors and diodes (D2 & D5). Check the value of each resistor using a DMM before soldering it into place and take care to ensure that the 1N5819 diode goes in the D2 position. Take care also with the diode polarity. Next, install the three capacitors. Note that the 1000mF electrolytic is mounted on its side, with its leads bent down through 90° to go through the board holes. All capacitors must be fitted with the correct polarity. Transistors Q1 & Q2 can go in next. Q1 is straightforward – just push it down onto the board as far as it will comfortably go and check its orientation before soldering its leads. Q2 is mounted with its metal tab flat against the board. First, bend its leads down by 90° about 5mm from its body, then fit it to the board and secure its Parts List 1 PC board, code 07110041, 76 x 46mm 1 UB-5 plastic utility box, 83 x 54 x 31mm 1 PC-mount type B USB socket, (CON1) 1 PC-mount type A USB socket, (CON2) 1 PC-mount 2.5mm DC socket (CON3) 4 M3 x 9mm tapped spacers 6 M3 x 6mm machine screws 4 M3 x 6mm machine screws, countersink head 2 M3 lock washers 1 50mm-length 0.7mm tinned copper wire (for link) Semiconductors 1 LM2940CT-5 5V regulator (REG1) 1 PN100 NPN transistor (Q1) 1 IRF9540 P-channel Mosfet (Q2) 1 3mm green LED (LED1) 1 1N5819 Schottky diode (D2) 1 1N4004 diode (D5) Capacitors 1 1000µF 16V PC electrolytic 1 22µF 16V PC electrolytic 1 10µF 25V tantalum Resistors (0.25W 1%) 1 22kΩ 1 820Ω 2 10kΩ tab using an M3 x 6mm machine screw, nut and washer. Q2’s leads can then be soldered and trimmed. Note: don’t solder Q2’s leads before June 2008  61 at right angles about 4mm above the board. This is done so that it will later protrude through the end of the case. The PC board assembly can now be completed by fitting connectors CON1-CON3. Make sure that these all sit flush against the PC board before soldering their leads. Final assembly The assembly is housed in a standard UB5-size plastic utility box. This box requires rectangular cutouts at either end to provide access to the two USB connectors (CON1 & CON2), plus a 3mm hole in the end next to CON2 to allow LED1 to protrude. A 9mm hole must also be drilled in one side of the box to provide access to the DC power socket (CON3). And finally, four holes are drilled in the base to mount the PC board. These holes are countersunk from the outside of the case, to accept countersink-head machine screws. Fig.3 shows the drilling details. Note that the sections in this diagram are all full-scale and can be used as drilling templates. Once the holes have been drilled, attach four M3 x 9mm tapped spacers to the PC board, then secure the assembly inside the box using four M3 x 6mm countersink screws. Checkout time Fig.3: this full-size diagram shows the drilling and cutout details for the plastic case that’s used to house the board assembly. USB OUT SILICON CHIP USB +Vbus PC USB PORT 6V DC INPUT Fig.4: this front panel label can be cut out and attached to the lid of the case. It can be protected using wide strips of clear adhesive tape. USB POWER INJECTOR securing its tab. If you do, you risk cracking the PC board tracks as the mounting screw is tightened. Regulator REG1 is mounted in exactly the same manner as Q2. As 62  Silicon Chip before, be sure to secure its metal tab before soldering the leads. LED1 is next on the list. It’s soldered in place with its body about 11mm above the PC board, after which it is bent down The unit can now be checked for correct operation. To do this, apply power from a 6V DC regulated plugpack and check that LED1 lights when you connect CON1 to your PC’s USB port. The LED should go off again if the cable to CON1 is disconnected. Next, check the voltage on the OUT pin of the regulator. This will probably be around 5.2-5.3V unloaded but should be very close to 5V if a load (eg, a USB hard drive) is connected. The USB specification is for a voltage in the range of 4.75-5.25V, so make sure it is in this range. The unit is now ready to power your USB hard drive or other peripheral. All that remains is to fit the lid and attach the front-panel label (Fig.4). Full-size artworks for the label and the PC board can be downloaded from the SILICON CHIP website. Finally, be sure to leave the poweronly connector on the cable to the hard drive disconnected when using the USB Power Injector. Do not plug it into a USB port on your comSC puter. siliconchip.com.au