Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 8 of 8

Thread: CAN Bus Pins

  1. #1
    Junior Member
    Join Date
    Sep 2021
    Posts
    5

    CAN Bus Pins

    Good Morning,

    I got my first Teensy 4.1 and did some basic light flashing stuff. Cool!

    I am looking to work with Canbus and have done some reading on the various transceivers that can be connected (like MCP2515 and SN65HVD232).

    Unfortunately a lot of the tutorials and other information on the internet refers to Arduino which labels pins differently.

    I am looking for which pins on the Teensy 4.1 are the Canbus Tx and the Canbus Rx - this doesnt appear to be on the Quick Reference card? (The quick reference card doesn't tell me but I think the light pink boxes relate to canbus pins?)

    The MCP2515 board is different again. It has pins:

    INT (????)
    SCK (SPI Clock)
    SI (MOSI - Master slave in)
    SO (MISO SPI Master in Slave out)
    CS (Chip select)
    GND (Ground)
    VCC (Power (5v?))

    Can anyone tell me which pins on the Teensy 4.1 these pins should be connected to?

    Thanks heaps.

    Al
    Last edited by bigalnz; 09-03-2021 at 01:23 AM.

  2. #2
    Junior Member
    Join Date
    Sep 2021
    Posts
    5
    I think it *might* look like this, but I am unsure where INT goes to.

    Click image for larger version. 

Name:	Teensy41_MCP2515 test.jpg 
Views:	13 
Size:	117.0 KB 
ID:	25750

  3. #3
    Junior Member
    Join Date
    Feb 2019
    Posts
    6
    Al,

    The pink squares labeled CRX# and CTX# are the CAN Bus pins. The device you have at the bottom with the MCP2515 chip is a standalone CAN controller using SPI for communication. It is not needed on the Teensy as it has CAN controllers built in. The SN65HVD232 is a CAN transceiver which you will need. I have used the SN65HVD232 chip with much success.

    Hope this helps,

    John D

  4. #4
    Member
    Join Date
    Aug 2018
    Location
    Brisbane, Australia
    Posts
    66
    The problem with that MCP2515 breakout you have is that it is designed for 5V operation which may fry your teensy. Some of the boards claim to have level shifters but I personally would not take the chance.

    A breakout based on a SN65HVD230 will generally be 3.3V and are available everywhere. I have used thesehttps://www.waveshare.com/sn65hvd230-can-board.htm without any problems before I started spinning my own pcbs with the transceiver chip.

  5. #5
    Member
    Join Date
    Aug 2018
    Location
    Brisbane, Australia
    Posts
    66
    I actually have a couple of the waveshare breakouts still in sealed packets. If you are interested and the nz in your nick means you are located across the Tasman from me, send me a pm with your physical address and I could mail them to you.

  6. #6
    Junior Member
    Join Date
    Sep 2021
    Posts
    5
    @thebigg I got a transceiver only board too - but thanks for the offer (yes NZ).

    Just checking before I solder :

    Click image for larger version. 

Name:	20210903_151528.jpg 
Views:	8 
Size:	110.2 KB 
ID:	25752

    TX goes to TX (i.e. they are NOT crossed over TX to RX?)

  7. #7
    Junior Member
    Join Date
    Feb 2019
    Posts
    6
    You are correct, TX goes to TX.

    This board has the two 120 ohm terminating resistors. If you are connecting this device to an existing CAN bus network, you will have to remove those resistors. If you are building your own network, only one of these boards will need the resistors.

    John D

  8. #8
    Junior Member
    Join Date
    Sep 2021
    Posts
    5
    I have wired it up like TX to TX:

    Click image for larger version. 

Name:	20210904_094351.jpg 
Views:	4 
Size:	59.5 KB 
ID:	25754

    I want to use it to program my Actisense EMU-1 (Canbus device for putting Analog engine data on Marine NMEA 2000). This guy has done it, albeit he used Arduno:

    https://www.youtube.com/watch?v=kxWhZpmXG3A

    He never mentioned removing any resistors. Didnt describe his setup much.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •