This multimeter could also have been written in C. Doing so would have forced us to miss out on various libraries, which led to more compact code. In today’s age of highperformance microcontrollers (this is a 100MHz class unit), sacrificing some efficiency for faster development is a tradeoff worth considering.
The Raspberry Pi Pico is impressive in that it provides a highly flexible development environment. For reasons of convenience, the following steps were performed using the stock MicroPython firmware readily available at www.raspberrypi.org/documentation/pico/gettingstarted. Our program isn’t large enough to warrant the creation of a custom build, which would only slow us down.
Both alternating and direct current are lethal. Don’t perform experiments with voltages larger than 50VCAC or 120VDC. For safety reasons, stay below 25V AC and 60VDC – and if you have cardiac problems, be especially careful of AC. Neither the publisher nor the author can be held responsible for damages to health and equipment.
Creating a high-accuracy instrument is an interdisciplinary task. One nice area of improvement involves the reference voltage fed into the ADC. The Raspberry Pi Pico board doesn’t enables us to harness the entire capabilities of the RP2040 microcontroller. A detailed explanation of the issues faced can be found in section 4.3 of the Raspberry Pi Pico datasheet document.
Metrology hasn’t changed significantly in the past few decades. Service manuals for vintage multimeters often contain accurate and commented schematics. These provide an excellent education for designers seeking to save themselves the effort of reinventing the wheel.
OUR EXPERT
Actual program development is then done on a workstation running Ubuntu 18.04 and the Thonny IDE. Unfortunately, it can’t be installed from the package repository of the distribution: the Raspberry Pi Pico core expansion works best with at least version 3.3.3+ of the product.
Should you feel like improving your reference voltage, please avoid falling victim to the accuracy fallacy. The reference voltage doesn’t necessarily need to be precise: in the end, no one cares if the absolute value is 3.205V or 3.235V. Instead, absolute stability is important – keep in mind that components are affected both by ambient temperature and aging.
Tam Hanna has developed, and made hardware for various civil and militia applications. He lives in a bunker full of test equipment in Budapest, and is always looking for well-paid jobs…
Given that MicroPython is an interpreted language, you don’t need to worry about connecting a PicoProbe or similar debugging hardware. The USB interface of the microcontroller is used to host a REPL console – the IDE running on the PC takes control of the microcontroller board via the serial link used for communicating with the bootloader. As for actual hardware development, DuPont headers can be soldered on to the board. It then fits a breadboard comfortably, thereby freeing you from designing a custom PCB during the initial stages of the project.
If you have a stable voltage reference at an odd voltage level, values can be massaged using various algorithms. Compensating temperature or aging effects, on the other hand, isn’t possible due to entropy. The same is valid for a resistor: if the voltage divider is constant with a ratio of 1:2.201, computing values isn’t an issue.
QUICK TIP
This multimeter could also have been written in C. Doing so would have forced us to miss out on various libraries, which led to more compact code. In today’s age of highperformance microcontrollers (this is a 100MHz class unit), sacrificing some efficiency for faster development is a tradeoff worth considering.
Incidentally, voltage reference design is one area where each multimeter vendor cooks their own soup. Datron, Hewlett Packard and Schlumberger Solartron take their own approach to the problem, the service manuals of the high-end products make for highly recommended reading. Finally, don’t forget mathematical processes. Using sophisticated filters lets you “eke out“ additional information from imperfect hardware. Grouping together ten samples into one measurement, for example, eliminates some noise sources.
F ew tasks in the life of an engineer can compete with the degree of satisfaction achieved by creating test equipment. Be it a testing rig or a generic piece of equipment, there’s always something to learn (and fun to be had).