Silicon ChipAdvanced Test Tweezers, Part 1 - February 2023 SILICON CHIP
  1. Outer Front Cover
  2. Contents
  3. Publisher's Letter: Ripping customers off through service & repair
  4. Feature: Computer Memory, Part 2 by Dr David Maddison
  5. Feature: Computer Memory Addendum by Nicholas Vinen
  6. Project: Active Mains Soft Starter, Part 1 by John Clarke
  7. Subscriptions
  8. Project: Advanced Test Tweezers, Part 1 by Tim Blythman
  9. Feature: A 30mm Spark-Gap Tesla Coil by Flavio Spedalieri
  10. PartShop
  11. Project: Active Subwoofer, Part 2 by Phil Prosser
  12. Product Showcase
  13. Feature: Heart Rate Sensor Module by Jim Rowe
  14. Project: Noughts & Crosses, Part 2 by Dr Hugo Holden
  15. Serviceman's Log: Nature abhors a vacuum, and so do I by Dave Thompson
  16. Vintage Radio: VE301Wn Dyn Volksemfanger by Ian Batty
  17. Market Centre
  18. Advertising Index
  19. Notes & Errata: Bass Block Subwoofer, January 2021; High-Performance Active Subwoofer, December 2022
  20. Outer Back Cover

This is only a preview of the February 2023 issue of Silicon Chip.

You can view 36 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:
  • Computer Memory, Part 1 (January 2023)
  • Computer Memory, Part 1 (January 2023)
  • Computer Memory, Part 2 (February 2023)
  • Computer Memory Addendum (February 2023)
  • Computer Memory, Part 2 (February 2023)
  • Computer Memory Addendum (February 2023)
Articles in this series:
  • Computer Memory, Part 1 (January 2023)
  • Computer Memory, Part 1 (January 2023)
  • Computer Memory, Part 2 (February 2023)
  • Computer Memory Addendum (February 2023)
  • Computer Memory, Part 2 (February 2023)
  • Computer Memory Addendum (February 2023)
Items relevant to "Active Mains Soft Starter, Part 1":
  • Active Mains Soft Starter PCB [10110221] (AUD $10.00)
  • PIC12F617-I/P programmed for the Active Mains Soft Starter [1011022A.HEX] (Programmed Microcontroller, AUD $10.00)
  • Firmware for the Active Mains Soft Starter [1011022A] (Software, Free)
  • Active Mains Soft Starter PCB pattern (PDF download) [10110221] (Free)
  • Active Mains Soft Starter lid panel artwork (PDF download) (Free)
Articles in this series:
  • Active Mains Soft Starter, Part 1 (February 2023)
  • Active Mains Soft Starter, Part 1 (February 2023)
  • Active Mains Soft Starter, Part 2 (March 2023)
  • Active Mains Soft Starter, Part 2 (March 2023)
  • Active Mains Soft Starter (January 2024)
  • Active Mains Soft Starter (January 2024)
  • Active Mains Soft Starter (February 2024)
  • Active Mains Soft Starter (February 2024)
Items relevant to "Advanced Test Tweezers, Part 1":
  • Advanced/ESR Test Tweezers back panel PCB (blue) [04105242] (AUD $2.50)
  • Advanced SMD Test Tweezers PCB set [04106221+04106212 {blue}] (AUD $10.00)
  • PIC24FJ256GA702-I/SS programmed for the Advanced SMD Test Tweezers (0410622A.HEX) (Programmed Microcontroller, AUD $15.00)
  • 0.96in cyan OLED with SSD1306 controller (Component, AUD $10.00)
  • Advanced SMD Test Tweezers kit (Component, AUD $45.00)
  • Firmware for the Advanced SMD Test Tweezers [0410622A.HEX] (Software, Free)
  • Advanced SMD Test Tweezers PCB patterns (PDF download) [04106221+04106212] (Free)
  • Advanced SMD Test Tweezers sticker artwork (PDF download) (Panel Artwork, Free)
