I have been using an arduino to create the basic control system of a li-ion battery charging station. I want to add in functionality for the arduino to 1) detect if a battery is plugged into the charger, and 2) give a rough sense of the amount of charge on the battery (or at least notify when it is full). my first thought was to use a standard li-ion charger board, then have a voltage divider in parallel with the battery which I can feed to the arduino analog pin but I'm not sure this would work while the battery is actively charging. If anyone has any suggestions or resources for either or both of these functionalities please let me know (especially if there are any pre-existing boards that might have this functionality).
You can buy 'fuel gauge' chips to do that, I saw them on AE.
Voltage is raising up to about 65% charge level and after that it's flat. So it would be difficult to estimate further charge levels measuring voltage. You need current sensor for what you are asking.
The TP4056 charger I/C has two open-drain outputs to indicate charging status. One goes low during charging, and the other goes low when charging is complete. If neither is low, then USB is not plugged in.
So on a typical module, you could do a little surgery to remove the LEDs and resistors connected to those pins, and instead connect the TP4056 pins to two of your GPIO pins in INPUT_PULLUP pin mode.
But that doesn't give you the battery voltage. For that you would need a resistive divider connected to an analog input. You would want to measure that when the battery is not being charged, and possibly when it is under maximum load.
I was imagining some 24V 100Ah battery "charging station". ![]()
OP should give some numbers...
Yes, I guess I made an assumption based on "lithium ion" and "Arduino". Clearly an unwaranted assumption.
Tesla Wall is lithium ion and single cell battery doesn't ask voltage divider.
Without numbers we are just guessing here...
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.