Maker Pro
Maker Pro

Battery Charger with Load Sharing + Current Sensor

iptvbrazar

Dec 2, 2023
4
Joined
Dec 2, 2023
Messages
4
Newbie friendly on the house?

I want to create a project where I can charge my Li-Po Battery (3.7v 1000mah) with a Load Sharing and detect when its low energy measuring its voltage with a current sensor INA219 in a ESP32 microcontroller.

I'm using a step down of 3.3v (LM2596) to power the ESP32, but also in doubt if should connect it directly in the 5v pin.

I'm really new and create this schematic and want to know how I should pass the battery to the sensor and measure its voltage level, its correct this way?

Sensor-Schematic.png
 

Delta Prime

Jul 29, 2020
1,793
Joined
Jul 29, 2020
Messages
1,793
I'm using a step down of 3.3v (LM2596) to power the ESP32, but also in doubt if should connect it directly in the 5v pin
Sure if you want to blow up the LiPo battery that's how I would connect it. Don't play with fire.
Off topic:
Doesn't anyone go to school anymore? Learning on your own is one thing but doing it safely is another.
If you'd like to learn how to make schematics then you're on your way but don't make anything!
Concentrate on the components themselves the connections how to make them.
1701623961590.jpg
The load sharing circuit allows the USB power to run the ESP8266 or ESP32 when it is connected. That allows the battery charging to proceed to termination independently. You don't want the charger to provide power to the ESP.

 

iptvbrazar

Dec 2, 2023
4
Joined
Dec 2, 2023
Messages
4
Sure if you want to blow up the LiPo battery that's how I would connect it. Don't play with fire.
Off topic:
Doesn't anyone go to school anymore? Learning on your own is one thing but doing it safely is another.
If you'd like to learn how to make schematics then you're on your way but don't make anything!
Concentrate on the components themselves the connections how to make them.
View attachment 61916
The load sharing circuit allows the USB power to run the ESP8266 or ESP32 when it is connected. That allows the battery charging to proceed to termination independently. You don't want the charger to provide power to the ESP.


Thank you for the reply.

If you would put a current sensor in this schematic to measure the voltage of the battery to the ESP32, how would you do it?
Thinking in using a INA219 module like this:
MCU-219-INA219-Bi-directional-Current-Sensor-Breakout-Module-DIY-3V-5V-Sensor-Module-I2C-Zero.jpg_.webp
 

Delta Prime

Jul 29, 2020
1,793
Joined
Jul 29, 2020
Messages
1,793
I would find the datasheet of that module and post it along with your question?
This way everyone would have a reference; there would be no room for interpretation of the explanation given.
And I'm not telling you how to do it my way. It is best to provide any and all information up front! That is only a recommendation.
My way is not responding to any questions given without supportive documentation. Bye-bye!
 

iptvbrazar

Dec 2, 2023
4
Joined
Dec 2, 2023
Messages
4
I would find the datasheet of that module and post it along with your question?
This way everyone would have a reference; there would be no room for interpretation of the explanation given.
And I'm not telling you how to do it my way. It is best to provide any and all information up front! That is only a recommendation.
My way is not responding to any questions given without supportive documentation. Bye-bye!
Bye
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,632
Joined
Nov 17, 2011
Messages
13,632
If you would put a current sensor in this schematic to measure the voltage of the battery
This doesn't work. A current sensor measures current, as the name implies, not voltage.

The ESP32 has 2 integrated ADCs. These can measure up to 2.45 V. Use a resistive voltage divider zu divide the battery voltage e.g. by 2, then measure this voltage directly with one of the ESP32's ADCs. No need for an external converter module.

Here's a tutorial how to use the ESP32's ADCs.
 

iptvbrazar

Dec 2, 2023
4
Joined
Dec 2, 2023
Messages
4
This doesn't work. A current sensor measures current, as the name implies, not voltage.

The ESP32 has 2 integrated ADCs. These can measure up to 2.45 V. Use a resistive voltage divider zu divide the battery voltage e.g. by 2, then measure this voltage directly with one of the ESP32's ADCs. No need for an external converter module.

Here's a tutorial how to use the ESP32's ADCs.
Thank you for the reply.

You are correct, its because the INA219 its a current and voltage sensor, but I only mentioned it as a current sensor, my bad.
I'm using a battery charger with load sharing of a 5v USB, looking into my drawn, it will convert both to 5v with a MT3608 step up (not to 3.3v, it was not a good way), so to not measure the 5v, but the battery 3.7v, it will have two power inputs (?)

Schematic_New Project2_2023-12-04.png
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,632
Joined
Nov 17, 2011
Messages
13,632
but the battery 3.7v, it will have two power inputs (?)
Check the battery charger module. Typically BAT- and GND are the same. Then you only need to divide BAT+ and measure from there to GND.
 
Top