Articles in this series:
  • Advanced Test Tweezers, Part 1 (February 2023)
  • Advanced Test Tweezers, Part 1 (February 2023)
  • Advanced Test Tweezers, Part 2 (March 2023)
  • Advanced Test Tweezers, Part 2 (March 2023)
  • ADVANCED SMD TEST TWEEZERS (January 2024)
  • ADVANCED SMD TEST TWEEZERS (January 2024)
  • ADVANCED SMD TEST TWEEZERS (February 2024)
  • ADVANCED SMD TEST TWEEZERS (February 2024)
Items relevant to "Active Subwoofer, Part 2":
  • Active Monitor Speakers power supply PCB [01112221] (AUD $10.00)
  • Active Monitor Speakers cutting and assembly diagrams (Panel Artwork, Free)
  • Ultra-LD Mk.4 Amplifier PCB [01107151 RevC] (AUD $15.00)
  • Ultra-LD Mk3 200W Amplifier Module PCB [01107111] (AUD $15.00)
  • High-Performance Subwoofer amplifier bracket & heatsink diagrams (PDF download) (Panel Artwork, Free)
Articles in this series:
  • Active Monitor Speakers, Part 1 (November 2022)
  • Active Monitor Speakers, Part 1 (November 2022)
  • Active Monitor Speakers, Part 2 (December 2022)
  • Active Monitor Speakers, Part 2 (December 2022)
  • Active Subwoofer, Part 1 (January 2023)
  • Active Subwoofer, Part 1 (January 2023)
  • Active Subwoofer, Part 2 (February 2023)
  • Active Subwoofer, Part 2 (February 2023)
Items relevant to "Heart Rate Sensor Module":
  • Sample software for the Heart Rate Sensor Module (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)
Items relevant to "Noughts & Crosses, Part 2":
  • Static Noughts & Crosses Computer game board PCB [08111221] (AUD $12.50)
  • Static Noughts & Crosses Computer compute board PCB [08111222] (AUD $12.50)
  • W27C020-70 EEPROM programmed for the Static Noughts & Crosses Computer [0811122A.bin] (Programmed Microcontroller, AUD $10.00)
  • EEPROM data for the Static Noughts & Crosses Computer (0811122A.bin) (Software, Free)
  • Static Noughts & Crosses Computer case details (PDF download) (Panel Artwork, Free)
Articles in this series:
  • Noughts & Crosses Machine, Pt1 (January 2023)
  • Noughts & Crosses Machine, Pt1 (January 2023)
  • Noughts & Crosses, Part 2 (February 2023)
  • Noughts & Crosses, Part 2 (February 2023)

Purchase a printed copy of this issue for $11.50.

