Teensy LC with CAN BUS

alexv5

Member
Hello.

I have used in the past 2 arduino nanos with the MCP2515 module.

Now I need to read 4 sensors with the Teensy LC and send that information via CAN to the arduino Nano. Basically, the Teensy LC is just transmiting via CAN, the Nano is the one that reads from the CAN Bus.

I'm using the same libraries as for the setup with the 2 nanos, the mcp2515.h from autowp.

I'm using the SPI pins from the Teensy LC, CS0, MOSI0, MISO0 and SCK0. I'm connectong the INT pin from the MCP2515 module to the same Digital Pin 2 that I have used in the 2 nanos setup.

The Arduino Nano gets no response from the CAN Bus, I suspect the Teensy is not sending the messages. I have done serial decoding with a picoscope on the CAN Bus and there is no messages being transmited.

Can the Teensy LC, since it's 3.3V work with the 5V MCP2515? And by this I mean the MOSI,MISO,CS and SCK pins.

Do I need level shifting on the CS0, MOSI0, MISO0, SCK0 and INT pins?

Thank you.
 
You will need to power the MCP2515 with 3V3. The Teensy LC is not 5V tolerant on its digital input pins.
The Microchip MCP2515 can be powered from 2.7V to 5.5V. I don't know about your module though.

Paul
 
You will need to power the MCP2515 with 3V3. The Teensy LC is not 5V tolerant on its digital input pins.
The Microchip MCP2515 can be powered from 2.7V to 5.5V. I don't know about your module though.

Paul

Paul the module is from Joy and it says it's compatible with Raspberry Pis (and other ARM single board computers) on a voltage level of 3.3V, as well as with Arduinos on a voltage level of 5V.

The pinout shows two supply voltages, I'm suppliying the VCC with 3.3V and the VCC1 with 5V, and everything is working. I have tried to supply the VCC and VCC1 with 3.3V on both and I get no response from the CAN Bus.

I also did a measurement with picoscope on the SPI lines, and none of them goes above 4V, so I will assume that everything is working properly.

Pinout is attached.

Thank you.
pinout.PNG
 
Last edited:
The +5V is used for the TJA1050 CAN transceiver only.
So you need 3V3 for VCC [which powers the MCP2515 that the Teensy LC interfaces to] and 5V for VCC1 which powers the TJA1050.

Paul
 
Back
Top