Honda Insight Forum banner

LiBCM Open Beta Support Thread

69849 Views 1492 Replies 60 Participants Last post by  ghaze24
This thread is for any and all questions related to LiBCM during the Open Beta.
After browsing www.linsight.org, if you still have questions, please post them here.

I will answer questions posted in this thread by updating the FAQ/Instructions/Documenation/etc at www.linsight.org.
I will probably respond to questions posted in this thread by replying with a hyperlink to the answer (which I may have just written).
  • Like
Reactions: retepsnikrep
1321 - 1340 of 1493 Posts

· Registered
Joined
·
19 Posts
Thank you @mudder and @Balto. I installed both your modules today and the heater pcb kit, everything went great and I'm currently grid charging.

The correct modules were a little easier to install which was a nice surprise, slid in the housing a easier and the aluminum brackets lined up perfect ( I had to enlarge the holes with the other modules)
 

· Linsight Designer
Joined
·
4,812 Posts
Discussion Starter · #1,322 · (Edited)
I have followed your instructions but the data in the serial monitor window, is not like it shows in the video. my data is not readable. Not sure what I am doing wrong.
@Campervanman, were you able to gather this data? I'm still interested in reviewing it, even if you've resolved the issue.

Thank you @mudder and @Balto. I installed both your modules today and the heater pcb kit, everything went great and I'm currently grid charging.

The correct modules were a little easier to install which was a nice surprise, slid in the housing a easier and the aluminum brackets lined up perfect ( I had to enlarge the holes with the other modules)
Glad to read you're up and running with the correct modules. How mis-matched were the three modules?

...

I've (finally) finished writing the latest firmware, which doesn't have many new features:
-Grid charger now soft-starts, to prevent high current draw while user is still mechanically mating the power cable.
-On the 4x20 display, changed time symbol from 'T' to 't', to prevent confusion between temperature and time.
-LiBCM now periodically runs fans when the battery is hot/cold, so that cabin air is able to reach intake temp sensor (in the intake air plenum). Then, once the intake temperature is known, LiBCM can continuously run the fans if it makes sense to do so (e.g. heat the pack up if the pack is cool and the cabin temp is warm).
-Added support for heater PCBs. You don't need to configure anything... if the heater PCB is connected, LiBCM will use it (instead of the fans) when it's cold. You can change temperature setpoints in config.h:
Code:
COOL_BATTERY_ABOVE_TEMP_C_KEYOFF
COOL_BATTERY_ABOVE_TEMP_C_GRIDCHARGING
COOL_BATTERY_ABOVE_TEMP_C_KEYON
HEAT_BATTERY_BELOW_TEMP_C_KEYON
HEAT_BATTERY_BELOW_TEMP_C_GRIDCHARGING
HEAT_BATTERY_BELOW_TEMP_C_KEYOFF

KEYOFF_DISABLE_THERMAL_MANAGEMENT_BELOW_SoC
...

So not many new features. However, under the hood there are numerous code changes. I ended up entirely re-writing the fan, grid charger, temperature, and (new) heater code, and also made minor changes to 24 other files. I have tested this code for the past several days, but considering the massive number of changes, if you choose to install this Prerelease code, I recommend:
-checking SoC at least every 24 hours when the key is off, and;
-checking SoC at least every 2 hours when grid charging, and;
-turning IMA switch off if you plan to leave the car unattended for more than 24 hours, and;
-if LiBCM continuously beeps, turn the IMA switch off immediately. Continuous beeping (always) means LiBCM is unable to keep the battery at a safe operating voltage.


I'm testing the code right alongside y'all. Please report any oddities.
 

· Premium Member
Joined
·
3,255 Posts
Thank you @mudder and @Balto. I installed both your modules today and the heater pcb kit, everything went great and I'm currently grid charging.

The correct modules were a little easier to install which was a nice surprise, slid in the housing a easier and the aluminum brackets lined up perfect ( I had to enlarge the holes with the other modules)
Nice! Glad to hear it's working as intended.
 

· Premium Member
Joined
·
1,550 Posts
-Added support for heater PCBs. You don't need to configure anything... if the heater PCB is connected, LiBCM will use it (instead of the fans) when it's cold. You can change temperature setpoints in config.h:
Code:
COOL_BATTERY_ABOVE_TEMP_C_KEYOFF
COOL_BATTERY_ABOVE_TEMP_C_GRIDCHARGING
COOL_BATTERY_ABOVE_TEMP_C_KEYON
HEAT_BATTERY_BELOW_TEMP_C_KEYON
HEAT_BATTERY_BELOW_TEMP_C_GRIDCHARGING
HEAT_BATTERY_BELOW_TEMP_C_KEYOFF

KEYOFF_DISABLE_THERMAL_MANAGEMENT_BELOW_SoC

John, a few questions before I install this update:

The temps in "HEAT_BATTERY_BELOW_TEMP_C_..." are the temps at which the heater PCBs turn off, right? In other words, when key on, the heater will heat the battery to 20 deg C, and then cut off? When grid charging, it will heat up to 16 deg C and then cut off, and when key off, it will heat to 10 deg C and then cut off? If so, what temperature must the cells drop back down to before the heater PCBs turn back on? What I would gain/lose by setting these temps to something much lower -- like 5 deg C?
 