ADVANCED ADVANCED TEST TEST SMD SMD T EEZERS EEZERS Part 1 by Tim Blythman The SMD Test Tweezers and their successor, the Improved SMD Test Tweezers, are both simple but useful tools. We have developed an enhanced version with many more features and other improvements, such as a larger screen and an easier-to-use interface. I f you have not already built an SMD Tweezers kit, you may be wondering what the fuss is about. After publishing our simple design from October 2021 (siliconchip.com. au/Article/15057) and the following refresh in April 2022 (siliconchip.au/ Article/15276), we were left with no doubt that both variants were very popular, with hundreds of kits sold. Both these designs used a tiny 8-pin 8-bit microcontroller run from a single CR2032 coin cell to probe components by applying voltage via a resistor. The original Tweezers measured resistance, capacitance or diode forward voltage and displayed the readings on a tiny OLED screen. The Improved Tweezers used the same hardware but a microcontroller with more flash memory, allowing us to add extra features, such as the ability to flip the display to suit being used in either hand and an expanded capacitance range. Advancements Both those variants of the Tweezers were designed with small size, low cost and simplicity in mind. They both used just about the cheapest microcontroller and smallest display possible. Given their popularity, we had to produce a follow-up, and knew it needed to be good. To be clear, this is not an incremental change over the first two designs, but a vast improvement. You can see from the list of features that the Advanced Tweezers will do much more than its predecessors. One of the things we looked for in a new microcontroller for the Advanced Tweezers was a 12-bit ADC (analog-­ to-digital converter) peripheral. This would provide extra resolution over the 10-bit ADC that is standard on most 8-bit PIC microcontrollers, such as those we used for the previous Tweezers. We reviewed some of the newer 8-pin PICs in the October 2022 issue (siliconchip.au/Article/15505), and have since started using the PIC16F18146 in some projects. However, we chose not to use an 8-bit PIC for our Advanced Tweezers. Instead, we have chosen a 28-pin 16-bit micro, the PIC24FJ256GA702. It also has a 12-bit ADC peripheral, so we still get the improved resolution. It also has some other interesting peripherals that we’ve put to good use. The Advanced SMD Test Tweezers are a bit bigger than the earlier version but only because they incorporate a larger display and extra pushbuttons. They also have new measuring modes, including an oscilloscope, voltmeter, I/V curve plotter and a tone/square wave generator. 44 Silicon Chip Australia's electronics magazine siliconchip.com.au It isn’t much more expensive than an 8-bit micro, but it is undoubtedly a lot more capable. Importantly, it has much more RAM and flash memory, so we can include many more modes and settings. That extra memory also means that the blocky font used on the earlier Tweezers has been replaced by one that is larger and much more readable. We’ve also used some interesting techniques for probing and sensing. So let’s introduce the various test modes that are available. Modes The earlier Tweezers variants only had a single mode which would try to identify the device under test and display its value. For a resistor or capacitor, it would show resistance or capacitance. For a diode, it would work out the forward voltage and polarity and display both. Dual anti-parallel diodes, such as bi-colour LEDs, would not be detected as they conduct in both directions. The Advanced Tweezers add many more modes, which we will briefly introduce before going into more detail during the usage section of the article (in the second part). Like the older variants, several modes are for characterising components such as resistors, capacitors and diodes. Instead of attempting to identify a device under test, the Advanced Tweezers reports all of its assessments together. This is made possible by using a larger OLED display and removes the possibility of the Tweezers identifying a component incorrectly. There are still dedicated modes for resistors, capacitors and diodes, which each display only one value in a large, clear font, but you need to select them. These modes are especially handy when dealing with surface-mounting capacitors, which typically don’t have any distinguishing markings. The diode mode also provides a low, steady bias current which is only interrupted by the reading cycle. This has the advantage that you know immediately that the LED is working and what colour it is when it lights. Checking the value of hard-to-read surface mounting parts is one of the great advantages of the Tweezers format. It is especially handy for capacitors and LEDs, which often have subtle polarity markings. siliconchip.com.au Features & Specifications ❎ 10 different modes (see modes & options lists) ❎ Runs from a single CR2032 coin cell ❎ Sleep current <1μA ❎ Resistance accuracy ~1% when calibrated ❎ Voltage accuracy ~2% when calibrated ❎ Capacitance accuracy ~5% when calibrated ❎ Adjustable sleep timeout ❎ Adjustable display brightness ❎ Sleep timer can be paused for continuous operation ❎ Display can be rotated to suit left- and right-handed use ❎ Cell voltage displayed in all modes ❎ Auto calibration of some parameters ❎ Works down to 2.4V cell voltage ❎ Standby cell life: equal to shelf life ❎ Operating cell life: typically several hours of use Modes    1    2    3    4    5    6    7    8    9 10 Resistance: 1Ω to 40MΩ, ±1% Capacitance: 10pF to 150μF, ±5%; gives readings up to 2000μF Diode forward voltage: 0-2.4V, ±2% Combined resistance/capacitance/diode display Voltmeter: 0 to ±30V ±2% Oscilloscope: ranges ±30V at up to 25kSa/s Serial UART decoder I/V curve plotter Logic probe Audio tone/square wave generator Oscilloscope options ❎ Voltage ranges: 0-5V, 0-10V, 0-20V, 0-30V, -5 to +5V, -10 to +10V, -20 to +20V, -30 to +30V ❎ Trigger on rising edge, falling edge, both or continuously (auto) ❎ Trigger level settable in 1V intervals ❎ Timebase (per div, 4 divs visible): 1ms, 2ms, 5ms, 10ms, 20ms, 50ms, 100ms, 200ms or 500ms Serial UART decoder options ❎ Baud rate: 110, 1200, 2400, 4800, 9600, 14.4k, 28.8k, 38.4k, 57.6k or 115.2k ❎ 8N, 8O, 8E and 9N data length/parity ❎ 1 or 2 stop bits ❎ active high or active low ❎ text (terminal) or HEX display I/V curve plotter options ❎ six-point sampling, live update, centred on 0V/0mA ❎ vertical scale (per div, four on screen): 1mA, 500μA, 200μA, 100μA or 50μA ❎ horizontal scale (per div, four on screen): 2V, 1V, 500mV, 200mV or 100mV Tone/square wave generator options ❎ frequency: 50Hz, 60Hz, 100Hz, 440Hz or 1kHz ❎ nominal amplitudes (pk-pk): 300mV, 600mV, 3V or 6V ❎ on/off control (defaults to off) Australia's electronics magazine February 2023  45 Fig.1: while the 28-pin microcontroller chip is about twice the physical size of the SOIC-8 parts used for the earlier Tweezers, there are many advantages to having so many available I/O pins. 10 pins are used for probing the tips, giving much more range. Three more I/O pins handle buttons for control and calibration, while the OLED display can be powered down completely using another spare pin. There is now also a digital voltmeter mode, which shows the voltage across the probe tips, up to ±30V. In oscilloscope mode, it can sample at up to 25kSa/s with varying voltage and time scales. It also offers some basic trigger modes. It’s not likely to make your bench ‘scope obsolete, but it could be handy for probing signals in the audio range. The ‘scope mode uses the same ±30V-capable input stage as the voltmeter mode, so it offers the same range. The recent digital oscilloscopes we have reviewed offer a serial decoding utility, and the Advanced Tweezers do too. There is only one input channel, so we can only decode a UART data stream. The Advanced Tweezers can accept and decode a variety of baud rates and data formats. To overcome the limitations of the diode checker only being able to handle single diodes, we have implemented an I/V curve plotting mode. The I/V curve shape will also allow you to categorise many ‘mystery’ components. The logic probe mode can differentiate between a high logic level, a low logic level and a high impedance. It also provides a digital trace so that transient signals and digital waveforms can be seen. Finally, a Tone Generator allows square waves to be delivered at several frequencies and amplitudes. It’s ideal for injecting test signals into The arrangement of the arms and tips is much the same as that for the Improved Tweezers, using the same arm PCBs and gold-plated pins as simple, practical tips. 46 Silicon Chip Australia's electronics magazine audio equipment or a clock signal into a digital IC. If you’re working with audio gear, you might consider having two sets of Advanced Tweezers; one to inject a tone and a second to trace it. The Tweezers also have the great advantage of being battery-operated, allowing them to be used without needing to be referenced to ground. We’ve provided three pushbuttons, giving more control over what the Tweezers are doing and making them easier to work with. This also allows us to add more extensive calibration and configuration options than the earlier variants. Circuit details Fig.1 shows the circuit diagram of the Advanced Tweezers. It has some improvements over the earlier versions that give better accuracy over a wide range of component values and provide better protection to the microcontroller. IC1 is a PIC24FJ256GA702 microcontroller, and its numerous I/O pins allow us to connect to the device under test (DUT) in various ways. However, siliconchip.com.au guaranteeing it draws no current when the Tweezers shut down. We had problems with some apparently faulty 0.49-inch OLEDs drawing too much current in standby mode, so we’re eliminating that possibility with this new design. Measuring resistors & diodes Fig.2: the Advanced Tweezers uses IC1’s internal ADC to measure voltages, using the voltage divider equation to calculate resistances and voltages across diodes. This works much the same as the earlier Tweezers, but with the addition of extra resistances and a 12-bit (instead of 10-bit) ADC to provide more range and accuracy. the design heritage shared with the earlier Tweezers is evident. Like the earlier Tweezers, a coin cell holder (BAT1) provides the nominal 3V supply to the circuit. The three capacitors, and the single 10kW resistor connected to IC1’s pin 1 are essential for any application of this microcontroller. The 10kW resistor pulls up the MCLR pin, allowing normal operation unless a connected programmer/debugger overrides it. This pin and the other pins associated with programming IC1 are connected to CON1 for this purpose. You’ll note that the PGED and PGEC programming pins (pins 4 & 5) are not shared with any other components, making development and debugging much easier. The 100nF capacitors bypass the main chip supply, while the 10µF capacitor bypasses an internal regulator responsible for powering the chip’s processor core. The remaining ten resistors provide the interface between the DUT (connected to the Tweezer tips at CON+ and CON−) and the microcontroller. You might note that there is no direct connection between the tips and the microcontroller; any path is always via at least one resistor. This is another improvement to the design and affords the microcontroller greater protection from the outside world. That’s especially important since we envisage users probing active circuits with the Advanced Tweezers. The 1kW resistors to pins 2 and 26 provide the lowest-resistance path between the microcontroller siliconchip.com.au and external circuitry, so we have protected each of these with a dual schottky diode clamping each to the two supply rails. These shunt excess current away from the I/O pins before any semiconductor junctions within IC1 can conduct current. The three tactile pushbuttons, S1, S2 and S3 also connect to I/O pins on IC1. These pins are normally pulled up weakly to the positive supply internally to the microcontroller, but they go low when the button is pressed so IC1 can sense that. MOD1 is the 0.96-inch (24mm) diagonal OLED display. It is nearly twice as wide and twice as tall as the 0.49-inch (12.5mm) OLED used in the earlier Tweezers, making for a much more legible display packed with more information. Two I/O pins are required for its I2C control interface with the microcontroller. We also use another I/O pin to power the OLED’s VCC pin. That means we can completely disconnect power from the OLED module, Naturally, much of the operation depends on the firmware. Still, before we get to that, we will explain how the microcontroller uses the sensing resistors in different ways to measure various components and voltages. The microcontroller has an internal 1.2V bandgap voltage reference. We measure this using the ADC (with the supply as a reference) and invert the result to calculate the supply voltage. For example, if the 1.2V reference is measured as 40% of the reference voltage, the supply must be 1.2V ÷ 0.4 or 3V. Since the internal bandgap reference can vary by up to 5% from nominal, the exact value of the reference needs to be determined during calibration for improved accuracy. Fig.2 shows the arrangement that is used for probing resistors and diodes. Resistors Ra and Rb could be any two of the 1kW, 10kW and 100kW resistors available, while Rc and Rd have the same options. The micro’s pins can be driven high, low or left floating (in a high-impedance mode). Ra is typically pulled to the supply voltage by driving it high, while Rb is left high-impedance. Similarly, Rd is connected to ground by driving it low, and Rc is also high impedance. Current thus flows from the micro via Ra and into the DUT via CON+, then back to ground via CON− and Rd. Tests are then performed with CON+ pulled low and CON− pulled high to account for reverse-biased diodes. For This view shows the spacing of the OLED module above the main PCB. Note the header pin acting as a reinforcing spacer at one corner of the OLED. This prevents the assembly flexing and causing a short between the two PCBs. Australia's electronics magazine February 2023  47 Screengrabs from part two, showing the Advanced SMD Test Tweezers in operation Screen 5: the AUTO SET tunes three calibration parameters by performing internal measurements with the tips open. It depends on the previous calibration settings being entered and correct. Screen 14: the initial Meter display mode, which can read up to 30V with both negative and positive polarities (with respect to CON+ and CON-). The resolution is 10mV to 9.99V and 0.1V above that. Screen 15: Scope mode is handy, even though there are only 100 horizontal and 48 vertical pixels in the trace area. It samples at up to 25kHz, is suitable for audio use, and has adjustable trigger settings. the following explanations, you can assume that any pins not mentioned are left in a high-impedance state, so they do not affect the calculations. The microcontroller’s ADC (analog to digital converter) peripheral is used to read the voltages on the pins connected via Rb and Rc. With the ADC scaled to use the supply voltage as its reference, the actual value of the supply is not important for resistance calculations. The calculations are made with raw ADC values. For the 12-bit ADC used on the PIC24FJ256GA702, there are 4096 steps, four times as many as with a 10-bit ADC. The calculations make use of the voltage divider equation. Six tests are performed using various combinations of the 1kW, 10kW and 100kW values. These have 2kW, 11kW and 101kW total in series with the device under test for both polarities. The best resolution is when the test and unknown resistors are similar in magnitude, so our algorithm discards invalid results and selects which of the measurements will give the most accurate final value. The two tests with 2kW series resistance are also used for diodes. In this case, the readings are scaled by the previously calculated supply voltage to determine the diode forward voltage. If the DUT voltage is close to the supply voltage, it is assumed that the DUT is not passing current. This will be the case for reverse-biased diodes or when no device is connected. So a diode is only detected if a voltage notably less than the supply voltage is seen in one direction and a voltage close to the supply in the other. In this case, the polarity and voltage are reported. While the CTMU has many applications, what matters to us is that it includes a programmable current source that can be delivered to an ADC pin during sampling. The ‘charge time’ naming comes from the fact that it can be controlled by external triggers and used to measure intervals between those triggers by measuring the amount of charge delivered to a known capacitor. Instead, by delivering a known current over a known interval, we can apply a fixed amount of charge, and with the equations shown in Fig.3, we can measure capacitance. That means we don’t need to resort to complex calculations involving logarithms which are often needed to analyse RC circuits. The 8-bit PIC devices we used for the earlier Tweezers avoided logarithms by using an approximation and limiting the state of charge to regions where the approximation would be most accurate. For this test, Rd is connected to Measuring capacitors Fig.3 shows the different arrangement used to measure the value of capacitors. One of the features of the ADC on this microcontroller is the CTMU or charge time measurement unit. Fig.3: the constant current source of the CTMU peripheral greatly simplifies the measuring of capacitances. It eliminates the need for the processor-intensive logarithmic calculations needed to derive a capacitor value from the time constant of an RC circuit. 48 Silicon Chip Australia's electronics magazine siliconchip.com.au Screen 16: we find the UART Serial Decoder indispensable at times. Like the Scope mode, it is highly configurable in terms of baud rates, bit depth and data polarity. This shows the TXT view. Screen 17: the Serial Decoder also offers a hexadecimal mode, useful for seeing binary data and control codes. Framing or parity errors are shown, which can help to determine the data format. Screen 18: while Diode mode cannot report dual diodes such as bicolour LEDs, the I/V Plotter shows both polarities. The current and voltage scales can be zoomed in for more detail. ground and Ra is connected to the CTMU current source. An initial ADC sample is taken, followed by a second sample after a known interval, with the current source active between the two samples. In both cases, 1kW series resistors are used. This is because the resistors will drop some voltage due to the current flowing, and the 1kW resistors will drop the least voltage. Fortunately, it will be the same for the first and second readings, so it will cancel out. Five different currents can be applied, so we can take multiple readings. To extend the range further, shorter and longer durations are used, giving six readings over different orders of magnitude. Like the resistor measurement, the readings near the middle of the range are chosen. High readings are ignored as the current source tends to saturate as its output nears the supply voltage. That would result in inaccurate readings. Since the voltage is the denominator of the equation, lower values are disregarded because this will diminish the resolution. Higher values lead to closer steps between their respective reciprocals and thus better resolution. The capacitance calculation depends on the supply voltage, CTMU current and time, so the expected accuracy is not as good as for resistance or diode voltage. Still, with calibration, it should be within 5%. Between measurements in the resistor and capacitor modes, the 1kW resistors in each group are pulled low, and the remaining pins are left floating. Apart from minimising current flowing in or out of floating pins, this also serves to discharge any connected capacitor, so it is ready for the next measurement cycle. One exception is in diode mode. In this case, the CON+ terminal is pulled high instead of low to provide a bias to light an attached LED, allowing it to be visually checked. A light-­emitting diode connected in the forward direction will illuminate except for the period when the reading is done, when it will appear to flicker off briefly. Fig.4: the Meter and Scope modes use a set of four fixed resistors to provide a biased divider capable of measuring voltages above and below the Advanced Tweezers’ supply rails. The circuits on the left and right are equivalent. siliconchip.com.au Australia's electronics magazine Scope and meter modes Another arrangement is used for the scope and meter modes that allows them to read voltages outside the Tweezers’ supply rails. Four more 1kW resistors are put into play. Of each pair, one is pulled high at the micro end and the other low. This situation is shown on the left of Fig.4, with the simplified circuit to its right being functionally equivalent. Each tip is thus subjected to a 20:1 voltage divider biased to half the supply voltage. Readings are taken by measuring the difference in the voltage between V1 and V2 and multiplying by 21. With a nominal 3V supply, we can measure up to around 30V (differential) between CON+ and CON−. Biased differential inputs allow positive and negative voltages to be measured. It’s possible for current to flow With three pushbuttons, calibrating and changing modes is much easier than earlier version of the Tweezers. February 2023  49 Screengrabs from part two, showing the Advanced SMD Test Tweezers in operation Screen 19: the Logic Analyser shows whether it detects a high, low or high impedance logic level. A scrolling chart also shows a brief history, making it easier to see transients and repeating patterns. Screen 20: like Scope mode, the Tone Generator is handy at audio frequencies or as a simple clock generator. It can produce square waves at five different frequencies and four different amplitudes. Screen 21: the Auto screen is only one of ten pages but encompasses and surpasses the abilities of its predecessors. It shows resistance, capacitance, diode polarity and forward voltage. through the unused 1kW and 100kW resistors if the applied voltage is greater than the supply voltage. The current through the 1kW resistors is shunted to the supply rails by D1 and D2. The 100kW resistors will conduct much less current, and this will flow through the microcontroller’s internal protection diodes. These unwanted currents dictate the useful upper voltage limits of the scope and meter modes. Voltages beyond those limits could cause damage to the microcontroller. Damage could also occur if excess voltage is applied while the pins are being driven (as for resistor, capacitor and diode modes), since these currents will now flow through the chip’s internal output transistors instead of the external and internal protection diodes. We found that one of our earlier prototypes was running cells flat even when not being used; this was because the damaged microcontroller was drawing excess current in sleep mode. If you find your Tweezers are going through cells excessively, that could be why. So care must be taken only to apply higher voltages in modes when the Tweezers expect it. This was not a concern with the older Tweezers designs, as they did not have any modes to measure externally applied voltages, and were only designed for use with passive devices. Modes that expect digital signals, such as the logic analyser and serial decoder, simply pull CON− to ground via its 1kW resistor. CON+ may be left floating or weakly pulled up or down by the 100kW resistor to detect the difference between high, low and high impedance logic levels. self-contained program that is called upon during the program loop. Each makes the measurements it needs and displays the results. The buttons are checked and flags are set for each mode to process in accordance with its operation. Firmware The firmware program on IC1 is responsible for initialising all the peripherals and the OLED display. It coordinates the measurements, reads the pushbuttons and controls the display as needed. Apart from the main program loop, a timer interrupt is set to fire about three times per second, triggering display updates at a comfortable rate. The code is modular, and each of the individual modes is much like a Power consumption The processor runs at a modest 4MHz instruction clock (down from the maximum possible 16MHz) to minimise power consumption and thus, the load on the coin cell. We could not maintain the desired screen update rate at lower speeds than this. During some of the scope mode’s sample periods, the clock is sped up to 16MHz to allow faster ADC sampling rates. There are also periods where no urgent processing is needed, in which case the DOZE feature is activated. The processing core runs at an even lower fraction of its maximum speed, reducing power usage even further. There is a timer counting off the timer interrupt. When this expires, a routine is called to power off the OLED and put the peripherals and I/O pins The hole at upper left is for a Nylon M2 screw to prevent children from removing the coin cell. While it would be quite difficult for them to remove it anyway, we want to ensure it is safe. 50 Silicon Chip Australia's electronics magazine siliconchip.com.au Screen 22: the Res screen provides the same resistance information as the Auto screen but in a larger font, which is handy for checking and sorting through different resistor values. Screen 23: the Cap screen works similarly, displaying just the measured capacitance in large text. It’s perfect for working out which part is which amongst a pile of unmarked SMD capacitors. Screen 24: the diode screen is similar to the Diode display on the Auto screen but a bias is applied from CON+ to CON− between tests. This lets you quickly check the polarity and operation of LEDs. into a low-power state, after which the processor goes into the lowest-power SLEEP state. By completely powering off the OLED, we avoid any possibility that it is not in its lowest possible power state. The OLED modules we used in the earlier Tweezers have a sleep mode that initially appears quite effective but sometimes had a current draw that crept up higher than expected. Interrupts triggered by a change in the switch states are used to wake up the processor while it is stopped. It resumes by doing much the same as when it first initialises, since the peripherals have all been put into lowpower modes too. The SLEEP mode keeps the RAM contents, so resuming from sleep will retain all the same mode settings and parameters. Our measurements during SLEEP recorded a consistent current draw around 700nA, much lower than the earlier Tweezers variants. At these levels, the cell’s self-discharge is likely to be more significant than the actual circuit current. We also sought to minimise current draw during normal operation; this is typically in the single-digit milliamps, depending on the operating mode. This is critical, as the amount of usable capacity for a coin cell (as measured in mAh) is higher with a lower current draw. So higher consumption not only reduces the time that a given cell capacity can be used, but also tends to reduce that capacity. The internal resistance of a coin cell is of the order 20W, so a current in the milliamps will also reduce the voltage available to the circuit by a noticeable amount, around 0.1V. Apart from its internal controller, the OLED only draws current for lit pixels, so there is the option to adjust the brightness and thus compromise between visibility and power consumption. The OLED is typically the greatest drain on the battery. The OLED dictates the 2.4V minimum voltage as it tends to fade and flicker below that level. The microcontroller will work down to around 2V, but running this low also limits the effective sampling range of the ADC. We initially used a pretty thick font for some of the displays. By changing to a lighter font with thinner strokes, we reduced the current by over 3mA in some modes! We found that the display was perfectly visible indoors at a reduced brightness, so we have set the default brightness to be somewhere in the lower end of its range, prolonging cell life and reducing the voltage drop. You can increase the brightness via the settings if necessary, eg, for use in very brightly lit areas. siliconchip.com.au Next month Because this is a reasonably complicated instrument (at least in terms of its modes and features), we don’t have space in this issue for the full construction, calibration and usage details. That will all be covered in the final article next month. Some screengrabs showing the Tweezers in operaSC tion are shown above. Parts List – Advanced SMD Test Tweezers 1 double-sided main PCB coded 04106221, blue (28 × 36mm) 2 double-sided arm PCBs coded 04106212, blue (100 × 8mm) 3 gold-plated header pins (for tips and OLED support) 1 PIC24FJ256GA702-I/SS microcontroller programmed with 0410622A.HEX (IC1) 1 0.96in 128×64 I2C OLED module, blue/cyan or white (MOD1) 2 BAT54S dual series schottky diodes, SOT-23 (D1, D2) 2 100nF 50V X7R ceramic capacitors, SMD M2012/0805 size 1 10μF 6V X7R ceramic capacitors, SMD M2012/0805 size 2 100kW ⅛W 1% SMD resistors, M2012/0805 size 3 10kW ⅛W 1% SMD resistors, M2012/0805 size 6 1kW ⅛W 1% SMD resistors, M2012/0805 size 3 small SMD two-pin tactile switches (S1-S3) 1 surface-mount 32mm coin cell holder (BAT1) 2 100mm lengths of 10mm diameter clear heatshrink tubing 1 5-pin right-angled header, 2.54mm pitch (CON1; optional, for ICSP) 1 label (optional; see Fig.8 next month) 1 M2 × 6mm Nylon screw 2 M2 Nylon nuts 1 CR2032 or CR2025 lithium coin cell Advanced SMD Test Tweezers Kit (SC6631) The kit includes all the parts listed in the parts list (except coin cell & CON1), with the microcontroller pre-programmed. It is available for $45 + P&P. Australia's electronics magazine February 2023  51