Testing battery level with regulator removed
-
Hi
Using a clone pro mini + NRF24L01 and HTU21DF sensor.
I have built a battery powered sensor with the regulator removed to reduce power consumption. When I test the level using the analog read method (split resistors) I always get the same value no matter what supply voltage i use (between 2.8v and 3,2v). Is this because analog read is no longer able to get a fixed reference point? I have also tried using the internal cpu voltage method and I get unpredictable results as well.
-
@4994james The internal reference is the more stable, but do remember that the ADC sample needs a stable voltage and low noise.
I've used high M value (prone to noise) resistive dividers with a simple electrolytic capacitor from the ADC pin to ground, no problems, perhaps worth a try.
-
Hi. I have used the divider recommended in https://www.mysensors.org/build/battery and with a 0.1uF electrolytic cap. There is still a ripple on this when i attach the scope. Maybe that's the issue but I get the same value (325 as it happens) from A0 even if I vary the supply voltage.
Just to confirm you have had this working after the pro mini onboard regulator is removed?
-
@4994james Mine is a non standard Arduino with booster and LDO.
Possibly something wrong with your divider wiring ?
If you've got A0 as input and do an ADC read, the value should change with varying voltage.
I use a 10uF electrolytic as have loads of them, stable as it gets.
-
The ADC needs a fixed reference and usually it uses the vcc for that. Since that is fluctuating, you will get the same value as the value from the resistor divider fluctuates the same.
To overcome this, you should use the internal 1.1V reference. This does mean that your analog voltage from the divider should be below 1.1V if I remember correctly
-
@4994james or just use internal vcc measurement as described on the same page. That saves you the voltage divider.
I wrote a convenient library to measure vcc internally : https://github.com/Yveaux/Arduino_Vcc
Suggested Topics
-
💬 EFEKTA WIRELESS TEMPERATURE & HUMIDITY SENSOR V1 | nRF52840
OpenHardware.io • 29 May 2020, 16:35 • openhardware.io 29 May 2020, 16:35 -
💬 My Slim 2AA Battery Node
OpenHardware.io • 8 Jan 2016, 13:44 • openhardware.io 14 Dec 2020, 19:09 -
Battery Level Measurement
General Discussion • 13 Dec 2014, 01:50 • funky81 15 Dec 2014, 01:42 -
💬 Battery Powered Sensors
Announcements • 11 Sept 2016, 21:13 • hek 15 Oct 2023, 12:55 -
💬 AC/DC/Batteries capable atmega328p board
OpenHardware.io • 9 Jan 2016, 10:46 • openhardware.io 4 Jan 2017, 12:48 -
💬 APRS GPS Tracker
OpenHardware.io • 23 Jan 2019, 09:16 • openhardware.io 23 Jan 2019, 14:25 -
Battery power (cr2032) on 2.0?
Hardware • 7 Aug 2016, 22:12 • CrankyCoder 8 Aug 2016, 18:58 -
💬 Easy/Newbie PCB for MySensors
OpenHardware.io • 7 Jan 2016, 22:06 • openhardware.io 23 Oct 2022, 10:54