Unable to use CAN for a G432B_ESC to talk with an ESP32

Hi All,

I have looked at most threads here and issues on GitHub in vain so far.

I am using (SimpleCanLib/examples/CANTest/src/CANTest.cpp at master · Igitigit2/SimpleCanLib · GitHub) and got 2 esp32 boards communicating over CAN using two sn65hvd230 transceivers.

Also got 2 G431B_ESC talking to eachother attached directly to can rx and tx pins.

However when trying to get all boards talking on the same bus only the boards of the same kind would talk to each other.

I have tried changing the speed, mode and all I could think off but both no way to get an esp32 talking a g431b ?

I saw @Owen_Williams videos and code, thank you for the great explanations.

Any help would be highly appreciated.

Cheers !

I am currently on vacation and can‘t really help a lot, but in principle, my CAN lib also works between G431 and ESP32 (I use it like that myself). Have you tried the demo program? That should work as well across platforms.

Hi @Grizzly,

Thank you for jumping in.

I have tried your simplecanlib example and it did also work on a kind of device only but not cross devices.

Today CAN decided it would work between my ESP32 and G431B all of a sudden.

I am actually unable to tell what happened TBH and I would love to know what it is knowing how much time I spent on this.

Many thanks,
Rafik

In such cases, it helped me a lot to use a simple scope/logic analyzer and some tools to trace the protocol on the bus. Are voltages etc. compatible between your devices (e.g. 3.3V vs. 5V)? Is your bus termination correct? It sounds a bit as if you would be somewhere near allowed tolerances.

Hi @Grizzly,

Thank you for the great advice.

Luckily CAN has been running solid since, however next time I will know what to do to troubleshoot.

Cheers,
Rafik

Hi @Rafik_B

If the issue is that only motors of the same type can communicate with each other, it is highly likely that the problem lies with the CAN transceiver. This would explain why motors with the same transceiver communicate well, while those with different transceivers experience issues. You should verify that all transceivers operate at the same voltage level. If I recall correctly, the SN65HVD230 operates at 3.3V. If you place it on the same bus as transceivers operating at 5V, it is very likely they will not communicate correctly.