Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LiPo Charging #4

Open
korgon opened this issue Feb 14, 2022 · 5 comments
Open

LiPo Charging #4

korgon opened this issue Feb 14, 2022 · 5 comments

Comments

@korgon
Copy link

korgon commented Feb 14, 2022

Hello and thank you for making a useful product and sharing your work on it with the world.

Is there support for, or has anyone adapted this to work with LiPo (specifically LiPoFe4 in my use case) batteries?

@danjulio
Copy link
Owner

A good question that sent me back to the design to refresh my memory how it works :-)

I think the answer could be yes - if the LiPoFe4 battery pack has built-in battery management (and balancing) circuitry to allow it to be used in existing 12V systems.

The trick would be to bypass the temperature compensation so the charger attempts to always put out the Bulk/Absorption and Float voltage levels the battery expects - independent of temperature since LiPoFe4 batteries don't want to be temperature compensated. This could be done by replacing the external battery temperature sensor with a resistor divider network that generates 0.75 volts to fix the temperature the charger senses to 25 C (where no temperature compensation is applied).

Selecting the resistor values takes a little thought. They should be high enough resistance so the constant current through them isn't too high (part of the charger's burden current that's always being drawn from the battery) but low enough so they can supply the current required by the ADC input. In addition, the charger has a 44.2 k-ohm resistor between the sensor input and ground so the charger can detect when the sensor is missing. A 13 k-ohm resistor in parallel with the 44.2 k-ohm resistor would result in a low-side (sensor input to ground) resistance of about 10.045 k-ohm. Then using a 34.2 k-ohm resistor on the high-side (3.3V to sense input) should provide about 0.75 volts at the sense input. Burden current would be an additional 75 uA (very low).

Reading the ET (External Temperature) register with an external micro-controller would tell you what temperature the resistor divider was simulating.

Finally the BULKV and FLOATV registers could be written by the external micro-controller with new values if the 14.7V Bulk/Absorption and 13.65V Float voltage levels needed to be adjusted for the specific battery.

Mind you, I haven't tested this but I think it would work. It takes advantage of the fact that the LiPoFe4 battery is designed to work in existing 12V systems with their traditional charge voltage levels. Of course the battery should be sized to fit the charger + solar panel maximum charge current (probably around the same Ah ranges as for Lead Acid batteries). And the temperature of the battery shouldn't exceed 0 - 40/50 C from my reading of LiFePo4 since the charger can no longer automatically disable charging when it gets too cold or too hot. Testing and study of the battery spec would definitely be in order before deploying this.

Would you mind updating this issue if you end up testing this or if you see something in your battery's spec to be aware of?

@korgon
Copy link
Author

korgon commented Feb 14, 2022

Thank you for such a detailed response. I have only begun looking into this battery chemistry, and it looks very promising compared to lead acid. I have been out of Electrical Engineering for quite some time and have focused more on software, but I am trying to re-learn much that has faded since my time at University; so please forgive me (and if you can provide clarity) if I am completely off base on anything here.

As you touched on, one of the biggest limitations of LiPoFe4 batteries that I have come to find is that they cannot be charged when the temperature is below freezing - doing so permanently damages them. Some higher end batteries protect themselves internally from charging at low temperatures, but most of the cheaper batteries on the market today do not.

You mentioned bypassing the temperature compensation by using a resistor divider network to "trick" the system into always thinking it is at optimal temperature - but would it be possible to keep the temperature sensor to prevent charging at low temperatures? Can the temperature logic be modified via firmware or is the logic hardwired?

@danjulio
Copy link
Owner

Yes. My first approach was just to modify an existing board.

However if you want to attack the problem via firmware then it should be possible to a) suppress temperature compensation and b) adjust the charge disable for a temperature range that would suit the specific battery.

Maybe it's as easy as changing some constants in config.h.

  1. Set V_FLOAT_COMP_X10 and V_BULK_COMP_X10 to 0 to disable temperature compensation.
  2. Set TEMP_LIMIT_HIGH and TEMP_LIMIT_LOW to suit the battery.

Also V_BULK_DEFAULT and V_FLOAT_DEFAULT can be changed if you want to change the default Bulk/Absorption and Float voltage levels.

You'd need to import the project into Silicon Labs Simplicity Studio and get a programmer. Then find the test points on the bottom of the board to attach the programmer signals (GND, C2D, C2CK) and supply power to the battery input to generate the on-board 3.3V supply. If you were to go this route I could post a picture showing the test points (or you can deduce them from the schematic).

@danjulio
Copy link
Owner

Also, possibly adjust V_LOAD_ON, V_LOAD_OFF and V_BAD_BATTERY because the LifePo4 might have different valid values for when you should turn on or off due to battery voltage and what constitutes an un-chargeable (bad) battery.

@korgon
Copy link
Author

korgon commented Feb 14, 2022

This sounds like the best approach for me, thanks!
If you don't mind, a picture of the test points (and your programmer too) would be very useful to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants