Silicon ChipMultimeter Calibrator & Checker - July 2022 SILICON CHIP
  1. Outer Front Cover
  2. Contents
  3. Publisher's Letter: Low-cost UPSes are not worth the risk
  4. Feature: IC Fabrication, Part 2 by Dr David Maddison
  5. Project: Multimeter Calibrator & Checker by Tim Blythman
  6. Review: Anycubic Photon Mono 3D printer by Tim Blythman
  7. Project: VGA PicoMite by Geoff Graham
  8. Project: 0-110dB RF Attenuator by Charles Kosina
  9. Review: Oatley Solar Charge Controller by John Clarke
  10. Project: Secure Remote Mains Switch, Part 1 by John Clarke
  11. Product Showcase
  12. Feature: PAS CO2 Air Quality Sensor by Jim Rowe
  13. Serviceman's Log: Trail camera fun by Dave Thompson
  14. Subscriptions
  15. Vintage Radio: Astor CJ-12 car radio by Dr Hugo Holden
  16. PartShop
  17. Market Centre
  18. Advertising Index
  19. Notes & Errata: MOS Air Quality Sensors, June 2022; Railway Semaphore Signal, April 2022; High Power DC Motor Speed Controller, January & February 2017
  20. Outer Back Cover

This is only a preview of the July 2022 issue of Silicon Chip.

You can view 44 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:
  • IC Fabrication, Part 1 (June 2022)
  • IC Fabrication, Part 1 (June 2022)
  • IC Fabrication, Part 2 (July 2022)
  • IC Fabrication, Part 2 (July 2022)
  • IC Fabrication, Part 3 (August 2022)
  • IC Fabrication, Part 3 (August 2022)
Items relevant to "Multimeter Calibrator & Checker":
  • Multimeter Checker & Calibrator PCB [04107221] (AUD $5.00)
  • PIC16F1459-I/SO programmed for the Multimeter Calibrator/Checker (0410722B.HEX) (Programmed Microcontroller, AUD $10.00)
  • Complete kit for the Multimeter Checker (Component, AUD $45.00)
  • Firmware and source code for the Multimeter Checker/Calibrator [0410722A/B] (Software, Free)
  • Multimeter Checker & Calibrator PCB pattern (PDF download) [04107221] (Free)
Items relevant to "VGA PicoMite":
  • VGA PicoMite PCB [07107221] (AUD $5.00)
  • VGA PicoMite short-form kit (Component, AUD $37.50)
  • VGA PicoMite short-form kit with case (Component, AUD $55.00)
  • Firmware and user manual for the VGA PicoMite (Software, Free)
  • VGA PicoMite PCB pattern (PDF download) [07107221] (Free)
  • Cutting/drilling guides for the VGA PicoMite front & rear panels (Panel Artwork, Free)
Articles in this series:
  • The Raspberry Pi-based PicoMite (January 2022)
  • The Raspberry Pi-based PicoMite (January 2022)
  • VGA PicoMite (July 2022)
  • VGA PicoMite (July 2022)
  • The PicoMite 2 (February 2025)
  • The PicoMite 2 (February 2025)
Items relevant to "0-110dB RF Attenuator":
  • 0-110dB RF Attenuator PCB [CSE211003] (AUD $5.00)
  • ATmega328P programmed with the firmware for the 110dB RF Attenuator [CSE211003.HEX] (Programmed Microcontroller, AUD $10.00)
  • Pulse-type rotary encoder with pushbutton and 18t spline shaft (Component, AUD $3.00)
  • 0.96in cyan OLED with SSD1306 controller (Component, AUD $10.00)
  • Short-form kit for the 0-110dB RF Attenuator (Component, AUD $75.00)
  • Firmware and BASIC source code for the 0-110dB RF Attenuator [Attenuator 3] (Software, Free)
  • 0-110dB RF Attenuator PCB pattern (PDF download) [CSE211003A] (Free)
  • Front panel label and drilling diagram for the 110dB RF Attenuator (Panel Artwork, Free)
Items relevant to "Secure Remote Mains Switch, Part 1":
  • Secure Remote Mains Switch receiver PCB [10109211] (AUD $7.50)
  • Secure Remote Mains Switch transmitter PCB [10109212] (AUD $2.50)
  • PIC16F1459-I/P programmed for the Secure Remote Mains Switch receiver (1010921R.HEX) (Programmed Microcontroller, AUD $10.00)
  • PIC16LF15323-I/SL programmed for the Secure Remote Mains Switch transmitter (1010921A.HEX) (Programmed Microcontroller, AUD $10.00)
  • Firmware and ASM source code for the Secure Remote Mains Switch [1010921A/R] (Software, Free)
  • Secure Remote Mains Switch PCB patterns (PDF download) [10109211/2] (Free)
  • Front panel label and drilling diagrams for the Secure Remote Mains Switch (Panel Artwork, Free)
