Lithium CANbus Integration

Started by CayoPV, August 10, 2022, 11:43:18 PM

Previous topic - Next topic

CayoPV

Hello!

I briefly started a thread about this ages ago and rather than dig up the old one I thought I make a new one (sorry mods!). This question may have been asked recently but thus far I have been unable to find it answered. I'm sure it could be I missed it somewhere though.

We have some legacy systems with Midnite classics that we either have or are looking to integrate with current-gen lithium battery modules. I design our battery modules and we have them manufactured for us.

My question is will we see a communication bridge module available at some point to integrate our CANbus lithium modules to the Classics? Is the new MNCOMBOX capable of this? We're using the industry standard protocol for CAN integration so it's not specific to us by any means. We're just looking for a way that our BMS can actively control the Classics over CANbus. Real-time adjustments of target voltage and current limits based on real-time measured cell values.

Thanks!

~Jakob

ClassicCrazy

#1
Jakob - I am interested in what protocol your canbus uses to talk to the batteries ?
I recently got some lithium batteries and it has a can port and have been wondering what communications would do to help the charging  ?
You mentioned real time adjustments of the target voltage and current limits . Can you elaborate on that a little ?
What brand are your lithium batteries ?
There is a thread in the open source section by Will who designed an arduino to change settings on the Classic to work with his EV battery charger . I forget exactly how he was doing that now but he explained it all and provided the arduino code.
I have been watching my cell voltages closely as the software I have from battery company is pretty decent on a computer , but I have been wanting to get that data out to an Esp8266 so I can send it wireless to Raspberry Pi which can then graph all the data.
If I got that far I would also be able to get the data into something like Node Red which then would be possible to maybe do what you are suggesting - change Classic settings via modbus.
But I am not that good at those things.
I did just find a project that gets can data from Pylontech batteries - which seems to be what all the current batteries use as their standard . Is that the protocol you use ?
This is that project.  I have the can board and esp8266 wired up but haven't tried it yet - seems like all the pylontech esp softwares I have tried don't work with the bms I have - maybe because of intial comms to get them talking. Maybe the Can port will just spit out data ?
https://www.setfirelabs.com/building-automation/pylontech-us2000-us3000-nodemcu-can-reader
Anyway my experience watching the Classic and batteries  is that it would be nice to be able have it lower it's current output after some time so that the bms could better balance the battery cells.
I am still learning how the lithiums work and best charging practices.
Anyway it would be great if Midnite was working on something like you asked about .

Larry
system 1
Classic 150 , 5s3p  Kyocera 135watt , 12s Soneil 2v 540amp lead crystal for 24v pack , Outback 3524 inverter
system 2
 5s 135w Kyocero , 3s3p 270w Kyocera  to Classic 150 ,   8s Kyocera 225w to Hawkes Bay Jakiper 48v 15kwh LiFePO4 , Outback VFX 3648 inverter
system 3
KID / Brat portable

australsolarier

midnite ignored lithium batteries for years, as if they are not existing. as if they are not the future.

if you have one of the prefab battery boxes you are totally dependent on the built in BMS. some can be configured somewhat. but basically if one cell is high it will simply stop charging and quite possibly stop balancing as well. that stuff is made in china and they do not use it themselves. they simply design something and when there is a strong feed back they might, maybe, bring out a better version. that quite possibly has other problems.
having all said that, having that event of premature stopping charging, it will just shave off a few SOC percentage points.

but the idea of slowing down charging in that event is a sound one. easy to do when there is no load attached.

normally if the if the battery communicates with the inverter/charger, it is just to tell the system to shut down like in an over V, under/over cellV, etc

boB


Working on Classic lithium improvements right now actually.

As for a CAN interface, that is also in the works and we already had one of those but for Classic to SMA Sunny Island integration.   Unfortunately  SMA did not push but said that they wanted so that was a wasted engineering time except that it might be useful for the lithium comm interface.

But is your lithium battery company willing to work with a generic communications interface ?   There is no "standard" for this lithium to canbus thing. They are all different.  Some lithium BMS's use modbus too which is even different.

Anyway, working on several improvements.   It takes a LOT of time and engineering to get it right.  Gee, even takes a lot of time to get it wrong !

boB

K7IQ 🌛  He/She/Me

australsolarier

bob,
yes, there is no standard.
personally i do not believe the BMS needs to interface with the charger or inverter.
personally i think the BMS in the battery is the last line of defence. as the inverter should shut down at over/under V.
personally i believe BMS balancer  should be strong enough to do the balancing when the battery pack is worn. that chinese stuff just has not enough current. mostly anyway.

