Silicon ChipCapacitor Discharger - December 2024 SILICON CHIP
  1. Outer Front Cover
  2. Contents
  3. Publisher's Letter: Printer ink costs more than gold!
  4. Subscriptions
  5. Feature: Undersea Communications by Dr David Maddison
  6. Project: Capacitor Discharger by Andrew Levido
  7. Feature: Precision Electronics, Part 2 by Andrew Levido
  8. Project: Compact HiFi Headphone Amp by Nicholas Vinen
  9. Project: Automatic night light by Tim Blythman
  10. Project: WiFi weather logger by Tim Blythman
  11. Review: Raspberry Pi Pico 2 by Tim Blythman
  12. Project: The Pico Computer by Tim Blythman
  13. Project: Variable Speed Drive Mk2, Part 2 by Andrew Levido
  14. PartShop
  15. Serviceman's Log: All washed up by Dave Thompson
  16. Vintage Radio: Dallas Arbiter Fuzz Face guitar pedal by Brandon Speedie
  17. Vintage Radio: MicroBee 256TC Computer by Don Peterson
  18. Market Centre
  19. Advertising Index
  20. Outer Back Cover

This is only a preview of the December 2024 issue of Silicon Chip.

You can view 40 of the 112 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 "Capacitor Discharger":
  • Capacitor Discharger PCB [9047-01] (AUD $5.00)
  • AOT10N60 High-voltage Mosfet for the 230VAC Fan Speed Controllers (Component, AUD $5.00)
  • Capacitor Discharger short-form kit (Component, AUD $30.00)
  • Capacitor Discharger PCB pattern (PDF download) [9047-01] (Free)
  • Capacitor Discharger drilling diagrams (Panel Artwork, Free)
Articles in this series:
  • Precision Electronics, Part 1 (November 2024)
  • Precision Electronics, Part 1 (November 2024)
  • Precision Electronics, Part 2 (December 2024)
  • Precision Electronics, Part 2 (December 2024)
  • Precision Electronics, Part 3 (January 2025)
  • Precision Electronics, part one (January 2025)
  • Precision Electronics, part one (January 2025)
  • Precision Electronics, Part 3 (January 2025)
  • Precision Electronics, part two (February 2025)
  • Precision Electronics, Part 4 (February 2025)
  • Precision Electronics, Part 4 (February 2025)
  • Precision Electronics, part two (February 2025)
  • Precision Electronics, part three (March 2025)
  • Precision Electronics, part three (March 2025)
  • Precision Electronics, Part 5 (March 2025)
  • Precision Electronics, Part 5 (March 2025)
  • Precision Electronics, Part 6 (April 2025)
  • Precision Electronics, Part 6 (April 2025)
  • Precision Electronics, part four (April 2025)
  • Precision Electronics, part four (April 2025)
  • Precision Electronics, part five (May 2025)
  • Precision Electronics, Part 7: ADCs (May 2025)
  • Precision Electronics, part five (May 2025)
  • Precision Electronics, Part 7: ADCs (May 2025)
  • Precision Electronics, part six (June 2025)
  • Precision Electronics, part six (June 2025)
Items relevant to "Compact HiFi Headphone Amp":
  • Compact HiFi Headphone Amplifier PCB [01103241] (AUD $7.50)
  • Dual Horizontal PCB-mounting RCA sockets (white/red) [RCA-210] (Component, AUD $2.50)
  • Compact HiFi Headphone Amplifier kit (Component, AUD $70.00)
  • Compact HiFi Headphone Amplifier PCB pattern (PDF download) [01103241] (Free)
  • Compact HiFi Headphone Amplifier panel drilling diagram (Panel Artwork, Free)
Articles in this series:
  • Compact HiFi Headphone Amp (December 2024)
  • Compact HiFi Headphone Amp (December 2024)
  • Compact HiFi Headphone Amp (January 2025)
  • Compact HiFi Headphone Amp (January 2025)