Articles in this series:
  • Secure Remote Mains Switch, Part 1 (July 2022)
  • Secure Remote Mains Switch, Part 1 (July 2022)
  • Secure Remote Mains Switch, Part 2 (August 2022)
  • Secure Remote Mains Switch, Part 2 (August 2022)
  • Secure Remote Switch, Part 1 (December 2024)
  • Secure Remote Switch, Part 1 (December 2024)
  • Secure Remote Mains Switch, part two (January 2025)
  • Secure Remote Mains Switch, part two (January 2025)
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 $11.50.

Multimeter -CheckeR -Calibrator It’s amazing how handy even the cheapest multimeters can be. But did you ever stop to think about how accurate they are? With the Multimeter Checker, you can verify their accuracy. For meters that aren’t so cheap, it will also allow you to calibrate them and adjust for drift. Project by Tim Blythman ultimeters are indispensable tools; perhaps so necessary that we tend to take them, and their accuracy, for granted. Sometimes accuracy is not that important, but there are times when it is. Back in August 2015, we presented the Low-cost Accurate Voltage Current Resistance Reference (siliconchip.au/ Article/8801) and showed how to use it to check and calibrate multimeters (siliconchip.au/Article/8832). It provides a DC reference voltage of 2.5V ±1mV (±0.04%), a resistance of 1kW ±1W (±0.1%) and a current of 2.5mA ±3.5µA (±0.14%). The DC voltage reference comes from a precision voltage reference IC, and that plus a precision resistor provides the current reference. That precision resistor can also be used on its own as the resistance reference. The whole thing is compact and ran from a coin cell, perfect for keeping in the toolbox to be used whenever needed. It covers the most common measurements done with a multimeter. While that was great, it didn’t provide an AC voltage source, so not all of the typical multimeter ranges could be checked or calibrated. So we decided to develop a new design that adds that feature. For the new Multimeter Checker, we M siliconchip.com.au have a dedicated voltage reference IC providing 3.3V for DC calibration. This is also used with a precision resistor to provide an accurate 100mA current source. It has another precision resistor to act as a resistance reference. Importantly, for calibrating AC voltage ranges, it provides a precise 1V RMS AC sinewave at one of three frequencies: 50Hz or 60Hz (to match typical mains frequencies) or 100Hz. Different multimeters use different methods to measure AC voltage (and alternating current). That is why some multimeters are labelled as “True RMS” while others are not. True RMS multimeters give accurate AC voltage measurements, whatever the shape of the waveform. In contrast, some cheaper multimeters measure the peak voltage and multiply the reading by a factor of 0.71, on the assumption that the waveform is sinusoidal. Of course, this will not be accurate unless the waveform is close to being a sinewave. A square wave, for example, will give an artificially low reading as its peak is the same as its RMS value. Similarly, triangle and sawtooth waves will tend to give readings that are too high. Some other meters measure the average of the rectified AC voltage and assume a sinewave, which will have different error magnitudes for other waveforms. In our circuit, the AC voltage is generated by an analog circuit, so it does not have the digital artefacts that would be produced by a digital synthesis method. Its amplitude and frequency are checked and adjusted by a microcontroller, which compares Features & Specifications ∎ ∎ ∎ ∎ ∎ ∎ ∎ ∎ DC voltage reference: 3.3V ±0.1% AC voltage reference: 1V ±0.5% RMS Direct current reference: 100mA ±0.2% Resistance reference: 33W ±0.1% AC reference voltage frequency: 50Hz, 60Hz or 100Hz (±0.3%) AC reference frequency source: crystal oscillator AC reference harmonics: ≲40dBV Control: pushbuttons with LEDs, and over USB virtual serial port Australia's electronics magazine July 2022  31 these to the DC voltage reference and the frequency of a crystal oscillator. As well as enjoying the benefits of both analog and digital circuitry, this allows the AC voltage reference to be set to 50Hz, 60Hz or 100Hz. Circuit details The entire Checker/Calibrator circuit is shown in Fig.1. The DC references (voltage, current and resistance) on the Checker work much the same as in the earlier Low-cost Accurate Voltage Current Resistance Reference. Still, we’ll explain how they work together, because they are also an intrinsic part of the AC voltage reference. 5V USB power is applied to socket CON1 and powers, among other things, 3.3V precision voltage reference VREF1. This MCP1501 low-cost 3.3V precision reference is critical to the correct operation of all the other parts. It’s capable of supplying up to 20mA, which is vital to ensure that the accuracy of the reference is not affected by the connected loads, especially as the analog generation circuitry is powered from this 3.3V reference. VREF1 has a 100nF bypass capacitor at its positive supply, pin 1. The 3.3V output from pin 7 is connected to TP5 and can be compared with circuit ground at TP6; these two points are marked DCV on the PCB. The PCB has separate circuit traces from TP5 to REF1’s feedback (FB) pin 8. This ensures that the 3.3V is accurate at the test point, in spite of any loads. Precision reference current Dual low-voltage rail-to-rail op amp IC3 (MCP6272) is powered from the 3.3V output of VREF1 and has a 100nF supply bypass capacitor. One half of IC3 (IC3b) is used to drive the current reference. The 3.3V from VREF1 feeds into the non-inverting input of IC3b (pin 5) via a 1kW resistor. Its corresponding inverting input (pin 6) is fed (via another 1kW resistor) from the high side of a 33W precision resistor used to measure the reference current. Any current through this resistor causes a voltage to develop between TP4 and ground. The output of this op amp (pin 7) drives the base of NPN transistor Q1, acting as an emitter-follower, via a 100W resistor. Q1’s collector is connected to the 5V rail, and its emitter goes to TP3. TP3 and TP4 are thus the current reference terminals. When TP4 is below 3.3V, Q1 is fed current by the op amp. If TP4 starts to rise above 3.3V, the current drive to Q1 starts to get cut off. When TP4 is at 3.3V, 100mA must be flowing through the 33W resistor to ground. There will be a minuscule current flowing from TP4 into the op amp’s pin 6, but it is of the order nanoamps, so it is much less significant than the 0.1% precision component tolerances. Thus, the op amp’s feedback loop maintains 100mA between TP3 and TP4 when the two are connected by a multimeter measuring current. TP3 and TP4 are labelled on the PCB as the DCA reference points. This compact Checker provides outputs to check the most commonly used features on most multimeters. It delivers 3.3V DC, 100mA DC and a 1V AC RMS pure sinewave that can be set to 50Hz, 60Hz or 100Hz and is checked for both voltage and frequency by the onboard microcontroller. The USB interface can also be used to manually control the AC oscillator and set custom frequencies. Australia's electronics magazine The 1nF capacitor between pins 6 and 7 helps suppress any high-­ frequency oscillation that might occur due to the high gain of the op amp. With 3.3V across the 33W resistor plus the base-emitter drop of Q1 and perhaps 0.1V across the 100W base resistor, the op amp output is typically at 4V, giving about 1V of headroom below the 5V supply. So anything connected to the current reference must drop less than 1V or have less than 10W resistance for the current reference to work correctly. A second, identical 33W precision resistor is provided as the resistance reference, allowing the circuit to provide an independent set of test pads, TP7 and TP8, for the resistance feature. AC voltage reference Practically all of the remaining circuitry is used to provide the AC reference. Since this circuit operates from a single-ended 5V DC supply, we first need a nominal level around which the AC signal can swing. For this, we have chosen half of the 3.3V supply, which is derived by using a pair of 10kW resistors to divide the output from VREF1 to produce 1.65V. The resulting voltage is low-pass filtered by a 1μF capacitor and buffered by IC3a, with another 10kW resistor providing the unity-gain feedback. The output of this op amp (pin 1) sits at 1.65V, and this is our AREF rail. The AC signal is generated by a phase-shift oscillator based around another op amp, IC1 (another MCP6272), and IC2, an AD8403ARZ10 quad 10kW digital potentiometer. IC2 is powered by the 5V rail with a 100nF bypass capacitor. The analog ground pins 1, 5, 17 and 21 connect to circuit ground, along with its digital ground at pin 9, while the SHDN (shutdown) and RS (reset) pins are pulled up to 5V by 10kW resistors to allow normal operation of the digital potentiometer at all times. Op amp IC1 is powered from the 3.3V rail, with a 100nF bypass capacitor, to provide signal symmetry around the 1.65V AREF reference. This is one reason why we have chosen the MCP1501 reference, as it has a sufficient output current and suitable voltage to power these components. This is critical because one of IC1’s outputs saturates briefly on every cycle, so if it were powered from 5V, siliconchip.com.au Fig.1: most of the components in the circuit are to generate and monitor the AC waveform, including IC1, IC2 and IC4. IC1 and its connected components form the phase shift oscillator, with IC2’s potentiometer elements controlling its frequency and amplitude under the supervision of IC4. It measures the oscillator voltage using its ADC with reference to the 3.3V precision reference and adjusts the digital potentiometers to achieve very close to 1V RMS. Similarly, the AC signal frequency is adjusted using 16MHz crystal X1 as a reference. siliconchip.com.au Australia's electronics magazine July 2022  33 the saturation would occur differently on positive and negative swings, leading to harmonics (ie, frequencies above the selected 50/60/100Hz option) creeping into the output. A phase shift oscillator works by reinforcing a signal that is delayed by 360°. The delay is formed by several RC filter networks, which add up to 180° of phase shift, followed by inversion, equivalent to a further 180° phase shift. As the RC filter phase shift depends on frequency, it will only have a delay of precisely 360° at one specific frequency. Signal components at other frequencies are attenuated as they are delayed by a different amount and interfere destructively as they make their way around the circuit. The circuit elements also attenuate all frequencies to some extent, so one half of op amp IC1 provides the gain needed to overcome this, while the other half provides the phase inversion. Phase shift oscillator There are three phase-shift elements composed of three 1μF capacitors connected to IC2 and three of the digital potentiometer elements inside IC2 (numbered 1-3). These are all wired as variable resistors (rheostats) and can vary independently from near to 0W up to around 10kW. Imagine a fairly pure 50Hz 1V AC RMS signal at pin 1 of IC1; this is what is expected when the oscillator is working as designed and set to the 50Hz output. 1V RMS is around 2.8V peak-to-peak. Op amp IC1b acts as an inverting amplifier with a gain of 1.5 times. So the output at pin 7 is expected to be an inverted version of IC1a’s pin 1 signal, but with a 4.2V peak-to-peak value. Since IC1 is fed from a 3.3V supply, the output saturates at 3.3V peak-to-peak. The resulting waveform is between a sinewave and a square wave, so it will also have some odd harmonics of 50Hz present, the first of which is at 150Hz. Fig.2 shows the spectrum of the oscillator’s output at 50Hz. You can see that the only significant harmonic is the third harmonic at 150Hz, although its level is down by over 40dB compared to the fundamental. Note that we will still get a 3.3V peak-to-peak output from IC1b even if the signal from IC1a’s pin 1 output 34 Silicon Chip Fig.2: this spectral analysis of the Checker’s AC output shows that the strongest harmonic is the third, over 40dB below the frequency of interest. The peak at 0Hz is due to the DC offset and using a grounded oscilloscope, instead of referring the signal to the 1.65V test point, TP2. drops as low as around 0.8V AC RMS or if it was higher than 1V AC RMS due to the saturation effect. This amplified signal from IC1b (at pin 7) passes through the three RC lowpass filter stages. If the digital potentiometers are set to around 5.5kW, each stage will cause a 60° delay to the 50Hz component and approximately halve its AC amplitude (as measured at each successive capacitor). Other, higher-frequency components will be delayed more and attenuated even more. For example, the third harmonic of 50Hz at 150Hz will be phase-shifted by around 80° and be reduced to about a fifth of its original amplitude by each stage. The three stages interact to a degree, so a simple mathematical analysis of each stage separately does not quite match what happens when they are combined. Before building the prototype, we had to simulate the entire circuit to determine the required component values. The result is a relatively pure 50Hz signal, but with quite a low amplitude coming into pin 3 of IC1a. But as long as the pin 7 output of IC1b is saturated on each cycle, the level is steady. IC1a acts as a non-inverting amplifier with a gain set by the ratio of the 330W fixed resistor and the fourth variable resistor in IC4. This gain is selected to bring the attenuated signal from the RC filter stages back up to 1V RMS and is fed to TP1 via a 100W resistor to protect IC1 from external short circuits. TP2 is connected to the 1.65V reference so that the sinewave between TP1 and TP2 can be measured without a DC offset. So, the AC signal frequency can be changed by adjusting the three variable Australia's electronics magazine resistor elements in the three RC networks. Similarly, the amplitude can be varied by adjusting the fourth variable resistor value. The resulting waveforms are shown in Scope 1. The primary output signal is the blue trace, while the red trace is the saturated output at IC1b’s pin 7. Note that it is inverted compared to the blue trace. You can see that the orange, yellow and green traces are phase-shifted and attenuated by each successive RC stage. The green trace is amplified to become the blue trace, thus completing the feedback loop. Control circuitry IC4 is a PIC16F1459 microcontroller that adjusts and monitors the AC reference for accuracy, among other tasks. It is powered from the 5V USB supply with a 100nF bypass capacitor between pin 1 (5V) and pin 20 (ground). A 10kW resistor between pins 1 and 4 pulls up the MCLR pin to allow normal operation when the circuit is powered. IC4 needs both an accurate voltage and frequency reference to do its job. The 3.3V output of VREF1 goes to JP1, and with the appropriate jumper fitted (in the ‘Run’ position), it feeds through to pin 16 (AREF+) of IC4. Since pin 16 also provides the PGD programming function, JP1’s other jumper position (marked ‘Prog.’) connects to programming header CON2. The other programming signals from IC4 are also connected to CON2. This includes MCLR, 5V, ground and PGC at IC4’s pin 15. Pins 13 and 14 connect to the AC reference output at TP1 and the 1.65V AREF signal, respectively. These are monitored by the ADC (analog to siliconchip.com.au Scope 1: the blue trace is the AC output signal at TP1, while the red trace is measured at output pin 7 of IC1b. The orange, yellow and green traces are measured at the top of each 1μF capacitor to the left of IC1a in Fig.1, from left to right. digital converter) peripheral in IC4 to check the frequency and amplitude of the output signal. The frequency reference comes from 16MHz crystal X1, connected to IC4’s pins 2 and 3 (CLKIN and CLKOUT). A 15pF load capacitor connects from each side of the crystal to circuit ground so it will oscillate correctly. Three LEDs, LED1-LED3, connect to IC4 via 10kW series resistors. The LED cathodes are grounded, so the LEDs illuminate when pins 8-10 are pulled high. Two tactile pushbuttons, S1 and S2, connect to pins 11 and 12. The other side of each switch is grounded while the pins are internally pulled up, allowing the micro to detect when the button is pressed. These LEDs and buttons provide a basic control interface for operating the Multimeter Checker. Control of digital potentiometer IC2 is over an SPI serial interface, with pins 5, 6 and 7 of IC4 being connected to pins 14, 12 and 11 of IC2. These lines have the roles of SCK (clock), SDI (data) and CS (chip select), respectively. Since IC2 uses an unusual 10-bit interface and a high data rate is not needed, the SPI commands are sent via bit-banged GPI/O operations. This also allowed us to simplify the PCB layout as we did not need to use the dedicated SPI (MSSP peripheral) pins, but could use any digital I/O pins. Pins 17, 18 and 19 are associated with IC4’s USB peripheral, so pins 18 and 19 are taken to the CON1 USB socket, and pin 17 is fed 3.3V from REF1. This means that the Multimeter Checker can be controlled and monitored by being connected to a computer’s USB port too. The PIC16F1459 was chosen as a siliconchip.com.au suitable part because we could not quite fit the necessary features onto a 14-pin microcontroller. But the presence of the USB interface means that we can add some other interesting and valuable features too. Finally, we get to the power supply. We’ve chosen a USB supply for its ubiquity. The 5V supply also gives more headroom than the 3V coin cell from the earlier design. After all, the 3.3V voltage reference would not function from a 3V cell. It also allows us to produce a higher test current than a coin cell could supply. LED4 and a 10kW series resistor are connected across the incoming 5V supply to show that power is present. There is no onboard 5V regulator; we rely on the USB source to be within the normal 4.5-5.5V range. All of the onboard components running from the 5V rail can handle that. Firmware The firmware program that runs on IC4 has three main aspects. The first is the fairly straightforward task of monitoring the buttons S1 and S2 and controlling LEDs LED1-LED3, providing a basic user interface. The second is the USB interface. This appears as a virtual serial port when connected to a computer. Keystrokes from the computer are stored in a buffer and handled much like button presses, but with extra functions. There is also the option of ‘printing’ status updates to the serial port, so the Multimeter Checker can provide more detailed information via the virtual serial port than can be displayed with the LEDs. Finally, IC4 is responsible for setting and monitoring the AC reference voltage output. It has no control over Australia's electronics magazine the DC voltage or current references, although it uses the DC voltage reference to check the AC voltage. The crystal oscillator used for IC4’s timebase ensures that all timing is accurate, particularly in measuring the frequency. The microcontroller samples the AC voltage waveform and checks its period (and thus its frequency), peakto-peak amplitude and average absolute amplitude (with reference to the 1.65V midpoint). Since the 3.3V reference is used as the scale for the ADC peripheral, the absolute digital value of the peak-topeak and average amplitude values are known and fixed in the program. The sampling works as follows. A timer interrupt fires 6000 times every second and takes a sample of the AC waveform. We chose this rate to allow integer divisions of 50Hz, 60Hz and 100Hz into that timer. Although that is not critical, it makes the calculations simpler. Just over 240 samples are taken, corresponding to two complete cycles at 50Hz. This is so that we can ensure that at least two positive-going zero crossings occur within each sample set; these are the points between which the period is measured. While 120 samples for a cycle at 50Hz does not seem like much precision, the firmware interpolates where the zero crossings occur to within 1/16th of a sample. It does this by calculating how much the samples before and after the zero-crossing are above or below the zero point. This way, the period can be measured with a resolution of around one part in 960 for a 100Hz signal, or better for lower frequencies. Sampling must occur without July 2022  35 interruption, so a set of samples is taken and then processed. Adjustments are made if necessary; then it goes back to sampling. By taking both the peak-to-peak and average amplitude, the Checker can also confirm that the waveform is sinusoidal, as a waveform with a different shape will not be able to match both. Oscillator adjustments The four digital potentiometers each have 256 steps. This is what limits the amplitude accuracy to 0.5% (about 1 part in 200), as the steps are about that far apart. In practice, a small amount of dithering occurs, so the average over several cycles will be closer to the target, close to the accuracy of the 3.3V reference. The frequency can be controlled more closely than the amplitude, as three potentiometers are involved. Rather than stepping all three together, each is incremented in turn, giving almost three times as many steps. This resolution results in steps of around 0.1Hz at 50Hz up to 0.3Hz at 100Hz, around 0.3% in the operating range. Like the amplitude, dither over several cycles improves the longer-­term average accuracy of the frequency. We’ll mention the full details of the USB interface a bit later. It provides a manual mode that allows direct control of the digital potentiometers. Construction The Multimeter Checker is built on a small PCB, 65 × 58.5mm, coded 04107221 – see Fig.3. It is mainly populated with surface mounting parts, although they are all pretty large and easy to work with. The only part with a smaller pin pitch than 1.27mm is the USB socket, and all passives are M3216/1206 parts at around 3.2 × 1.6mm. We’ll assume you have flux, solder wick, tweezers and all the other gear for working with these sorts of parts. Fume extraction is a good idea when working with flux too. Start by fitting the USB socket, CON1. Apply flux to the pads on the PCB and insert the socket’s locating posts into their holes on the PCB. Clean the iron’s tip and add fresh solder. Carefully apply the tip to each lead in turn without touching the metal shell. After soldering each pin, use a magnifier to check that there are no solder bridges, and if there are, use the wick to remove them. If you can’t see, clean off the flux residue with alcohol or a flux cleaner. Parts List – Multimeter Checker & Calibrator 1 double-sided PCB coded 04107221, 65 × 58.5mm 1 mini USB Type B socket (CON1) 1 5-pin right-angle header (CON2; optional; only needed for in-circuit programming) 1 3-pin header and jumper shunt (JP1) 2 small SMD two-pin tactile switches (S1, S2) 1 16MHz low-profile HC-49 crystal (X1) Semiconductors 2 MCP6272 or MCP6L2 dual low-power rail-to-rail op amps, SOIC-8 (IC1, IC3) 1 AD8403ARZ10 4-channel 10kW digital potentiometer, wide SOIC-24 (IC2) 1 PIC16F1459-I/SO microcontroller programmed with 0410722A.HEX, wide SOIC-20 (IC4) 1 MCP1501T-33E/SN 3.3V voltage reference, SOIC-8 (REF1) 4 green LEDs, 3mm through-hole or M3216/1206 SMD (LED1-LED4) 1 BC817 50V 800mA NPN transistor, SOT-23 (Q1) Capacitors (all 10V+, X7R or C0G ceramic, SMD M3216/1206 or M2012/0805) 4 1μF 5 100nF 1 1nF 2 15pF Resistors (all M3216/1206 1% 1/8W except as noted) 1 15kW 12 10kW 2 1kW 1 330W 2 100W 2 33W 0.1% Complete Kit: includes all the parts listed above and is available for $45 + P&P, Cat SC6406 36 Silicon Chip Australia's electronics magazine If you find a solder bridge, apply fresh flux to the leads and press the wick against the bridge using the iron, then carefully pull both away. When the smaller leads look tidy, solder the larger pads for the shell, turning up the heat if necessary. Fit the four ICs and REF1 next. These are all SOIC (small outline IC) parts of various sizes, but don’t mix up REF1, IC1 and IC3 as they all have eight pins. Note that IC3 and REF1 face in opposite directions too. Check the part markings against the parts list and PCB silkscreen as you go, making double sure that pin 1 is correctly orientated in each case before soldering any pins. For each part, apply flux, then tack one lead in place, ensuring the correct orientation by checking the silkscreen dot and IC markings. If the pads are all well aligned, solder the remaining pins; otherwise, adjust as needed by reapplying heat from the iron. Like with CON1, check for solder bridges and remove them as needed. It’s usually easier to solder all the pins before removing any bridges. Q1 is the only transistor on the board, and it should be fitted as shown in the photos and overlay. It’s the smallest part overall, so be careful not to lose it. But as the leads are widely spaced, it should not be difficult to solder. Install the capacitors next. The values will not be marked on the parts themselves, so work with one value at a time. The values required for each location are shown in Fig.3. Solder one lead, check that the part is square, flat and even within its pads and then solder the remaining lead. Refresh the first lead if necessary. Remember to add flux to the PCB pads as you go, regularly cleaning the iron tip and then adding fresh solder. The resistors should be marked with codes representing their values. They are all the same size; check Fig.3 or the PCB silkscreening to see which values go where. We used larger pads for the 33W precision resistor in case part shortages meant that we couldn’t get the high-­ accuracy parts in an M3216/1206 size, so don’t be concerned that the part is much smaller than the pads. Now fit the four LEDs. They are all in one corner of the PCB and have their cathodes to the right, as indicated by the cathode symbol on siliconchip.com.au Fig.3: most components are relatively easy to solder; the USB socket is a bit tricky because its pins are pretty close together. During assembly, the most critical thing to check is that all ICs are orientated correctly, with their pin 1s in the positions shown. Also ensure that the solder makes contact with the pad and pin of each device and check carefully for solder bridges between pins when you’ve finished. the silkscreen. You can use either M3216/1206 surface-­mounting types or 3mm through-hole LEDs. For through-hole LEDs, the anode lead is usually longer. If using SMD LEDs, they should have green cathode markings, but it’s pretty easy to check them with a DMM set on diode test mode. Hold the probes on either side of the LED (making sure it doesn’t fly away!). If the LED lights up, the red probe is on the anode and the black probe on the cathode. The two tactile switches mount near the LEDs. Install these in the same fashion as the other two-lead parts. That completes the surface-mounted parts, so you can now clean off the flux residue. The remaining components are all through-hole types, and some are optional. Fit crystal X1 next. You should not need an insulating pad under the metal case as the two mounting pads are covered with solder mask on the top of the PCB. However, if the solder mask in that area is damaged, add an insulator or mount it off the PCB surface. Regardless, verify after soldering it that its case is not shorted to either pad underneath. If you have a pre-programmed microcontroller (IC4), you don’t need to fit CON2, the in-circuit programming header. In this case, you could also replace JP1 with a short wire link across the pair of pads on the “R” side of the jumper. Otherwise, fit both headers and install the jumper shunt initially in the “P” position for programming. Although we have not used them on our prototype, we’ve scattered a few 3mm holes around the PCB to fit standoffs if you want to mount the Checker to something. siliconchip.com.au Programming If you don’t have a pre-programmed microcontroller, you will have to program it now. The Silicon Chip Online Shop offers a complete kit for this project; if you’re using that, the micro will be programmed, and you won’t have to worry about this step. Using a PICkit 3, PICkit 4 or Snap connected to CON2, load the 0410722A.HEX file onto IC4 using the Microchip IPE (integrated programming environment). If you are using a Snap, you likely will need to supply power to the board; this can be done using a USB lead connected to CON1. When power is applied, LED4 will light up. So if you don’t see LED4 illuminated, check for power and that the circuit has been built correctly before proceeding. After programming, disconnect the programmer and move JP1 from the “P” (program) position to the “R” (run) position. Testing When the unit is powered up, it will start in 50Hz mode, and LED1 should be solidly lit to indicate this. Pressing S1 will cycle through the 50Hz, 60Hz and 100Hz modes. LED1-LED3 light up in turn to show the current mode. Pressing S2 switches between the default pure sinewave to a more saturated waveform. You can use this to check how the multimeter responds to AC waveforms that are not pure sinewaves. In this mode, the amplitude is set to a high level (causing saturation of the op amp output and clipping). The LEDs indicate this mode by flickering rapidly. This waveform may be easier to verify during initial testing, as it does not depend on the microcontroller correctly detecting the amplitude. Australia's electronics magazine If the LEDs are flashing slowly (around 1Hz), the Checker has not been able to verify that the output frequency and amplitude are correct. They might flash briefly on a mode change, but there is a problem if they continue flashing for more than a few seconds. In this case, first double-check that JP1 is in the run position. This connects the 3.3V reference to the microcontroller, so if it is still in the programming position or not fitted, the micro cannot confirm the AC output level. One bad solder joint, especially around IC1 and IC2, will be enough to corrupt the waveform, so check those areas too. If you have an oscilloscope, you can verify that the waveform at TP1 is a 1V RMS sinewave offset by 1.65V DC. The DC level can be eliminated by using AC coupling on the ‘scope. Be careful not to ground TP2 unless the supply to the Checker is floating (for example, it is powered by a USB battery pack). USB control Connecting the USB interface to a computer will provide a lot more information, so do this if possible, especially if you are troubleshooting. The Checker should not need USB drivers on recent operating systems, and you can simply use a serial terminal program to communicate. We usually use TeraTerm on Windows, but programs like Putty, the Arduino Serial Monitor or MMEdit can also be used. On Linux, minicom is one option. Find out what serial port has been allocated and open this with your terminal program. You will not need to set a baud rate as it is a virtual serial port. July 2022  37 Typing “1”, “2” or “3” will change the mode to 50Hz, 60Hz or 100Hz. You will see the LEDs change as the mode changes. Pressing “S” selects the sinewave mode, while the “R” key sets the saturated output (think “rectangular wave”). Pressing the space bar will produce a status report over two lines; this can be seen at the top of Screen 1. The first line shows the current control variables; “A” controls the amplitude and “F” controls the frequency. The second line shows the reported amplitude (V) and frequency (F). Pressing “M” sets manual control mode. All three LEDs will light together in this case, and you can set the A and F parameters manually. The A parameter is changed with the full stop and comma keys (think of the <> above them on the keyboard). Increasing the A parameter will decrease the output amplitude. Once the output voltage drops below 0.8V AC RMS, it may drop off altogether as there is insufficient gain around the feedback loop to maintain oscillation. Still, it will recover once a valid setting is selected. You can change the frequency with the “−” and “+” (or “=”) keys. The F parameter can span between 1 and 750, corresponding to approximately 45Hz to over 1kHz. The Checker cannot accurately display frequencies over about 600Hz, so the use of this end of the range is not recommended. Manual mode is terminated by pressing S1 on the board, or selecting the 50Hz, 60Hz or 100Hz modes from the USB interface using the 1-3 keys. Using it Before you start using our Checker, you should refer to the calibration section in its manual (if present). When using our Checker, you can check or calibrate a multimeter in the following modes: • DC voltage – connect the probes between TP5 and TP6 on a range like 20V DC and check/adjust for 3.300V. • AC voltage – connect the probes between TP1 and TP2 on a range like 2V AC and check/adjust for a reading of 1.00V. This should be correct regardless of whether the meter is a True RMS type or not, as it is a pure sinewave. • Direct current – connect the probes between TP3 and TP4 on a range like 200mA and check/adjust for 100mA output. TP3 is the current source and TP4 is the sink, so you might get a negative reading unless the red probe goes to TP3. • Alternating current – connect the probes between TP1 or TP2 with a 100W 1% or 0.1% resistor in series. Set it for a low range and check for a reading of 10mA. • Resistance – connect the probes between TP7 and TP8 on a range like 200W and check/adjust for a reading of 33.00W. • Frequency – connect the probes between TP1 and TP2 on a range like 200Hz and check for a reading of 50Hz, 60Hz or 100Hz (set using pushbutton S1 and LEDs1-3). For best results, press S1 until LED3 lights and check/adjust for 100.0Hz. • Duty cycle – connect the probes between TP1 and TP2 and check for a Here we are probing TP1 & TP2 (ACV) with an Agilent (now Keysight) U1252A DMM. This result is within 0.03% of the expecting value, which shows that the meter’s calibration is still good, and demonstrates the accuracy of the Multimeter Checker & Calibrator. 38 Silicon Chip Screen 1: a typical output from the USB serial port. You can trigger the two-line reports shown here by pressing the space bar, while the single-line entries are due to manual changes in the amplitude and frequency settings. Mode changes do not produce any output but will be seen in changes to the illuminated LEDs on the Checker. reading of 50%. For best results, press S1 until LED3 lights. • True RMS readings – press S2 to activate the modified wave mode and check the AC voltage reading between TP1 and TP2. The displayed voltage should be above 1V RMS; our prototype produces 1.27V RMS in this mode. A higher reading suggests your meter uses the average method. In comparison, a lower reading suggests it uses the peak method (as the peakto-peak voltage in this mode is 3.3V, a peak-reading multimeter will generally show around 1.17V). Summary While we set out to add an AC voltage and frequency reference to an otherwise straightforward DC reference design, we think that being able to control the operation of the AC source manually will be a handy feature that many people will use. The USB interface also gives this handy little device a range of possible uses. One thing to watch out for is noisy USB charger power supplies; they can cause frequency measurements of the ACV output to be unstable. In that case, the best solution is to power it from a USB power bank. A laptop USB port usually provides enough clean power to get stable readings from the Multimeter Checker. SC Australia's electronics magazine siliconchip.com.au