Hello. I’m currently working on a project where I connect both a BMS and a motor controller to an ESP32 via CAN communication. I have a question regarding the setup:
Should I connect the BMS and the motor controller to the ESP32 separately, each using its own CAN connection?
Or is it okay to connect both the BMS and the motor controller in parallel on the same CAN_H and CAN_L lines, like in a typical CAN bus setup?
I believe option 2 should be fine since each device uses a different PID (identifier), but I’d appreciate your advice.
I moved your topic to an appropriate forum category @youganghyeon.
In the future, when creating a topic please take some time to pick the forum category that best suits the subject of your topic. There is an "About the _____ category" topic at the top of each category that explains its purpose.
So, both the BMS and the motor controller use 250 kbps, both use extended 29-bit CAN IDs, and they have different PIDs.
Given these conditions, it's okay to connect them on the same CAN bus and receive data using a single SN65HVD230 with an ESP32, right?
Yes, when connecting them together be sure it is separated from the bus by a transceiver and the units at each end of the bus need a 120 Ohm termination resistor. There are only two of them regardless of how many nodes.
You can place as a lot of nodes on the CAN bus, depending on what Transceivers you use.
This should help:
the CAN_H and CAN_L lines of the BMS and the motor controller are separated, so I wasn't sure if it was okay to connect them together on the same CAN bus. Thank you for your answer.
The motor controller uses the SAE J1939 protocol, and it's unclear which protocol the BMS uses. Could there be any issues if these two systems use different protocols?
If I successfully communicated with the motor controller and BMS using the ESP32 and SN65HVD230, can it be assumed that both the motor controller and BMS have integrated CAN transceivers?