Measuring battery
-
Hi. I'm having some troubles when i try to read the voltage off my arduino batterys,
The problem it's not the code, my problem is the wire connection... Do i connect the battery (+) to A0 pin only or do i have the connect the battery (+) to the A0 pin and the VCC pin on the arduino pro mini ???
If i connect the arduino over USB to see the serial monitor i can see the voltage on 4.8V to 5V.
But when i try to connect to my battery the i get dead antenna.
-
Hello @mrc-core
You can use the Vcc.h library, and mesure the voltage without any wire
-
@carmelo42
How does this work when using a booster?
-
@meanmrgreen - No, since the booster will output a steady voltage and thats what read in that library. If you have a booster I always use resistors and connect it to A0 (https://www.mysensors.org/build/battery). Another way is to lower BOD by burning new fuses and bootloader but this is more advanced.
-
@sundberg84
Will look into that, i have a UNO lying around aswell so prehaps ill experiment with the bootloader burning eventually.
Suggested Topics
-
Welcome
Announcements • 23 Mar 2014, 08:24 • hek 2 Apr 2014, 14:39 -
Interface-board-for-remote-control
My Project • 16 days ago • OldSurferDude 3 days ago -
Wio-E5 (STM32 and SX1262)
My Project • 31 Dec 2024, 17:52 • nagelc 25 Jan 2025, 20:21 -
BT832X PA / LNA
My Project • about 9 hours ago • nagelc about 9 hours ago -
Nb of possible nodes in a mysensors networks with domoticz
My Project • 13 Jan 2025, 18:10 • GLAB 16 Feb 2025, 01:11 -
Status of my rv(camper) home automation system 2020-2025
My Project • 5 days ago • fsgraz 3 days ago