Page 1 of 1

Help with M84, Arduino and CAN bus

PostPosted: Fri Mar 01, 2024 2:42 am
by acca
Hello,
I'm trying to make a dashboard using an esp32 (arduino) and SN65HVD230DR can transceiver, using Twai library :
https://docs.espressif.com/projects/esp ... /twai.html

In CAN normal mode, i can read and decode CAN data and write it to serial console, but as soon as i plug the CAN UTC, the serial becomes very slow and M84 software says 'ECU not connected", if i unplug the arduino, ECU can connect to M84 software.

I tried listen_only mode, but it doesn't seems to work at all.

Could someone help me to find the solution please ?
Thanks

Re: Help with M84, Arduino and CAN bus

PostPosted: Fri Mar 01, 2024 5:18 am
by David Ferguson
A CAN UTC has a built-in terminating resistor. I suspect your CAN bus is over-terminated. With everything connected (including UTC, M84 and Arduino), what resistance do you measure between CAN Hi and CAN Lo?

What do you measure when the UTC is removed?

Are their possibly other devices on the CAN bus that could have a termination resistor connected between CAN Hi and CAN Lo?

Re: Help with M84, Arduino and CAN bus

PostPosted: Fri Mar 01, 2024 6:11 am
by acca
I'll measure resistance tomorrow, but I already removed resistor from esp32
I have three things on the canbus : m84, UTC and esp32
If I just power down the esp32, the esp32 communicates
If I close m84 software, esp32 communicates
Does it looks like a resistor problem ?

Re: Help with M84, Arduino and CAN bus

PostPosted: Fri Mar 01, 2024 6:58 am
by acca
Could my problem come from incorrect bitrate ?
I'm using 500KBITS

Re: Help with M84, Arduino and CAN bus

PostPosted: Fri Mar 01, 2024 1:20 pm
by Stephen Dean
Hi,

If you connect just the UTC without the M84 Manager running, does it slow the CAN bus down? Running the M84 Manager on a 500K bus will work, but a fair percentage of the available bandwidth is used by the communications between the M84 Manager and the M84, Is there a reason why you are using 500K?

Re: Help with M84, Arduino and CAN bus

PostPosted: Fri Mar 01, 2024 6:37 pm
by acca
Hi,
The problem was the bus speed, setting bus speed to 1MBps solved this problem
Thank you very much