Silicon ChipESR Test Tweezers - June 2024 SILICON CHIP
  1. Outer Front Cover
  2. Contents
  3. Publisher's Letter: Avoid cheap extension cords!
  4. Feature: Privacy Phones by Dr David Maddison
  5. Subscriptions
  6. Feature: Electronex 2024 by Noel Gray
  7. Project: Self Toggling Relay by Tim Blythman
  8. Project: Arduino Clap Light by Tim Blythman
  9. Project: ESR Test Tweezers by Tim Blythman
  10. Feature: MicroMag3 Magnetic Sensor by Jim Rowe
  11. Project: USB-C Serial Adaptor by Tim Blythman
  12. Project: DC Supply Protectors by John Clarke
  13. Project: WiFi DDS Function Generator, Pt2 by Richard Palmer
  14. Serviceman's Log: Another mixed bag of servicing stories by Various
  15. Circuit Notebook: Arduino bin reminder by Geoff Coppa
  16. Circuit Notebook: Programming a Micromite over Bluetooth by Grant Muir
  17. Vintage Radio: HeathKit GW-21A handheld transceivers by Dr Hugo Holden
  18. PartShop
  19. Market Centre
  20. Advertising Index
  21. Notes & Errata: Skill Tester 9000, April & May 2024
  22. Outer Back Cover

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

