5v Battery level
I have a Arduino mini 5v node with DHT11 and a Motion Sensor.
Now i want to add a battery level function but i have only find how to do it with 3.3v.
I am currently using 4st AA batteries for this node.
If so, use the following numbers instead:
// 1M, 200K divider across battery and using internal ADC ref of 1.1V // Sense point is bypassed with 0.1 uF cap to reduce noise at that point // Vmax = 1.1*((1e6+200e3)/200e3) = 6.6 Volts // 6.6/1023 = Volts per bit = 0.006451613 float batteryV = sensorValue * 0.006451613;
(switch the 470k resistor to a 200k resistor and use 0.006451613 in the code)
@mfalkvidd that's exactly what I was looking for.
Thanks for the quick answer.
Great! You're welcome.
My node has been on for a week now and the battery meter shows 102%. It feels like a bit to much.
@ErrK thats nothing unusual. I use this code on 2x1.5A batterys and normally you get readings on 3.2V which is over 100%,
@sundberg84 ok. Thanks for the help and the quick reply.