Articles in this series:
  • Wired Infrared Remote Extender (May 2024)
  • Symbol USB Keyboard (May 2024)
  • Wired Infrared Remote Extender (May 2024)
  • Thermal Fan Controller (May 2024)
  • Symbol USB Keyboard (May 2024)
  • Thermal Fan Controller (May 2024)
  • Self Toggling Relay (June 2024)
  • Self Toggling Relay (June 2024)
  • Arduino Clap Light (June 2024)
  • Arduino Clap Light (June 2024)
  • Lava Lamp Display (July 2024)
  • Digital Compass (July 2024)
  • Digital Compass (July 2024)
  • Lava Lamp Display (July 2024)
  • JMP009 - Stroboscope and Tachometer (August 2024)
  • JMP007 - Ultrasonic Garage Door Notifier (August 2024)
  • JMP009 - Stroboscope and Tachometer (August 2024)
  • JMP007 - Ultrasonic Garage Door Notifier (August 2024)
  • IR Helper (September 2024)
  • IR Helper (September 2024)
  • No-IC Colour Shifter (September 2024)
  • No-IC Colour Shifter (September 2024)
  • JMP012 - WiFi Relay Remote Control (October 2024)
  • JMP012 - WiFi Relay Remote Control (October 2024)
  • JMP015 - Analog Servo Gauge (October 2024)
  • JMP015 - Analog Servo Gauge (October 2024)
  • JMP013 - Digital spirit level (November 2024)
  • JMP013 - Digital spirit level (November 2024)
  • JMP014 - Analog pace clock & stopwatch (November 2024)
  • JMP014 - Analog pace clock & stopwatch (November 2024)
  • WiFi weather logger (December 2024)
  • Automatic night light (December 2024)
  • WiFi weather logger (December 2024)
  • Automatic night light (December 2024)
  • BIG LED clock (January 2025)
  • Gesture-controlled USB lamp (January 2025)
  • Gesture-controlled USB lamp (January 2025)
  • BIG LED clock (January 2025)
  • Transistor tester (February 2025)
  • Wireless flashing LEDs (February 2025)
  • Transistor tester (February 2025)
  • Wireless flashing LEDs (February 2025)
  • Continuity Tester (March 2025)
  • RF Remote Receiver (March 2025)
  • Continuity Tester (March 2025)
  • RF Remote Receiver (March 2025)
  • Discrete 555 timer (April 2025)
  • Weather monitor (April 2025)
  • Discrete 555 timer (April 2025)
  • Weather monitor (April 2025)
Items relevant to "WiFi weather logger":
  • Firmware for JMP016 - WiFi Weather Logger (Software, Free)
Articles in this series:
  • Wired Infrared Remote Extender (May 2024)
  • Symbol USB Keyboard (May 2024)
  • Wired Infrared Remote Extender (May 2024)
  • Thermal Fan Controller (May 2024)
  • Symbol USB Keyboard (May 2024)
  • Thermal Fan Controller (May 2024)
  • Self Toggling Relay (June 2024)
  • Self Toggling Relay (June 2024)
  • Arduino Clap Light (June 2024)
  • Arduino Clap Light (June 2024)
  • Lava Lamp Display (July 2024)
  • Digital Compass (July 2024)
  • Digital Compass (July 2024)
  • Lava Lamp Display (July 2024)
  • JMP009 - Stroboscope and Tachometer (August 2024)
  • JMP007 - Ultrasonic Garage Door Notifier (August 2024)
  • JMP009 - Stroboscope and Tachometer (August 2024)
  • JMP007 - Ultrasonic Garage Door Notifier (August 2024)
  • IR Helper (September 2024)
  • IR Helper (September 2024)
  • No-IC Colour Shifter (September 2024)
  • No-IC Colour Shifter (September 2024)
  • JMP012 - WiFi Relay Remote Control (October 2024)
  • JMP012 - WiFi Relay Remote Control (October 2024)
  • JMP015 - Analog Servo Gauge (October 2024)
  • JMP015 - Analog Servo Gauge (October 2024)
  • JMP013 - Digital spirit level (November 2024)
  • JMP013 - Digital spirit level (November 2024)
  • JMP014 - Analog pace clock & stopwatch (November 2024)
  • JMP014 - Analog pace clock & stopwatch (November 2024)
  • WiFi weather logger (December 2024)
  • Automatic night light (December 2024)
  • WiFi weather logger (December 2024)
  • Automatic night light (December 2024)
  • BIG LED clock (January 2025)
  • Gesture-controlled USB lamp (January 2025)
  • Gesture-controlled USB lamp (January 2025)
  • BIG LED clock (January 2025)
  • Transistor tester (February 2025)
  • Wireless flashing LEDs (February 2025)
  • Transistor tester (February 2025)
  • Wireless flashing LEDs (February 2025)
  • Continuity Tester (March 2025)
  • RF Remote Receiver (March 2025)
  • Continuity Tester (March 2025)
  • RF Remote Receiver (March 2025)
  • Discrete 555 timer (April 2025)
  • Weather monitor (April 2025)
  • Discrete 555 timer (April 2025)
  • Weather monitor (April 2025)
