Silicon ChipDigital Capacitance Meter - January 2025 SILICON CHIP
  1. Outer Front Cover
  2. Contents
  3. Publisher's Letter: As expected, the 3G shutdown was messy
  4. Feature: Data Centres & Cloud Computing by Dr David Maddison
  5. Project: Digital Capacitance Meter by Stephen Denholm
  6. Project: Compact HiFi Headphone Amp by Nicholas Vinen
  7. Feature: Precision Electronics, Part 3 by Andrew Levido
  8. Project: Gesture-controlled USB lamp by Tim Blythman
  9. Project: BIG LED clock by Tim Blythman
  10. Subscriptions
  11. Project: 40A Current Probe by Andrew Levido
  12. PartShop
  13. Project: Battery-Powered Model Train by Les Kerr
  14. Feature: TCS230 Colour Sensor by Jim Rowe
  15. Feature: Extracting Data from Micros by Dr Hugo Holden
  16. Serviceman's Log: Relating a range of rambling repairs by Various
  17. Vintage Radio: Monarch “All-American Five” radio by Ian Batty
  18. Market Centre
  19. Advertising Index
  20. Outer Back Cover

This is only a preview of the January 2025 issue of Silicon Chip.

You can view 38 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 "Digital Capacitance Meter":
  • Digital Capacitance Meter PCB [04111241] (AUD $5.00)
  • PIC16F1847-I/P programmed for the Digital Capacitance Meter [0411124A.HEX] (Programmed Microcontroller, AUD $15.00)
  • 1.3-inch blue OLED with 4-pin I²C interface (Component, AUD $15.00)
  • 1.3-inch white OLED with 4-pin I²C interface (Component, AUD $15.00)
  • Firmware for the Digital Capacitance Meter (Software, Free)
  • Digital Capacitance Meter PCB pattern (PDF download) [04111241] (Free)
  • Digital Capacitance Meter front panel and drilling diagrams (Panel Artwork, Free)
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:
  • 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 "Gesture-controlled USB lamp":
  • Firmware for JMP018 - Gesture Controlled USB Lamp (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 "BIG LED clock":
  • Firmware for JMP019 - BIG LED Clock (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 "40A Current Probe":
  • 40A Current Probe PCB [9049-01] (AUD $5.00)
  • 5MHz 50A Current Probe PCB pattern (PDF download) [9049-01] (Free)
  • Panel artwork and drilling diagrams for the Current Probe (Free)
Items relevant to "Battery-Powered Model Train":
  • Battery Powered Model Train transmitter PCB [09110241] (AUD $2.50)
  • Battery Powered Model Train TH receiver PCB [09110242] (AUD $2.50)
  • Battery Powered Model Train SMD receiver PCB [09110243] (AUD $2.50)
  • Battery Powered Model Train charger PCB [09110244] (AUD $2.50)
  • PIC12F617-I/P programmed for the Battery-Powered Model Train transmitter [0911024T.HEX] (Programmed Microcontroller, AUD $10.00)
  • PIC16F1455-I/P programmed for the Battery-Powered Model Train TH receiver [0911024R.HEX] (Programmed Microcontroller, AUD $10.00)
  • PIC16F1455-I/SL programmed for the Battery-Powered Model Train SMD receiver [0911024R.HEX] (Programmed Microcontroller, AUD $10.00)
  • PIC12F617-I/P programmed for the Battery-Powered Model Train charger [0911024C.HEX] (Programmed Microcontroller, AUD $10.00)
  • Software for the Battery Powered Model Railway project (Free)
  • Battery Powered Model Train PCB patterns (PDF download) [09110241-4] (Free)
Items relevant to "TCS230 Colour Sensor":
  • Test sketch for the TCS230 Colour Sensor Module (Software, 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 $13.00.

Project by Stephen Denholm This straightforward piece of test equipment measures capacitor values over a wide range, from about 10pF to 10,000μF (10mF). It’s easy to assemble with all through-hole parts, fits into a UB1 Jiffy box, and won’t break the bank either. I Digital Capacitance Meter occasionally need to measure values of large electrolytic capacitors (up to at least 6800µF) but have been restrained by the limited capacitance measurement ranges of the DMMs I have. To overcome this, I’ve resorted to setting up a test circuit using a digital oscilloscope to measure a capacitor’s value by measuring their charge time. This worked well but was time consuming. I explored Silicon Chip magazines looking for a relatively simple capacitance meter project that I could expand my development skills on and build. I found quite a few articles on the subject, ranging from very simple to quite advanced designs. Of particular interest was the Circuit Notebook item “PIC capacitance meter measures charging time” by William Andrew (July 2008; siliconchip. au/Article/1874). It was a little too siliconchip.com.au basic for my requirements, but I liked the relatively simple design concept, which appeared to work. I therefore decided to develop a similar design that was also PICbased, would use the charging time measurement concept, was relatively simple to build and compact, covered a range from about 10pF up to about 10,000µF, and was powered by a standard 9V battery. I was also inspired by Jim Rowe’s article on low cost 1.3-inch OLED displays in October 2023 (siliconchip. au/Article/15980). I thought I would have a go at also incorporating one of those low-power display modules into my design. Circuit details As shown in Fig.1, my circuit uses an 8-bit enhanced mid-range Australia's electronics magazine PIC16F1847 microcontroller unit (MCU). It has three capacitance ranges selected by switch S1 and shows the measured value of the capacitor under test (Cx) on the 1.3-inch OLED display (MOD1). The OLED is also used to display any over/under range or battery voltage warning messages that are necessary. The measurement operating sequence is commenced by pressing pushbutton switch S3. The MCU will then first ensure that Cx is fully discharged by switching on Q4 for a short period, then off, discharging it via the 33W resistor. It then starts charging capacitor Cx via one of Mosfets Q1, Q2 or Q3 and the associated series resistance. At the same time, it starts the MCU’s 16-bit Timer1, which operates with a counting interval of 1µs. The charging January 2025  27 voltage developed across Cx is then measured by the MCU’s Comparator1 positive input (C1IN+, pin 2) and compared to the voltage applied on its negative input C12IN0− (pin 17). As soon as the charging voltage exceeds the voltage at C12IN0−, the comparator stops Timer1, initiates a program interrupt and passes control back to the main program, where the Timer1 count register values are used to calculate the capacitance. As the source voltage for charging Cx is the 5V Vdd supply, the comparator C12IN0− input is set to 63.2% of Vdd, nominally 3.16V. This ensures that the comparator operation and hence measurement time will always be equivalent to one RC time constant of the capacitor under test. That simplifies the calculation to Cx = Timer1 count (µs) ÷ selected range series resistance, scaled accordingly. For the Lo, Mid and Hi capacitance ranges, the MCU calculations use series resistance values of 2MW, 25kW or 500W, respectively. It also means that, even if the output of the 5V regulator drifts with temperature or time, the measurements should remain accurate. The actual values used in the circuit are provided by the fixed/variable resistance combinations VR1 + 1MW, VR2 + 12kW and VR3 + 500W, which are switched into or out of circuit by the MCU via Mosfets Q1, Q2 and Q3. I used P-channel SMD devices as, particularly for the Hi range, they need 28 Silicon Chip low on-resistances to slightly improve the measurement accuracy. Suitable PNP transistors such as BC858s with base resistors of say 1kW to 3.9kW may work reasonably well, but with a small reduction in measurement performance. However, I have not tried that arrangement. re-compiling the code and uploading it to the MCU if necessary. I did briefly think about adding an auto-­ zeroing function to the meter design but decided it wasn’t worth the extra effort for my particular requirements, especially if I always stick to using the same meter leads. Performance Construction Performance-wise, my meter has been providing quite accurate and repeatable results across all three ranges. I have confirmed this occasionally by checking the meter’s range extremities against the calibration capacitors that I now keep for such a purpose. On the Lo range, it is necessary to keep the meter leads short to minimise any stray capacitance. In the MCU program code, I have allowed compensation for zero-offset in the Lo range calculations, which significantly improves the capacitance measurements for values below 1nF and surprisingly allows the meter to achieve quite accurate and consistent results down to about 10pF. This zero-offset value compensates for some inherent MCU program instruction cycle time, which starts to dominate the measurements for very short capacitance charging durations. It also compensates for the stray capacitance inherent in the physical construction of the meter and the short leads I use. The zero-offset value is hard-coded, but it is not too difficult to change by The board, coded 04111241 and measuring 80 × 100mm, is a double-­ sided design, but there are only a few top-layer tracks that can easily be replaced by wire links, as you will see in the photo of my prototype. So if you are etching the board yourself, start by fitting the four wire links you can see in that photo; they are also visible as top-layer tracks in the overlay diagram, Fig.2. Also note that there are four SMD components that mount on the underside: Mosfets Q1-Q3 and regulator REG1. They are shown in ‘X-ray’ fashion in Fig.2. Start by soldering them in place while the board will still fit flat on your bench. Q1-Q3 are all the same types and REG1 is in a different package, so it should be obvious which goes where and in what orientation. Do make sure that the leads are sitting flat on the board before soldering and not sticking up in the air, which would indicate that the part is upside-down. Tack each part by one pin and check that all the leads are over the matching PCB pads. If not, remelt that Australia's electronics magazine siliconchip.com.au Fig.1: the circuit diagram for the Capacitance Meter. S1 is used to switch the capacitance range. joint and gently nudge it into place. Once it’s properly aligned, solder the remainder leads and then refresh the first joint. Next, flip the board over and solder all the resistors in place. They are mounted with the leads bent quite close to the bodies. Follow the overlay diagram to see which values go where. There is just one diode, so fit that now, making sure its cathode stripe goes towards the top edge of the board as shown in Fig.2. You don’t have to use a socket for IC1, but it makes it easier to swap that chip if that ever becomes necessary. Solder either the socket or IC1 directly to the board, but in either case, make sure it is orientated with its notched (pin 1) end towards the top of the PCB. Solder terminal block CON1 in place now. We recommend that its wire entry holes are kept towards the left-hand side, although you can insert the wires from either end. Next, fit the headers (CON2-CON6), 100nF capacitor (which is not polarised) and transistor Q4 (orientated as shown). Note that CON4 is only required if you plan on (re)programming IC1 in-circuit. You could leave the other headers off and solder wires directly to the board, but we suggest using headers to make assembly (and if required later, disassembly) much easier. Mount the four trimpots next, making sure the adjustment screws all go towards the bottom of the board as per Fig.2: the overlay/wiring diagram for the Digital Capacitance Meter. Check your OLED pinout before wiring it up; the 5V pin is at the top of CON5. siliconchip.com.au Australia's electronics magazine January 2025  29 Fig.2. They are all different values, so don’t get them mixed up. Now solder the two electrolytic capacitors in place, ensuring that the longer (positive) lead goes into the bottom hole in each case. The negative striped ends of the cans should be near the top edge of the PCB. PCB pins for test points TP1 and TP2 are not strictly required if you have a double-sided board, as you can simply insert DMM probes into the plated through-holes. If you have a single-­ sided board, you will need to solder PCB pins into the two test point holes. Rotary switch The last part to mount directly to the PCB is the rotary switch. It is a twopole type. As supplied, it will probably have six positions, but we only need three. To change that, undo the nut and remove the washer from the shaft. Prise up the stop washer and rotate the switch fully anti-clockwise, then re-insert the stop washer with its pin going into the second hole between the moulded “3” and “4”. Check that it now only switches through three possible positions. If not, change the position of the stop washer and try again. Once it’s correct, put the lock washer back over the shaft and tighten the nut on top. In my build, the switch shaft length as supplied was just long enough to Figs.3 & 4: the cutting diagrams for the base and lid of the Jiffy box. You have some flexibility with the locations cutouts on the lid, as they’re mounted off the board. All diagrams are shown at actual size, and all dimensions are in millimetres. 30 Silicon Chip Australia's electronics magazine siliconchip.com.au pass through the front panel with enough poking through to attach the knob. The exact length required depends on the height of the spacers used to mount the PCB in the box and the knob you’re using. Ideally, you should temporarily mount the PCB in the box so you can check how much to cut off (if any). To do that, you will first need to drill PCB mounting holes in the base of the box and at least one hole in the lid (for the rotary switch shaft). The PCB mounting hole positions are shown in Fig.3 and the lid holes in Fig.4. With the shaft cut to length, remove the PCB from the box and solder the switch to it. There are two possible orientations, so match the switch to the photos and overlay. The next job is to mount the remaining parts on the front panel/lid and solder wires with female DuPont headers ready to plug into the headers on the PCB. If you haven’t already, finish making the holes in the lid as per Fig.4, after reading the next two paragraphs. Regarding the OLED screen, you can see from the photos that I used countersunk head screws, Nylon washers and nuts to mount it to a clear acrylic sub-panel, then glued that panel to the inside of the lid using epoxy. I did it this way as the acrylic panel provides some protection for the OLED screen; the screw heads are hidden under the front panel label. You could use the same approach, or mount the OLED directly to the lid using the holes shown in Fig.4. However, if you do that, note that even if you countersink the holes on the outside, the screws will probably still project above the surface of the lid due to its thinness. You may be able to cover them with a label but it’s better to use my approach, if possible, if you want a flat panel label. If you use my approach, use washers to space the OLED screen from the acrylic panel so the screen isn’t crushed when you tighen the screws. Strip off pairs of DuPont jumper wires from the ribbon for the 9V battery snap and switches S2 & S3. Strip off a set of four for the OLED. Cut them so that you have bare wires on one end, then solder them to the panel-­ mounting parts (check the OLED pinout with reference to Fig.2). For the two banana sockets, use medium-duty hookup wire (or similar) in two different colours instead. 1 single- or double-sided PCB coded 04111241, 80 × 100mm 1 UB1 Jiffy box 1 panel label, 100 × 160mm 1 1.3-inch (33mm) 128×64 pixel I2C OLED display module (MOD1) [Silicon Chip SC5026 or SC6511] 1 3mm clear acrylic sheet of ~43 x 41mm (for mounting the OLED module) 1 2-pole sealed rotary switch (S1) [Altronics S3022, Jaycar SR1212] 1 miniature panel-mount SPST toggle switch (S2) 1 panel-mount momentary NO pushbutton switch (S3) [Altronics S0960, Jaycar SP0700] 1 small-to-medium knob to suit S1 1 2-way 5.08mm pitch terminal block (CON1) 3 2-pin headers, 2.54mm pitch (CON2, CON3, CON6) 1 5-pin header, 2.54mm pitch (CON4; optional, for ICSP) 1 4-pin header, 2.54mm pitch (CON5) 1 red panel-mount binding banana socket 1 black panel-mount binding banana socket 1 pair of banana plug to crocodile clip test leads 1 2MW top-adjust multi-turn trimpot (VR1) 1 20kW top-adjust multi-turn trimpot (VR2) 1 500W top-adjust multi-turn trimpot (VR3) 1 50kW top-adjust multi-turn trimpot (VR4) 1 18-pin DIL IC socket (optional) 1 9V battery snap 1 9V battery retaining clip 1 9V battery 5 M3 × 6mm panhead machine screw 8 M3 × 6mm countersunk machine screw 4 M3 × 10mm tapped spacers 4 Nylon M3 washers 5 M3 hex nuts 10 short (~100mm) female/female DuPont jumper leads, joined in a ribbon 2 100mm lengths of medium-duty hookup wire (red & black) 1 100mm length of 1.5mm diameter black/clear/white heatshrink tubing 2 PCB stakes/pins (optional) Semiconductors 1 PIC16F1847-I/P 8-bit microcontroller programmed with 0411124A.HEX, DIP-18 (IC1) 1 AMS1117-5.0 or similar 5V 1A LDO linear regulator, SOT-223 (REG1) 3 AO3401(A) or SQ2351ES P-channel logic-level Mosfets, SOT-23 (Q1-Q3) 1 BC337 45V 800mA NPN transistor, TO-92 (Q4) 1 1N5819 40V 1A schottky diode (D1) Capacitors 1 470μF 10V radial electrolytic 1 100μF 10V ±5% tantalum [Vishay Sprague 293D107X5010D2TE3] 1 10μF 50V radial electrolytic 1 2.2μF 50V ±5% MKT [TDK B32529D0225J000] 1 100nF 50V ceramic or multi-layer ceramic 1 100nF 63/100V ±5% MKT [Altronics R3025B, Vishay BFC237012104] Resistors (all ¼W 1% axial) 1 1MW 1 27kW 1 22kW 1 15kW 1 12kW 10 10kW 1 4.7kW 1 1kW 1 270W 1 33W siliconchip.com.au Australia's electronics magazine Parts List – Digital Capacitance Meter January 2025  31 You can then plug everything into the headers on the PCB, using Fig.2 as a reference, and screw the two banana socket wires into the terminals of CON1. Ensure the wire routing is correct for the 9V battery, OLED screen and wires to CON1. With IC1 out of its socket, switch on power and check the voltage between pins 5 and 14 of that socket. You should get a reading between 4.5V and 5.5V. If not, switch off and check for faults. Assuming it’s close to 5V, switch off and insert IC1 in its socket, ensuring it has the correct orientation and that none of the leads fold up under the body when you do so. If IC1 has not been programmed, you can now power the device back on and connect an in-circuit programmer to CON4, with its pin 1 marking to the left as shown. Use software like Microchip’s free MPLAB IPE to load the HEX file, which you can download from siliconchip.au/Shop/6/532 You can then switch it back on and check that the screen display comes up normally. If so, you can proceed with calibration. Otherwise, power it off and check your soldering and parts placement. Calibration To initially calibrate the meter, set the voltage at test point TP1 (IC1’s negative comparator input voltage) to 3.16V by adjusting trimpot VR4. There is no ground test point; you could use negative (bottom) terminal of CON1. Next, for each range in turn, make repeated capacitance measurements of a calibration capacitor of known value while adjusting the selected range trimpot (VR1-VR3) to progressively obtain a calibrated value very close to the known capacitances. The parts list includes suggestions of three low-cost 5% tolerance capacitors that could be used, although sourcing the larger values may not be easy (DigiKey and Mouser have suitable parts). Cycle through the ranges and adjust each to get the correct measurement until you are only making minimal adjustments. In operation, once the measurement and calculation of the capacitance is completed, the MCU displays the value on the OLED in units of either pF, nF or µF depending on the range selected and size of the capacitor under test. If the measured value is out of range, a warning is shown to select a higher or lower range if possible. Also, before any measurement of Cx commences, the MCU checks the battery voltage and a warning message appears if it is low. If the voltage is too low (less than about 7V), a message to replace the battery is displayed and measurement stops. Conclusion Having built, tested and calibrated my meter, I decided to check my stock of electrolytic capacitors. 32 Silicon Chip The finished Digital Capacitance Meter with crocodile clips attached (shown below). Our version of the front panel label (shown here at 50% actual size) will be available to download from our website at siliconchip.com.au/Shop/11/585 I found some relatively new, unused electrolytic capacitors with values nowhere near their labelled value and not within the specified tolerance. In fact, I would say these capacitors had been incorrectly labelled or manufactured, as they were that far out! This was rather concerning as these components had been sourced from reputable suppliers. Buyer beware, as they say! I built the Touchscreen Wide-Range RCL Box (June 2020; siliconchip.au/ Series/345) a few years ago now. I’ve found it to be a very handy device. When I first built it, I thoroughly checked all the resistance values and found these to be well within the ±1% tolerance, which was great. However, I did not check the C and L values. So, out of interest, I decided to do a quick check on the capacitance values with my new meter. Surprisingly, I found two capacitors well outside (>30%) the ±10% tolerance I was expecting, even though I’m sure I had purchased SMD capacitors with specified tolerances of ±10% or better. I also performed a check with a DMM on capacitance range and got very similar results. I’m now waiting on a rainy day to do some further diagnostics on the RCL box. SC siliconchip.com.au