Go Down

Topic: Analog Input voltaje (Read 1 time) previous topic - next topic


Hello, im trying to check the voltaje in a battery, but i dont know the range of voltaje input, i dont know what is the min. to get a 1023 in a analog read.

If i connect a battery with a 2.93V analog read get me 1023, i dont know why.

Thanks and sorry for my english (:


The range for input is 0-3V. You need a voltage divisor to estimate the total voltage.

p.e.: trying to mesure 9V, use two resistors, 1 of R value and the other 2R, connect the battery to the exterme of the two resistor in serie, use high value to avoid dischard the battery quick. The signal to the input between the two resistor and after you have to apply the formula (value*3)/1023.


I was wrong, I am having an issue with this too. The problem is refer to the Aref. When it is suply by the battery connector the Aref is the battery voltage itself, so if you connect the battery to one analog input you will get the maximum reding, 10 bits, 1023.

I am not able to solve this problem. I have tried using external Aref with battery voltage, same problem. I also tryed, use internal2.23V with a resistor divider, same result. It is only working well when is connected to the USB, then the Aref is 3.3V exact.

Any ideas???


There is a command to set the analog reference to different options. Maybe you need to set yours because it's set to a low reference

Go Up