Reading RS485 Data From The BMS

… I think I need more smarts in my BMS. There are some fun cold-start edge cases for my EV motorbike whereby the system needs to turn on enough to handle charging the rest of the system, and the BMS just isn’t clever enough to deal with this, so it requires a bit of a bodge via the vehicle management unit (VMU) to kick it into gear.

No problem, just use the CAN bus or RS485 to talk to the BMS and change its modes.

But in a frustrating turn of events, it appears that my Battery Management System (BMS) for the EV motorbike does not support CANBus (which is fine, I guess) but also does not support RS485 in the same set of speed ranges as my PLC (which is not!).

This means that, while my PLC has a native RS485 port, the serial interface it uses for that port cannot be set the locked-in bus frequency for the BMS, so despite them being really close they’re just different enough data rates to just see mangled data from one another.

A terrible video of the console-only interface I've written for the REC BMS, running over RS485.

My ‘fix’ for this, is a dedicated TTL serial to RS485 board, which takes a normal UART and translates it back and forth from RS485 levels. As this board has a more forgiving crystal, and can change speed between the UART one one side and the RS485 bus on the other, it finally lets the PLC talk to the BMS!

If you have a REC Battery Management System, and want to have a go with my open source software for them, you can find the code over at github.