personally i am using the BATRIUM balance system. it is expensive, but has software updates, is totally programmable, is not chinese. their website is full of flaws though, it is very difficult to find what you want there. the cell voltages and all other things can be watched on a windows computer via lan and everytime i am here i am watching with fascination at the balancing process. some of the cells have their own characteristics and behavior during the Vabsorb process.
i can see right away if there is a lose terminal or something else amiss.
the batrium can communicate with victron gear, it is a long weary process to configure that too, similarly weary like the original midnite classe firmware update. not sure how they interact though. probably shut downs in an emergency only.


boB

Quote from: australsolarier on August 23, 2022, 08:48:21 PM
bob,
yes, there is no standard.
personally i do not believe the BMS needs to interface with the charger or inverter.
personally i think the BMS in the battery is the last line of defence. as the inverter should shut down at over/under V.
personally i believe BMS balancer  should be strong enough to do the balancing when the battery pack is worn. that chinese stuff just has not enough current. mostly anyway.


These are good choices I would think.   And add to that, the BMS should have a strong over-current capability so that it doesn't have to have false trips for short over-amps that wouldn't hurt the batteries in the first place.  i.e.  Don't under-design the power switch.


Quote from: australsolarier on August 23, 2022, 08:48:21 PM

personally i am using the BATRIUM balance system. it is expensive, but has software updates, is totally programmable, is not chinese. their website is full of flaws though, it is very difficult to find what you want there. the cell voltages and all other things can be watched on a windows computer via lan and everytime i am here i am watching with fascination at the balancing process. some of the cells have their own characteristics and behavior during the Vabsorb process.
i can see right away if there is a lose terminal or something else amiss.

Sounds kind of like the cells are almost sentient in their lifelike way on the screen !  Kind of like Google's A.I. was purported to be.


Quote from: australsolarier on August 23, 2022, 08:48:21 PM
the batrium can communicate with victron gear, it is a long weary process to configure that too, similarly weary like the original midnite classe firmware update. not sure how they interact though. probably shut downs in an emergency only.

The old firmware update worked kind of klunky I agree.   The Classic firmware itself at least did not have to change ito fix that, luckily.  It was finally fixed by one of our engineers tweeking the basic USB upload code or methods on the PC a couple of years later. 

BATRIUM system looks interesting and sounds like it has all you might want.

Now, since the BATRIUM is programmable...   I wonder if you can change the data that is output over their data line (BMS network) to match another method, at least of the same type...  RS-485,  CANBUS, etc.  for different inverters or whatever (?)    It would be interesting to see what is controllable.  It could do a lot of things, software wise, that might make others want to use this battery.  It's got a computer in it after all and some kind of communications.

Bluetooth maybe too ?


I guess we should be happy there are so many different hardware and serial protocols.   that is...  standards to choose from !

K7IQ 🌛  He/She/Me

ClassicCrazy

#6
Yes all these lithium server rack batteries  bms communications are a hodge podge of protocols.
They seem to have all copied the Pylontech protocol to some degree . And the pylontech is not regular modbus style.
But the Jakiper battery I have lets you select different outputs for the rs485 or Can port that is supposed to then be able to communicate with various of the new inverter/charger units .
I have set the port to Growatt type and there is a modbus protocol for that.
I have been trying to get the data out of mine so I can graph it in Grafana like I do with the Midnite Classic.
Graham is going to help me with that but everyone is kind of busy now in fall so more of a winter project I think.
I was able to scan it with Modbus Scanner and get data so I know it is possible. It is just that modbus communication code stuff that I am a bit rusty on !

The problem with these bms is they don't seem to be able to balance at the top if there is more current than they can dissipate in their resistors. My bms will only seem to balance when the cells get to 3.5v and then will only balance as the battery voltage is increasing. So if the voltage goes to the absorb limit and stops , then the balance stops - or if the battery voltage decreases then the balance stops. At least that is what I have seen while watching my bms so far. The software they provided is pretty good  in that it shows lots of info - battery voltage, each cell voltage, the mv difference between cells, any ov or error alarms, etc.

So what could the Classic have that would help ? Maybe if it had a feature where it could drop the charging current to 1 or a few amps when it got to the absorb voltage ( or better a voltage just below the absorb voltage) and then the battery voltage would rise slowly and let the bms balancing do its job. But seems like these batteries come with cells that are kind of out of whack - there are a couple high cells that  probably need to be manually discharged a bit ( or the lower cells charged to match ) .  A friend told me that the  chinese stuff is kind of a crapshoot on what you will get.
I am gaining on my lithium learning curve for best practices.

Larry
system 1
Classic 150 , 5s3p  Kyocera 135watt , 12s Soneil 2v 540amp lead crystal for 24v pack , Outback 3524 inverter
system 2
 5s 135w Kyocero , 3s3p 270w Kyocera  to Classic 150 ,   8s Kyocera 225w to Hawkes Bay Jakiper 48v 15kwh LiFePO4 , Outback VFX 3648 inverter
system 3
KID / Brat portable