Problem receiving CAN Bus message from Orion BMS 2

Pet

1 µW
Joined
Apr 13, 2024
Messages
1
Location
Greece
Hello! We are using the Orion BMS 2 and we are trying to send data to a teensy 4.1 via CAN Bus using an ISO1050 transceiver (I checked that the connections are correct). However, when we try to do that, we do not see any data on Arduino IDE’s serial. Our oscilloscope is broken for now, so we used a multimeter to measure the voltage of the CANH and CANL on the BMS’s side and it measured 1.6V and around 1.4V on teensy’s side. We can still see the data (0D in HEX or 13 in DEC) on the CAN BUS traffic in BMS’s software. I’d like to mention that to form the message (it has the ID 0x123) I’ve followed the corresponding manual and I matched the Baud Rates of the BMS and teensy (50kbit/sec). I also attached screenshots taken from the software and my code. The code is attached below. Does anyone know where the problem might be? Excuse me for any profound mistakes! :)

C:
#include <FlexCAN_T4.h>

FlexCAN_T4<CAN1, RX_SIZE_256, TX_SIZE_16> can1;

void setup() {
  Serial.begin(9600);

  can1.begin();
  can1.setBaudRate(500000);
  can1.setMaxMB(16);
  can1.enableFIFO();
  can1.enableFIFOInterrupt();
}

void loop() {
  CAN_message_t msg;
 
  if (can1.read(msg) && msg.id == 0x123) {
    Serial.println("Received message!");

    Serial.print("ID: ");
    Serial.print(msg.id, HEX);
    Serial.print(" Data: ");
    for ( uint8_t i = 0; i < msg.len; i++ ) {
      Serial.print(msg.buf[i], HEX);
      Serial.print(" ");
    }
    Serial.println();
  }

  delay(100);
}
 

Attachments

  • 1.PNG
    1.PNG
    128.5 KB · Views: 1
  • 2.PNG
    2.PNG
    41.5 KB · Views: 1
Back
Top