The Godfather talking
Share your stuff or I will make you regret it.
Sonsivri
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
November 24, 2024, 07:50:15 19:50


Login with username, password and session length


Pages: [1]
Print
Author Topic: How to monitor battery status  (Read 5070 times)
0 Members and 1 Guest are viewing this topic.
puta
Junior Member
**
Offline Offline

Posts: 89

Thank You
-Given: 364
-Receive: 29


« on: February 16, 2023, 11:18:50 11:18 »


How can I monitor the remaining battery charge status on a battery operated ESP32 microcontroller project with re-chargable eg. 18650 battery. This is somewhat similar to battery operated handheld devices / cameras .. etc dispaly battery status. Is it done by just reading the voltage across the Battery terminal... 

Thanks for your help on this.
Logged
sadman
Hero Member
*****
Offline Offline

Posts: 709

Thank You
-Given: 1830
-Receive: 2891


Sow The Seeds of Love


« Reply #1 on: February 16, 2023, 11:26:27 11:26 »

if in your project you are using LCD and by using analogue input of ESP32 easily monitor the battery voltage and can be display on LCD remains power of the battery you can find code snip by googling.
Logged
puta
Junior Member
**
Offline Offline

Posts: 89

Thank You
-Given: 364
-Receive: 29


« Reply #2 on: February 16, 2023, 11:32:46 11:32 »

Yes, exactly. I use TFT display in my project. Thanks for quick reply sadman !

Is monitoring the voltage across the battery terminal acurate enough?
I mean is the relationship between voltage and remaining charge is linear enough? and what voltage is considered 0V remain in the display etc..
Logged
sadman
Hero Member
*****
Offline Offline

Posts: 709

Thank You
-Given: 1830
-Receive: 2891


Sow The Seeds of Love


« Reply #3 on: February 16, 2023, 01:49:51 13:49 »

Yes, exactly. I use TFT display in my project. Thanks for quick reply sadman !

Is monitoring the voltage across the battery terminal acurate enough?
I mean is the relationship between voltage and remaining charge is linear enough? and what voltage is considered 0V remain in the display etc..


you just need simple voltage divider example share which is used for 9 volt battery yes it will linear during charge show voltage as rises during charging.
Logged
pushycat
Senior Member
****
Offline Offline

Posts: 463

Thank You
-Given: 213
-Receive: 1448



« Reply #4 on: February 18, 2023, 04:12:00 16:12 »

How can I monitor the remaining battery charge status on a battery operated ESP32 microcontroller project with re-chargable eg. 18650 battery. This is somewhat similar to battery operated handheld devices / cameras .. etc dispaly battery status. Is it done by just reading the voltage across the Battery terminal...  

Thanks for your help on this.

In addition to monitoring the voltage with a voltage divider network as suggested by "sadman" you can also put a shunt resistor in series to the Load, to monitor the current which will give a real time of juice left in the battery. But this will make it accurate but a bit complicated and difficult in coding.
Logged
bobcat1
Senior Member
****
Offline Offline

Posts: 304

Thank You
-Given: 4285
-Receive: 94


« Reply #5 on: February 19, 2023, 08:22:42 08:22 »

Hi

for accurately monitor battery information & status you will need to use a coulomb counter,

Either use a software algorithm who process: current, temperature, voltage & battery chemistry data or use a chip from known manufactures like (TI,ST,Analog device....)

All the best

Bobi  
Logged
sadman
Hero Member
*****
Offline Offline

Posts: 709

Thank You
-Given: 1830
-Receive: 2891


Sow The Seeds of Love


« Reply #6 on: February 19, 2023, 11:51:15 11:51 »

as mentioned by bobcat1 Coulomb Counter is much better solution then the simple resister divider network a good hook up instruction can be found at spark-fun webpage with code example.


https://learn.sparkfun.com/tutorials/ltc4150-coulomb-counter-hookup-guide/all#:~:text=A%20coulomb%20counter%20is%20like%20an%20odometer%20for%20current.&text=By%20counting%20the%20pulses%20and,putting%20back%20into)%20your%20battery.

https://www.analog.com/en/product-category/battery-fuel-gauge-and-coulomb-counter.html

https://www.youtube.com/watch?v=mxIrqjYCLho

sadman
Logged
Sideshow Bob
Cracking Team
Hero Member
****
Offline Offline

Posts: 1002

Thank You
-Given: 231
-Receive: 983



« Reply #7 on: February 19, 2023, 01:29:12 13:29 »

How can I monitor the remaining battery charge status on a battery operated ESP32 microcontroller project with re-chargable eg. 18650 battery. This is somewhat similar to battery operated handheld devices / cameras .. etc dispaly battery status. Is it done by just reading the voltage across the Battery terminal... 

Thanks for your help on this.
Somewhat a digression but a site I often use regarding battries is the  Battery University https://batteryuniversity.com/
Logged

I have come here to chew bubblegum and kick ass... and I'm all out of bubblegum
fvjibdz
Inactive

Offline Offline

Posts: 1

Thank You
-Given: 1
-Receive: 0


« Reply #8 on: September 10, 2023, 11:10:48 11:10 »

However, if your application has a mainly constant power draw (i.e. IoT sensor waking up and performing work on fixed intervals), you might exploit this to have fun implementing a level estimation by yourself, only using the voltage.

https://www.stg-maximintegrated.com/en/design/technical-documents/app-notes/3/3958.html

Towards the end of the application note you can see that the voltage doesn't relate linearly to the battery charge level. You might profile your battery under your constant load, recording the voltage, to then store the curve and lookup its inverse for finding the current capacity. Then, as a next step, you might reason about adjusting the curve over time to account for battery aging and degradation. A simple idea could be, knowing that your load in Ampere is constant, to integrate the estimated consumption on each 100%-0% cycle and keep track of how the total capacity is decreasing, then adjust the charge estimate proportionally.

Of course a battery monitor/gauge is the best solution as suggested by the other members. I just wanted to give my 2 cents on how I would approach this if I were to force myself, of be forced, not to use it. A solution like this will for sure be less accurate, but for a hobby project I think it would be fun to implement something like it.
Logged
Pages: [1]
Print
Jump to:  


DISCLAIMER
WE DONT HOST ANY ILLEGAL FILES ON THE SERVER
USE CONTACT US TO REPORT ILLEGAL FILES
ADMINISTRATORS CANNOT BE HELD RESPONSIBLE FOR USERS POSTS AND LINKS

... Copyright © 2003-2999 Sonsivri.to ...
Powered by SMF 1.1.18 | SMF © 2006-2009, Simple Machines LLC | HarzeM Dilber MC