Author Topic: DIY 6-digit handheld volohmmeter  (Read 1336 times)

0 Members and 1 Guest are viewing this topic.

Offline jaromir

  • Supporter
  • ****
  • Posts: 286
  • Country: sk
DIY 6-digit handheld volohmmeter
« on: March 23, 2020, 11:29:31 pm »
Foreword
I'm not sure whether this topic should belong to 'Projects' section, but 6 digit voltmeters is borderline voltnuttery thing, perhaps more when it's DIY project, so I entered it here. Mods have all the power to move it elsewhere, of course.
This is more-less finished project. I will receive some more spit and polish, but major rework is not in the plans. I decided to make the project available for anybody intersted.

Motivation
It all started with my previous project [1]. It turned out to be quite chunky box, with a fair bit of circuitry for what it is doing - measuring single voltage input. Nonetheless, despite being one of a few finished long-scale voltmeter project, it served as testbed for further development and experiments. The enclosure is really closely packed with circuitry and I wondered if it can get any smaller. On a first glance it looked quite hard, but shortly I realised it can be done, with some added benefits. Except of the obvious form factor shrink, more efficient power supply could bring less self heating, with associated faster power-up stabilization. While shrink-down voltmeter could be worthy project on its own, I decided to make it harder by adding two features - switchable input ranges and resistance measurement.
While tabletop multimeters with 6 and more digits are quite common from multiple of manufacturers, vast majority of handheld multimeters do have resolution up to 60000 counts (4 and 3/4 digits), with some going to 500000 counts (5 and 3/4 digits), while 6 digits multimeters being rare as hen's teeth (Gossen Metrawatt METRAHIT 30M being exception). This imbalance exists for a reason - different use case for handheld multimeters is one factor, harder environmental conditions making stable references difficult to build is definitely another one, not to mention somehow higher consumption of precision circuitry. My device isn't here to change this in any way. I'm aware of limitations of my device and I approached it as practical example of impractical design, since chase is better than the catch.

Implementation, design goals
I set a few goals in previous paragraph - 6 digit measurement (with reasonable linearity and noise), battery operation, switchable input ranges. This is one boundary condition, still leaving a lot of degrees of freedom. In order to move forward I needed to define mechanical factors. Despite having 3D printer in my home lab, I opted for off-the-shelf plastic enclosure, after a bit of searching I settled down on a quite cheap enclosure [2] with 6xAA battery holder and dimensions still acceptable to be called handheld. Considering low cost, acceptable quality and good availability, another boundary condition was set. Designing handheld devices usually involves pingponging between mechanical and electrical design, this one was not an exception, so I had to return to electronics again.
I set up those design goals:
* Three voltage ranges: 1V, 10V and 100V full range, bipolar. 1V and 10V ranges should have switchable input resistance - 10M and >1Gohm. (in fact I was able to acheive 1M, 10M and >1Gohm)
* Selectable integration time, at least 1, 10 and 100PLC
* Five resistance ranges - 1k, 10k, 100k, 1M and 10M full range
* Four wire resistance measurement

