John L Errington MSc

John Errington's Experiments with an Arduino

Voltage measurement with the Arduino board (page 3).

The examples already described allow reasonably accurate measurements to be made - but only if the source has a very low internal resistance. Most voltmeters are made to have a high impedance so that they do not significantly change the voltage being measured.

Effect of voltmeter impedance on accuracy of measurement

The diagram shows a voltage source (ie whatever you are measuring the voltage of) connected to your measuring device (voltmeter). Lets look at what happens when we make a measurement with our arduino.

fig0The Arduino analog input circuit has an impedance of about 10k. If we are measuring the voltage from a source with a true open circuit voltage of 1.5V and an internal resistance of 10k ohms, our reading will be
V = Vs * Rp /( Rp +Rint) = 1.5 * 10k /20k
So the reading we get will be 0.75V.
Thats clearly not much use.

If we make our voltmeter have an input resistance of 10M then we get
V = Vs * 10,000k/10,010k
so V = 1.5 * 0.999 = 1.499V - which is within the limits of accuracy for our Arduino.

How can we make the input resistance high?

For voltages between 0 and 5V we can use an Operational Amplifier in a voltage follower configuration as shown here. Vin is the voltage you are measuring, and Vout connects to the analog input on the Arduino.

Normally we would use positive and negative supplies to power an Op Amp; however modern CMOS Op Amps are able to accept inputs and provide outputs through the whole supply range. This simple configuration, with only four components, will give an input resistance of ten megohms, and will also provide protection against static and overvoltage or reverse voltage at the input.

The MCP6041/2/4 series are particularly suitable in this application, giving one, two or four op amps in an 8 pin or 14pin DIL package at low cost. (around £2.50 eBay)

measuring other external voltages

For positive voltages we use the same circuit as above, but simply change the divider chain. Lets design a circuit to measure in the range 0 - 20V.

The divider needs to present a voltage Vout of 0 - 5V at A0, so for a 20V input we will have 5V across R2 and 20 - 5 = 15V across R1.

Choosing R2 = 10M and R1 = 30M gives the range we need. You can chain three 10M resistors to make the 30M resistor. Alterrnatively you could use a 3M3 resistor for R2 and a 10M resistor for R1.

Again Vin is the voltage you are measuring, and Vout connects to the analog input on the Arduino.

For all the above examples its necessary to calibrate the measurement system.

 

Acknowledgements: All diagrams drawn with MeeSoft Diagram Designer