· Registered
Joined
·
19 Posts
@mudder I spoke too soon, left the pack grid charging last night and came back this morning to only being at 39% Soc up from %30 and my pack seems to not be charging anymore (I haven't installed it back in the car yet)

As usual, any help/suggestions/troubleshooting directions are greatly appreciated. Thanks in advance!

Not sure what info to include, I'm hoping I just forgot something simple or misunderstood some part of how this should be functioning right now.

I did a fresh install of 8.5, I've got a steady green and a blinking green led on the libcm board
I was able to get the heater led to turn on (have since turned it off)


this is what I get when I have the grid charger plugged in and open the serial monitor:
LiBCM v0.8.5, 2023JAN02
'$HELP' for info

HW:D/5AhG3/48S/Vs=ast/Heat:Y
Key:OFF
Old SoC: 60%, New SoC:39%.
Current Sensor 0A set to (counts): 332
Total hours since firmware last uploaded: 0 (960 Hours MAX)
Charger: Plugged In
temp:5

Motor vehicle Font Automotive tire Gas Electricity
Motor vehicle Electrical wiring Audio equipment Gas Electricity
 

· Linsight Designer
Joined
·
4,812 Posts
Discussion Starter · #1,327 ·
The temps in "HEAT_BATTERY_BELOW_TEMP_C_..." are the temps at which the heater PCBs turn off, right?
If the heater PCB isn't installed, then this parameter is used to run the fans. The fans have a temperature based hysteresis, a time-based hysteresis, and a state-based hysteresis, which together prevent them from rapidly turning on and off.

If the heater PCB is installed, then this parameter is used to run the heater PCB. The heater PCB only has a time-based hysteresis, which prevents the open drain N channel MOSFET from turning on/off more than once per second (specifically: the value set by HEATER_STATE_CHANGE_HYSTERESIS_ms).

So yes, if the heater PCB is installed, then the heater PCB is activated whenever the pack temperature is below the HEAT_BATTERY_BELOW_TEMP_C_... value. Note that the heater or fan is always disabled when the car is off, the grid charger is unplugged, and the SoC drops below KEYOFF_DISABLE_THERMAL_MANAGEMENT_BELOW_SoC.

In other words, when key on, the heater will heat the battery to 20 deg C, and then cut off?
Correct.

When grid charging, it will heat up to 16 deg C and then cut off, and when key off, it will heat to 10 deg C and then cut off?
Correct.

If so, what temperature must the cells drop back down to before the heater PCBs turn back on?
In your examples above (20/16/10 degC), the cells would only need to drop down to 19/15/9 degC, respectively. No temperature-based hysteresis is required for the heater PCB, because it's solid state.

What I would gain/lose by setting these temps to something much lower -- like 5 deg C?
Setting to 5 degC would save energy when it's cold outside and the grid charger isn't plugged in. It's certainly safe to set down to 5 degC.
 

· Linsight Designer
Joined
·
4,812 Posts
Discussion Starter · #1,328 ·
@mudder I spoke too soon, left the pack grid charging last night and came back this morning to only being at 39% Soc up from %30 and my pack seems to not be charging anymore (I haven't installed it back in the car yet)
Your pack is really unbalanced. LiBCM disables grid charging as soon as the first cell reaches 3.900 volts. So then as soon as each cell reaches 'full', all LiBCM can do is discharge those full cells, and then wait for the less charged cells to catch up. There's a small amount of hysteresis to prevent rapid grid charger cycling, which is why your highest cell voltage is 'only' 3.889 volts. As soon as the highest cell(s) drop low enough, the grid charger will reactivate, and then turn off again once they hit 3.900.

The top right number on the 4x20 display shows you that the difference between the most-full and most-empty cell is 237 mV... that's going to take another day to balance out fully. Until then SoC is going to remain low... because the usable range is very low until the pack is balanced.

Note that once all three modules are initially balanced, you won't have to wait this long again. Given that you sourced the three modules separately, it's very likely that they didn't all start out at the same SoC. For example, the module I sent you was at 30% SoC, because that's the highest SoC allowed to legally ship them.

Nothing to worry about... just keep watching that 'd0.xxx' value. I'd keep it on the bench until it drops below d0.010. LiBCM will eventually balance it down to about half that value.

this is what I get when I have the grid charger plugged in and open the serial monitor:
LiBCM v0.8.5, 2023JAN02
'$HELP' for info
If you keep this window open while the grid charger is plugged in, LiBCM will actually tell you which cells are still balancing; it's the next line after all the individual cell voltages are list... stored in hex format. If this paragraph doesn't make sense, then just look at the differences in reported cell voltages (in the serial monitor window)... almost certainly the cell voltage delta is between the various three modules (e.g. 'IC3' is the 12S module, IC0 and half the IC1 cells are one 18S module, and IC2 and the other half of IC1 are the other 18S module).

...

tl;dr: Pack is really unbalanced. Keep checking the 'd0.xxx' value every six hours or so, until it's less than 'd0.010'. Note this value will trend towards zero, but might have local maxima while the grid charger is running.
 

· Premium Member
Joined
·
1,550 Posts
Just uploaded 0.8.5d. For now, the only change I made was setting HEAT_BATTERY_BELOW_TEMP_C_KEYOFF to 5. I'm guessing that at some point I may flip the values for HEAT_BATTERY_BELOW_TEMP_C_GRIDCHARGING and HEAT_BATTERY_BELOW_TEMP_C_KEYON -- with the logic that I would rather use energy from the grid to raise the temp of the batteries and try to avoid taking any power from the gas engine to keep the cells warm. But I also don't want to run the heaters all weekend long if I leave the car plugged in from sheer laziness -- so I need to think through that one.

Thanks again!
Bryan
 

· Registered
Joined
·
19 Posts
tl;dr: Pack is really unbalanced. Keep checking the 'd0.xxx' value every six hours or so, until it's less than 'd0.010'. Note this value will trend towards zero, but might have local maxima while the grid charger is running.
I totally should have been able to figure that out myself! I knew my modules weren't going to be balanced well but I thought they were closer when I checked voltages, no worries! Lots to learn, your thorough answers are always super appreciated. Thanks again!
 

· Linsight Designer
Joined
·
4,812 Posts
Discussion Starter · #1,331 ·
Just uploaded 0.8.5d. For now, the only change I made was setting HEAT_BATTERY_BELOW_TEMP_C_KEYOFF to 5.
Sounds good.

I'm guessing that at some point I may flip the values for HEAT_BATTERY_BELOW_TEMP_C_GRIDCHARGING and HEAT_BATTERY_BELOW_TEMP_C_KEYON -- with the logic that I would rather use energy from the grid to raise the temp of the batteries and try to avoid taking any power from the gas engine to keep the cells warm.
I wouldn't worry too much about powering the heaters while driving... it's less than 1/10th a horsepower. But yeah if you want to preheat with the grid charger plugged in, that works, too.

But I also don't want to run the heaters all weekend long if I leave the car plugged in from sheer laziness -- so I need to think through that one.
Just to clarify, the heaters will only run enough to keep the battery to the specified temperature. Once the pack is up to temp, the heater will turn off (until the temp drops down again). My recommendation is to plug the grid charger into a "Watts Up" meter (or equivalent) and monitor just how little power the heater actually uses once the battery is up to temp. For science (at least initially).
 

· Premium Member
Joined
·
1,550 Posts
It seems logical that the use of the heater PCBs would slow down grid charging, right, with electricity going toward heat? I plugged in about 2 hours ago and my SOC was 52. I'm now at 56. Temp is 14 deg C. This seems much slower than before, but maybe just the new normal?

UPDATE: now almost at the four hour mark. Temp is 13 deg C. SOC has climbed from 52 at the start, to 59, now.
 

· Registered
Joined
·
19 Posts
It seems logical that the use of the heater PCBs would slow down grid charging, right, with electricity going toward heat? I plugged in about 2 hours ago and my SOC was 52. I'm now at 56. Temp is 14 deg C. This seems much slower than before, but maybe just the new normal?

UPDATE: now almost at the four hour mark. Temp is 13 deg C. SOC has climbed from 52 at the start, to 59, now.
My pack is very out of balance so I know it'll take a long time, but I feel like I'm noticing similar slow charging behavior. I've been grid charging with the serial monitor open since about noon today, set $DISP=CELL and the only thing that was updating was the temperature, no charging/discharging cell data displayed. My delta went from .327 to .236 over that 9 hours.

Just because I was curious, I went back to 8.4 and within 2 minutes my pack started discharging and logging cell data.

As a test I loaded 8.5 again, opened the serial monitor, set $DISP=CELL and waited for 10minutes, the only thing that updated was the temperature, no charging or discharging cell data.

Went back to 8.4 and again within 2 minutes my pack is discharging and I'm seeing cell logs again. I've been grid charging on 8.4 for about 20min now and my delta has already dropped from .236 to .232 so it seems like theres different behavior here?
 

· Linsight Designer
Joined
·
4,812 Posts
Discussion Starter · #1,334 ·
It seems logical that the use of the heater PCBs would slow down grid charging, right, with electricity going toward heat.
Yes. When they're on, the heater PCBs consume a significant percentage of the stock grid charger's power. Specifically, the stock grid charger sources 450 mA, which is about 80 watts, whereas the 5AhG3 heater consumes about 55 watts. Both these numbers assume each cell is at 3.7 volts, but they scale ratiometrically (i.e. the heater solution consumes about 70% of the stock grid charger's power whenever it's on).

I plugged in about 2 hours ago and my SOC was 52. I'm now at 56. Temp is 14 deg C. This seems much slower than before, but maybe just the new normal?
With the stock grid charger, you should expect to charge at about 30% of the normal (i.e. heater off) rate while the modules are initially heating up. Then, once they're up to temperature, you should expect the grid charging power to increase... unless it's very cold outside (in which case the pack heater might never turn off because the pack never gets up to temp).

One option if you want to grid charge faster is to upgrade to a faster charger. This is only necessary if you want to charge faster; otherwise the stock charger works just fine.

UPDATE: now almost at the four hour mark. Temp is 13 deg C. SOC has climbed from 52 at the start, to 59, now.
Let's do some math:
-A 48S 5AhG3 pack is 888 Wh, which means every SoC percent is 8.9 Wh.
-Worst case, if the heater stays on continuously, the grid charger should still source 30% of 80 watts into the battery (see math in first reply), which is 24 watts minimum into the battery.
-If you charge at 24 watts(min), then the SoC should rise at least 24 Wh per hour.
-24 Wh/h is 2.7% SoC increase per hour minimum.

Therefore, after four hours, SoC should rise at least 10.8% (2.7% per hour * 4 hours).
Whereas, you are seeing 7% SoC rise after four hours (59% - 52%).

While that's not the expected 10.8%, it's not too far off, either. I don't like that the numbers don't agree, but at least SoC is increasing, right ;)?

How cold is it outside right now? I'm assuming it's -10 degC.
How warm was the pack initially? Is the heater PCB what's keeping the pack above that ambient temp?
 

· Linsight Designer
Joined
·
4,812 Posts
Discussion Starter · #1,335 ·
My pack is very out of balance so I know it'll take a long time, but I feel like I'm noticing similar slow charging behavior. I've been grid charging with the serial monitor open since about noon today, set $DISP=CELL and the only thing that was updating was the temperature, no charging/discharging cell data displayed. My delta went from .327 to .236 over that 9 hours.
Assuming the following initial conditions:
Vcell(high) = 3.900 volts
Vcell(low)(initial) = 3.573 volts (3.900 - 0.327)
Vcell(low)(now) = 3.634 volts (3.900 - 0.236)

Then, using the lookup table in SoC.c, the low cell was initially at 28% SoC, and is now at 37% SoC. This is a 9% SoC difference, which means each balancing circuit consumed 1.67 Wh after 9 hours, which is an average 186 mW balancing power per cell. Given that each cell's discharge circuitry consumes 200 mW when activated (3.900^2/75, this is right on par with what I would expect.

The discharge circuitry is so repeatable that I propose:
-either your stated "9 hour" period was actually 8 hours and 22 minutes, or;
-one of my initial condition assumptions is incorrect.

After doing the math, your discharge circuitry is working as expected.

FYI: LiBCM is very slow to balance cells... because it must do so by turning any cell imbalance into heat. In the worst case, LiBCM is dissipating QTY59 cells (e.g. in a 60S configuration), which means the PCB must dissipate almost 12 watts (possibly without turning the fans on).

Just because I was curious, I went back to 8.4 and within 2 minutes my pack started discharging and logging cell data.

As a test I loaded 8.5 again, opened the serial monitor, set $DISP=CELL and waited for 10minutes, the only thing that updated was the temperature, no charging or discharging cell data.

Went back to 8.4 and again within 2 minutes my pack is discharging and I'm seeing cell logs again. I've been grid charging on 8.4 for about 20min now and my delta has already dropped from .236 to .232 so it seems like theres different behavior here?
This sounds like an issue unrelated to how fast the cells are balancing. Can you verify whether the grid charger is plugged in or not during this test between firmware versions?

If so, the latest prerelease firmware adds numerous new conditions that will prevent grid charging. If the grid charger is plugged in and LiBCM chooses not the actually charge, it will output the reason why. For example, 0.8.5d can output the following:
"Overcharged" (existing)
"Overdischarged" (existing)
"Pack Charged" (existing)
"Charger Hot" (new)
"T_grid Unplugged" (new)
"Pack Too Cold" (new)
"Pack Too Hot" (new)
"Cabin Too Hot" (new)
"T_intake Unplugged" (new)
"Exhaust Too Hot" (new)
"Plugin Delay" (new)
"LiBCM Powerup" (new)
Turnoff Delay (new)

So if you see any of the above, then the charger is disabled. Note that some warnings are normal during the grid charging process. For example, when the first cell gets full, you should see "pack charged". You should also see "plugin delay" briefly after you plug in the grid charger (to prevent the grid charger from sourcing current while you're still plugging in the cord).

If any of these conditions persist, then the grid charger won't charge. However, the cells will still balance, even if the car is off (as long as SoC remains above CELL_BALANCE_MIN_SoC (default value: 65%)).

Note that $DISP=CELL isn't required when the key is off... just plug in the grid charger and it will automatically display the cell voltages. Honestly I'm not even sure $DISP=CELL works when the key is off... if it does, it might not work correctly. I'll look into that.

I absolutely want to figure out the issue you're describing, but right now I don't have enough information. Can you please post logs so I can review them? And also a more descriptive explanation of the difference you're seeing between the two firmware versions.
 

· Premium Member
Joined
·
1,550 Posts
at least SoC is increasing, right ;)?
How cold is it outside right now? I'm assuming it's -10 degC.
How warm was the pack initially? Is the heater PCB what's keeping the pack above that ambient temp?
As always, thanks for the helpful and thorough reply! Here is the latest, after about 6.5 hours: SOC is up to 63% and the temp is 12 deg C. So yes, SOC is increasing. Not sure about the slowly dropping pack temp. Officially, it looks to be about -5 deg C outside, right now. My car is in an unheated, disconnected garage. I would guess that the unheated garage is slightly warmer (maybe I should put a thermometer in there). When I parked the car in there, this evening, the 4x20 display said it was 14 deg C. This was after my 40 minute commute home. Seems like the heater PCBs may not be able to get the temp to the default 16 deg C while gridcharging. I wonder if the delta is too great between the ambient temp and the pack temp?
 

· Linsight Designer
Joined
·
4,812 Posts
Discussion Starter · #1,337 ·
Thanks for the update.
Yes, please do not a thermometer in the garage, so we can get accurate deltas. In my testing last month, I was able to keep the modules 40 degC above ambient. In your case, it sounds like you're not even getting 20 degC, so certainly we'll want to look into this. Please give me another temperature update in the morning.
 

· Linsight Designer
Joined
·
4,812 Posts
Discussion Starter · #1,339 ·
That's certainly possible.
3.700 volts is ~50% SoC.
3.600 volts is ~30% SoC.
3.500 volts is ~15% SoC.

Even at 15% SoC, you'd still get 90% as much power as my calculations above (at 50% SoC).

One other note is that I still need to enable all of LiBCM's balancing resistors whenever the heater is turned on... that's another 10 watts of heating, in addition to the 55 watts added by the heater kit. However, my previous testing was able to maintain +40 degC without using the BMS discharge resistors.

I vote we wait until the morning to see if the pack is much cooler, or just slightly cooler, which will let us know whether something is connected improperly and/or not working.

@joeaax1j One other test I'd like you to perform: Type $TESTT a couple times (FYI: You can use the up arrow to recall previous entries, so that you don't have to keep typing it in). The first time you do so LiBCM will turn the temperature sensors on... the 2nd (and subsequent) times LiBCM will print out all temp sensor values. Let me know the results (both tonight and/or tomorrow).
 

· Premium Member
Joined
·
1,550 Posts
OK, I'm back inside. A few things to note:

My thermometer is reporting the temp in the garage to be about 2 deg C. Here is a pic of the 4x20 showing voltage:
Blue Automotive lighting Font Gas Display device


I left my laptop at work, tonight. So I won't be able to get $TESTT values until tomorrow. However, I wonder if I might have figured out what is wrong? When I opened the car door to take the pic of the 4x20 display, I noticed that the OEM IMA fan is running. Isn't it probable that the OEM fan is fighting the heater PCBs and removing a lot of the heat that they are generating?

(Got to get a few hours of sleep before work tomorrow. So, I'm off to bed for now. I'll be up in about 4 hours.)

-Bryan
 
1321 - 1340 of 1493 Posts
Top