I set up rough block diagram, see attachment 01 below. For ADC core I opted for design I already had [1], with some adjustments. EPM240 is CPLD that can host and ADC controller, but not much else. Since I wanted employ integration time switching as well as experimenting with other multislope modulation schemes, I decided to leave EPM240 for something more powerful (here it means jumping from 240 logic blocks to 1k and more). Lattice seems to have portfolio that fits my needs - hand-solderable package (QFN being tolerable, but QFP preferred), relatively low power operation and 1k+ LUTs. Mach XO2 fit the needs quite well, so the FPGA selection was done. In my previous project I used MSP430 to spice up my work, in this project I decided to use more familiar STM32L151. On user end of device is thin COG LCD with backlight, EA DOG132, since it had suitable dimensions and current consumption. For buttons I opted for Marquardt 6450 Series again, I just love those pushbuttons.
My previous voltmeter was partially designed in "throw a kitchen sink at the problem" manner. I tried to get my feet more closer to ground. Expensive LT1116 comparator was replaced with LM311 while still being suitable for this application. Opamp in integrator is OPA140, the rest of circuit employs OPA192 or OPA2192; OPA177A are used in reference circuit around LM399A. Using LM399A in reference source was tough choice. For battery powered application something like LT1236 or LTC6655 would me more sensible choice, but I decided to go a bit fancy here and used heated reference - mainly because it's design challenge.
To achieve +-10V input range (actually +-12V for overrange) and high input impedance (order of GOhm and higher) isn't that trivial exercise. In my previous voltmeter I had high hopes for LTC2057, but it's significant current noise caused me a lot of trouble at higher input impedances. There are other autozero opamps, like LTC1052 with much better parameters, but low power supply range forced me to make bootstrapped power supply for it. This is starting to dictate power supply requirements. To achieve +-12V output swing on bootstrapped output, +-18V range was needed. 36V is maximal supply voltage for OPA192 and other opamps, so I decided to derive another power rail, -14V to power the opamps. This sets supply voltage to 32V, still being fine for analog portions of circuit as well as ADC. With projected current consumptio of roughly 20mA from both +-18V rails this asks for roughly 1W of output power to analog parts. After a bit of searching I opted for ADP5070 followed by ADP7142 and ADP7182 in a basic, more-less datasheet configuration. Power to the FPGA was delivered via 3,3V LDO with shutdown, MCU is always powered on via low power MCP1703 LDOs. Last power rail is 5V for powering relays and display backlight. When device is off, MCU is dormant with minimal current consumption, but can wake-up from pushbutton press and power up FPGA and analog portions of circuit; as well as power everything down when needed. Battery voltage is monitored with high resistance resistor divider (6,2/2,4M) followed by MCP6441 voltage follower to get nice low impedance output for ADC internal to MCU. There is isolated USB interface onboard, made around CP2102 interface IC and ADUM1202 isolator.
I'd love to have at least digital domain galvanically separated from analog, but unfortunately I couldn't make power supply small and good enough, so I opted for power scheme described above. That also forced me to be more careful with grounding, decoupling and power planes placement. Going back to mechanical design I realized I can't fit everything on single PCB with dimensions given by enclosure size, so I opted for sandwich construction of two PCBs. Some circuit parts were fixed - for example user interface (display, keys) has to be on upper (main) PCB. Most logical choice would be to separate digital and analog parts on two PCBs, but I couldn't fit both analog frontend and ADC on single PCB, so I decided to have ADC on main PCB and leave analog frontend on smaller expansion PCB. Enclosure dimensions and circuit blocks division gave ma another constraint, so I could finally get to schematics drawing and PCB design.
Since I had clear idea what to do, this was relatively easy part and majority of work was done in two evenings. I opted for a bit of fun and joy (hobby projects are done for fun and joy, right?) and used minimelf 0207 resistors throughout both boards, even for some capacitors. Unfortunately decoupling capacitors are in more "boring" 0805 size format. Should there be anybody to trying to replicate my design - minimelf footprint can be populated by common and easy to solder 1206 resistor size, so you don't have to obtain not exactly common minimelf resistors.

Making it work
After PCBs were mostly populated, i discovered a few nasty layout bugs, forcing me to do quite a bit of rework and bodging. The bigger main PCB was mostly OK-ish, but analog board was half-functional even after excessive bodging. Voltmeter part was OK, but ohm current source had two ranges missing and 4-wire measurement plainly didn't work. I decided to respin the board to fix the bugs, after that I had more-less functional device, with working 4-wire resistance measurement, as well as working up to 10Mohm. Some more pictures and comments are in album [3].
I realized I can have also diode test "for free", so expanded the functionality here, too.

