Arduino Voltage Tolerance

Hi all,

I am running an Arduino to check the wiring within an electrical engine harness, by sending a 5V signal through one connection of the harness and measuring the output voltage at the other end. Ignoring the voltage tolerance of the harness itself, which is minimal, how accurate is the tolerance of the Arduino itself?

The readings measured are usually between 4.8V-4-9V, how much of this voltage loss do you think could be attributed to the Arduino?

Many thanks,

CG6

Depending on your wiring , especially grounding arrangements , you might well drop that voltage somewhere in your circuit along a 0v line
Post your circuit up and code - your method of scaling might be out too.

If you connect your analog pin to the 5v line you should get 1023, if that happens all is well.
Also note the A-D is referenced to that 5v supply , so if that is actually 4.9v , the span of your input is 4.9v . You can select internal reference to overcome that and get higher accuracy

hammy:
Also note the A-D is referenced to that 5v supply , so if that is actually 4.9v , the span of your input is 4.9v . You can select internal reference to overcome that and get higher accuracy

Yes. The ADC, inside the Arduino, by default, uses the voltage on the 5V pin as the reference. This voltage won’t always be exactly 5.00V, so if you do it this way, to get the best accuracy you must measure this voltage [and hope that it doesn’t vary later on], and use it in the following formula:

ADC_result = Vin * (1023 / Vmeasured)

Where:

  • Vin is the voltage being read by the analogRead() call
  • Vmeasured is the voltage measured on the 5V pin, and is the reference voltage used by the ADC

So, if you measured 4.96V on the 5V pin, and there is 4.56V at Vin, then:

ADC_result = 4.56 * (1023 / 4.96) = 940

But, if the Vin voltage is, say, 5.03V, then you’ll get:

ADC_result = 5.03 * (1023 / 4.96) = 1023 [it’s really [i]1037[/i], but the ADC doesn’t go that high]

So, using 5V as the reference is not always a good idea – and for more reasons than what I illustrated, above. This voltage tends to be rather noisy, and can fluctuate if other things are being driven off it – especially if your wiring is not done right – as hammy alluded to.

So, a way to make this more stable, and accurate is to use the internal reference. For the UNO [you didn’t specify which Arduino you’re using], there is only one, and it’s set to 1.1V. Being at 1.1V, you will need to voltage divide your 5V input down to 1.1V [max], like this:

InputSignalVoltageDivider01.png

The sum of R1 and R2 needs to be high enough to not load down [and thus influence] the signal you are reading. Typically this means an R2 resistor value higher than 10k – the maximum recommended value for an accurate reading [has to do with the sample & hold timing]. Including a capacitor [with the proper value] across R2 reduces the impedance to below 10k, so this is a trick for getting a good reading with higher value resistors.

To select the resistor values, use the following formulas:

R[sub]T[/sub] = R1 + R2

Select an R[sub]T[/sub] that is high enough to not effect the circuit you are measuring [but, probably should be lower than 10M, since the input impedance of an Analog Input on an Arduino runs around 100M – and even at 10M you might get some slight error, due to voltage dividing].

Then, to calculate R2:

R2 = R[sub]T[/sub](V[sub]O[/sub])/V[sub]I[/sub]

R1 = ``R[sub]T[/sub] - R2

Where:

  • V[sub]I[/sub] is the input voltage [the “Test Input” in the above schematic]
  • V[sub]O[/sub] is the output voltage [the voltage to the Arduino An pin]

So, if R[sub]T[/sub] is chosen to be 1M, then:

R2 = 1M(1.1V)/5V = 220k

R1 = 1M`` - 220k = 780k

Figuring out a value for C is beyond my skill level. Usually a value in the range of 10nF to 100nF does the job. Trial and error will get you there. Or maybe one of the other engineers on this Forum will pick up the slack :wink:

You can read more about the ADC internal reference feature here: AnalogReference()

DHASWELL:
Hi all,

I am running an Arduino to check the wiring within an electrical engine harness, by sending a 5V signal through one connection of the harness and measuring the output voltage at the other end. Ignoring the voltage tolerance of the harness itself, which is minimal, how accurate is the tolerance of the Arduino itself?

The readings measured are usually between 4.8V-4-9V, how much of this voltage loss do you think could be attributed to the Arduino?

Many thanks,

CG6

Measure the loom input voltage and the loom output voltage with separate analog inputs, then you will not have to worry about the loss in the Arduino.
loom Input voltage - loom Output voltage = volt drop in the loom.
Tom... :slight_smile:

DHASWELL:
..... the voltage tolerance of the harness itself, .....

What does that actually mean?