• Hello ES! We could use some help to get us past the finish line on building the new knowledgebase for the forum.
    Can you donate? Please see our fundraising page. Thank you!

ANT BMS communication - VESC/CAN/....

bananu7

Regular
Joined
Sep 27, 2024
Messages
824
Location
Poland
I'll be the one to start the thread because we should have a common place to drop stuff at the very least. Please don't post help requests with configuring the BMSes here; this is meant to be a "working group" document for getting the BMS to communicate with VESC or other devices, such as custom microcontrollers.

The starting point we have is this repo:

After a quick read, it talks to the unit via Serial/UART:

HardwareSerial _bms(2); // UART 2 (GPIO16 RX2, GPIO17 TX2)
// ...
_bms.begin(BMS_BAUD_RATE, SERIAL_8N1, BMS_RX_PIN, BMS_TX_PIN); // (19200,SERIAL_8N1,RXD2,TXD2)
_bms.setTimeout(BMS_TIMEOUT); // How long to wait for received data
Where baud is 19200, and timeout is 250 (ms).

There's another project which looks more fresh, an ESPhome integration:
It also uses UART.

HW wise, the unit has multiple connection options:
1757704235554.png

This is from the documentation. It's for the "20-30s" model which covers the largest 420A/1050A which I personally use in my projects, but likely the communication will be similar.

So it seems that to expose the CAN data to VESC, one simply needs to talk to the BMS via one of the four interfaces and either poll it or listen to CAN frames, and expose the data on the bus in the format VESC expects. I don't use a VESC controller as of now, but I can tackle the first part of the issue.

Since there's many different coding languages and platforms (I personally stopped using C++ altogether) we should focus on documenting the protocol first and foremost, so that anyone wanting to implement their own solution has a clear, well documented path for how to talk to the unit.
 
Last edited:
I am going for the BT to VESC approach so if by chance i figure anything out i will add it in here.
 
I think it usually says you have to specify if you want can bus. I wonder if it just that you will need wiring for it, or if it actually is a hw difference :unsure:
 
Back
Top