Items relevant to "The Pico Computer":
  • Pico Computer PCB [07112234] (AUD $5.00)
  • PWM Audio PCB [07112238] (AUD $2.50)
  • ESP-PSRAM64 64Mb (8MB) PSRAM chip (SOIC-8) (Component, AUD $5.00)
  • DS3231MZ real-time clock IC (SOIC-8) (Component, AUD $8.00)
  • DS3231 real-time clock IC (SOIC-16) (Component, AUD $7.50)
  • Pico Computer kit (Component, AUD $40.00)
  • PWM Audio Module kit (Component, AUD $10.00)
  • Pico Computer kit with Pico (Component, AUD $50.00)
  • Digital Video Terminal kit (Component, AUD $65.00)
  • Pico Computer front panel (07112235) (PCB, AUD $2.50)
  • Pico Computer demonstration software (Free)
  • Pico Computer & PWM Audio Module PCB patterns (PDF download) [07112234, 07112238] (Free)
  • Pico Computer panel cutting diagrams (Panel Artwork, Free)
Items relevant to "Variable Speed Drive Mk2, Part 2":
  • Mk2 VSD PCB [11111241 or 9048-02] (AUD $15.00)
  • STM32G030K6T6 programmed for the VSD Mk2 [1111124A] (Programmed Microcontroller, AUD $10.00)
  • Firmware for the VSD Mk2 (Software, Free)
  • VSD Mk2 PCB pattern (PDF download) [11111241] (Free)
  • Mk2 VSD drilling & cutting diagrams (Panel Artwork, Free)
Articles in this series:
  • Variable Speed Drive Mk2, Part 1 (November 2024)
  • Variable Speed Drive Mk2, Part 1 (November 2024)
  • Variable Speed Drive Mk2, Part 2 (December 2024)
  • Variable Speed Drive Mk2, Part 2 (December 2024)

Purchase a printed copy of this issue for $13.00.

