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

Thread: Need help with CAN bus...

  1. #1

    Need help with CAN bus...

    Hi guys,
    I've just received that CAN transceivers (hope they are ok for Teensy!):
    https://www.ebay.it/itm/2pcs-SN65HVD...53.m2749.l2649

    I've connected the Teensy v3.6 CAN-TX pin with the CTX of transceiver and Teensy CAN-RX to the CRX...
    Can you please point me to the best CAN library to use? I need to get connected to the CAN bus of my bike at 500kbps and ask with OBD messages for RPM, TPS and ECT...
    On my old project with Arduino MEGA I've used the MCP library and it has a loopback mode so I was able to test the connections and SW without connecting physically to the CAN bus of the bike: in loopback mode everything is sent to the CAN bus is received back.... is there a similar feature?
    Have I need the 120ohm resistor with Teensy?


    Sorry, I'm new on CAN

  2. #2
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    8,325
    Looks to use the same chip as these : https://www.amazon.com/gp/product/B07NZCK5XY

    Those are the ones I was pointed to so that is promising. There are canbus threads for custom Teensy libraries a search should find if a reply isn't posted.

  3. #3
    Senior Member+
    Join Date
    Jul 2014
    Location
    New York
    Posts
    3,192
    You can try the IFCT library. Check this thread - do a search for MCP with that thread and you will find that whatever you have for MCP should work with the IFCT Lib. There should be some examples in there as well.

  4. #4
    Thanks guys I'll give it look asap....

  5. #5
    Junior Member
    Join Date
    Feb 2019
    Posts
    2
    I am currently using the FlexCAN library included with Teensyduino with the same transceiver as this product, I’ve got mine on a custom PCB. It is very easy to use. You won’t have loopback mode with the Teensy and this library.

    From the picture, this board has a 120 ohm resistor onboard. It is between CAN HI and CAN LO labelled 121. If you want to use this product in an existing CAN BUS, you will have to remove this resistor. The bus wires in a CAN network are terminated at both ends with 120 ohm resistors.

    You will need 120 ohm impedance twisted pair for CAN HI and CAN LO when you connect to the bike’s bus. Keep these wires as short as possible. If you cannot find 120 ohm twisted pair in your area, ethernet cable should work just fine ( it is 100 ohm impedance ). The CAN protocol is very fault tolerant.

    If you have any more questions, I’ll be happy to help.

    https://e2e.ti.com/support/interface...cables-for-CAN

Posting Permissions

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