Become a leader in the IoT community!
Join our community of embedded and IoT practitioners to contribute experience, learn new skills and collaborate with other developers with complementary skillsets.
Join our community of embedded and IoT practitioners to contribute experience, learn new skills and collaborate with other developers with complementary skillsets.
Hi,
I’m trying to get the value of my battery using an analog input of my ATTiny85 to create a gauge. To do this, I made a voltage divider to avoid draining too much battery. The problem is that I don’t understand why, after letting my project (which includes sensors and a screen) run for more than 24 hours, I’m still getting an input value of 512 with an `analogRead()`.
I haven’t applied any calculations yet, just retrieving the value from my voltage divider. But this value doesn’t budge at all… I’m using a 3.7V 400mAh LiPo battery.
Here’s my schematic.
Hello, using a multimeter, measure the voltage of the battery. Lets start from there
Related to that, I would highly recommend using the TinySnore library if you’re concerned about optimizing power usage. I used it in another project that uses a CR2016 battery and it’s able to run for ~a few weeks using intermittent monitoring of inputs: https://embeddedcomputing.com/technology/processing/chips-and-socs/tinysnore-turns-your-attiny-into-a-low-power-prodigy (granted, my device is just sitting there most of the time)
Hi @afuevu_ I’ll grab a multimeter and check the battery voltage now. I’ll update you shortly.
Thanks @jeremycook for the recommendation! I’ll give it a try.
Appreciate the link! 🙏🏻
CONTRIBUTE TO THIS THREAD