You can view 57 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.

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 "Arduino Clap Light":
  • Arduino firmware for JMP006 - Clap Light (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 "ESR Test Tweezers":
  • ESR Test Tweezers four PCB set (AUD $10.00)
  • Advanced/ESR Test Tweezers back panel PCB (blue) [04105242] (AUD $2.50)
  • PIC24FJ256GA702-I/SS programmed for the ESR Test Tweezers (0410524A.HEX) (Programmed Microcontroller, AUD $15.00)
  • 0.96in white OLED with SSD1306 controller (Component, AUD $10.00)
  • ESR Test Tweezers kit (Component, AUD $50.00)
  • Firmware for the ESR Test Tweezers [0410524A.HEX] (Software, Free)
  • ESR Test Tweezers PCB patterns (PDF download) [04105241-2] (Free)
Items relevant to "MicroMag3 Magnetic Sensor":
  • Sample software for the MicroMag3 3-Axis Magnetic Sensor module (Free)
Items relevant to "USB-C Serial Adaptor":
  • USB-C Serial Adaptor PCB (black) [24106241] (AUD $2.50)
  • USB-C Serial Adaptor PCB (green) [24106241] (AUD $1.00)
  • PIC16F1455-I/SL programmed for the Type-C USB Serial Adaptor [2410624A.HEX] (Programmed Microcontroller, AUD $10.00)
  • USB-C Serial Adaptor full kit (Component, AUD $20.00)
  • Firmware for the USB-C Serial Adaptor [2410624A.HEX] (Software, Free)
  • USB-C Serial Adaptor PCB pattern (PDF download) [24106241] (Free)
Items relevant to "DC Supply Protectors":
  • DC Supply Protector PCB (adjustable SMD version) [08106241] (AUD $2.50)
  • DC Supply Protector PCB (adjustable TH version) [08106242] (AUD $2.50)
  • DC Supply Protector PCB (fixed TH version) [08106243] (AUD $2.50)
  • DC Supply Protector kit (adjustable SMD version) (Component, AUD $17.50)
  • DC Supply Protector kit (adjustable TH version) (Component, AUD $22.50)
  • DC Supply Protector kit (fixed TH version) (Component, AUD $20.00)
  • DC Supply Protector PCB patterns (PDF download) [08106241-3] (Free)
Items relevant to "WiFi DDS Function Generator, Pt2":
  • WiFi DDS Function Generator PCB [04104241] (AUD $10.00)
  • 3.5-inch TFT Touchscreen LCD module with SD card socket (Component, AUD $35.00)
  • Laser-cut pieces for optional WiFi DDS Function Generator stand (PCB, AUD $7.50)
  • Firmware for the WiFi DDS Function Generator (Software, Free)
  • WiFi DDS Function Generator PCB pattern (PDF download) [04104241] (Free)
  • WiFi DDS Function Generator case drilling diagram and labels (Panel Artwork, Free)
Articles in this series:
  • WiFi DDS Function Generator, Pt1 (May 2024)
  • WiFi DDS Function Generator, Pt1 (May 2024)
  • WiFi DDS Function Generator, Pt2 (June 2024)
  • WiFi DDS Function Generator, Pt2 (June 2024)
Items relevant to "Arduino bin reminder":
  • Software for the Arduino-based Bin Reminder (Free)

Purchase a printed copy of this issue for $12.50.

TIM BLYTHMAN’S ESR TEST T EEZERS We have produced a few variants of our Test Tweezers since the original version in the October 2021 issue. Still, none has yet had the handy feature of measuring capacitor ESR (equivalent series resistance). Our new ESR Test Tweezers can measure ESR and capacitance while being significantly more compact than all our previous ESR meters! E SR (equivalent series resistance) is an inherent but undesirable property of capacitors that acts like a resistance in series with the capacitive element. Fig.1 shows this and the other factors that can be used to model a real capacitor, as opposed to an ideal, purely capacitive one. For good performance, especially at high currents (as in a switch-mode supply), a capacitor’s ESR and ESL (equivalent series inductance) should be low and the leakage resistance should be high. That combination best approximates an ideal capacitor. Generally, the ESL is relatively small and is often lumped together with ESR by specifying it at a known frequency, often 100-120Hz or 100kHz (the former being relevant when rectifying mains AC). The total series impedance can then be specified in ohms. If the ESR is high, the capacitor will dissipate a significant proportion of the energy that passes through it, Fig.1: the behaviour of real capacitors, especially electrolytic types, deviates from the ideal model of capacitors found in textbooks. ESR (equivalent series resistance) is one of the more prominent unwanted phenomena; capacitors often fail due to the ESR rising to unacceptable levels. 54 Silicon Chip unlike purely reactive elements such as ideal capacitors and inductors, which have no losses. It is well known that high-ESR electrolytic capacitors can cause problems, but they are not the only type of capacitor that can suffer from high ESR. Other types, such as plastic film, can be affected too. In a power supply, a high ESR manifests as a voltage drop due to the current flowing in and out of the capacitor. That will decrease the voltage available to the circuit and heat up the capacitor, sometimes to the point that its contents boil and spill out! Electrolytic capacitors depend on an electrolyte as the current path between the oxide dielectric layer and the cathode. If this electrolyte dries out, its resistance and thus the ESR will increase. Increasing ESR will also cause an increase in dissipation inside the capacitor, further heating and drying out the electrolyte. A high ESR capacitor will often cause mysterious or intermittent faults, as documented extensively in our Serviceman’s Log pages, where replacing the electrolytic capacitors usually fixes a power supply. The conductivity of the electrolyte can also change with temperature, leading to problems that appear or disappear as the capacitor heats up after the equipment is turned on. In audio circuits, the higher-than-­ expected ESR can change the frequency response of a circuit and may increase distortion. These are just Australia's electronics magazine some of the scenarios where a high ESR can cause problems. If you have a device that has failed or isn’t working correctly, after checking for obvious visual faults like burned components or failed solder joints, the next step is usually to test the electrolytic capacitors. If any are found to have a low capacitance, high leakage or high ESR, they may well be the culprits. Often, several are found to be on the way out. So, an ESR meter is a very valuable piece of equipment for making repairs and even checking new components to verify that they will perform as expected. Earlier ESR Meters we published include Bob Parker’s classic 2004 ESR Meter Mk2 (siliconchip.au/Series/99). That article goes into more detail on the construction of electrolytic capacitors and how they are affected by rising ESR. It also has numerous tips on troubleshooting capacitors. One frequently-seen piece of advice is a warning not to connect the ESR Meter to charged capacitors. We have included some protection circuitry, but large capacitors can pack enough of a punch to render that protection moot! The same advice applies to our ESR Test Tweezers. Like the ESR Meter Mk2, the ESR Test Tweezers is also well suited to measuring low resistances, such as current shunts. So they are sure to come in handy for other sorts of troubleshooting. siliconchip.com.au exact part number may not be known, so the earlier ESR Meters provided a table showing roughly acceptable values for a range of capacitors. Table 1 shows these values. Some data sheets might specify a dissipation factor or loss angle instead of an ESR value; page 63 has information about what those parameters mean and how to convert them to an ESR value. The ESR Test Tweezers are much smaller than the earlier devices, so we have not been able to include the table on the equipment, but you can download it, print it out and keep a copy handy. Features & Specifications ❎ Measures ESR/resistance from 0.01Ω to 1kΩ ❎ Measures capacitance from 100nF to 50μF ❎ Can perform in-circuit testing as long as capacitors are discharged ❎ Compact Tweezers format makes probing parts easy ❎ Runs from a single 3V lithium coin cell ❎ Will operate down to a cell voltage of 2.4V ❎ Displays results on a clearly visible OLED screen ❎ Typical accuracy better than 10% ❎ Adjustable sleep timeout and brightness ❎ Display can be rotated to suit left- and right-handed use ❎ Simple calibration of most parameters ❎ The standby cell life is close to the cell shelf life Design compromises ESR Test Tweezers Kit (SC6952, $50) This kit includes everything in the parts list except the coin cell & optional header CON1. The three resistors & one capacitor needed for calibration are included. The Arduino-based LC and ESR Meter from August 2023 (siliconchip. au/Article/15901) uses the same ‘frontend’ design as the ESR Meter Mk2 to measure ESR, but piggy-backs onto the Wide-range digital LC Meter from June 2018 (siliconchip.au/Article/11099), using its processor to drive the measurement circuitry and display the results. That was a popular project, but we reckoned we could simplify the all-­ important ESR sensing circuitry and fit it into a much more compact instrument that costs less to build. Measuring ESR Measuring ESR is not difficult in theory, although we must be able to separate the effects of the main capacitance and leakage resistance from the ESR (see Fig.1). As we noted, the ESR is often taken to include ESL at a specific frequency, so we don’t need to concern ourselves with ESL too much. The ESR Test Tweezers use the same philosophy as the other ESR Meters. Relatively low currents are briefly pulsed into the capacitor, and the voltage across the capacitor is measured. It is allowed to discharge between tests. The brief pulses do not have time to significantly charge the capacitor (assuming it is above 1μF); the capacitance acts like a short-circuit in this testing, so it does not affect the reading. Since the capacitor is practically always discharged, the leakage siliconchip.com.au resistance has no effect; the capacitance effectively short-circuits it. The pulses can also be considered analogous to an AC signal, so the capacitor’s impedance is low enough that the ESR dominates. Knowing the ESR is not enough to tell whether a capacitor is faulty. It’s a good idea to verify that its capacitance hasn’t dropped, and this Meter can do that, too, up to about 50μF. Beyond that, most DMMs will have a capacitance measurement mode that works up to a few thousand microfarads. Any decent capacitor will specify its expected ESR value (or equivalent) in the data sheet, and you can compare that value to the Meter’s reading. However, when servicing equipment, the This device is patterned on the very popular Advanced Test Tweezers from February & March 2023 (siliconchip. au/Series/396). They are a compact and elegant device with many useful functions. So we have kept the ESR Test Tweezers to much the same form factor, using differently-coloured PCBs to make the two tools easier to tell apart. We know that many readers will end up with both! The Advanced Test Tweezers performed most of the tests in software running on a microcontroller, so they needed relatively few external components. For testing ESR, we need more complicated circuitry, so we have had to use more components. They are the same M2012 (0805 imperial) SMD parts that measure 2.0 × 1.2mm along with a few other parts in small packages. Apart from there being more components, construction should not be any harder than for the Advanced SMD Tweezers. Table 1: typical ESR readings for good capacitors 25V 35V 63V 160V 250V 1μF 10V 5 4 6 10 20 2.2μF 2.5 3 4 9 14 4.7μF 6 3 2 6 5 1.6 1.5 1.7 2 3 6 10μF 16V 22μF 3 0.8 2 1 0.8 1.6 3 47μF 1 2 1 1 0.6 1 2 100μF 0.6 0.9 0.5 0.5 0.3 0.5 1 220μF 0.3 0.4 0.4 0.2 0.15 0.25 0.5 470μF 0.15 0.2 0.25 0.1 0.1 0.2 0.3 0.15 1000μF 0.1 0.1 0.1 0.04 0.04 4700μF 0.06 0.05 0.05 0.05 0.05 10mF 0.04 0.03 0.03 0.03 Australia's electronics magazine If your capacitor’s data sheet does not mention a typical or maximum ESR value, this table can be used as a guide. If your data sheet mentions a dissipation factor or loss angle, refer to our panel on page 63. This table can be downloaded from siliconchip.com. au/Shop/11/238 June 2024  55 The ESR Test Tweezers use simplified circuitry compared to the earlier ESR Meter designs. That’s partly to help us fit the parts on the board but also because we were able to reduce the parts count without compromising performance, saving on parts cost and assembly time. For example, the older designs feature a pulse injector with 11 parts and a pulse amplifier made from 17 parts. The corresponding sections of our circuit have only five and nine parts, respectively (50% less overall!). We are not using a voltage regulator either; instead, our software compensates for any variations in the supply voltage from the cell. The earlier designs used a compar- ator (built into the processor) alongside a voltage ramp to measure the pulse amplitude, requiring eight more parts. Our circuit uses the 12-bit ADC (analog-­ to-digital converter) peripheral built into the microcontroller and no external parts. Instead of a multiplexed LED display driven by a shift register IC, requiring several more parts, we are using the same graphical OLED display module as in the Advanced Test Tweezers (although it’s white this time rather than blue/cyan). It sits over the main PCB, occupying only the size of a four-pin header on the main PCB. The earlier ESR Meters could apply test pulses up to 50mA. Given that the ESR Test Tweezers are designed to run from a coin cell, we aimed to use lower amplitude pulses to avoid excessive drain from the cell. Despite all this, the ESR Test Tweezers can measure fairly accurately down to 10mW (just like our previous ESR meters) and will draw less than 1μA of current when in low-power mode; that’s low enough that the standby life of the cell will be close to its shelf life. We tested our prototype using our Coin Cell Emulator (December 2023; siliconchip.au/Article/16046). It reported a current of 0.0μA while the ESR Test Tweezers were sleeping, less than the 100nA minimum that the Coin Cell Emulator can display. Fig.2: the ESR Test Tweezers use a 16-bit, 28-pin PIC24 microcontroller to drive the measurement circuitry and a small OLED display. Different test currents are applied to the DUT via the 300W, 3kW and 30kW resistors, while Q2 amplifies the voltage across it for the micro to sense using its internal ADC. The diodes protect the micro in case the probed capacitor has some charge left. 56 Silicon Chip Australia's electronics magazine siliconchip.com.au The typical operating current is around 3.5mA with no components connected to the test leads, rising to 5mA when a component is being tested or settings are being modified. About half of that current is due to the OLED screen, which is set to near its lowest brightness setting by default. The current draw increases if you need to operate the OLED at a higher brightness, but we found that was not necessary for indoor use. Circuit details Fig.2 shows the full circuit diagram of the ESR Test Tweezers. Many components are common to the Advanced Test Tweezers: IC1, MOD1 and CON1 are much the same, with IC1 being the PIC24FJ256GA702 16-bit microcontroller. IC1 is powered by coin cell BAT1. The two 100nF capacitors bypass its two positive supply pins, while the 10μF capacitor provides bypassing for a 1.8V regulator internal to IC1. Practically nothing else is connected directly to the cell, meaning that IC1 has total control over what can draw current from it. The 22μF capacitor provides a reserve of power to assist the coin cell in delivering the test pulse current. This is about the highest value of capacitor commonly available in the M2012 size we are using for this project; it is sufficient for our needs. The highest pulse current is 10mA, applied for no more than 50μs. With a 22μF capacitor, the nominally 3V rail dips by about 0.02V, rather than the 0.2V expected without the capacitor. This also means that the coin cell is subjected to a lower average load; it does not see the heavy peaks that would otherwise shorten its useful life considerably. CON1 is the ICSP (in-circuit serial programming) header and the 10kW resistor on IC1’s pin 1 sets the micro to run normally unless a programmer is connected. We mainly included CON1 to simplify software development; you shouldn’t need it in regular operation, although it may be useful if we ever release a firmware update. MOD1 is an I2C OLED module powered at its Vcc pin by one of IC1’s I/O (input/output) pins. Pulling that pin low shuts off the display module completely. The other two connected I/O pins provide the I2C serial control interface. siliconchip.com.au The ESR Test Tweezers PCB (shown enlarged) looks similar to the Advanced Test Tweezers, but it has different capabilities. We used white PCBs to set them apart and will provide white arm PCBs to match. Tactile pushbuttons S1-S3 connect to three more I/O pins. Each is furnished with an internal pullup current from IC1, so their state can be easily detected without external parts. Debouncing is done by the software. The parts below MOD1 form the pulse injection circuitry. The 300W, 3kW and 30kW resistors allow nominal currents of 10mA, 1mA and 100μA to be generated from a 3V supply rail. IC1’s I/O pins can source 1mA with only a small (less than 0.1V) voltage drop. At 10mA, the drop would be around 0.6V, so the 300W resistor is provided with PNP transistor Q1 for switching; the second 3kW resistor provides the base current when Q1 is driven. The 22μF and 100nF capacitors in parallel are present to limit the amount of charge that can be injected if a large, charged capacitor is connected to the TP+ and TP− terminals. They act together as a low impedance when the pulses are applied. Silicon diodes D2 and D3 clamp any voltage from the capacitor being tested that exceeds their forward thresholds. The presence of D2 and D3 also means that the maximum pulse that can be applied is less than 1V. So even if you test a capacitor in reverse, the voltage should be low enough to avoid damaging it. IC1’s pins 21 and pin 22 are normally kept low, and pin 18 is kept high, turning Q1 off. The PULSE OUT line sits at 0V and the 22μF and 100nF capacitors are discharged via the 10kW resistor at bottom left. Any connected device is also discharged. Just before a pulse is applied, pins 21 and 22 are put in a high-impedance state by the processor. The appropriate Australia's electronics magazine pin is driven high (or low in the case of pin 18) to start the pulse. A measurement is then taken, and the pins revert to their idle state, ready for the next measurement. Sense amplifier The DUT (device under test), usually a capacitor or low-value resistor, connects between the TP+ and TP− pins. The test current applied to the PULSE OUT line induces a voltage at TP+ relative to circuit ground. The circuitry below IC1 amplifies the resulting voltage. When IC1’s pin 25 is low, this circuitry is powered off via the AMP POWER line, but it is brought high during testing. The 1MW/470kW divider ensures that Q2 is biased on slightly, as long as the supply is above about 2V. The 100nF capacitor at Q2’s base will have the bias voltage across it. Before a pulse is applied, the voltages at LOW ANALOG (pin 24, AN7) and AMP OUT (pin 23, AN8) can be sampled by IC1’s ADC to record a baseline voltage. The LOW ANALOG line will be close to 0V, and the AMP OUT pin will be close to the voltage provided by the AMP POWER line, which will be reduced slightly due to Q2 being biased on slightly. When a pulse is applied, the voltage rises at the TP+ pin, and the voltage at Q2’s base rises by a similar but slightly smaller amount. The reduction is due to the signal being attenuated by the surrounding components, such as the 10kW resistor and 1MW/470kW divider. Q2 behaves as an emitter follower, so its emitter will rise by much the same voltage, and the current through the 100W resistor will be proportional to the emitter voltage. June 2024  57 Since the collector current will match the emitter current (give or take the much smaller base current), the current through the 2.2kW resistor will be the same as that through the 100W resistor, meaning that the voltage across the 2.2kW resistor is 22 times that across the 100W resistor. The microcontroller then takes another sample to compare with the baseline values. In practice, the change at the AMP OUT pin is 10-15 times the change at the LOW ANALOG line. Of course, the AMP OUT line will fall during a pulse, while the LOW ANALOG line will rise, but it is simple enough to take the difference either way. The 1kW resistor and dual diode D1 provide another level of protection against external voltage sources (such as charged capacitors). While it appears that we effectively have six ranges to read (two analog inputs multiplied by three current sources), they overlap. We use four ranges: the 100μA source sensed at the LOW ANALOG input and all three test currents sensed at the AMP OUT input. Note that neither the LOW ANALOG or AMP OUT signals can swing rail-to-rail. Diode D1 clamps the LOW ANALOG level between AMP POWER and ground. Due to the 100W resistor, the AMP OUT signal cannot reach 0V, even if Q2 is saturated. Several calibration factors are programmed into the ESR Test Tweezers, including the levels at which the LOW ANALOG and AMP OUT signals are valid. Firmware The firmware driving the ESR Test Tweezers has much in common with the Advanced Test Tweezers since they use the same microcontroller. However, the ESR Test Tweezers do not have as many features. We have implemented three measurement modes, labelled ESR, RES Parts List – ESR Test Tweezers 1 double-sided main PCB coded 04105241, white solder mask, 36 × 28mm 2 double-sided arm PCBs coded 04106212, white solder mask, 100 × 8mm 1 double-sided back panel PCB coded 04105242, white solder mask, 36 × 28mm 1 0.96in 128×64 I2C OLED module, white (MOD1) 1 surface-mounting 32mm coin cell holder (BAT1) 3 SMD two-pin tactile switches (S1-S3) 1 3-pin gold-plated header, 2.54mm pitch (for tips and mounting MOD1) 1 4-pin header, 2.54mm pitch (to mount MOD1; usually comes with MOD1) 1 5-way header, 2.54mm pitch (CON1; optional, for ICSP) 1 M2 × 6mm Nylon panhead machine screw 2 M2 Nylon hex nuts 1 CR2032 or CR2025 lithium coin cell 1 small piece (eg, 2 × 2cm) of double-sided foam-core tape 2 100mm lengths of 10mm diameter clear heatshrink tubing Semiconductors 1 PIC24FJ256GA702-I/SS microcontroller programmed with 0410524A.HEX, SSOP-28 (IC1) 1 BC859 PNP transistor, SOT-23 (Q1; marking 4C) 1 BC817 NPN transistor, SOT-23 (Q2; marking 6C) 1 BAT54S dual schottky diode, SOT-23 (D1; marking KL4) 2 1N4007WS silicon diodes, SOD-323 (D2, D3) Capacitors (all SMD M2012/0805 size 6.3V+, X5R or X7R) 2 22μF 1 10μF 4 100nF 50V X7R extra 10μF (could be any type) for capacitance calibration Resistors (all SMD M2012/0805 size, 1/8W, 1% – codes in brackets) 1 1MW (105 or 1004) 2 10kW (103 or 1002) 1 1kW (102 or 1001) 1 470kW (474 or 4703) 2 3kW (302 or 3001) 1 300W (301 or 300R) 1 30kW (303 or 3002) 1 2.2kW (222 or 2201) 1 100W (101 or 100R) extra 10W, 100W and 1kW resistors for calibration 58 Silicon Chip Australia's electronics magazine and CAP. The ESR mode provides a function similar to our previous ESR meters. The main ESR testing mode uses the 100μA source and the LOW ANALOG input to detect if a component is present across TP+ and TP−. If so, it runs pulses from each of the 100μA, 1mA and 10mA sources, taking measurements using the AMP OUT signal from the pulse amplifier. If the 10mA pulse gives a valid AMP OUT reading, an ESR value is calculated using this data and a calibration factor. The 1mA pulse is checked next; if this is not valid, the ESR reading is taken from the 100μA pulse. You can tell which range has been used from the number of decimal places displayed. The 10mA pulse gives a result to two decimal places (0.01W), while the 1mA pulse gives a result to the nearest tenth of an ohm and so on. The RES mode (for resistance) is intended to measure the values of resistors, and it does so using only the 100μA source. That makes it a bit easier on the cell since there are no high-current pulses. The resolution of the RES mode is only around 10W; we expect it to be useful if you have many parts to sort through. The CAP mode gives a reading for both capacitance and ESR for the device under test. It also uses the 100μA source but applies it for long enough to charge up the capacitor, although this is somewhat limited by the 22μF capacitance in series with the DUT. It takes readings at 40μs, 400μs and 4ms from the start of the pulse. Our prototype gave us fairly accurate readings up to 50μF, so we’ve specified that as the maximum. The display will show dashes if the measured capacitance is higher than 50μF. The lower limit of 100nF is due to the resolution being about 10nF; the readings will tend to be inaccurate below 100nF. Since we have collected much the same data as the RES mode, an ESR reading is given too, with the same limitations as that mode. The firmware is also responsible for monitoring button presses and putting the processor to sleep when the device is not being used. There is a SETTINGS mode where preferences and calibration parameters can be changed, including the option to save the calibration and settings to flash memory. siliconchip.com.au We’ll delve into the calibration, setup & operation of the ESR Test Tweezers once construction is complete. Construction The SSOP-package microcontroller and M2012 parts mean assembly is not overly difficult, but it best suits constructors with some experience working with SMDs. If you have built the Advanced Test Tweezers, you should have little trouble with the ESR Test Tweezers. You will need a fine-tipped soldering iron, solder, flux paste and solder-­wicking braid. You should also have a magnifier, SMD tweezers and a means of holding the PCB in place, such as Blu-Tack. Good lighting is highly recommended, along with fume extraction (or work outdoors or near a large open window). Start by placing a little flux paste on the PCB pads for IC1 and rest it in place, checking that the pin 1 dot is in the correct position. Looking at the PCB with CON1 at the bottom, the text on the chip should be rightway-up. Check your build against the Fig.3 overlay diagram and accompanying photos. Note that our photos show CON1 fitted (which isn’t necessary unless you need to program the chip onboard). We also fitted a socket for MOD1 so we could remove the OLED if necessary; you can hard solder it using a standard pin header. Tack solder a couple of IC1’s leads and check that the other pins on both sides are correctly aligned. Adjust it if needed before carefully soldering the remaining pins. When finished, clean away any flux residue (eg, using alcohol) and closely inspect the soldering before proceeding, as it will be much easier to correct problems you find before more components are fitted. If you have bridged any of the pins of the IC, add a dab of flux paste on top and then use solder-wicking braid to clear it. Verify that all pins have had solder flow onto both the pin and the pad; if it’s just on the pin, it will not make a good connection to the PCB. Fit the three SOT-23 devices next, being careful not to mix them up. Dual diode D1 is near the top of the PCB, with PNP transistor Q1 near the bottom. Q2, the NPN transistor, is near IC1. If you aren’t sure which is which, they should have codes printed on the top. The parts list has likely codes siliconchip.com.au Fig.3: fit the components to both sides of the main PCB as shown here. Most of them are moderately easy to solder apart from IC1, which has closely spaced pins. Don’t mix up the different SOT-23 devices and note that D2 and D3 are connected in opposite directions. You don’t need to fit the headers for CON1 and MOD1; we did so to simplify the development process. These photos show a number of the important construction details. The arms attach to the main PCB with chunky solder fillets and are protected by heatshrink tubing. The white screw and nuts prevent the coin cell from being easily removed. A header pin soldered between the main PCB and the OLED PCB helps to reinforce the OLED mounting. A solder fillet mechanically secures the tips to the arms. Ensure that the solder surrounds one end of the header pin and flows into the holes in the arm PCB. (although they can vary by manufacturer). In each case, apply a little flux paste to the pads, tack one lead, then check that the other two leads are within their pads before soldering them. Australia's electronics magazine The two single diodes, D2 and D3, face in opposite directions, so check that the PCB’s cathode markings match the devices’ cathode stripes. Fit the capacitors next, being careful not to mix them up, as they are not June 2024  59 Screen 1: the default display at power-on. Touching the tips together will show a low readings in ohms. The cell voltage is displayed next to a countdown timer; when the timer expires, the Tweezers enter a lowpower sleep mode. Screen 2: the second operating mode uses the low-current range to measure resistance without unnecessarily loading the cell. If S1 is pressed in any operating mode, the timer is paused and dashes are displayed, as seen here. Screen 3: the third mode gives readings for capacitance (between 100nF and 50μF) and ESR using low-current pulses. A typical 10μF capacitor is connected here. Pressing S2 will resume the timer, as will changing modes with S3. marked. There are four 100nF capacitors on the front of the PCB plus one 10μF capacitor. One of the 22μF capacitors is on the front, while the other mounts on the back of the PCB. Now carefully work through the 11 resistors, matching the markings to the PCB silkscreen. The parts list shows the typical markings for the values we are using. Note that one of the 3kW parts is also on the back of the PCB. Next, solder the cell holder to the back of the PCB. Make sure that the opening faces towards the screw hole; you can compare it to our photos. Now thoroughly clean the flux residue off the PCB using a suitable solvent. Your flux might recommend one on its data sheet, but isopropyl alcohol is a good all-round alternative. Methylated spirits can be used, although it might leave residue. Allow the PCB to dry and inspect it again before proceeding. Next, solder the three tactile switches, S1-S3. We do this now to avoid getting solvent in their mechanisms. They are fitted in much the same way as the other surface mounting parts but are a bit larger and easier to manage. You can carefully clean up any flux residue from this step using a cotton tip or similar moistened by a small amount of solvent. available as part of the MPLAB X IDE download and can be installed on Windows, Mac and Linux computers. Choose the PIC24FJ256GA702 and open the 0410524A.HEX file in the IPE. Enable power from the programmer if you need it. To avoid permanently soldering the header to the PCB, you can push the 5-way header into the socket on your programmer while holding the other ends of the pins in place through the pads of CON1. It’s a bit of a juggle, but it will make the Tweezers easier to use later. Click the button to program the chip and check that the IPE verifies the program correctly. Programming the microcontroller You won’t need to perform this step if you have a pre-programmed microcontroller from the Silicon Chip Online Shop (including the one in our kit). If you have a blank micro, it’s best to program it now before the arms and display are fitted, as they might get in the way. You’ll need a Snap, PICkit 3, PICkit 4 or PICkit 5 programmer to program the PIC24FJ256GA702 microcontroller. The Snap cannot provide power, so you can temporarily fit the coin cell while programming occurs. We suggest using Microchip’s free MPLAB X IPE for programming. It’s Fitting the arms The arms are each formed from a long, thin PCB, with the tips using gold-plated header pins to offer a low-resistance contact surface that will not corrode. Tin each arm tip generously and remove the header pins from their shroud. The rear of the ESR Test Tweezers before the protective panel is attached. Coin Cell Precautions The ESR Test Tweezers make use of a coin cell. Even though we have added protections such as the locking screw, there is no reason for this device to be left anywhere that children could get hold of it. Also, the tips are pretty sharp and might cause injury if not used with care. 60 Silicon Chip Australia's electronics magazine siliconchip.com.au Screen 4: the Calibrate step takes readings with open and shorted tips and automatically sets the ADC saturation settings and probe (contact) resistance. Leave the tips open, press S1, then hold the tips together and press S1 again. Then release the tips. You can try again if you get an error. Screen 5: the bandgap voltage is the nominally 1.2V reference used by IC1 for voltage measurements. At the bottom is the calculated supply (cell) voltage; use S1 & S2 to trim the bandgap until the displayed voltage matches the cell voltage, measured using a multimeter or similar. Screen 6: the display can be rotated by 180° to suit left- or right-handed use. Press S1 to toggle it and the display will rotate immediately to the new setting. Like all the other settings here, these new values are used immediately but are not automatically saved to non-volatile flash memory. Using a pair of tweezers, solder a pin in position to the end of each arm, as shown in the photos. Try to line them up so they are centred. Note that the pins face inwards once the Tweezers are assembled. The arm PCBs slot over the larger pads in the corners of the main PCB. We recommend not fully pushing the main PCB into the slot; leave some room. Take care that the arms do not contact any other pads on the PCB. Fitting the arms is a bit like fitting the SMD components. Tack them roughly in place and check that they are aligned well, then add more solder to secure them firmly. Check the action and see that the tips meet correctly. Finally, add solid fillets of solder all-round to make them mechanically secure. Slide the heatshrink tubing over the arms, leaving the tips clear, then shrink it in place. Doing this now avoids damage to the OLED screen from excessive heat. We’ve taken some photos of the ends of the arms so you can see how the tips are attached and how the arms mount to the main PCB. prevent it from flexing and touching the main PCB. The back panel PCB can be soldered to the ground pins of MOD1 and CON1 or simply stuck to the back of the cell holder using double-sided tape. Ensure that the ESR TWEEZERS legend faces outwards (it’s a dual-use panel; the other side has the legend for the Advanced Test Tweezers). Finally, fit and secure the cell using the M2 Nylon screw and nuts. The nuts go on the same side as the cell, giving the depth needed to prevent the cell from being easily pulled out. The photos show how we have done that on our prototype. This is to prevent a child who might get hold of the Tweezers from removing the cell, which could be dangerous (it is hard to pull out regardless, but this is worthwhile extra security). The OLED screen The OLED is mounted next. You should be able to simply slot the fourway pin header into the pads of the MOD1 footprint on the PCB. We recommend temporarily placing a piece of card behind the OLED to prevent it from shorting the main PCB or arms. This will also help to add a small space between them. Tack one pin and check that the display is neat and square. Solder the remaining pins and remove the piece of card. You can fit the battery at this stage and check that everything works. You should see something like Screen 1 when it is first powered on. The reading should show a low value (under 0.1W) when the tips are shorted together. Remove the battery and solder a pin header or piece of solid wire to the top right corner of MOD1 and through to the main PCB underneath. This provides extra support for the OLED to Calibration and operation In regular operation, pushbutton S3 cycles between the modes, while S1 pauses the countdown timer. S2 The ESR Test Tweezers shown at actual size. It’s easy to read the screen while probing components. Most constructors do not need to solder the programming pin header. siliconchip.com.au Australia's electronics magazine June 2024  61 Screen 7: as with our other Tweezers, the OLED current draw is the single most significant drain on the cell. Setting the display brightness as low as possible (using S1 & S2) will prolong the cell life. The default level of 30 is the lowest usable setting; it can be changed in steps of five up to 255. Screen 8: the timer is displayed in the ESR, RES and CAP modes. The Tweezers go into a low-power sleep when it counts down to zero. The time can be set in multiples of five seconds up to 995 seconds (about 16 minutes). Since the timer can be paused, you might not need to change this setting. Screen 9: four screens like this calibrate the current pulse values. Connect the recommended resistor or capacitor value (100W here) across the probes and trim the value until the smaller text (99.90W) is close to the actual value connected. The default values are based on our prototype. (or any S3 mode change) will enable it again. The timer is shown at upper right and defaults to 10 seconds. When it expires, the low-power sleep mode is activated. Normal operation is resumed by pressing any button. Screen 2 shows the RES mode, with a 510W resistor connected. The three dashes at upper right indicate that the timer is paused. That means the ESR Test Tweezers will not go to sleep; it will probably drain the battery within a day or two if left like this. Screen 3 shows a 10μF capacitor connected in CAP mode; similarly, the timer has been paused to allow continuous readings to be made. All three operating modes also show the cell voltage at the top of the screen. Our prototype could function down to around 2V. This is about the point at which the PIC24 processor stops working. We specify 2.4V as the minimum supply voltage, as the accuracy of readings declines significantly below that. A long press of S3 (about two seconds) switches between operating and settings modes, with S3 then cycling through the various parameters and S1 and S2 adjusting them. The ESR Test Tweezers are usable without calibration, but the calibration steps are easy. There are also a couple of customisation preferences you can apply. Many calibration steps involve measuring a known value or voltage with the Tweezers and trimming the calibration factor until the displayed value is accurate, which is quite simple and intuitive. The suggested parts to use are 10W, 100W and 1kW resistors for calibrating ESR and a 10μF capacitor for calibrating capacitance. These values are near the top of their ranges, so they will provide the best resolution when performing the calibration. The calibration factors are shown in ohms because they are analogous to providing an exact value for the second resistor in a divider. However, because of the circuit’s complexity, they don’t correspond to any measurable resistance value. If you don’t have these exact value resistors, a lower value (preferably within that decade) will be adequate. Higher values might be outside the limit of their respective range, in which case the display will show “OPEN”. Remember that while resistors are readily available with 1% tolerance or better, capacitors could vary up to 20%. If possible, measure your capacitor with an accurate capacitance meter and use that instead of the nominal value. The panels above with Screens 4-12 detail the available calibration and setup options. Be sure to do the steps in the order listed, as some factors depend on others being set accurately beforehand. To return to normal operation from settings, press and hold S3 for about two seconds. Be aware that the sleep timer does not count down while in Settings mode, so you should return to operating mode immediately after changing the settings to avoid draining the battery. We designed this PCB to protect the back of the Test Tweezers. It can be attached to the cell holder with double-sided tape. It has markings on the opposite side so that it can also be used for the Advanced Test Tweezers. This blue version will be available on our website for users of the Advanced Test Tweezers, although a white version will be included in ESR Test Tweezers kits. 62 Silicon Chip Australia's electronics magazine Using the ESR Tweezers Connect the component to be tested between the tips of the probes and apply pressure to make sure they are making good contact. Polarised components should have their positive lead connected to the top (TP+) tip. However, the test voltage is low and should not cause damage if the component is reversed. Diagnosing capacitor problems due to high ESR is helpful for those in the power and audio fields. Now you can check that with a handy, compact tool that doesn’t cost much to build. The ESR Test Tweezers can measure ESR, resistance & capacitance (albeit over somewhat limited ranges), making them more valuable than the 2004 design and in a smaller package. SC siliconchip.com.au Screen 10: this is the last screen you should need to use for setup and calibration. Press S1 to save any altered settings to flash memory; S2 will load the defaults in case the saved data becomes corrupted. The defaults can also be loaded by holding S3 while powering up the Tweezers. Screen 11: after saving to or restoring from flash, you should get a message indicating it completed successfully. This is the last necessary step for setup and calibration; a long press of S3 will return to operating mode. As well as on the first use, you should recalibrate when a new cell is fitted. Screen 12: there are some screens after Save/Restore that should not need to be changed; they adjust the factors set by the Calibrate step shown in Screen 4. They include the probe contact resistance (shown here) and two pages with ADC limit values, used to check that readings are valid. Dissipation factor, loss angle and ESR Dissipation factor (DF) and loss angle (δ) measure the energy lost in an oscillating system. Many capacitor data sheets specify these instead of providing an ESR value. In our case, the dissipation factor and loss angle specifically refer to the losses in a capacitor due to ESR. These terms are also used in other contexts in electrical engineering, but we are looking specifically at capacitor ESR. We want to relate the capacitive reactance to the pure resistance due to ESR. Both can be plotted on the complex number plane, hence the references to angles. The loss angle is simply the inverse tangent function of the dissipation factor; thus, you might also see ‘tangent of loss angle’, which means the same as ‘dissipation factor’. Since the reactance changes with frequency, we need to focus on a specific frequency. For example, in a transformer-based mains power supply, the capacitors will be subjected to predominantly 100Hz (50Hz mains) or 120Hz (60Hz mains) ripple. Capacitors in audio circuits will be subjected to a broader range of frequencies, perhaps 20Hz to 20kHz. Capacitors in switchmode supplies will generally have ripple at 20kHz to 2MHz. Let’s take a concrete example of a capacitor, such as the 4700μF 50V electrolytics we have used in numerous projects, such as the Dual Hybrid Power Supply from February & March 2022 (siliconchip.au/Series/377). The Dual Hybrid Power Supply article specifies Nichicon UVZ1H472MRD capacitors to filter the rectified output of a mains transformer. Their data sheet lists a (maximum) tangent of loss angle of 0.2. That corresponds to a loss angle of 11.3° or 0.197 radians, ie, tan(11.3°) ≈ 0.2. Note that the loss angle (in radians) is very close to the dissipation factor for typical values. This is a well-known approximation for the tangent function at low values. Using the impedance equation for capacitors of Z = 1 ÷ (2πfC), we get an impedance value of 0.34W for a 4700μF capacitor at 100Hz. Multiplying this by the dissipation factor of 0.2 gives an ESR of 0.068W, close to the 0.05W noted in Table 1 for similar capacitors. If you measured an ESR siliconchip.com.au of 0.05W for such a capacitor, that would be acceptable, as it is below the specified maximum. The loss angle (δ) can be visualised with a diagram of the complex impedance (Fig.a), which shows the reactance due to capacitance in the imaginary plane (vertical) and the resistance due to ESR in the real plane (horizontal). The cosine of the loss angle relates to the proportion of energy transmitted by the capacitor (compared to that dissipated by the ESR). At low loss angles, the cosine of δ is close to unity, and there are no losses, although they rise sharply as the angle (and ESR) increases. These ideas are similar to concepts like power factor (and power angle), although, in AC power systems, the capacitive element is undesirable and a purely resistive load is preferred. You can also see from this how a high ESR would create a phase shift for audio signals, increasing distortion. Australia's electronics magazine Fig.a: this complex plot shows how a capacitor’s impedance (Z), ESR and loss angle (δ) are related. The dissipation factor (DF) is the ratio of the horizontal distance (ESR) to the vertical distance (Z), ie, DF = ESR ÷ Z = tan(δ). June 2024  63