question

peternielsen avatar image
peternielsen asked

What kind of protocol do you recommend to implement for BMS ?

Hi,

We (the community) are discussing how to support Victron in the diyBMS (https://github.com/stuartpittaway/diyBMSv4ESP32). Can you please answer few questions :

  1. What protocol should we go for ? (we have WiFi, CAN and RS485)
  2. Where do we find information about the protocol ?
  3. What is the minimum HW equipment we need to test this ? Is it enough with the rPi and VenusOS ?

/peter

BMS
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

3 Answers
mvader (Victron Energy) avatar image
mvader (Victron Energy) answered ·

Hello all of you! ;o).

That sounds like a cool plan.

1. Protocol: I recommend to use the CAN-BMS protocol. Because that way you don't have to do anything on the Venus OS side; which (a) saves you an enormous amount of work, and (b) your solution will then work with out of the box Venus OS, instead of having to install something special and/or having to wait for us including a new driver into the default images.

2. I can share to to you by email Peter, but first: is CAN an option for this project? You'll need to do something in hardware to have CAN on the ESP32 I'd expect?

3. rPi and Venus OS: you mean a RaspberryPi and a Cerbo GX? I'd test it with a Cerbo GX only. No need to test it with anything else.


Matthijs

6 comments
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

peternielsen avatar image peternielsen commented ·
The newest ESP32 controller board has got CAN support on it made by Stuart. Great please do email me (should i post the email here or how do we get in touch?) the documentation you have and i can share it with Stuart if that's ok ?
0 Likes 0 ·
mvader (Victron Energy) avatar image mvader (Victron Energy) ♦♦ peternielsen commented ·
yes I'll send you an email.
0 Likes 0 ·
peternielsen avatar image peternielsen mvader (Victron Energy) ♦♦ commented ·
Thank you, i look forward to getting it, one thing we were discussing is how to test the support. Stuart can get hold of a Cerbo GX. I was thinking we need to emulate an inverter and smartsolar charger to test things out. Any suggestions in this regard ? I have not heard of a development kit or such so i guess such doesn't exist correct ?
0 Likes 0 ·
chrissnow avatar image chrissnow commented ·
@mvader (Victron Energy) Please could I also have the protocol? I'd like to do something similar.
0 Likes 0 ·
marv21 avatar image marv21 commented ·

@mvader (Victron Energy)

I am trying to develop a device that converts RS485 to CAN.
Could I also get the CAN-BMS protocol?


Thank you

0 Likes 0 ·
solar-53-6f-6c-61-72 avatar image solar-53-6f-6c-61-72 commented ·

Is it possible to get the CAN-BMS protocol as I have a battery that speaks a CAN protocol that my Cerbo does not understand. For this reason I want to build a "translator".

0 Likes 0 ·
Louis van der Walt avatar image
Louis van der Walt answered ·

My driver could also work for you if you do not have a CAN hardware interface.
You will need a USB->UART cable and connect that to the UART on the ESP32. The driver use the serial interface to poll for BMS data and publish that to VictronOS on the dbus. A direct UART->UART should also be possible but a bit more work.

You can test with your BMS and VenusOS running on a Pi3+. No need to have an inverter for the test. You can look at your results in the RemoteConsole, dbus-spy or VRM.

https://github.com/Louisvdw/dbus-serialbattery


Edit: I see you mention RS485. That would be a great option if you plan to have multiple batteries connected. Each BMS a slave on the RS485 line.


1 comment
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

mvader (Victron Energy) avatar image mvader (Victron Energy) ♦♦ commented ·

That might be an even better idea, yes.


Note @peternielsen, that once you're going for "closed loop control", ie. the BMS sending dynamic CVL / CCL / DCL values, you will need a full system, including Inverter/charger & solar charger to test. But after quick read through @Louis van der Walt his material (nice!) I think thats not part of this at the moment. And btw also not necessary, systems can work very well with static values, as long as they are configured properly ofcourse.

0 Likes 0 ·
goboatingnow avatar image
goboatingnow answered ·

Every thing bus based should use CAN , that’s what I’m doing , for lower level solutions I use I2C or LIN bus. Forget RS485, way to proprietary

What is CAN-BMS. Where is the protocol documented ?

2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.