How to make a digital multimeter?

I'm thinking of making a basic digital multimeter, using an Arduino. Any tips welcome.

I've Googled "how to make a digital multimeter" without a lot of success. Some hits are:

  • How to use a digital multimeter
  • How to buy a digital multimeter
  • How to make a digital multimeter more useful
  • How to choose a digital multimeter
  • How to make an analog multimeter (?)

One site that I found had some brief descriptions (using an Atmega128) but his could only measure up to about 10V.

Now obviously you can measure up to 5V by just doing an analogRead, and probably up to 20V by going through a voltage divider first. But that assumes for one thing that you have the polarity around the right way, and most multimeters just show a "-" sign in the display if you have the leads backwards.

How do they do that?

One idea that springs to mind is to use a voltage divider, say 100/1, so that it could handle 500V. But then the resolution on low voltages would be poor.

Then I read about Instrumentation Amplifiers, which sound like they could be useful:

http://en.wikipedia.org/wiki/Instrumentation_amplifier

I don't quite get how the three op-amp instrumentation amplifier works - neither input (V1 or V2) is relative to ground but rather to each other. But somehow the two op-amps combine those into some sort of output. I suppose there is a common implied ground but that makes my head hurt a bit thinking about it. And I don't see how that handles negative voltages, except perhaps that they aren't negative if there is no ground.

Anyway, any suggestions or links would be appreciated, thanks.

Hi Nick;

I know it is possible to make a simple model. I am sure you have no problem to program it. ;)

The old digital model have a "scale or range" selection knob. You select 100 mV, 1 V, 10 V, 100 V for example. The selector will select an op-amp circuit to "translate" min to max ==> 0 - 5 V into the analog pin. I know you are aware of the Ardiuno 1023 step limitation. And op-amps are Analog computer, in a way... And beside, at higher voltages, you will need a resistors reduction circuit network to reduce the voltage going into the op-amp.

My 2 cent.

Hi Sir, i think you have to start with a rotary switch like the fan regulators have, as the structure and functionality of a multimeter generally works with varying resistances at a particular point when a the regulator is moved, I attached the picture of example like the ones i manufacture the concept is the same i think you just need to tweak the place where the 250vac cap’s are placed.

In a nutshell this has to be the starting point and then you have to think about the LCD also i read the post yesterday by “liudr” he mentioned many lcd usage trials out of those multimeter lcd working with arduino he mentioned as “very hard” so better use a HD44870 driver lcd only or if you can work that alphanumeric lcd.

EDIT:

How to make a digital multimeter more useful

I think this is a very innovative point to develop here as once things are being measured by Arduino the computer is already having a gateway of information then it can just input the information from the arduino within it self for all sorts of developments like integration with simulation programmes and xocillo oscillation software, so a lot of possibilities exist if development on this is taken up many of the people will forgo using the traditional multimeter’s. :wink:

Maybe a good start would be to find an old Sam's that covers a good analog MM.

http://sfpl.org/index.php?pg=2000032001

I would use a DVM chip like the MAX1497/MAX1499, SPI interface and a few resistors and job pretty much done. It will drive a LED display as well although you probably don't need that.


Rob

Nice idea for a project but I presume you wish to do it because it can be done rather than a "cheap" way to end up with a DMM, since it'll probably cost you at least 20 times what you would pay to buy a ready-made one.

Yes, exactly. I already have DMMs that are probably 100 times as accurate as one I could make.

But if I understand the process I could build something that could be used in a small way to do something similar. Like, report the voltage sent to a dummy load. Or the current it is drawing.

