Silicon ChipUSB Port Protector – just in case! - May 2018 SILICON CHIP
  1. Outer Front Cover
  2. Contents
  3. Publisher's Letter: Trusting our lives to computers / A different approach to project construction
  4. Feature: Drone Air Taxis – Autonomous, Pilotless and Soon! by Dr David Maddison
  5. Feature: Tiny capsule measures, radios your gut gas data by Ross Tester
  6. Project: 800W (+) Uninterruptible Power Supply (UPS) by Duraid Madina and Tim Blythman
  7. Project: Multi-use Frequency Switch by John Clarke
  8. PartShop
  9. Feature: LTspice Simulation: Analysing/Optimising Audio Circuits by Nicholas Vinen
  10. Project: USB Port Protector – just in case! by Nicholas Vinen
  11. Serviceman's Log: The Serviceman's Curse by Dave Thompson
  12. Project: 12V Battery Balancer by Nicholas Vinen
  13. Feature: El Cheapo Modules 16: 35-4400MHz frequency generator by Jim Rowe
  14. Product Showcase
  15. Vintage Radio: Zenith Royal 500 "Owl Eye" AM Radio by Dr Hugo Holden
  16. PartShop
  17. Subscriptions
  18. Market Centre
  19. Advertising Index
  20. Notes & Errata: Majestic Speakers / Battery-Pack Cell Balancer / WiFi Water Tank Level Meter / 6-Element VHF TV Yagi Antenna / AM Radio Transmitter / The Clayton’s “GPS” Time Signal Generator
  21. Outer Back Cover: Hare & Forbes Machineryhouse

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

You can view 35 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 "800W (+) Uninterruptible Power Supply (UPS)":
  • 800W+ Uninterruptible Power Supply control shield PCB [11106181] (AUD $5.00)
  • Arduino Sketches (.ino) and library for the 800W+ Uninterruptable Power Supply (Software, Free)
  • 800W+ Uninterruptible Power Supply control shield PCB pattern (PDF download) [11106181] (Free)
  • 800W+ Uninterruptible Power Supply front panel artwork (PDF download) (Free)
Articles in this series:
  • 800W (+) Uninterruptible Power Supply (UPS) (May 2018)
  • 800W (+) Uninterruptible Power Supply (UPS) (May 2018)
  • 800W (+) Uninterruptible Power Supply (UPS) Part II (June 2018)
  • 800W (+) Uninterruptible Power Supply (UPS) Part II (June 2018)
  • 800W (+) Uninterruptible Power Supply (UPS) Part III (July 2018)
  • 800W (+) Uninterruptible Power Supply (UPS) Part III (July 2018)
Items relevant to "Multi-use Frequency Switch":
  • Deluxe Frequency Switch PCB [05104181] (AUD $7.50)
  • PIC16F88-I/P programmed for the Deluxe Frequency Switch [0510418A.HEX] (Programmed Microcontroller, AUD $15.00)
  • Firmware (HEX and ASM) files for the Deluxe Frequency Switch [0510418A.HEX] (Software, Free)
  • Deluxe Frequency Switch PCB pattern (PDF download) [05104181] (Free)
Items relevant to "LTspice Simulation: Analysing/Optimising Audio Circuits":
  • Software for the LTspice Tutorial, Part 4 (Free)
Articles in this series:
  • LTspice – simulating and circuit testing, Part 1 (June 2017)
  • LTspice – simulating and circuit testing, Part 1 (June 2017)
  • LTspice Part 2: Simulating and Testing Circuits (August 2017)
  • LTspice Part 2: Simulating and Testing Circuits (August 2017)
  • LTspice Tutorial Part 3: Modelling an NTC Thermistor (September 2017)
  • LTspice Tutorial Part 3: Modelling an NTC Thermistor (September 2017)
  • LTspice Simulation: Analysing/Optimising Audio Circuits (May 2018)
  • LTspice Simulation: Analysing/Optimising Audio Circuits (May 2018)
Items relevant to "USB Port Protector – just in case!":
  • USB Port Protector PCB [07105181] (AUD $2.50)
  • Complete kit for the USB Port Protector (Component, AUD $20.00)
  • USB Port Protector PCB pattern (PDF download) [07105181] (Free)
Items relevant to "12V Battery Balancer":
  • 2 x 12V Battery Balancer PCB [14106181] (AUD $2.50)
  • 12V Battery Balancer PCB pattern (PDF download) [14106181] (Free)
Items relevant to "El Cheapo Modules 16: 35-4400MHz frequency generator":
  • Software for El Cheapo Modules: ADF4351 (Free)
Articles in this series:
  • El Cheapo Modules From Asia - Part 1 (October 2016)
  • El Cheapo Modules From Asia - Part 1 (October 2016)
  • El Cheapo Modules From Asia - Part 2 (December 2016)
  • El Cheapo Modules From Asia - Part 2 (December 2016)
  • El Cheapo Modules From Asia - Part 3 (January 2017)
  • El Cheapo Modules From Asia - Part 3 (January 2017)
  • El Cheapo Modules from Asia - Part 4 (February 2017)
  • El Cheapo Modules from Asia - Part 4 (February 2017)
  • El Cheapo Modules, Part 5: LCD module with I²C (March 2017)
  • El Cheapo Modules, Part 5: LCD module with I²C (March 2017)
  • El Cheapo Modules, Part 6: Direct Digital Synthesiser (April 2017)
  • El Cheapo Modules, Part 6: Direct Digital Synthesiser (April 2017)
  • El Cheapo Modules, Part 7: LED Matrix displays (June 2017)
  • El Cheapo Modules, Part 7: LED Matrix displays (June 2017)
  • El Cheapo Modules: Li-ion & LiPo Chargers (August 2017)
  • El Cheapo Modules: Li-ion & LiPo Chargers (August 2017)
  • El Cheapo modules Part 9: AD9850 DDS module (September 2017)
  • El Cheapo modules Part 9: AD9850 DDS module (September 2017)
  • El Cheapo Modules Part 10: GPS receivers (October 2017)
  • El Cheapo Modules Part 10: GPS receivers (October 2017)
  • El Cheapo Modules 11: Pressure/Temperature Sensors (December 2017)
  • El Cheapo Modules 11: Pressure/Temperature Sensors (December 2017)
  • El Cheapo Modules 12: 2.4GHz Wireless Data Modules (January 2018)
  • El Cheapo Modules 12: 2.4GHz Wireless Data Modules (January 2018)
  • El Cheapo Modules 13: sensing motion and moisture (February 2018)
  • El Cheapo Modules 13: sensing motion and moisture (February 2018)
  • El Cheapo Modules 14: Logarithmic RF Detector (March 2018)
  • El Cheapo Modules 14: Logarithmic RF Detector (March 2018)
  • El Cheapo Modules 16: 35-4400MHz frequency generator (May 2018)
  • El Cheapo Modules 16: 35-4400MHz frequency generator (May 2018)
  • El Cheapo Modules 17: 4GHz digital attenuator (June 2018)
  • El Cheapo Modules 17: 4GHz digital attenuator (June 2018)
  • El Cheapo: 500MHz frequency counter and preamp (July 2018)
  • El Cheapo: 500MHz frequency counter and preamp (July 2018)
  • El Cheapo modules Part 19 – Arduino NFC Shield (September 2018)
  • El Cheapo modules Part 19 – Arduino NFC Shield (September 2018)
  • El cheapo modules, part 20: two tiny compass modules (November 2018)
  • El cheapo modules, part 20: two tiny compass modules (November 2018)
  • El cheapo modules, part 21: stamp-sized audio player (December 2018)
  • El cheapo modules, part 21: stamp-sized audio player (December 2018)
  • El Cheapo Modules 22: Stepper Motor Drivers (February 2019)
  • El Cheapo Modules 22: Stepper Motor Drivers (February 2019)
  • El Cheapo Modules 23: Galvanic Skin Response (March 2019)
  • El Cheapo Modules 23: Galvanic Skin Response (March 2019)
  • El Cheapo Modules: Class D amplifier modules (May 2019)
  • El Cheapo Modules: Class D amplifier modules (May 2019)
  • El Cheapo Modules: Long Range (LoRa) Transceivers (June 2019)
  • El Cheapo Modules: Long Range (LoRa) Transceivers (June 2019)
  • El Cheapo Modules: AD584 Precision Voltage References (July 2019)
  • El Cheapo Modules: AD584 Precision Voltage References (July 2019)
  • Three I-O Expanders to give you more control! (November 2019)
  • Three I-O Expanders to give you more control! (November 2019)
  • El Cheapo modules: “Intelligent” 8x8 RGB LED Matrix (January 2020)
  • El Cheapo modules: “Intelligent” 8x8 RGB LED Matrix (January 2020)
  • El Cheapo modules: 8-channel USB Logic Analyser (February 2020)
  • El Cheapo modules: 8-channel USB Logic Analyser (February 2020)
  • New w-i-d-e-b-a-n-d RTL-SDR modules (May 2020)
  • New w-i-d-e-b-a-n-d RTL-SDR modules (May 2020)
  • New w-i-d-e-b-a-n-d RTL-SDR modules, Part 2 (June 2020)
  • New w-i-d-e-b-a-n-d RTL-SDR modules, Part 2 (June 2020)
  • El Cheapo Modules: Mini Digital Volt/Amp Panel Meters (December 2020)
  • El Cheapo Modules: Mini Digital Volt/Amp Panel Meters (December 2020)
  • El Cheapo Modules: Mini Digital AC Panel Meters (January 2021)
  • El Cheapo Modules: Mini Digital AC Panel Meters (January 2021)
  • El Cheapo Modules: LCR-T4 Digital Multi-Tester (February 2021)
  • El Cheapo Modules: LCR-T4 Digital Multi-Tester (February 2021)
  • El Cheapo Modules: USB-PD chargers (July 2021)
  • El Cheapo Modules: USB-PD chargers (July 2021)
  • El Cheapo Modules: USB-PD Triggers (August 2021)
  • El Cheapo Modules: USB-PD Triggers (August 2021)
  • El Cheapo Modules: 3.8GHz Digital Attenuator (October 2021)
  • El Cheapo Modules: 3.8GHz Digital Attenuator (October 2021)
  • El Cheapo Modules: 6GHz Digital Attenuator (November 2021)
  • El Cheapo Modules: 6GHz Digital Attenuator (November 2021)
  • El Cheapo Modules: 35MHz-4.4GHz Signal Generator (December 2021)
  • El Cheapo Modules: 35MHz-4.4GHz Signal Generator (December 2021)
  • El Cheapo Modules: LTDZ Spectrum Analyser (January 2022)
  • El Cheapo Modules: LTDZ Spectrum Analyser (January 2022)
  • Low-noise HF-UHF Amplifiers (February 2022)
  • Low-noise HF-UHF Amplifiers (February 2022)
  • A Gesture Recognition Module (March 2022)
  • A Gesture Recognition Module (March 2022)
  • Air Quality Sensors (May 2022)
  • Air Quality Sensors (May 2022)
  • MOS Air Quality Sensors (June 2022)
  • MOS Air Quality Sensors (June 2022)
  • PAS CO2 Air Quality Sensor (July 2022)
  • PAS CO2 Air Quality Sensor (July 2022)
  • Particulate Matter (PM) Sensors (November 2022)
  • Particulate Matter (PM) Sensors (November 2022)
  • Heart Rate Sensor Module (February 2023)
  • Heart Rate Sensor Module (February 2023)
  • UVM-30A UV Light Sensor (May 2023)
  • UVM-30A UV Light Sensor (May 2023)
  • VL6180X Rangefinding Module (July 2023)
  • VL6180X Rangefinding Module (July 2023)
  • pH Meter Module (September 2023)
  • pH Meter Module (September 2023)
  • 1.3in Monochrome OLED Display (October 2023)
  • 1.3in Monochrome OLED Display (October 2023)
  • 16-bit precision 4-input ADC (November 2023)
  • 16-bit precision 4-input ADC (November 2023)
  • 1-24V USB Power Supply (October 2024)
  • 1-24V USB Power Supply (October 2024)
  • 14-segment, 4-digit LED Display Modules (November 2024)
  • 0.91-inch OLED Screen (November 2024)
  • 0.91-inch OLED Screen (November 2024)
  • 14-segment, 4-digit LED Display Modules (November 2024)
  • The Quason VL6180X laser rangefinder module (January 2025)
  • TCS230 Colour Sensor (January 2025)
  • The Quason VL6180X laser rangefinder module (January 2025)
  • TCS230 Colour Sensor (January 2025)
  • Using Electronic Modules: 1-24V Adjustable USB Power Supply (February 2025)
  • Using Electronic Modules: 1-24V Adjustable USB Power Supply (February 2025)

