AngeloCasi / FUGU-ARDUINO-MPPT-FIRMWARE

An open source Arduino ESP32 MPPT Charger firmware equipped with charging algorithms, WiFi, LCD menus & more!
Creative Commons Zero v1.0 Universal
514 stars 130 forks source link

Charging algorithm is dangerous #6

Open X-Ryl669 opened 2 years ago

X-Ryl669 commented 2 years ago

Right now, the charging algorithm is very dangerous. It's ok to connect the output to a BMS, but not to plug directly on a battery (whatever the chemistry).

It should follow charging curves and also respect the limits. Typically, a charging curve for a lead acid battery depend on the charge state of the battery, it c/should start with a voltage set up then once some threshold is reached, it should monitor the current and limit the current but keep the voltage in a desired range, and then once the charging current is 0, it should float by increasing the voltage while monitoring the current is low (else, it should go back to the CC mode).

Right now, the algorithm for charging is more a "try to respect all constraint" charging, that is: limit charging current, limit voltage, limit power. It's doing this with only a single feedback: the PWM duty cycle. This can't work to implement correct charging algorithm here, IMHO, since PWM only deal with power, not independant voltage or current.

I think another MOSFET & inductor is required here in buck/boost mode to implement a proper charging here, the goal of this is to decouple the power input (from the MPPT output) into either voltage or current control.

Tomsan83 commented 2 years ago

your remark is good, but it is just a matter of coding, no additional mosfet is needed - new state machine with some battery states like OFF (no sun), BULK (CC), ABSORPTION (CV) and FLOAT (i.e. floating near 13,7V for one 12V battery GEL) is needed and MPPT ALGORITHM shall be used only in BULK state ! other states like ABSORPTION and FLOAT just shall operated with PWM duty and check max voltage i.e. 14,4 for ABSORPTION and 13,7 for FLOAT.