Help with CAN Bus on Teensy 4.0

xpeedster

Member
Hi everyone, I have a Teensy 4.0 board and what I technically want to do is to connect it to a car ECU and read the ECU can messages with it.

However, to first test (and learn) the proper use of the CAN bus on Teensy I wanted to use the two CAN buses (CAN1 and CAN2), one of the to send messages and receive them with the second CAN. I have worked with CAN before (not on teensy), but I'm having issues this time.

I am using this transceiver: https://www.amazon.es/ICQUANZX-SN65HVD230-comunicaci%C3%B3n-transceiver-Arduino/dp/B07VG3Z9GT/ref=sr_1_2?__mk_es_ES=%C3%85M%C3%85%C5%BD%C3%95%C3%91&crid=QN7QPFGWK0MF&keywords=can+transceiver&qid=1645697676&sprefix=can+transceive%2Caps%2C109&sr=8-2

My connections are simple: pins 22 and 23 (CAN1) to the first transceivers TX and RX. Pins 0 and 1 to the second transceivers RX and TX. Both transceivers are connected to 3.3V and GND. Last, CAN_HIGH of both trasnceivers are conected, and CAN_LOW are also connected.

I tried this with the sample code of the FlexCAN library but I got no good results. Does anyone have a code I can try with this configuration?

Thanks a lot in advance.
 
Hi xpeedster!
First you need to specify the make and model of the car you want to connect to, to make sure the connection is possible.
Then look at the schematic and make sure that the circuit has a termination resistor of 120 ohms
Third, you need to know the speed of the CAN bus you are connecting to (baudrate)
 
Hi AVSTech, I am aware of what you comment. However, right now I am more willing to know about my setup with one single Teensy 4.0 and two transceiver, using two CAN channels and trying to send messages from one channel ot the other one.
 
@xpeedster: we can help you better if you show the exact code you used and how you exactly hooked up both CAN transceivers. Schematic and/or photos do help.
Regards,
Paul
 
Back
Top