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 -
Alexa Fauxmo - Mysensor Bridge Gateway / BLE - Mysensors Bridge Gateway
My Project • 10 Aug 2024, 08:29 • fsgraz 10 Aug 2024, 08:29 -
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 16 Feb 2025, 01:11 -
Long time test done with soil sensor!
My Project • 7 Jan 2025, 09:13 • Nicklas Starkel 13 Jan 2025, 09:10 -
Wio-E5 (STM32 and SX1262)
My Project • 31 Dec 2024, 17:52 • nagelc 25 Jan 2025, 20:21