5v Battery level
-
Hi.
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.
-
@ErrK you're using http://www.mysensors.org/build/battery#measuring-and-reporting-battery-level ?
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.
Suggested Topics
-
Welcome
Announcements • 23 Mar 2014, 08:24 • hek 2 Apr 2014, 14:39 -
Long time test done with soil sensor!
My Project • 7 Jan 2025, 09:13 • Nicklas Starkel 13 Jan 2025, 09:10 -
Door chime
My Project • a day ago • Paul Scarbro a day ago -
BMP280 SPI Adafruit
My Project • 24 Aug 2016, 01:56 • Matt 23 Jan 2025, 16:25 -
Nb of possible nodes in a mysensors networks with domoticz
My Project • 13 Jan 2025, 18:10 • GLAB 23 days ago -
Simulate Online-Recreating 'Flappy Bird' with Arduino Nano
My Project • 15 Jan 2025, 09:13 • Skylar Jones 15 Jan 2025, 09:13