Verification
Since the ADC has input range +-10V (with cca 2V overrange), I focused first on JVO-2 testing on this particular range.
* I measured INL using Time electroncis 2003S calibrator and HP-34401A being known for quite good linearity for 6,5 digit DMM. I wasn't able to get more than 1ppm nonlinearity, see attachment 02 below. Anyway, this is still a bit problematic, to properly cover the INL I need higher instrument class. At least I know my device isn't completely off.
* I made quite a few measuremnts of shorted input jacks, testing for noise as per [4], fantastic resource. Fortunately there is really a lot of already measured commercial devices, so I have something to comapare against. At 10V range, for 1PLC, 10PLC and 100PLC I measured 0.69, 0.21 and 0.16ppm of RMS noise. For other ranges, see attachment 03 below. For comparison, I setup table capturing measured noise data of some other tabletop multimeters and my device, see attachment 04 and 05 below.
* Since this is battery operated instrument, I was curious about startup behavior as well as stability as batteries are getting drained. After powerup, jumps roughly 15ppm high and falls down within ppm or two in roughly 10 minutes, typical startup behavior is captured in graph 06 below.
When changing power supply voltage from 10V down to 5.8V I can't detect any change of reading more than 1ppm. To achieve this wasn't as easy as it may sound - in my first trials I discovered quite strong (and non-linear) dependence of ADC reading on battery voltage, despite +-18V rails were perfectly stable. Aftera bit of head scratching I tracked down the reason to conducted EMI from main switching power supply influencing LM399A reference. Proper decoupling of reference with 100nF capacitors right at LM399 pins solved this problem.
* Ohm ranges didn't get as much of treatment as voltage ones. Device was adjusted against my HP34401 on top of therange and checked with a few stable resistors I had on hand. From preliminary checks it looks like the reading correspond to each other within a few tens of ppm, but I don't call this proper test yet.

Résumé
Now I got somehow weird combo of long-scale voltohmmeter in handheld enclosure, battery powered with hungry LM399A reference.
I learned a few new things, compared to what I knew before this project.
* Low local heating (and thermal design in general) is important factor in precision circuits.
* Having working ADC (as circuit on PCB) is far away from having voltmeter (as device in box) and this is heck a long way to multirange multimeter.
* Despite what MELF stands for (Mostly End up Laying on the Floor) I haven't lost single MELF resistor.
* LM399 is just really not suitable for battery operation.
After all, it was really fun project and I don't regret time and money spent on it. All sources are available on github [5]. Link in [3] contains a lot of photos with some more comments to it.

Future work
* I should verify the ohm ranges
* Autorange is still not implemented. I'm not even sure I want to implement it, though.
* As the source code for MCU grew, I realized I have chosen bad firmware structure. Rewriting it to omit repeated blocks of code would be good idea, but quite a bit of work.
* Having two inputs (main input and 4W resistance sense) enables me to make ratio measurements. This is something to be examined later.
* Having larger FPGA on board enables me to experiment with other modulation schemes than what I have now. This is very likely a thing I'm going to try.


Links
[1] - https://www.eevblog.com/forum/metrology/diy-6-5-digit-voltmeter/
[2] - https://www.tme.eu/sk/katalog/?search=KM-103&s_field=1000011&s_order=desc
[3] - https://imgur.com/a/50MBxly
[4] - https://xdevs.com/article/dmm_noise/
[5] - https://github.com/jaromir-sukuba/vm_mini
 

Offline Vgkid

  • Super Contributor
  • ***
  • Posts: 2581
  • Country: us
Re: DIY 6-digit handheld volohmmeter
« Reply #1 on: March 24, 2020, 12:24:49 am »
Very cool project, will read about it later. Just skimmed it.
If you own any North Hills Electronics gear, message me. L&N Fan
 

Offline imo

  • Super Contributor
  • ***
  • Posts: 2637
  • Country: 00
Re: DIY 6-digit handheld volohmmeter
« Reply #2 on: March 25, 2020, 12:07:58 pm »
Cool, as usual from Jaromir's Lab.
The next step is a fine tuning to 7.5 digits (with LTZ1000)..
 

Offline Kleinstein

  • Super Contributor
  • ***
  • Posts: 7645
  • Country: de
Re: DIY 6-digit handheld volohmmeter
« Reply #3 on: March 25, 2020, 05:15:36 pm »
For a portable instrument 6 digits is well enough. There are not that many voltages to measure that are more stable than the LM399 reference.

The input amplifier looks nice and relatively simple.  :-+ Speed wise IC15 (TL061)may be boarder-line as amplifier inside the loop.

The current source looks a little odd. It is 2 voltages and 2 reference resistors with the classic way with current source to transfer the voltage to the upper side. However a 1:100 step is rather large for this stage. A low reference voltage makes it more sensitive to the low frequency noise of the OPA2192.  I would more go for 2 voltage levels that are 1:10 and than the reference resistors in 1:100 ratio. The switching with IC7 is also not ideal, as the switch resistance enters a little.

Are the 10 PLC and 100 PLC modes done as one long integration or as averaging of shorter conversions ?
For 100 PLC a single integration at a piece is likely not useful. Other meters tend to use 10x10 PLC instead.

If there is enough space, one could consider using 2 current steps for the relays, e.g. by adding a RC combination in series. This could save some power and less heat gives less thermal EMF error. The hold current can be quite a bit lower. Reed relays are relatively fast so that some 100 µF or even less could be sufficient.
 
The following users thanked this post: jaromir, imo

Offline jaromir

  • Supporter
  • ****
  • Posts: 286
  • Country: sk
Re: DIY 6-digit handheld volohmmeter
« Reply #4 on: March 25, 2020, 09:04:43 pm »
Thank you for your comments, guys.

The input amplifier looks nice and relatively simple.  :-+
Thanks, very appreciated.

Speed wise IC15 (TL061)may be boarder-line as amplifier inside the loop.
When torturing the amplifier with square-wave signal I noticed some overshoots with x10 gain, so I applied capacitor C19 to decrease the bandwidth and keep it more stable. Not much of a problem here, so I decided to keep the slow, cheap and low power TL061 here.

The current source looks a little odd. It is 2 voltages and 2 reference resistors with the classic way with current source to transfer the voltage to the upper side. However a 1:100 step is rather large for this stage. A low reference voltage makes it more sensitive to the low frequency noise of the OPA2192.  I would more go for 2 voltage levels that are 1:10 and than the reference resistors in 1:100 ratio. The switching with IC7 is also not ideal, as the switch resistance enters a little.
Current source is result of some compromises and gave me some headaches. The schematics may be hard to follow, so I attached simplified schematics so I can illustrate my thinking. The principle is simple - R1, U1, Q1 are constant current sink, causing constant voltage drop on R2. U2 drives Q2 so that voltage on R3 is the same as on R2, regardless of Rload. Absolute resistance of R1, R2, R3 isn't much important, but tracking is important - best option is to have resistor network on single substrate.
My goal was to achieve 1uA, 10uA, 100uA and 1mA of current.
I could achieve that if R1 and R2 were stable and R3 could be switched in four orders of magnitude, but I can't think of any off-the-shelf resistor network for this purpose. I could, on the other hand, OSOP 20-pin resistor network, containing 10 resistors of the same value, I chose 10k. I can't think of way of connecting them to cover 4 decades, so I had to be creative a bit. I can wire three resistors in paralell, that is 3,33k, three resistors in series, that is 30k. Wiring them in series makes resistance 33,3k, with 3,33k tap - that is exactly 10:1 ratio with 6 resistors, usable for R3. Unfortunately, I was stuck there, because at least two more resistors were needed for positions R1 and R2.
I opted for 20k value at R1 position, for 7V reference it gives 350uA through R2, voltage drop of 3,5V, that means 1,05mA output current when R3=3,33k and 105uA when R3=33,3k. Here is where big compromise was made - to cover 10uA a 1uA ranges, I had to resort to using R1 that is not a part of resistor network, unfortunately. Its resistance was 2MOhm, that yields 3,5uA through R2. If U2 was powered from 18V, its inputs were out of linear range without zener diode D1, so it's switched in for low two ranges. It's not needed on high ranges, so it's switched off with transistor.
I'm unhappy with both non-networked resistor and big resistor step (too little current via R2). Issue with resistor is obvious - it can drift in other way to resistor network, resulting in worse long term stability. Too small current via R2 may mean more influence of leakage currents on PCB or switches as well as U1 and U2 bias currents. 1ppm from 3,5uA is 3,5pA. I think the best solution would be custom resistor network with three decades of resistance for R3, two for R1 and one for R2, if only it existed as off-the-shelf component.
I thought of having two reference levels, but having only 1:10 ratio for R3 l, I'd need Vref and Vref/100 to achieve four decades of reference current - that is 70mV. Problem with leakage would be the same, but here offset of U1 would come into play, too.

