Go Down

Topic: How to read Voltagelevel of the Battery ? (Read 484 times) previous topic - next topic



I have powered the Arduino Uno with a 9V Battery pack and I wanna measure it's voltagelevel with an Arduino Sketch.
How can I do that without a voltage dividier ?

I'm a Newbie, if you use Shortcuts then I'm glad if you explain them ;-)

Kind regards


By dividing the battery's output voltage (say by 10k/10k divider, a factor of 2), and reading that
with an analog pin.

  float batt_volt = analogRead (pin) * 10.0 / 1024 ;
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]


I assume that there is no way without a voltage divider ?
If I have 12 V, can I use a 10K/150K voltage divider (a factor of 16) ?

The Code would look like this then ?

Code: [Select]
float batt_volt = analogRead (pin) * 80.0 / 1024 ;

Go Up