Millivolt Meter Version 2

MilliVolt Meter V 2.11 Front 4 Volt range
MilliVolt Meter V 2.11 Front 4 Volt range

An updat­ed ver­sion of the Millivolt Meter project from May 2016, with dual range selec­tion, cal­i­bra­tion selec­tion, improved soft­ware, and updat­ed board lay­out.

After three years, I decid­ed it was time for a refresh of my orig­i­nal Millivolt Meter ver­sion 1.51, based on the Scullcom Hobby Electronics  Millivolt Meter on Youtube.
The orig­i­nal board was designed to loose­ly match the orig­i­nal Scullcom Hobby Electronics thru-hole board using a mix of sur­face mount and thru-hole devices instead. The major changes in ver­sion 1.5 were the addi­tion of the Caddock volt­age divider in place of the dis­crete resis­tors, the Arduino Pro Mini instead of the Nano, and using an I2C con­nect­ed dis­play instead of the direct­ly con­nect­ed par­al­lel dis­play.

Original Millivolt board V 1.5 Top Components
Original Millivolt board V 1.5 Top Components

The Version 1.51 board was fea­tured in a lat­er video by Scullcom Hobby Electronics as the Millivolt Meter MK2, with sev­er­al oth­er updates.

Paul Versteeg made sev­er­al mod­i­fi­ca­tions to the board such as bat­tery volt­age mon­i­tor­ing and refined the soft­ware to include fil­ter­ing, and improved cal­i­bra­tion. Paul’s Blog

Millivolt Meter V2.1 Assembly test setup
Updated Millivolt Meter V 2.1 Assembly test set­up

The new ver­sion 2 board is now larg­er to sup­port the addi­tion­al com­po­nents.
One of the first changes was to replace the TO220 volt­age reg­u­la­tor with a sur­face mount low qui­es­cent cur­rent / low dropout ver­sion. Also added was a PTC fuse on the 9 volt input. The board will now work with a sup­ply down to 5.4 volts which allows the 1.5 volt bat­ter­ies to be drained all the way to 0.9 volts each.
A MAX14931 dig­i­tal iso­la­tor was added between the dig­i­tal and ana­log sec­tions of the board for com­mu­ni­ca­tions with the LTC2400 ADC, and iso­lates the SPI bus and relay con­trol.
The ADR4540 volt­age ref­er­ence remains the same, but now has mechan­i­cal and ther­mal iso­la­tion slots around it along with addi­tion­al fil­ter­ing on the vref out using film capac­i­tors.
The input volt­age divider still uses the Caddock pre­ci­sion decade resis­tor divider, but it is now con­fig­ured as a 10 meg Ohm 10:1 divider on the 40 volt range. A shield­ed COTO relay with a 5 volt coil is now includ­ed to switch to a 4 volt range, which bypass­es the divider still keep­ing a 9 meg Ohm input resis­tance.
I added an over-range check in soft­ware to auto­mat­i­cal­ly switch to the 40 volt range from the 4 volt range if the volt­age is greater than 4.01 volts or the ADC sets the over-range bit, along with set­ting the back­light to vio­let to warn of the range change.

Millivolt Meter V 2.11 Assembly test shorted input
Millivolt Meter V 2.1 Assembly test set­up with short­ed input

Some oth­er new items are an input pro­tec­tion board, a ZeptoBit iso­lat­ed USB-UART adapter, Multi-input I2C LCD dis­play adapter with EEPROM, bat­tery volt­age mon­i­tor, and back pan­el cal­i­bra­tion selec­tion switch.

Millivolt Meter V 2.11 top inside
Millivolt Meter V 2.11 top inside set­up for volt­age ref­er­ence 1,000 hour burn in. (exter­nal pow­er)

To con­nect the USB iso­la­tor to the back pan­el I used an Adafruit pan­el mount exten­sion USB Cable — Micro B Male to Micro B Female #3258.
For the cal­i­bra­tion switch, I used a C&K MA00L1NZQD rotary switch and pinned it for 5 posi­tions with the fifth posi­tion being OFF to pre­vent acci­den­tal cal­i­bra­tion from the front pan­el.
I was orig­i­nal­ly going to use 4 sin­gle cal­i­bra­tion points, but end­ed up using a 2‑point cal for each range at 10% and 90%.
Cal‑A and B are used for the low (0.4096) and high (3.6864) cal for the 4 volt range, with Cal‑C and D used for the low (4.096) and high (36.864) cal on the 40 volt range.
The cal­i­bra­tions for each range must be done with A before B, and C before D, as the high cal for each range uses data from the low cal for it’s cal­cu­la­tions.
The 2‑point cal does­n’t use a zero cal, so that front pan­el switch is cur­rent­ly unused.

Millivolt Meter V 2.11 back panel
Millivolt Meter V 2.11 back pan­el

I used a 6‑cell AA bat­tery pack for nor­mal oper­a­tion of the meter, but added an exter­nal pow­er jack for test­ing and burn-in pur­pos­es. I kept the unit pow­ered con­tin­u­ous­ly for over 1,000 hours / 45 days to allow the volt­age ref­er­ence drift to set­tle, before my final cal­i­bra­tion.
Overall I am pleased with the updates, but feel that there is still room for improve­ment espe­cial­ly with the soft­ware to reduce some non-lin­ear errors with the ADC.
I would like to uti­lize the EEPROM on the I2C dis­play board to map out the non-lin­ear errors in the ADC cir­cuit, but that will be a future project.

Millivolt Meter V 2.11 front shorted input
Millivolt Meter V 2.11 front short­ed input

Eagle CAD board and schemat­ic files Millivolt Meter Version 2.11
OSH Park Millivolt Meter V2.11 project page

Millivolt Meter Ver. 2.11 BOM

Eagle CAD board and schemat­ic files RGB I2C Display with EEPROM

Eagle CAD board and schemat­ic files Input Protection board

Front Panel Designer front and back pan­el files for Hammond 1455N1601BU box

Arduino sketch files for soft­ware ver­sion 3.34

Modified Adafruit_RGBLCDShield library for addi­tion­al input I/O

15 Replies to “Millivolt Meter Version 2”

  1. Hi Greg,

    This looks like a very good iter­a­tion from your 1.5 ver­sion. I was wait­ing to see if there had been any fur­ther devel­op­ments and am pleased to see that you have incor­po­rat­ed sev­er­al advances in this design. I like the mul­ti­point cal­i­bra­tion mech­a­nism and the board design looks like it has incor­po­rat­ed sev­er­al advances that, in the­o­ry should improve on the pre­vi­ous per­for­mance. The changes to the volt­age reg­u­la­tor was some­thing I was intend­ing to do if I made the 1.5 ver­sion, but the oth­er changes should be very ben­e­fi­cial too.

    One of the issues raised with the pre­vi­ous prob­lem seemed to be wide vari­a­tions and lin­ear­i­ty prob­lems at the very low end of the range. Has the range switchover improved this? It seems that you have a strat­e­gy for address­ing lin­ear­i­ty and stor­ing this in EEPROM which sounds like it should be a sim­ple cod­ing issue 😉 rather than a pcb design prob­lem.

    Looking at the pho­tos in your blog, I note that there are a cou­ple of post-pro­duc­tion ‘addi­tions’. There is a blue wire from pin 5 (INA3) on the iso­la­tor head­ing under the Arduino — not sure if that has been addressed on the lat­est pcb? There is also a SOT23 daugh­ter­board vis­i­ble on the ‘top view’ of the open case above — looks like it might be an addi­tion­al volt­age reg­u­la­tor to the Arduino?

    I am busy with the MilliOhm meter at the moment but will be fol­low­ing this one close­ly as it is high on my list of ‘inter­est­ing projects’.

    As a com­plete aside, I designed a set of RF H‑Field probes on a 4 lay­er PCB ear­li­er in the year but nev­er got round to pro­duc­ing them. When I was look­ing on OshPark for the MilliOhm boards, I came across a sim­i­lar set you had pro­duced but can’t find any ref­er­ence to them in your blog. I would be inter­est­ed to know if you got them to work or if you had any prob­lems with them.

    1. Hi John,
      There is some improve­ment at the low end due to the range switch and the 2‑point cal­i­bra­tion, but once the mea­sured volt­age is at the mid­dle or extreme high/low end of the range, there are still errors in the hun­dreds of uV.
      The errors are very repeat­able and sta­ble, so that is why I am inter­est­ed in explor­ing addi­tion­al cal­i­bra­tion meth­ods.
      The blue bodge wire was to cor­rect a non-con­tin­u­ous trace for the relay con­trol, which has been cor­rect­ed in Ver. 2.11
      The SOT23 is a Maxim MAX6342 pow­er on reset mon­i­tor that I was exper­i­ment­ing with. The dis­play that I was using had a real­ly long start­up and would require a sys­tem reset 10% of the time when pow­er­ing up.
      I end­ed up adding some addi­tion­al capac­i­tance to the exist­ing reset cir­cuit on the Pro-Mini (the blue capac­i­tor) and remov­ing the MAX6342.

      The H‑Field probes were designed, but haven’t been ordered yet. Eagle CAD files

      Thanks,
      Greg (Barbouri)

  2. Hello Greg,

    Many thanks to you, and Louis Scully and Paul Versteeg, for mak­ing all this infor­ma­tion avail­able for hob­by elec­tron­ics enthu­si­asts.
    This Millivolt Meter is an excel­lent project — I have start­ed order­ing parts and am look­ing for­ward to the build­ing and test­ing.

    One issue that puz­zles me: It seems you have tak­en a lot of trou­ble to make sure that the crit­i­cal front-end cir­cuit­ry is designed to min­i­mize noise and exter­nal inter­fer­ence by use of shield­ing, and keep­ing tracks as short as pos­si­ble.
    But you then hang a sep­a­rate board on the input with large un-shield­ed pro­tec­tion com­po­nents. Can you explain why this does not com­pro­mise the per­for­mance?

    Ken.

    1. Hi Ken,
      You are cor­rect the sep­a­rate un-shield­ed pro­tec­tion board can com­pro­mise the per­for­mance.
      But it is a com­pro­mise between blow­ing out the front end of the sys­tem with a surge, or a bit more noise on the input.
      Everything in the design of a sys­tem is a com­pro­mise in per­for­mance, cost, safe­ty, rugged­ness, etc. It is very hard to have it all at the same time.
      With a low noise volt­age ref­er­ence input to the Ver‑2 Millivolt meter and nor­mal aver­ag­ing, The meter only dis­plays about 1 micro volt of noise on the dis­play on the 4 volt scale with the pro­tec­tion board.
      For me this is an excel­lent com­pro­mise. For oth­ers that want the low­est noise pos­si­ble, it is easy to remove the pro­tec­tion board from the sig­nal path and even add shield­ed cable from the inputs to the shield­ed box.

      That is what I think is great about DIY elec­tron­ics, you can do it the way you want and pick the com­pro­mis­es that you are com­fort­able with.
      It would not be too hard to also build a shield for the pro­tec­tion board.

      The main rea­son that I did add the shield on the main board was the very close prox­im­i­ty to the Teensy 3.2 board, and it’s dig­i­tal noise.

      Thanks,
      Greg (Barbouri)

  3. Hi Greg, I ordered 3 of the 1.51 pcb last year (thank you very much for mak­ing them avail­able) but made a few changes: I use an AD4550 5V ref­er­ence. The AD8628, LTC2400 & AD4550 are pow­ered by 5.25V. Measuring range is up to 5.2V/52V. I cut the ground trace of the AD8628 and pro­vide ‑0.25V direct­ly to its ground pin. See LM7705 for more infor­ma­tion. A „rail-to-rail“ opamp isn‘t rail to rail, when it comes to mil­li- or micro­volts. That‘s where the non-lin­ear­i­ty comes from. It’s a dead­band, not an off­set, so you can’t cal­i­brate it away. My input cir­cuit uses two small sig­nal relays to switch between the 1:10 divider (50V @ 10MOhm) and a direct con­nec­tion from the input post via a 15kOhm/3W resis­tor to the input of the opamp (5V @ >1GOhm). The resis­tor pro­tects against at least 100V in lim­it­ing the input cur­rent to the opamp to less than 7 mA. I too use a 2‑point cal­i­bra­tion, but with arbi­trary val­ues for low and high. I enter the cor­rect val­ues (there are four but­tons to do this) & the pro­gram cal­cu­lates the coef­fi­cients for y = mx + b and stores them to the eep­rom. There is also a prob­lem with the float pre­ci­sion of the 8bit arduino. It‘s restrict­ed to less than 7 dec­i­mal dig­its. Rounding errors are almost unavoid­able. So I built my sec­ond mV-meter using a SamD21 (off the pcb) which pro­vides true dou­ble pre­ci­sion. To calm the ner­vous dis­play I do aver­ag­ing 1 to 8 mea­sure­ments before dis­play­ing and sav­ing to the buffer. And I use a 2004 LCD. With a bit of aver­ag­ing or fil­ter­ing the read­ing is sta­ble to 1..3uV. Both meters do not dif­fer more than a few dig­its from 0 to 5V. To each oth­er and a 6 1/2 dig­it Solartron 7150. This is astound­ing. The iso­la­tion of the dig­i­tal sig­nals is not nec­es­sary. I tried this too, using ADUM1201 mag­net­ic iso­la­tors. I couldn‘t find any dif­fer­ence regard­ing the noise. While the LTC2400 is con­vert­ing, noth­ing hap­pens on these lines. I even tried to keep CS low after the first con­ver­sion. No obvi­ous change. But a clean sup­ply makes a dif­fer­ence. I use a LT3042 to pro­vide the 5.25V to the ana­log part. Sorry for so much text 😉

    1. Hi Greg & Henry

      I was hav­ing a look at the code and note Henry’s com­ments about the lim­it­ed Arduino float pre­ci­sion (no dou­ble pre­ci­sion floats avail­able) and his choice of a SamD21 board. Had either of you con­sid­ered using the ‘BigNumber’ library http://www.gammon.com.au/forum/?id=11519 ? This seems to be fair­ly fast and a sim­ple drop in for the pre­ci­sion sim­ple maths that is required?

      BigNumber::begin (); // ini­tial­ize library

      //factorials
      BigNumber fact = 1;

      for (int i = 2; i <= 200; i++)
      {
      Serial.print (i);
      Serial.print (“! = ”);
      fact *= i;
      Serial.println (fact);
      }

      I have just done some tests on a Nano and I am aver­ag­ing cal­cu­lat­ing e to 10 dec­i­mals in 13ms and to 16 dec­i­mals in 25mS. More than suf­fi­cient pre­ci­sion and speed, I would think.

      I will have a look in more detail at the code. There is a mod­est mem­o­ry hit with this library but it does­n’t look too bad and there seemed to be plen­ty of room.

  4. Hi Greg,

    I have just received three boards for the Millivolt Meter v2. On both qual­i­ty and design they look very good, and I’m about to start assem­bly.

    I have anoth­er ques­tion, regard­ing sep­a­ra­tion between the ana­logue and dig­i­tal parts of the design. I would have expect­ed the crit­i­cal Vref and ADC ICs to be con­nect­ed to ana­logue ground, but they are in fact con­nect­ed to dig­i­tal ground. On the oth­er hand, the sig­nal iso­la­tion IC is placed after ADC and Vref, between them and the micro­proces­sor. So I’m not clear on whether the ADC and Vref belong in the ana­logue or the dig­i­tal domain.

    Can you explain the think­ing behind this aspect of the design?

    Thanks, Ken.

    1. Hi Ken,
      The ADC and VREF are on a sep­a­rate ground tied to a star ground point which forms ground 2. The iso­la­tion IC and relay are tied to ground 3 and are also tied to the star ground point.
      My thought was to iso­late the cur­rent flow paths on the ana­logue cir­cuit side based on cir­cuit type and lim­i­ta­tions of using a 2 VS 4 lay­er board.

      Greg (Barbouri)

  5. Hi Greg,
    So there are in effect three ground nets, with ADC and Vref hav­ing their own ground region. That makes per­fect sense. It is not clear from the schemat­ic, but look­ing care­ful­ly at the pcb lay­out in Eagle, I can see the the three ground regions.
    Thanks for your reply, Ken.

  6. Hi Greg,

    Just won­der real­ly — where do you get 36.864 V (Cal D) from please? As always excel­lent project or rather con­tin­u­a­tion of the project.

    Thanks
    Alex

    1. Hi Alex,
      I use a Power Designs Inc. Model C500 Precision DC Source.
      I have also used my HP 6205C Dual pow­er sup­ply in the past, but it tends to drift over time.
      I mon­i­tor the sup­ply with a cal­i­brat­ed 6.5 dig­it meter, and adjust the out­put as need­ed.

      Power Designs Inc. C500

      Greg (Barbouri)

  7. Hi Greg,

    I do not have access to such a cal­i­bra­tor. I can only use a decent bench pow­er sup­ply – I think it should be enough.
    Another ques­tion – I have cal­i­brat­ed the 4V scale, but the volt­age is still off by 0.1–0.15V. Also say 2.5V is dis­played on 40V scale, but does not dis­played on 4V scale (hard­ware issues?). Do you have a more updat­ed ver­sion of your sketch please?

    Thanks
    Alex

    1. Alex,
      Version 3.34 is the most cur­rent sketch.
      The cal­i­bra­tions for each range must be done with A before B, and C before D, as the high cal for each range uses data from the low cal for it’s cal­cu­la­tions.

      Greg (Barbouri)

  8. Sorry I pre­vi­ous mes­sage got par­tial­ly delet­ed.

    Greg,

    The prob­lem with the LCD screen was that in your Modified Adafruit_RGBLCDShield library, the MCP23017 address has to be cor­rect­ed to 0x27 (this is what i2c scan­ner gives me):

    #define MCP23017_ADDRESS 0x27

    Another issue. I did fol­low the cal­ib pro­ce­dure (A before B, and C before D), but no luck. Output 4 (Position A5) is not work­ing on both LCD back­packs (I think this is a soft­ware issue) so I moved it to A0 for now. Sadly, the errors are way too high. On the 4V range, on 3.6864V (this is a cal­ib point), I am get­ting 3.2797V.
    The same volt­age on the 40V scale gives me 3.500971
    This is mas­sive­ly off for both scales.

    I thought the prob­lem may be here in the sketch:

    float A_CI_1 = 1677312 // Calibration ide­al 1 — (0.4096 * 16777216)/ 4.09700 = 1677312 — 10% FS
    float B_CI_2 = 15095809; // Calibration ide­al 2 — (3.6864 * 16777216)/ 4.09700 = 15095809 — 90% FS

    float C_CI_1 = 16773121; // Calibration ide­al 1 — (4.0960 * 16777216)/ 4.09700 = 16773121 — 10% FS
    float D_CI_2 = 150958089; // Calibration ide­al 2 — (36.864 * 16777216)/ 4.09700 = 150958089 — 90% FS

    However, it did not make any dif­fer­ence. Any ideas please?
    Thanks
    Alex

Leave a Reply

Your email address will not be published. Required fields are marked *