Implement Auto CCL Soft Landing feature#248
Conversation
Added Auto CCL Soft Landing configuration for precisely charging batteries to the configured bulk voltage.
|
I'll make some 'tuning' changes before this goes live. I'm working on how to play nice with YamBMS cutoff logic. A long slow taper triggers an early transition to float so I'm experimenting with maintaining a higher charge current for longer along with an increase in the cutoff timer to give 'soft landing' a chance to finish charging before the transition to float. The good news is these are simply tuning parameters. I'm also considering something I saw @MrPabloUK do in his LED code that I think is cool, to eliminate the 'debug' sensors while keeping the data available to me in HA. |
|
In discussion #213 I asked you to do a charging test following this procedure but you did not give any feedback, I don't know if you tried it ?
What is the purpose of your Auto CCL Soft Landing function and why is it essential for you ? I also have a Deye and I don't need the Auto CCL function to charge my battery properly. |
|
When you say "only the bulk target is considered", considered by what? If CVL is 55.2 I get 55.4. If I add .2v inverter offset I get 55.6v. The inverter (more or less) obeys CVL. It does not know what my target voltage is. Are you referring to 'Auto CVL'? It does't work for me because I have a battery with mismatched cells. The battery is balanced for SOC but at bulk voltage I have a large delta V due to IR differences in the cells. Auto CVL nerfs charging because it's trying to 'protect' a cell that doesn't need its protection. My motivation is to charge my batteries with precision. My function charges to within .01v. This level of precision is unnecessary but the Seplos BMS does it so I want YamBMS to do it too. After tomorrow I will perform your test. I'm trying to figure out an interaction with the cutoff logic. Charging to only 3.45v per cell makes it very easy for the cutoff voltage to fall below 3.37v. >10A and boom, cutoff voltage drops below 3.37v and restarts the cutoff timer. Took 20 minutes to reach EOC due to repeated restarts of the timer. |
|
What I mean is that the Inverter_offset_v is not taken into account in the YamBMS charging logic; it's only used to reach the target voltage. I'm not asking you to use the current Auto CVL function, but simply to charge without any additional functions, correctly configuring your Deye without TOU 100% + Inverter_offset_v to reach the target bulk voltage. |
OK, so just +.5 inverter offset and do not set TOU to 100%. The inverter should charge to .5v less than CVL to arrive at bulk. I'm still not understanding how these two scenarios are expected to be different:
I will perform the test after I negotiate the cutoff logic. I think that increasing bulk by .2v (which will increase the max cell voltage) and increasing the slope of the Auto CCL de-rate curve should allow 'soft landing' to pass through the area of 'turbulence' where cutoff repeatedly triggers and restarts. I also reduced the cutoff timer duration to leave a shorter window for the timer to be restarted. The longer the timer the better the chance of a current spike causing cutoff voltage to fall below 3.37v. |
|
The cutoff logic does not consider bulk voltage at all, so if the inverter does not respect CVL, then there's nothing in core YamBMS to assure that the battery voltage stops rising at the bulk voltage, or even reaches the bulk voltage at all. All of the other Auto functions are 'protection'. Charging precision is what soft landing brings to the party. |
|
Of course, the cutoff logic takes the bulk voltage into account. It's up to you to adjust your equipment correctly to achieve it. |
I stand corrected: bulk voltage is referenced once in the cutoff logic: The cutoff logic is fragile. I am trying to navigate the logic but one instant of negative current resets the counter. A spot welder, for example. One pulse of current also resets the timer. With a high cell voltage of 3.46 it only takes 10 amps to drop cutoff voltage below 3.37. I'm seeing both of these. I have proposed a solution here It should be noted I was having this issue long ago. Never figured out why it was happening because it's not easy to see why charging status is toggling back and forth between bulk and cutoff: |
This is backwards. If battery voltage has reached bulk and current is low, and cutoff is failing, it's up to me to "adjust my equipment"? |
Updated various parameters for Auto CCL SL configuration, including knee voltage, activation time, and curve shape. Added back previously removed sensors for delta and target current.
Simplified the logic
Further simplification







Auto CCL Soft Landing
Auto CCL Soft Landing is an optional, independent current-derating function that participates in the existing Auto CCL step pipeline.
Purpose
Facilitate a controlled “soft landing” at bulk voltage by tapering requested charge current as pack voltage approaches bulk.
As pack voltage approaches bulk, voltage rises rapidly. Because the inverter and control logic do not respond instantaneously, the system may overshoot bulk voltage before current is reduced.
Soft Landing ensures the system reaches bulk under a controlled slope of gradually reduced current. When properly configured, it prevents bulk voltage overshoot and allows pack voltage to converge tightly to bulk while maintaining a small, predictable charge current near bulk (e.g., to give passive balancers time to operate).
This feature is optional and may not provide significant benefit in systems that already achieve stable convergence at bulk voltage. In systems where overshoot is managed by lowering bulk voltage, Soft Landing instead controls charge current directly so that the specified bulk voltage can be reached accurately without offset compensation.
How It Works
When enabled, Auto CCL Soft Landing gradually reduces charge current as the battery approaches the configured bulk voltage.
Charging completion (Cut-Off / EOC / Float) remains governed by YamBMS core logic.
What It Does Not Do
Optional Substitutions (defaults shown)
Comparison with Existing Auto CCL
Auto CCL Soft Landing and the existing Auto CCL mechanism serve different purposes and operate on different inputs.
Auto CCL limits charge current based on cell voltage as cells approach the BMS over-voltage protection threshold. It is primarily a safety-oriented limiter and includes asymmetric response behavior to react quickly to rising cell voltage while avoiding oscillation.
Auto CCL Soft Landing shapes charge current based on battery voltage as the system approaches the configured bulk voltage. It provides a deterministic taper profile that allows maintaining a low, controlled charge current near bulk without relying on cell-level voltage thresholds.
Both mechanisms may be enabled simultaneously. When multiple charge-current limits apply, YamBMS uses the most restrictive result.