Capacitor Discharger Here is an often-requested project: an easy and safe way to discharge capacitors, large and small, including those used to store rectified mains (up to about 400V DC). Project by Andrew Levido f you have ever worked on high-power audio amplifiers, vintage radios or switch-mode power supplies, you have probably been ‘bitten’ by a capacitor that remained charged after the circuit was disconnected from the power source. Even if you have been careful to keep your fingers out of the way, it is all too easy to accidentally discharge such a capacitor with a soldering iron or screwdriver, with startling and perhaps damaging consequences. It is therefore always good practice to safely discharge such capacitors before working on a device. You should definitely not do this by shorting the capacitor with a test lead (or worse, a screwdriver), since the amount of energy stored can be significant and the peak currents could be huge. Doing so is not good for the capacitors, the printed circuit board (PCB), the shorting device or the nerves of anyone nearby. It’s much better to use a controlled discharge device that limits the current to an acceptable level. An obvious and common choice is to discharge the capacitors via a power resistor. That is where my thinking started when I set out to build a simple discharger for myself. I envisaged a power resistor mounted in a small case with a couple of banana jacks so I could use standard test leads siliconchip.com.au to discharge the capacitors in question. I wanted a discharger good for voltages up to about 400V DC, making it suitable for off-line switch-mode power supplies and vintage valve gear. I wanted it to be able to handle this voltage indefinitely, so the discharger would not be destroyed if it was accidentally left connected or was connected when power was applied. For example, a 10W resistor would need a value of 16kW or more to be permanently connected across a 400V supply – any lower, and the 10W rating would be exceeded. However, a 10W resistor running at its rated power can get hot enough to burn skin (or even boil water!). So you might instead use a value of about 33kW to keep temperatures reasonable, giving a maximum dissipation of 4.85W (400V2 ÷ 33kW). The problem with a resistive discharge circuit is that the capacitor voltage will fall exponentially, as shown in Fig.1. The figure shows the normalised capacitor voltage on the vertical axis and time on the horizontal axis. The decay time depends on the circuit time constant τ, given by the Normalised RC Decay 1.0 0.9 Normalised Capacitor Voltage I 0.8 0.7 0.6 0.61 0.61 0.5 0.4 0 0.37 .37 0.3 0.22 .22 0 0.2 0.15 .15 0 0 0.08 .08 0.1 0.0 0.0τ 0.5τ 1.0τ 1.5τ 2.0τ 2.5τ 0.05 0 .05 3.0τ 0 0.03 .03 3.5τ 0.02 0 .02 4.0τ 0.01 . 0 4.5τ 5.0τ Time constants: τ=RC (seconds) Fig.1: when discharging via a resistor, the voltage across a capacitor decays exponentially at a rate determined by the time constant τ, which is the product of the resistance and capacitance. Australia's electronics magazine December 2024  33 product of resistance and capacitance. The numbers adjacent to the curve indicate the level of discharge achieved after a given number of time constants. The graph shows that discharging a capacitor from 400V down to a safe level (less than say 10V) will take about four RC time constants. With a 1000µF capacitance and 16kW or 33kW resistance, the discharge would take 64 or 132 seconds (about one/two minutes) – way too long in my book. We can calculate the average power dissipated in the resistor during this process by dividing the energy stored in the capacitor by the time taken to discharge it. The energy stored in a capacitor is ½CV2, which works out to 80J in our example. We know the discharge time is 64/132 seconds, giving us an average power dissipation of 1.25W/0.6W. Neither seems like an efficient use of the resistor’s power rating. At the start of discharge, the resistor draws 25mA/12mA from the capacitors, with an instantaneous power dissipation of 10W/5W, but it decreases rapidly as the capacitor voltage falls. What if we could draw a constant 25mA and discharge the capacitor this way? We know that the relationship between the current in a capacitor and the voltage across it is I = C × ΔV/ Δt. This means the capacitor voltage will fall linearly at a rate of -I/C with a constant discharge current. In our example, this will be -25V per second, discharging to 10V in just under 16 seconds, four to eight times faster than using a resistor. The peak power dissipation will be 10W, but the average will now be 5W – much better. That is all good, but I still had to develop a simple circuit that would sink a relatively constant 25mA over a wide voltage range. It should also be polarity independent, since I wanted to be able to use the discharger without worrying about which lead goes where (one of the benefits of simple resistors...). Circuit details Fig.3: the measured current of the prototype ranges from a little over 26mA at 400V down to about 16mA at 8V. That’s enough to discharge all but the largest capacitors reasonably quickly. The resulting circuit is shown in Fig.2. The capacitor to be discharged connects via banana jacks CON3 and CON4, and a normally-closed thermal switch, to the diode bridge formed by diodes D1 to D4. The diode bridge means that it does not matter which way the capacitor is connected; either way, the positive voltage gets applied to the drain of Mosfet Q1 and the negative voltage to its source. The discharge current flows through LED1, giving a handy visual indication that the capacitor is discharging. The remaining part of the circuit is the current sink proper. The Mosfet is biased on via the string of three 47kW resistors. Three resistors are used to get sufficient voltage and power ratings, as almost all of the input voltage appears across them (a 1W resistor is generally capable of handling 400V DC, but it’s better to be safe than sorry!). As the Mosfet begins to conduct, the voltage across the 27W resistor rises until it reaches around 650mV, at which point transistor Q2 begins to switch on, pulling the Mosfet gate down and restricting the current through the Mosfet’s channel to approximately 25mA. The zener diode is required to ensure the Mosfet gate-source voltage never exceeds a safe level, particularly during start-up. You may be wondering why I used a 600V, 13A TO-220 Mosfet for an application with a maximum current of 25mA. The reason for the voltage rating should be obvious, but since we are operating this Mosfet in the linear mode, it is the power dissipation rather than the current rating that is critical. This Mosfet needs to dissipate up to 10W, so I used a TO-220 package device mounted on a heatsink. Most of the parts in the circuit are fitted to a PCB housed in a small plastic enclosure. The Mosfet and the Australia's electronics magazine siliconchip.com.au Fig.2: this shows the complete capacitor discharger circuit. It sinks a relatively constant 25mA from 10V to over 400V. Current vs Applied Voltage 30 25 Current (mA) 20 15 10 5 0 34 0 50 Silicon Chip 100 150 200 Voltage (V) 250 300 350 400 thermal switch are both mounted on a heatsink formed from a piece of aluminium angle. The thermal switch is a fail-safe device that disconnects the circuit if the heatsink temperature reaches 90°C. That should never happen under regular use, but it prevents overheating if the discharger is left connected for extended periods while power is applied. In practice, the discharge current is not perfectly regulated, as shown in Fig.3. The measured current for my unit was 26.6mA at 400V, dropping to around 20mA at 10V and 16mA at 8V. Below this, there is insufficient voltage to bias the Mosfet on, so the current drops almost to zero. The LED lights when a charged capacitor is connected; it goes out when the capacitor voltage drops to less than 10V, giving a useful indication that discharging is complete and the circuit is safe. Keep in mind that the LED will also go out if the thermal breaker trips, but that’s pretty unlikely in normal use, and you would hear it if it did (assuming you do not have severe hearing loss). The LED colour is not critical but if you use one with a higher forward voltage (like green, blue or white), it will stop discharging at a slightly higher voltage. If you want to be sure (to be sure), you can always check the capacitor’s final voltage with a DVM before proceeding to work on the circuit. If you see the voltage increasing, don’t freak out! That is a phenomenon called dielectric charge absorption. It is very common in large electrolytic capacitors; unloaded, they can recover quite a bit of their initial charge over time. Because of that, you may want to leave the discharger connected to the capacitor for a while, to make very sure it’s drained before working on the device! The PCB is a neat fit in the handheld case, with the banana sockets mounting each on one end panel. Fig.4: the PCB is quite simple, so assembly is straightforward. Ensure the diodes, LED and transistors are orientated correctly and avoid dry joints; it should work first time. Construction Construction is very straightforward. The Capacitor Discharger is built on a double-sided board coded 9047-01 that measures 90 × 50mm. Refer to the PCB overlay diagram, Fig.4, to see which parts go where. Fit the diodes first, ensuring they are in the correct positions and have all the cathode stripes facing the top of the board. Then mount the resistors, followed siliconchip.com.au Fig.5: drill the heatsink (aluminium angle) according to this diagram. The shape of the semi-circular cutout is not critical as long as there is room for the LED leads to clear the heatsink. Australia's electronics magazine December 2024  35 Parts List – Capacitor Discharger 1 double-sided PCB coded 9047-01, 90 × 50mm 1 dark grey 120 × 60 × 30mm ABS plastic moulded enclosure [Jaycar HB6032, Altronics H0216] 1 90°C normally-closed (NC) thermal switch (S1) [Jaycar ST3825, Altronics S5612] 2 panel-mounting banana jack sockets (CON3, CON4) [Jaycar PS0421, Altronics P9267] 1 pair of mains-rated probes with banana plugs 1 90mm length of 25 × 12 × 1.6mm aluminium angle [Bunnings I/N 1138107 or 0427711] 3 M3 × 10mm panhead machine screws, flat & shakeproof washers & nuts 4 No.4 × 6mm self-tapping screws 1 small tube of thermal paste 1 150mm length of mains-rated hookup wire Semiconductors 1 STP18N60M2 or AOT10N60 600V 10A Mosfet or equivalent, TO-220 (Q1) [Silicon Chip SC4571, element14 2807284, DigiKey 497-13971-5-ND] 1 BC547 45V 100mA NPN transistor, TO-92 (Q2) [Jaycar ZT2152, Altronics Z1040] 1 red 5mm 30mA LED (LED1) [element14 2322131] 1 7.5V 0.4W or 1W zener diode, DO-41 (ZD1) [Jaycar ZR1407, Altronics Z0332] 4 1N4007 1kV 1A diodes, DO-41 (D1-D4) [Jaycar ZR1007, Altronics Z0112] Resistors 3 47kW 5% 1W axial [Jaycar RR2814, Altronics R7257] 1 27W 5% ¼W axial [Jaycar RR0534, Altronics R7520] This photo and Fig.7 show the simple wiring required. Capacitor Discharger Kit (SC7404, $30 + P&P): includes the PCB, resistors, semiconductors, mounting hardware (no heatsink) and banana sockets. by the small transistor, with its flat face orientated as shown. Leave the Mosfet and LED off the board for now. The heatsink bracket is made by cutting 90mm from a piece of standard 25 × 12 × 1.6mm aluminium ‘unequal angle’, drilled as shown in Fig.5. The semi-circular cutout at the bottom centre of the heatsink is to clear the LED leads. Its exact shape is not critical; it can be formed by hand with a round file. Once drilled and deburred, the bracket can be attached to the PCB by mounting the thermal switch with two M3 × 10mm machine screws with washers and nuts. The screws should be installed from the bottom of the board to ensure they don’t interfere with the case. Use a dab of heatsink compound under the thermal switch. Make sure to line up all the holes in this step. You may need to carefully bend the terminals of the switch down to about 45° to allow the lid to be fitted. Bend the Mosfet leads and fit this using another M3 × 10mm screw, with a nut and washers in the same way. Again, use heatsink compound under the Mosfet. Carefully tighten the Mosfet down before soldering so you don’t put any undue strain on the leads. Now drill a 5mm hole right in the centre of the case top for the LED, plus two 12mm holes, centred in both end plates for the banana jacks, as shown in Fig.6. Test-fit the PCB into the case and clip the LED’s leads to the correct length so its lens just protrudes through the hole in the top of the case when assembled. Then you can solder it in permanently. Finally, fit a couple of wires to the CON1 and CON2 pads on the PCB. After that you can wire up the Fig.6: one 5mm hole is required in the top of the case for the LED, plus one 12mm hole in each end plate for the banana jacks. 36 Silicon Chip Australia's electronics magazine siliconchip.com.au connectors and thermal switch as shown in Fig.7. The wire doesn’t need to be thick but it should have mains-rated insulation to ensure it will withstand up to 400V. Finally, you can screw the board down using 6mm self-tapping screws and close up the box. Silicon Chip PDFs on USB Testing & operation To check that the Capacitor Discharger is working, you can connect it (either way) across a power supply and adjust the voltage. You should see the LED light and a current draw in the region of 18-25mA at any voltage above about 10V. Using it is as simple as connecting a pair of test probes to each side of any potentially charged capacitors – I use a cheap pair I picked up online. Remember that high voltages might be applied to those test probes; don’t use really cheap ones if you will be applying 400V DC! Still, in our experience, you don’t need to spend much money to get clips with decent insulation. If the LED lights when the clips are attached, the capacitor is charged, so hold the probes in place until it goes out. It should only take a matter of seconds if it's a single capacitor, although a large capacitor bank like in a power amplifier could take longer to fully discharge. In the case of an amplifier with two capacitor banks (positive and negative), you can connect it across both banks to discharge them at the same time. This simple, low-cost project is well worth building if you develop or serSC vice any high-voltage devices! ¯ A treasure trove of Silicon Chip magazines on a 32GB custom-made USB. ¯ Each USB is filled with a set of issues as PDFs – fully searchable and with a separate index – you just need a PDF viewer. ¯ Ordering the USB also provides you with download access for the relevant PDFs, once your order has been processed ¯ 10% off your order (not including postage cost) if you are currently subscribed to the magazine. ¯ Receive an extra discount If you already own digital copies of the magazine (in the block you are ordering). EACH BLOCK OF ISSUES COSTS $100 NOVEMBER 1987 – DECEMBER 1994 JANUARY 1995 – DECEMBER 1999 JANUARY 2000 – DECEMBER 2004 JANUARY 2005 – DECEMBER 2009 JANUARY 2010 – DECEMBER 2014 JANUARY 2015 – DECEMBER 2019 OR PAY $500 FOR ALL SIX (+ POST) Fig.7: wiring the capacitor discharger could not be more straightforward. Use any handy mains-rated hookup wire, as the maximum current is 25mA. siliconchip.com.au Australia's electronics magazine WWW.SILICONCHIP.COM. AU/SHOP/DIGITAL_PDFS December 2024  37