Purchase a printed copy of this issue for $10.00.

Don’t let one small “oops” fry your computer – and cost you $$$$! USB PORT PROTECTOR by Nicholas Vinen Using your PC or laptop to power a 5V project that you’re working on is very convenient – but it’s so easy to make a small slip while plugging something into a breadboard and oops! That’s exactly what happened to one of our staff members. For a while after the incident, it looked like his (own!) laptop was toast. But fortunately he was able to safely reset it and it came back to life. But he was SO lucky! Next time he’ll definitely be using this simple, economic device . . . W e won’t name the hapless person who thought he’d cooked his laptop. To avoid embarrassment, we’ll simply refer to him as A.P. (ie, Accident Prone). This is one of those projects we know will be useful because A.P. kept asking “is it finished yet” as he obviously needed it! That incident obviously spooked him and why wouldn’t it? He could have lost a lot of work and spent quite a bit of money and time on buying a new computer and then setting it up, which could have taken several days. We do a lot of development work, increasingly with Arduinos and similar microcontroller modules. We also do quite a bit of bread-boarding, often in combination with the Arduinos. When you’re doing this kind of work and you have external power supplies or voltage sources connected to your siliconchip.com.au circuit, that’s just asking for trouble. You may not realise it but when an Arduino board (or similar) is plugged into your computer’s USB port, you’re just one slip away from potential disaster. For example, say you’re running the Arduino from a 12V plugpack, because it’s driving some 12V relays or a motor or whatever. So there’s a source of 12V right near a bunch of other connections on the Arduino board, just looking for an excuse to find its way onto the USB 5V rail and into your computer. One slip, and oops! It could blow up the Arduino, your shield(s), and even your computer. Not only will this USB port protector vastly improve the chances of your computer surviving such an event, it may also prevent damage to the Arduino board and whatever Celebrating 30 Years May 2018  57 Fig.1: the circuit diagram of the USB Port Protector. Diode D3, zener TVS1 and transistor Q1 are all connected between VCC and GND and shunt current when an excessive voltage is applied, while polyswitch PTC1 and fuse F1 prevent large currents from flowing if the fault is serious. Diodes D1 & D2 and zener TVS2 protect the D+ and D- data lines. shields or other circuitry are plugged into the USB port. We can’t promise it will be 100% safe but it’s certainly a lot safer than if you aren’t using any protection... You might expect USB ports to have some kind of builtin protection against external voltages being fed in. After all, all kinds of devices can be plugged into these ports, including external hard disks and amplifiers and other gear which has its own, separate power supply. In fact, many USB ports do have some protection, such as series PTC thermistors (“polyswitches”) to limit fault currents, transient voltage suppressors and so on. But this protection varies between computers and is often absent in laptops and notebook computers. Let’s face it, there’s a lot less space inside portable computers – and manufacturers also want to keep the computer as light as possible and save money where they can. That means leaving out anything that isn’t absolutely necessary. Regardless of what sort of protection your USB port may have, this USB Port Protector is small and cheap, so why not add in an extra layer of defence? If you ever manage to activate its protection, it will have paid for its cost many times over! Circuit description The circuit of the USB Port Protector is shown in Fig.1. USB plug CON1, which plugs into your computer, is shown on the left side while the USB socket, CON2, goes to the connected device (Arduino, etc) is on the right. Just to be clear – the potential danger of overload from excessive voltages or currents comes via CON2. The ground connection and the two differential data lines, D+ and D-, are wired straight through between plug and socket (ie, CON1 and CON2) while 5V flows through fuse F1 and positive temperature coefficient thermistor PTC1. 58 Silicon Chip We’ve used both a fuse and PTC because the fuse reacts faster to very high currents, protecting the rest of the circuitry on the board if there’s a serious fault, but the PTC does not need to be replaced if it “trips” and helps the circuit to handle moderate overloads without damage. PTC1 normally has a low resistance – around 100mΩ below 1A – but if the current through it increases, its resistance rises, limiting it at around 2A (given enough time for it to heat up). This would normally only occur if the 5V line rises above 5.5V and the Port Protector is shunting current in order to prevent it rising further. In fact, the Port Protector does very little as long as the USB supply voltage is in the normal range of 0-5.25V and the D- and D+ lines are in the normal range of 0-3.3V. Green LED1 lights up to indicate power is present but that’s about it. The unit draws around 3mA in this condition. If the 5V rail is pulled negative, ie, below 0V (eg, you’ve accidentally shorted it to the output of a transformer or some other supply rail) then schottky diode D3 will conduct. This prevents VCC from going below about -0.5V. D3 is a high-current diode, capable of handling 15A continuously and 275A for around 5ms, so it makes a very effective clamp. It limits the voltage on VCC to -0.55V at 15A, so your PC is safe from damage from negative voltages on the supply line. Should the overload condition persist, either PTC1 will limit the overload current to a safe level or F1 will blow, disconnecting the compromised circuitry from your computer. Clamping positive voltages It’s even more likely that you might accidentally short the 5V rail to a higher voltage, eg, 12V from a car battery. Just think of the heavy currents which will fry anything connected to it! The Port Protector has active and passive Celebrating 30 Years siliconchip.com.au Fig.3: the fuse blow time for F1 (black) and “trip” time for PTC1 (blue) at various current levels. The relevant portion of Q1’s SOA curve from Fig.2 is plotted in red and you can see that F1 will protect Q1 for fault currents above 2A. Fig.2: safe operating area (curves) for the ECH8102 PNP transistor, used in this device as a protective shunt. The vertical red line corresponds to a shunt voltage of 5.5V and its intersection with the SOA curves shows how long the transistor is guaranteed to survive at various collector current levels. systems to handle this situation. The active system is the first line of defence. It comprises high-current PNP transistor Q1 and shunt voltage reference REF1. The 1.2kΩ/1kΩ resistive divider across the 5V supply feeds 45.45% of the supply voltage to the adjust terminal of REF1. It’s designed to sink current into its cathode terminal as soon as this adjust terminal exceeds +2.5V. So given the voltage divider, that means that it will sink current when the supply exceeds 5.5V (2.5V ÷ 45.45%). This will cause a voltage to develop across the 470Ω resistor and once that voltage exceeds around 0.7V (Q1’s baseemitter voltage), Q1 will switch on and shunt the 5V supply rail, pulling it down. In this manner, REF1 and Q1 act to limit the 5V supply rail to just over 5.5V. Q1 is capable of handling more than 10A but since there will be 5.5V between its collector and emitter, it can only do that for a very short time before it overheats. But at the same time PTC1 will rapidly heat up and increase its resistance, to limit that current. And in any case, if the current exceeds 3A, for example, the fuse will very quickly blow before Q1 is damaged. So REF1/Q1 act together as a very precise and very fast clamp. When REF1 is sinking current from Q1’s base, Q2 will also normally switch on as its base is also pulled around 0.7V below its emitter, via the 10kΩ resistor. This will light up red LED2, indicating that the clamp is operating and that you have a problem. LED2’s current is limited by its low base current and relatively fixed gain (hFE). REF1 can sink up to at least 100mA and Q1 has a current gain (hFE) in the hundreds, so Q1 is more than capable of passing its full peak current rating of 24A in this circuit. Note that LED2 may go out if there is a persistent overload, since when Q1 heats up, its base-emitter voltage will drop and it may drop low enough below Q2’s base-emitter switch-on voltage that it will no longer switch on. But chances are that PTC1 and/or F1 will have acted to limit the fault current by that stage anyway. siliconchip.com.au The only problem with the clamp provided by Q1 and REF1 is the reaction time. It takes a short time for REF1 to react to an increase in the feedback voltage and it also takes time for Q1 to switch on – around a microsecond. Passive clamping This is why we also have a transient voltage suppressor, TVS1 connected across the 5V supply rail. It’s a passive device which will react more-or-less instantly to excessive voltage. But like most zener-type devices, the difference between the voltage at which it will start to conduct current and the voltage across it when a large current is flowing is quite large. We’ve selected the most suitable device possible but it’s still not ideal. The “working voltage” for TVS1 is defined as 5V but it’s designed to pass only 1mA or so at 6.0V. The clamping voltages are specified as 9.8V at 1A and 13.5V at 42A. So clearly, we can’t rely on this device to protect the PC since it would allow quite a high voltage to be fed back in before taking effect. Hence our dual-action strategy, with TVS1 there to limit very brief, high-voltage excursions (eg, a static discharge) and also to “fill in the gaps” for the short period until Q1/REF1 are able to switch on and shunt the fault current. Protection for the signal lines We’ve also included 3V transient voltage suppressor TVS2 (take care of the metal tab on the underside of its body, as it could short out the connection when soldered) and dual schottky diodes D1 and D2 to protect against damaging voltages being fed in via the D+ and D- signal wires. This is unlikely, since these lines normally go straight to some sort of USB/serial adaptor or micro on a development board and so there aren’t many exposed components to accidentally short. But it’s still possible that a high voltage fed into your Celebrating 30 Years May 2018  59 +5V rail (or +3.3V rail, or some other supply point) could damage the USB/serial adaptor or microcontroller and allow current to flow through into the D+ and/or D- lines. So we decided that we should provide at least some protection for these lines, as well. The half of dual diodes D1/D2 that connects between ground and the signal line prevents them from being pulled too far below ground. We’re using smaller diodes here since a large diode would have too much capacitance and would interfere with USB signalling. But these diodes are still rated at 300mA continuous and 1.25A for 10ms, with a forward voltage below 1V up to several hundred milliamps. So they should provide decent protection. TVS2 has a breakdown voltage of around 3.6V at 1mA and a clamping voltage of 6.5V at 25A. So the combination of D1/D2 and TVS2 should conduct significant current away from the D+/D- lines well before their voltages reach 5V. Most USB ports would not be damaged by these voltages. We can’t put a voltage suppressor like TVS2 directly between the D+ and D- lines and ground because it would have far too much capacitance. But the series diodes between D+/D- and TVS2 have a much lower capacitance that’s effectively in series with that of TVS2, so they have virtually no effect on signalling. We tested our prototype with a “hi-speed” USB card reader and it functioned normally. Is it bulletproof? In a word, no, but if it does fail, the Port Protector is likely to fail in such a way that it still protects your computer. Parts list – USB Port Protector 1 double-sided PCB, coded 07105181, 32.5 x 19mm 1 PCB-mount USB Type A horizontal plug (CON1) 1 PCB-mount USB Type A horizontal socket (CON2) [eg, Altronics P1300] 1 SMD fuse, 3216/1206 package, 1A super fast blow [Vishay MFU1206FF01000P100] 1 SMD 1.1A PTC thermistor, 3216/1206 package [Bourns MF-NSMF110-2] 1 30mm length of 20mm diameter clear heatshrink tubing Semiconductors 1 AN431AN shunt reference IC, SOT-23 (REF1) 1 ECH8102 12A PNP transistor, ECH8 (Q1) 1 BC856 100mA PNP transistor, SOT-23 (Q2) 1 high-brightness green LED, 3216/1206 package (LED1) 1 high-brightness red LED, 3216/1206 package (LED2) 1 CDSOD323-T05S transient voltage suppressor, SOD-323 (TVS1) 1 SM2T3V3A transient voltage suppressor, DO-216AA (TVS2) 2 BAT54SFILM dual 300mA schottky diodes, SOT-23 (D1,D2) 1 15A 30V schottky diode, DO-214AB (D3; MCC SK153) Capacitors 1 100nF SMD X7R ceramic, 3216/1206 package Resistors (all SMD 3216/1206 package, 1%) 1 47kΩ (coded 4702 or 473) 1 10kΩ (coded 1002 or 103) 1 1.2kΩ (coded 122) 1 1kΩ (coded 102) 1 470Ω (coded 471) 60 Silicon Chip While our testing shows that it’s robust and can handle significant overloads without damage, if you apply just the right (worst possible) combination of voltage and current, it may be possible to blow Q1 or TVS1 before fuse F1 blows. Still, our testing suggests that the most likely outcome of a serious overload is for F1 to blow and at least it’s cheap and (relatively) easy to replace. The difficulty in designing a circuit like this to be able to withstand anything you can throw at it is that in order to effectively protect against a high current source being connected to the VCC line, it needs to absorb quite a lot of power in a brief period. And while the PTC and/or fuse should ideally cut the power to protect the other components, they may not be fast enough. Fig.2 shows the “safe operating area” (SOA) curves for transistor Q1, taken from the ECH8102 data sheet. We’ve added a vertical red line to show the typical voltage of about 5.5V across Q1 while it is conducting. While this is a high-current transistor, it is quite tiny so if a high current is applied, it will quickly overheat and might fail. As shown in Fig.2, it’s guaranteed to survive 24A at 5.5V (132W!) for somewhere between 500µs and 1ms. For longer periods, the maximum allowable current is lower; around 3A (16.5W) for 10ms, 1.5A (8.25W) for 100ms and 300mA (1.65W) continuously. Beyond this, it may survive but that isn’t guaranteed. Our testing has shown that for a single pulse, these ratings are very conservative. But it’s good practice to design a circuit to stay within these ratings. The “trip” times for PTC1 (blue) and F1 (black) are shown in Fig.3. We’ve also plotted the relevant portion of the SOA curve for Q1 in red so that you can compare them. As you can see, F1 responds considerably faster than PTC1 and in fact is very likely to blow before Q1’s SOA is exceeded for currents above 2A. For fault currents between 300mA and 2A, it’s possible that Q1 will overheat and fail before either F1 blows or PTC1 acts to limit the current. And in fact, PTC1 is not guaranteed to do anything for fault currents below 1A. You will need to notice red LED2 lighting and resolve the fault yourself. Still, as we said above, the ratings for Q1 seem to be pretty conservative and as long as the overload is limited to no more than a second or two, we would expect it to survive. Looking at Fig.2, you may wonder why we’ve bothered with the PTC at all, given that its “trip” current is higher than the fuse blow current over most of the graph. But keep in mind that PTC1 is considered to be “tripped” when it has reached a high enough resistance value to keep the fault current below 2.2A. It will still have some effect in reducing the fault current even at lower current levels and shorter time spans, because its resistance will start to increase well before it has fully tripped. And you also have the option of replacing F1 with a zeroohm resistor (or just soldering across the pads) and relying on PTC1 to limit fault currents. This does increase the risk of blowing Q1 in a serious fault (although, as we said, it’s pretty robust) but doing so would also increase the chance that the unit will survive a moderate overload unscathed and you won’t have a blown fuse to replace. Note that while replacing Q1 is a bit of a pain, it’s actually quite cheap (under $1) so if Q1 does “throw itself on the grenade” and fail while protecting your computer from damage, at least it isn’t an expensive failure. Celebrating 30 Years siliconchip.com.au Figs.4&5: top and bottom overlay diagrams for the USB Port Protector. Use these as a guide during construction. Be careful with the polarity for TVS1, TVS2, Q1 and LEDs1&2. It’s easiest to start by fitting Q1 and TVS1, then the remainder of topside SMD components, then the bottom-side components and finally, CON1 and CON2. The matching photographs above are reproduced close to twice actual size, for clarity. Sourcing the parts Most of the parts are surface-mount devices (SMDs) and they are all available from Digi-Key or Mouser in the USA. Most are also available from element14 in Australia. While both Digi-Key and Mouser offer free express international delivery for orders over $AU60, the parts for this project will cost you much less than that. So we are also making the parts available a kit, to make it easier to build the USB Port Protector. The complete kit, including PCB and the USB input and output sockets will sell for $15.00 (Cat SC-4574). Construction The USB Port Protector is built on a double-sided PCB that measures 32.5 x 19mm and is coded 07105181. All but four of the components are mounted on the top side of the board, as shown in the overlay diagrams, Figs.4 & 5 and matching photos. The only through-hole components are the USB plug and socket. By the way, you may notice a minor difference between the overlay diagrams and the PCB photos: we’ve changed TVS2 to a more suitable part since building the prototype. Most of the parts are fairly easy to solder, although some of them are quite close together, to keep the unit compact. It’s easiest to do in the following order. Start with transistor Q1. This is in a fairly small ECH8 package, with four short leads on each side. The good news is that most of the adjacent leads are connected together so it doesn’t matter if you bridge the pins when soldering (in fact, it’s pretty much unavoidable). Pin 4 is the base connection and you need to make sure it doesn’t short to pin 3, the emitter. Start by identifying pin 1. There is a dot printed in the corner on the top of the package but you will need a magnifier and good light to see it. Orientate the part so that it matches the pin 1 markings on the PCB and smear a thin layer of flux paste on all eight of its pads. Apply a tiny amount of solder to the pad for pin 4, then heat this solder while sliding the part into place. Check that the other seven pins are correctly located above their pads using a magnifier. If not, re-heat the solder joint and carefully nudge the part. Repeat as necessary until it’s lined siliconchip.com.au up, then solder the four pins on the opposite side of the package. These are all joined together so you can do it as one big solder joint. Now apply solder to the three remaining pins and add a bit of fresh solder to pin 4 as well. To tidy up the solder joints, apply a little more flux paste on top of the solder and then use some solder wick to remove the excess. Clean up the flux residue with some methylated spirits, isopropyl alcohol or other flux cleaner and then inspect it visually to ensure all the solder joints are good. That’s the trickiest part out of the way. Next, solder TVS1 in place, next to Q1. It’s fairly small and its cathode stripe will not be terribly obvious so again, use magnification to identify the cathode and orientate it correctly before tacking it place and soldering the opposite pin. Now solder the SMD passive components in place; this includes five resistors, one capacitor and the PTC thermistor. None are polarised; just be careful to fit each in the location shown in Fig.4. The resistors will be printed with a small code indicating their value (eg, 1.2kΩ code is 122; or 12Ω x 102) but the capacitor will not be marked. The resistor codes are also shown in the parts list opposite. The next components to mount are reference REF1 and transistor Q2. These are in identical SOT-23 packages so don’t get them mixed up after taking them out of their packaging. They are polarised but have three pins each so the orientation is obvious – see the pinouts in Fig.1. Next are the two LEDs. Usually, the cathode is marked with a green dot but sometimes the anode is marked instead. The easiest way to check is with a DMM set on diode test mode. The LED will light up with the red probe connected to the anode and black to the cathode. You can confirm the colour at the same time. Note that some DMMs (eg, those powered by two AA cells) may not apply sufficient voltage to light up a green LED. Solder these where shown on the overlay diagram; LED1 is green while LED2 is red and the cathodes are orientated towards the USB plug, as shown by the “K” markings on the PCB. Now solder schottky diode D3 in place. Add a little flux paste to the pads first as it’s quite large but the procedure Celebrating 30 Years May 2018  61 is much the same as for the other two-pin devices. Just make sure you apply the iron for long enough to form good solder fillets between the PCB and terminals of the device. Then flip the board over and fit the four remaining SMDs on the bottom side, as shown in Fig.5. D1, D2 and ZD1 are polarised; also pay particular attention to the location of the cathode stripe on ZD1. The fuse is not polarised. Finally, fit the USB plug and socket as shown. Both need to be pushed down firmly onto the PCB before soldering. The plug has a notch on the underside which the edge of the PCB fits into. Note that the USB plug pins may be quite short and may not protrude very far through the bottom of the PCB, so it’s a good idea to solder them on both sides. Just make sure you don’t accidentally bridge the pins. Testing Inspect the board to verify that all the solder joints are good and that you have no unwanted bridges, then plug it into a USB port on your PC. If you have a USB charger, you could use that instead. Check that the green LED lights up but the red LED should not. You can then carefully measure the voltage across D3. You should get a reading in the range of 4.5-5.25V (usually quite close to 5V), with the red probe to its cathode (striped) end. Now plug a small device like a USB card reader or flash drive into the socket and verify that it powers up correctly. Try reading the contents of the card/flash drive on your PC and verify that it works normally without any unexpected disconnection events. If you want to verify that the Port Protector will definitely protect your computer, you will need a ~6V supply and a resistor with a value between 2.2Ω and 10Ω. Unplug the Port Protector and anything that’s plugged into it and use a clip lead to connect the USB socket shell to the ground terminal of your 6V supply. Connect one end 62 Silicon Chip of the test resistor to the positive output of the 6V supply (battery pack, plugpack, etc) and then touch the other end of the resistor to the USB socket pin that’s immediately adjacent to fuse F1, on the underWe finished side of the board. our Port Protector If you can do this with clear heatshrink tube . . . while looking at the just in case A.P. managed to drop something into the Protector PCB! top of the board, you should see both LED1 and LED2 light up. LED2 indicates that the protection is operating. If you have a helper, they could measure the voltage across D3. It should be close to 5.5V. This confirms that the device is working. Using it To avoid accidentally shorting the 5V supply or either of the signal lines during use, we suggest you encapsulate the entire device in a short piece of heatshrink tubing, as shown above. Clear tubing is convenient since you can still see the components – but any colour will work. Cut the tubing so that it covers the entire USB socket, up to the lip that’s around the open end, and the very base of the USB plug, up to where it projects from the PCB. Then it’s just a matter of applying a little heat, eg, from a hot air gun, hair drier or lighter (with the flame some distance below the tubing). Rotate the assembly until the tubing has shrunk into place and try to avoid burning yourself in the process. If it gets too hot to hold, put it down and let it cool before shrinking the remainder of the tubing. If you manage to blow the fuse, you will simply have to cut the tubing off, desolder the fuse, clean the old solder off using flux paste and some solder wick, solder a new fuse in place and apply a fresh length of heatshrink tubing. Or if you’re really clever, you may be able to cut a flap in the tubing around the fuse, replace it and then glue the flap back in place. SC Celebrating 30 Years siliconchip.com.au