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)
-
@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. -
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%,
-
@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.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login