Result of aforementioned compromise is that 1k, 10k and 100k ranges should be pretty stable, 1M and 10M ranges are probably somehow worse and by now I can't see how to workaround it without having custom resistor network - that is doable, but rather expensive. There is option of wiring four OSOP 20-pin packages into one giant network, but that is somehow cumbersome solution.

Are the 10 PLC and 100 PLC modes done as one long integration or as averaging of shorter conversions ?
For 100 PLC a single integration at a piece is likely not useful. Other meters tend to use 10x10 PLC instead.
The ADC itself is switchable to 1...10PLC integration period (though I'm using only 1, 2, 5 and 10PLC), higher integration periods (20, 50 and 100PLC) are computed as average of multiple 10PLC measurements.

If there is enough space, one could consider using 2 current steps for the relays, e.g. by adding a RC combination in series. This could save some power and less heat gives less thermal EMF error. The hold current can be quite a bit lower. Reed relays are relatively fast so that some 100 µF or even less could be sufficient.
That is very good suggestion, thanks.
 
The following users thanked this post: Kleinstein, imo

Offline Kleinstein

  • Super Contributor
  • ***
  • Posts: 7645
  • Country: de
Re: DIY 6-digit handheld volohmmeter
« Reply #5 on: March 25, 2020, 10:16:06 pm »
For the current source one does not need matching for all 3 resistors. It is more like good matching for R2 and R1 or R3 and a low TC for the other of R1 and R3. The output current is given by  - U_ref * R2/ (R1*R3).
For gain switching one can change R1,R2 and R3. I think the better way would be to have a constant R1 and switch R2 and R3.
For R2 this could be something like 1 and 0.1 times R1. R3 would than need to switch between 2 good resistors (no need to be in the same array). So one could have an Array with 2 of some  1 K and 10 K for R1 and R2 and 2 more independent good resistors for R3.
Alternative to an array with 1:10 ratio there could also be 10 equal resistors to get something like 4 in series for R1 and either 3 in parallel or 3 in series for R2.

This way the first OP would always work relative to a rather high voltage (e.g. 7 V). The second OP would work with 7 or 0.7 V.
So maybe R1= 10K , R2 = 1K or 10 K and R3 = 10 K or 1 M. There is one slight downside: the ~ 1 mA range would have a relatively high voltage at the critical resistor and thus quite some power loss. However this is kind hard to avoid when switching voltage and reference resistors - the highest current would naturally see the higher voltage.
 
The following users thanked this post: jaromir

Offline jaromir

  • Supporter
  • ****
  • Posts: 286
  • Country: sk
Re: DIY 6-digit handheld volohmmeter
« Reply #6 on: March 25, 2020, 11:29:51 pm »
Thanks for the analysis. Switching R2 instead of R1 is a good suggestion, indeed.
This is probably not the last time I designed such as current source, so I'll make sure to try this resistor switching topology.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf