@BjoernK haven’t seen this code so far, but it looks like GUI code which most likely talks another protocol to the Lynx Smart BMS.
However, I played at little bit with the hardware yesterday and found out how it works:
It’s an I²C interface. The cable has the following mapping:
Pin 1 - yellow - 5V
Pin 2 - green - SDA
Pin 3 - red - SCL
Pin 4 - black - GND
You need a pull-up on SDA/SCL to 5V.
The device answers on I²C address 0b000001AA
where AA
is set by the address jumper. So in default configuration the address is 0x8
.
Any reads on the device will always return the same status byte with the following meaning:
0b00000000 - Everything allright (center LED is green)
0b00000010 - No supply on bus bar (center LED is orange)
0b00010000 - Fuse 1 open (center LED red, first fuse LED red)
0b00100000 - Fuse 2 open (center LED red, second fuse LED red)
0b01000000 - Fuse 3 open (center LED red, third fuse LED red)
0b10000000 - Fuse 4 open (center LED red, forth fuse LED red)
If multiple fuses are open multiple bits are set (just or the values).
I’m now thinking about the best way how to use the I2C bus from the Cerbo GX (or any other device running Venus OS). My current favourite solution is to use FTDI’s FT232H (or similar variant) chip and its MPSSE mode. There would be already a ready-to-buy cable (C232HM-EDHSL-0) which only needs to two pull-up resistors. The only problem is to find an easy solution to use the MPSSE mode on Venus OS.