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 layout.

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 display.

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 setup

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 power)

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 panel

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

58 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 problem.

    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 methods.
      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 enthusiasts.
    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 testing.

    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 possible.
    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 performance?

    Ken.

    1. Hi Ken,
      You are cor­rect the sep­a­rate un-shield­ed pro­tec­tion board can com­pro­mise the performance.
      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)

      1. Hi Greg,
        Thanks for reply.
        Once built, I’ll play around with the input cir­cuit­ry to see how it affects noise.
        Ken.

  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.

    2. Won’t the use of an active LM7705 (instead of a pas­sive ground con­nec­tion) intro­duce more inac­cu­ra­cy on the out­put of the AD8628? (Note: I’m not say­ing it won’t be much more accu­rate near zero)

  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 assembly.

    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 needed.

      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 calculations.

      Greg (Barbouri)

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

    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

  9. Hi Greg,

    I assem­bled the sec­ond board, but still have the same issue with accu­ra­cy. I fol­lowed your advice on cal­i­bra­tion (A before B and C before D), but still no joy. Any sug­ges­tions please? 

    Thanks
    Alex

    1. Hi Alex,
      Did you enter your actu­al v_ref in line 111 of the sketch?
      “float v_ref — This is your actu­al volt­age mea­sured from the inter­nal ADR4540 IC
      An incor­rect v_ref val­ue can cause accu­ra­cy errors.

      Greg (Barbouri)

  10. Hi Greg,

    I found the issue. I think there were sev­er­al errors con­tribut­ing to this: (a) I do not have a volt­age source able to pro­vide a sta­ble 36.864 V. I am using a pow­er sup­ply and it drifts. (b) I did cal­i­bra­tion before Vref IC volt­age was sta­bilised. © I pow­ered a project through Arduino rather than a battery.
    It is bet­ter now, but not ide­al. For exam­ple, 10.000000V is giv­ing me 10.0123V i.e. 123mV error.
    Now I need to fig­ure out how to obtain a sta­ble 36.864 V to re-cal­i­brate it.

    Thanks
    Alex

  11. Dear Greg,

    From what I under­stood, the inte­gral non­lin­ear­i­ty curve of the LTC2400 fol­lows a rather pre­dictable parabo­la. See the datasheet for an exam­ple. By adding anoth­er cal­i­bra­tion point in the mid­dle of the scale you can approx­i­mate this func­tion in the micro­con­troller code. I expect this would sub­stan­tial­ly improve the accu­ra­cy of your ADC readings.

    Cheers,

    Jacques

    P.S.: Love your blog!

  12. thank you for realy great project. I tried build this … but with some changes.

    - i used many ideas men­tioned by Henry
    — ref­er­ence ADR4550
    — ‑0,25V nega­tove volt­age for OPAMP
    — 2 relays for chang­ing range — 1:1 with resis­tor 51k just in series with OPAMP
    — i used esp32
    — as a dis­play oled char­ac­ter dis­play 20x2

    and result was great, but some non­lin­ear­i­ty apears 🙂 the 1:10 range looks ok but 1:1 not. Strange. Problem was the oscilat­ing OPAMP, i thing. Just touch­ing the input of opamp by mul­ti­me­ter probe (just one end) and non­lin­ear­i­ty goes away. So i added one capac­i­tor 220p between 51k and the relay and groud. And now it is nice 🙂

    1. Hi Michal,
      Sounds like a fun, inno­v­a­tive, and chal­leng­ing build.
      Would love to see a pic­ture of it. Twitter @breviceps

      Thanks,
      Greg (Barbouri)

      1. Hi Barbouri,

        yes, so man­ny hours spend on this 😀

        when the front pan­el comes, i’ll try get every­thing togeth­er and then i’ll make some pictures

        Michal

    1. Hi Bruno,
      The Millivolt meter does­n’t mea­sure neg­a­tive or AC volt­ages directly.
      Because of its sin­gle pos­i­tive rail pow­er sup­ply, you would have to swap the input con­nec­tions to mea­sure a neg­a­tive potential.

      Greg (Barbouri)

  13. Hello Greg,
    Can this meter be used to mea­sure volt­ages across com­po­nents in a cir­cuit (dif­fer­en­tial volt­age) like a hand-held meter? This assumes its iso­lat­ed run­ning off the inter­nal bat­tery. I tried some­thing sim­i­lar using an ESP8266’s inter­nal (not so great) ADC and run­ning it from a bat­tery but the volt­age read­ings become unsta­ble once I try to float the ground of the ESP8266.
    Thank You
    Austin

    1. Hi Austin,
      Yes
      I use mine quite often to mea­sure dif­fer­en­tial volt­ages across components.
      I have two units on my bench, one is pow­ered by an exter­nal iso­lat­ed pow­er sup­ply and has an inter­nal USB iso­la­tor for data.
      The oth­er unit is bat­tery only, for when I need max­i­mum iso­la­tion and do not need to log data.

      Greg (Barbouri)

      1. Thanks for the quick response Greg. The unit with the exter­nal iso­lat­ed pow­er sup­ply and iso­lat­ed usb can also be used for dif­fer­en­tial volt­ages, cor­rect? Because the meter grounds are elec­tri­cal­ly iso­lat­ed from DUT ground. Just want­ed to be clear in my understanding.
        Thanks again Austin

        1. Hi Austin,
          Yes, that is correct.
          Just need to take extra care in assem­bly to iso­late cir­cuit boards with non-con­duc­tive stand­offs, includ­ing display.

          Greg (Barbouri)

  14. Hi Greg,

    As a new­bie I have been read­ing every­thing to do with this project from the main con­trib­u­tors (your­self, Paul and Louis) and get­ting myself a tad confused!
    I have ordered your v2.11 board (from OSH) but I ordered the LCD ser­i­al inter­face (Board Module LCD1602 2004 Display for Arduino) that Paul used. 

    My first ques­tion is as I have your v2.11 board do I require your display42 EEPROM board or can I get away with the one I ordered?

    The sec­ond ques­tion is do I also require the USB iso­la­tor and input pro­tec­tion boards as well or are these option­al ? I will prob­a­bly order the USB iso­la­tor and I/P pro­tec­tion boards any­way but just won­dered if they are mandatory.

    Best regards
    Richard

    1. Hi Richard,
      You can use the LCD1602 mod­ule, but will have to rewrite the firmware to use a dif­fer­ent dis­play dri­ver and move the switch inputs to the main board.
      Also the LCD1602 mod­ule is a mono­chrome (sin­gle col­or) dis­play, so the dis­play will not indi­cate auto range change, or cal mode, etc.
      The cur­rent firmware does not uti­lize the EEPROM on the display42 board, and uses the small­er ATMega328P EEPROM on the Pro-mini, so it can be left unpopulated.
      I use the display42 board in sev­er­al oth­er projects that do require the EEPROM, so it is some­what a gener­ic mod­ule for me.
      The USB iso­la­tor and input pro­tec­tion boards are option­al units and do not require any firmware changes.

      Greg (Barbouri)

  15. Hi Greg,

    Many thanks for your prompt reply.
    I have ordered the RGB I2C Display with EEPROM boards (from OSH after upload­ing the Eagle file) and I am now cre­at­ing a BOM from the schemat­ic. I just thought it would be eas­i­er to stick with your design in the end. Is it pos­si­ble you could also upload a pho­to of a pop­u­lat­ed I2C (with EEPROM) board? It’s just it is always nice to see if you have ordered a com­po­nent that looks in the same ball­park (not that I don’t trust my inter­pre­ta­tion of the Eagle information). 

    I have also ordered all your volt­age ref project com­po­nents. I just hope wifey is understanding.

    Your projects will be very use­ful in under­stand­ing a slight prob­lem in anoth­er (voltmeter/ammeter) LTC2400 based appli­ca­tion I am involved in. We use an MCP2210 (USB-SPI), LTC2400, opto-iso­la­tor, oscil­la­tor and a volt­age ref on a small cus­tom board but the sta­bil­i­ty thresh­old is only 200mV. We think this is main­ly noise/design of the board but this whole world of LTC2400 work and sta­ble volt­age refs is very impor­tant in under­stand­ing where we are going wrong!

    Keep up the good work !

    Cheers
    Richard

    ps I am now acquaint­ed with the world of reflow as your boards are quite small and have ordered a small heat­ed plate and air blower!

    1. Hi Richard,
      Sounds like you have plen­ty of fun projects to keep you busy for a while.
      I wrote a blog post back in 2018 with infor­ma­tion on the dis­play board:
      Prototype I2C Display Board with EEPROM

      For most of my full board work I use a Presto “Liddle Griddle” and an IR ther­mome­ter for the reflow.
      Presto Liddle Griddle
      Full man­u­al oper­a­tion, but works great for me.

      I am still slow­ly work­ing on the Programmable Voltage Reference project, and the next ver­sion will sup­port 0 to 5.0000 Volts output,
      with a bet­ter ref­er­ence, and ther­mal iso­la­tion. Board design is done, but still sav­ing up for the parts.

      Greg (Barbouri)

  16. Hi Greg,

    I would be def­i­nite­ly inter­est­ed in a nice 0–5.0000 source!
    I will keep an eye out. 

    Should I hold off on the orig­i­nal (if I can use some of the parts for the new ver­sion) or will it be total­ly different?

    Cheers
    Richard

    1. Richard,
      Quite a few com­po­nent changes on the new board, and it is still a design pro­to­type, which may require more revi­sions before completed.
      I would rec­om­mend build­ing the board using your exist­ing parts, and then decide if you need the extra’s from the new version.
      Also, some­times my projects run on “Elon time”.

      Greg (Barbouri)

  17. Thanks for the great descrip­tion. I’ve built this meter with some minor changes (import­ed to KiCad and used anoth­er volt­age regulator).

    This was the first time I’m using an Arduino, so it was fun to start learn­ing. But I have some issues adjust­ing the meter. I built a ref­er­ence that I adjust­ed and com­pared with my Agilent 34401A

    I have v_ref 4.09548V.
    Ideal A_CI_1 1677935 (for 0.40960V)
    Ideal B_CI_2 15101412 (for 3.68640V)
    Actual mea­sured 0.4096V A_CA_1 1679692.125 (high­er val­ue by a fac­tor of 1.001047195)
    Actual mea­sured 3.6864V B_CA_2 15099172.00 (low­er by a fac­tor 0.999851669)
    gain_error1 1.000298 (isn’t that a tad high…)
    offset_error1 ‑1257.25

    When mea­sur­ing volt­ages, dis­play shows:
    0V = 1.423 mV (40V range is 11 mV, though)
    0.40960V = 410.656 mV
    2.49737 V = 2.498103 V
    3.68640V = 3.689030 V

    The same with the 40V range, it is read­ing a bit too high all through.

    I’ve tried adjust­ing a few times, but it shows a bit high all the time. Maybe I have to man­u­al­ly set the gain_error? The cal­cu­la­tion does­n’t feel opti­mal, or I’m miss­ing some­thing in the code.

    Also on row 561 in your v.3.34 code, there is the fol­low­ing when cal­cu­lat­ing the 40V high range offset:
    offset_error2 = ((gain_error1 * C_CI_1) — C_CA_1);
    Shouldn’t it be cal­cu­lat­ed from gain_error2?

    Same when cal­cu­lat­ing the volt­ages. On rows 754 and 757 high range is cal­cu­lat­ed with gain_error1 and low range with gain_error2.
    Shouldn’t it be the oth­er way around? If I change these vari­ables I do get a bit low­er readings.

    1. Hi Johana,
      After sift­ing thru the 2.5 year old code, It looks like you are cor­rect with your assess­ment of lines 561, 754, and 757.
      Good catch in find­ing those errors.
      I have nev­er been entire­ly hap­py with the cur­rent cal­i­bra­tion code for the V2 Millivolt Meter, and I some­what men­tion that towards the end of the post.
      Unfortunately short­ly after fin­ish­ing the post, work com­mit­ments kept me from fol­low­ing up with the project along with oth­er wait­ing projects.
      I believe the accu­ra­cy could be improved by adding anoth­er cal­i­bra­tion point at 0.000 volts, but haven’t fol­lowed thru with research­ing what changes would need to be made to make that happen.
      I am open to any code improve­ments any­one may have.

      Thanks for the coffee’s
      Greg (Barbouri)

      1. Thanks, a lot. I will go through the code a bit more. What threw me off too, was that the off­sets were neg­a­tive. Now if I change them to pos­i­tive num­bers, it’s a lot clos­er. I think I’m get­ting there. I’m not a C pro­gram­mer, so I won’t prob­a­bly pub­lish my poor attempts. But if oth­er uses the same code, watch out if your actu­al mea­sure­ments are high­er or low­er than the ide­al, it affects the off­set calculation.

  18. It’s now work­ing! And it is very accu­rate. I changed how the cal­i­bra­tion works. I now use a 0V cal­i­bra­tion point, too. This way I cal­cu­late three lin­ear curves. The first one between 0V and 0.4096V, the sec­ond between 0.4096V and 3.6864V and the last one between 4.096 and 36.864V. I removed the ref­er­ence cal­i­bra­tion off­set cal­cu­la­tion, because there was no point when doing it this way. I also do the cal­i­bra­tion mea­sure­ment the same way as when actu­al­ly mea­sur­ing (same fil­ter weight etc), oth­er­wise result dif­fers. Now in the 4V range, 0V off­set is only 9 uV. And the cal­i­bra­tion points agree to almost all dig­its with my Agilent 34401A. Readings are slow­er than the Agilent, it takes a few sec­onds for it to set­tle final­ly. Note that of course in between the cal­i­bra­tion points, accu­ra­cy is unknown. E.g. in 40V range, there is about 0.66 mV off­set at 0V (but 40V range is only cal­i­brat­ed at 4.096V and 36.684V). But I’m thinkin on hav­ing it auto­mat­i­cal­ly switch to 4V range, too.

    The mod­i­fied code is avail­able here. I hope it is OK to post it pub­licly (oth­er­wise I will take it down):
    https://github.com/hevanaa/6‑digit-millivoltmeter

    Regarding the hard­ware, my meter is almost the same as your 2.11 ver­sion hard­ware. The only dif­fer­ence with regards to the code is that for some rea­son I could­n’t get A4 BUTTON_LEFT to work, so I’m using BUTTON_SELECT instead. Otherwise I could have used anoth­er posi­tion for 0V cal­i­bra­tion (now it is in the same func­tion as 0.4096V calibration). 

    Comments, improve­ments and cor­rec­tions are welcome.

  19. I found an issue with the mod­i­fied library. The fifth but­ton was­n’t work­ing (A4 BUTTON_LEFT). The rea­son was on line 426 in Adafruit_RGBLCDShield.cpp. Previously it was
    uint8_t reply = 0x2F;
    2F is 101111, which caus­es fifth but­ton to not work. I changed it to:
    uint8_t reply = 0x3F;
    and now all but­tons work (3F = 111111).

    1. Hi johanh,
      Good catch. The issue with the library has been cor­rect­ed with your update, and the mod­i­fied “Adafruit_RGBLCDShield” ZIP file has been replaced.
      Thanks,
      Greg(Barbouri)

  20. I’m pulling this project togeth­er with parts and PCBs but hav­ing a lit­tle trou­ble under­stand­ing the wiring scheme for the but­tons and rotary switch. Is the a pho­to or dia­gram fro reference?

    Thanks for a great project!

    John

    1. Hi John,
      For some unex­plained rea­son I did­n’t take any pic­tures of the front pan­el wiring.
      All but­ton inputs feed into the dis­play board top head­er. Pin 1 which is clos­est to the pow­er switch is ground and ties to one side of the three front pan­el input switches.
      Pin 2 con­nects to the Zero Cal switch, pin 3 to the back pan­el Cal‑D, pin 4 Cal‑C, pin 5 Cal‑B, pin 6 Cal‑A, and pin 7 the brown wire con­nects to the front pan­el range switch.
      The com­mon rotary switch wire (red) on the back pan­el con­nects to the Ref Cal front pan­el switch. Basically the Ref Cal switch momen­tar­i­ly com­pletes the ground con­nec­tion to what ever is select­ed on the back pan­el cal select rotary switch.

      Greg (Barbouri)

      1. Thanks for this help Greg. I’m think­ing based on the traces com­ing off the MCP23017 that you are refer­ring to JP3 as the head­er of interest?

  21. Re: Face Plates
    I did­n’t have enough left in the parts bud­get for Front Panel Express face plates so I reworked the files into Gerbers and ordered PCB ver­sions. The blue PCB mate­r­i­al isn’t a great match to the Hammond case but over­all it’s a good low cost solu­tion. I have four extra sets and Gerber files if I run out of extras- you pay postage and they’re yours- one per per­son. Drop me a line- greusel@​sbcglobal.​net.
    Best Regards,
    John

  22. Hi Greg,
    I have it most­ly togeth­er now- sans relay and but­tons. When I start it up I get a cycling through the back­lit col­ors and set­tling on teal/blue. I do not how­ev­er have any char­ac­ters dis­played. Is this an issue with I2C address­es? I haven’t put any bridges on SJ0,SJ1 or SJ3. I have only attached SCL, SDA, VCC GND at the LCD dri­ver board- don’t believe I need any­thing else to have a func­tion­al dis­play correct?

    Thanks again,

    John Greusel

    1. Hi John,
      First thing to check is the dis­play con­trast, if turned too far either way you will have black blocks or no dis­play at all.
      Second thing to check is that SCL SDA are not swapped.
      You should only have one pair of ter­mi­na­tion resis­tors on the SCL SDA buss, prefer­able at the end of the line (dis­play).

      If it is cycling through the back­light col­ors then there is com­mu­ni­ca­tions with the dis­play, so most like­ly con­trast setting.

      Greg (Barbouri)

  23. All good now Greg. It was bad sol­der­ing on the I2C dis­tri­b­u­tion chip. Now to assem­ble it in the enclo­sure and fig­ure out the cal­i­bra­tion process.

    Thanks for your help!

    John

  24. Greg,
    Seem every­thing is work­ing now in the elec­tron­ics but I too had dif­fi­cul­ty start­ing from bat­tery pow­er- hav­ing to always push reset once. I changed the delay in the ini­tial­iza­tion rou­tine from (500) to (5000) and the prob­lem is gone. I’m no pro­gram­mer so this was a stab in the dark but it seems to have fixed the problem.
    Best,
    John Greusel

  25. Hello, I’m try­ing to build my own mil­li­volt­meter and I down­loaded your Arduino sketch file for soft­ware ver­sion 3.34 with the required libraries, but dur­ing com­pi­la­tion the pro­gram fails say­ing that the vari­able “BUTTON_MENU” at code line 612 was not declared, by any chance did you encounter this prob­lem too? If so, do you know how to fix it?
    Alex

    1. Hi Alessio,
      Just ran the verify/compile on ver­sion 3.34 with no errors.
      I am using Arduino 1.8.19 and the mod­i­fied Adafruit_RGBLCDShield.h file which pro­vides the 6th menu button.
      If you are not using the updat­ed library file that may be the cause of the error.

      Good luck with your project.
      Greg (Barbouri)

  26. Good evening, I want­ed to know if PCBs are available:
    — Multi-input I2C LCD dis­play adapter with EEPROM
    — Input pro­tec­tion cir­cuit and USB isolator

    Thank You

    1. Hi Alessio,
      Here are the links to the boards you asked about:

      Isolated TTL to USB quad Ver. 3.0
      https://oshpark.com/shared_projects/aNhUu06u

      Protection Rev1.0 41V
      https://oshpark.com/shared_projects/LuGOYBOZ

      I2C RGB LCD Display 4.24 W/eeprom
      https://oshpark.com/shared_projects/GuRNybzO

      I do not sell boards or projects currently.
      If you have a CAD pro­gram that can import EagleCAD files, you should be able to have them made by any board manufacturer.
      Greg(Barbouri)

    1. I use the neg­a­tive back­light for most of my projects as the let­ters and num­bers change col­or instead of the background.

      Greg (Barbouri)

Leave a Reply

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