[quote author=Nick Gammon link=topic=97047.msg728261#msg728261 date=1331975189] Yes, exactly. I already have DMMs that are probably 100 times as accurate as one I could make.

But if I understand the process I could build something that could be used in a small way to do something similar. Like, report the voltage sent to a dummy load. Or the current it is drawing. [/quote]

Your thinking is right on. While you would never be able to emulate all the functions that a modern DMM can perform, and would most likely have to limit yourself to DC voltages and current functions, and would never approach the resolution and accuracy just using a basic arduino board, you would however come away with real new knowledge on how such measurements are made.

True differential instrumentation op-amps are the key to how bipolar measurements are possible in a typical DMM. The basic measurement circuit is usually a +/- 200mv A/D converter that does not wire either meter lead to it's internal circuit common (or ground as some like to call it). Higher voltage scales are just a matter of switching in front end attenuator resistors that perform the same function as a voltage divider as used in a single ended system like an arduino A/D pin. Current is measured simply by wiring the meter leads in series with a low ohm value shunt resistor and taking a differential voltage reading across the shunt resistor. And yes concentrating on learning all you can on 'instrumentation op-amps' is your best course of study in my opinion. Sooner or later you will find the source document(s) that put it into words that makes it all 'click in' for you.

Good luck on your learning journey.

Thanks for the suggestions everyone.

I have used a rectifier bridge with 4 diodes to solve the polarity problem once - http://www.play-hookey.com/ac_theory/ps_rectifiers.html -

it causes a voltage drop you can compensate, but your DMM can support both AC and DC then... (in theory)

Yeah you could use a diode to kill negative voltages on a circuit but that would mean youd just be reading a fluctuating DC current which misses out on half the signal.

I would go with an op amp of some description. You would need some way of making a variable resistor which could be controlled electronically though and I have no idea if a component like that already exists without any moving parts (though I have a feeling there is something). Unless , as the guys before me said , you were just using it to see if it worked or for low voltages.

I did see something on youtube not too long ago where a guy had built an oscilliscope on an arduino promini which isn't too far away from your goal. Might be worth looking into soemthing like that.

I did read a suggestion about a resistor ladder as the voltage divider. You can change the resistance in the program by either grounding a particular resistor - ie. OUTPUT/LOW - (thus terminating the ladder) or setting it high impedance - ie. INPUT/LOW.

I still don't quite see how to handle negative voltages, except maybe to add a constant bias. So if you can measure up to 5V, you add a 2.5V bias. Thus 5V is +full range, 2.5V is zero volts, and 0V is -full range. Something like that.

Yeah you could use a diode to kill negative voltages on a circuit but that would mean youd just be reading a fluctuating DC current which misses out on half the signal.

Very true, but still solvable with

val = analogRead(VOLTAGEPIN);
switch (mode)
{
  case DC: voltage = 5.0 * val / 1023.0;
    break;
  case AC: voltage = 10.0 * val / 1023.0;  // just double it :)
    break;
}

too simplistic ???

Guys, what about the 1023 steps ? A 0 to 5 V into the analog pins, and you only have 1023 steps limitation. ...

I wonder if there is a way to increase that ? A split voltage into two analog pins... ? Like a lower section - and a higher section... ? With the help of op-amps... might work... just brainstorming here.

Guys, what about the 1023 steps ? A 0 to 5 V into the analog pins, and you only have 1023 steps limitation. ...

I wonder if there is a way to increase that ? A split voltage into two analog pins... ? Like a lower section - and a higher section... ? With the help of op-amps... might work... just brainstorming here.

no 1024 steps, from 0..1023 :) but yes for 5V or any voltage (through AREF) between 1.1 and 5V so technically almost on the edge of 1mv (1.1V/1024).

A voltage divider makes the range within TTL, using an external (I2C) ADC can increase the resolution e.g. - http://ww1.microchip.com/downloads/en/devicedoc/22003e.pdf - gives more precision...

question is What are Nicks requirements?

hmmm what if you were to step up the voltage a bit? That way , the negative voltage would be taken as a logical negative but then there would be a limit AND the danger of too much Vs. If you could find some way to firstly AMPLIFY the signal then dampen it so the signal is "flatter" , I think you would have this sorted. Simply set the logical negative then anything under that would be negative.

robtillaart: question is What are Nicks requirements?

I'm just brainstorming really. One requirement would be to see how much current a dummy load is drawing, but that is pretty well-defined in terms of voltage levels, polarity etc.

I was thinking of this a bit because of the thread about the SPI ADC converter. I noted that it seemed to give a pretty accurate reading when sampling 2.5V, and with 12 bit accuracy. Then I was wondering how you might test (say) 30V or more. I supposed if you have a well-defined problem then you just tweak the resistors and amplification to suit. But with a bench multimeter it must be harder. The same leads can be used to measure in the millivolt range, or up to hundreds of volts.

In fact I watched a recent blog by Dave Jones where he put his multimeter on the ohms range, and then stuck the leads into 240V power! Interestingly most, if not all, of his meters survived this. Now I presume that you wouldn't get away with doing that by putting 240V into A0 on your Arduino. :)

Modern multimeters have a lot of spud-proofing built in. Sometimes, depending, though your multimeter may survive, you may snuff a component with an injudicious application of the ammeter or ohmmeter in a live circuit. In the bad old days, VOMs were very unforgiving. Simpson (and most others) provided a schematic for repairs in the manual. Imagine taking your meter down because you were down on the low-volts scale and put the meter leads backward to high-voltage (no auto-scale, auto-polarity). They still haven't done away with the ammeter fuse/s.

Hey Nick I know this is an old thread, but I was curious if you ever found a nice design? I'm looking to make a few, to measure voltage of various PC components and display them all using different 4x 8 segment displays They would only need to have a small range, like say a 3V meter would only need to read from 2.5 - 4V, and 12V from 11 to 13V. I found this from Sparkfun https://www.sparkfun.com/products/10956 but don't really need a PCB, and don't need the probes so my design would be a bit smaller.

Not really. It was a bit of brainstorming, and then I moved onto something else.

However since then I did do a capacitor tester:

http://www.gammon.com.au/forum/?id=12075

Since that only uses a couple of pins you could combine that with a voltage and resistance tester. It is probably a compromise between cost and how robust the end product is against "bad" inputs. Some of the fairly recent threads about protecting your inputs might help there.