r/ArduinoProjects • • 3d ago

Project Design/Guidance Battery voltage measurement

Post image

I am building a battery powered project and I need it to be low power. I also need to measure the battery voltage. So the way it works is that the esp is in deep sleep by default, it wakes up to do a certain function then goes back to sleep. While it is performing that function, i want to read the battery voltage.

I want to use a voltage divider with a transistor to only measure the voltage when required (to save power). The transistor will be controlled by a GPIO pin.

My problem is that the battery can be charged to 4.2v and the esp pins can only handle 3.3v. If the battery is fully charged, will this damage the ADC pin?

Note- theres arrangement to avoid this by adding an extra transistor but my space is limited so I prefer the simplest option (if possible)

0 Upvotes

6 comments sorted by

2

u/9551-eletronics 3d ago

how will this save any meaningful amount of power and why did chatgpt draw this, you can just use a voltage divider

2

u/kayz52 3d ago

I wanted to use a voltage divider only but i realised that during deep sleep the voltage divider circuit will keep drawing current. That's why I thought of doing this so that current draw is only when I check the voltage

2

u/Elec2727 3d ago

The esp32 has to be a lot in deep sleep for it to make a difference.

2

u/kayz52 3d ago

Well the default state would be deep sleep so thats most of the time

3

u/9551-eletronics 3d ago

you would probably wanna disconnect it on the positive rail

4

u/rouggio 3d ago

Just implemented something like this with a voltage divider and the result is a bit underwhelming, might try with a coulomb meter next time