I have seen a lot of tutorials on how to measure volts with an Arduino and a voltage divider circuit with 2 resistors.
I also figured out that I can measure a range of 0V-78V with R1=220 kOhm and R2=15 kOhm.
But, is possible to limit the range to only 50V-80V ? Because, all values below 50V are not interesting for my application and the maximum voltage that will be measured will be around 72VDC.
I am thinking that maybe it is possible to make a circuit that will spread the range of 50V-80V on the range 0V-5V which can be measured by Arduino on the analogue pin and thus increase the accuracy compared to 0-80V.
Any tips on if and how this can be achieved?
Background info: I want to measure the voltage of a eBike battery which is usually considered being empty at around 58V and full at 72V.
Can be done with an opamp, but why.
You have 1024 values spread out over 80volt.
= 0.1volt resolution. More than you need.
What would worry me more is if the SOC of one cell would drop below an acceptable level.
And its not hard to get a 12, 14 or 16 bit ADC if you need extra resolution.
It is possible with 3 resistors if you have a negative voltage supply, but then you would have to add other components to protect the Arduino from negative voltages when your input is less than 50 volts.
As others have said, scaling your 0..80v input with a couple of resistors still gives you pretty good resolution from the ADC.
However, you should consider what would happen if there's the odd voltage spike above 80v... your Arduino would see more than 5v and it could be toast.
With high voltages it's a good idea to scale the voltage in two steps:
- use 2 resistors as a divider so you expect, say, 0..15v for a 0..80v input
(use at least 10k for the input resistor to limit the current)
- put a 15v zener from that point to ground. This will limit to 15v
- use another 2 resistors to divide the 0..15v into 0..5v for your arduino.
Even if you got 100v in, the zener would limit the middle voltage to 15v and your cpu will be safe.
P.S. This is a useful calculator for scaling voltage ranges using 3 resistors:
With a -12v supply you can scale 50-80v into the 0-5v range, but you also get negative outputs for voltages below 50v.