0
\$\begingroup\$

I'm thinking about tapping into an existing CAN bus. I'm going to attach in a middle point, and I don't want to introduce any issue in the original bus.

In order not to disturb the original bus with the new stub, I was thinking about splitting the net using two transceivers, but having no experience I thought about asking first.

This is my current idea:

schematic

simulate this circuit – Schematic created using CircuitLab

This circuit shall go the nearest possible to the original bus. On the farthest end of the new bus, another 120 Ohm termination resistor shall be placed.

The "passive mode" wire chooses whether the new bus shall only listen to the original mode (passive mode = 5V) or be also able to write frames on the original bus (passive mode = 0V).

Do you think this can work? Are there better ways to do this?

To be honest, I took the dual transceiver idea from an old post on one of the stackexchange sites some years ago, but I don't remember when or where...

Thank you

\$\endgroup\$
1
  • \$\begingroup\$ Use one of the newer CAN transceivers. They will either tell what partial load they will apply 1/4 for example or how many nodes you can add. This will reduce the impact on the bus. \$\endgroup\$
    – Gil
    May 30, 2022 at 4:21

2 Answers 2

2
\$\begingroup\$

You can typically run a stub off of an existing CAN backbone without problems as long as the stub is not too long. Standards like J1939-11 limit the stub length to 3m maximum.

Just connecting two CAN transceivers together as you propose won't work. Think about what happens when a dominant bit gets driven on U1.

First it comes out of RXD on U1 as a "0" and then goes into TXD of U2, which then drives a dominant bit on the new CAN bus. All good so far right, we want the second bus to copy the first.

But now it gets not so good. The dominant bit on the new bus comes back as a "0" on the RXD pin of U2. Which then feeds back into the TXD pin of U1, which causes a dominant bit to be driven on the original bus. We now have a problem. U1 is driving dominant on the original bus, even when all other transceivers stop doing so.

The two transceivers have now formed a latch that will lock up the bus on the first dominant bit. So, your design will only work in the passive mode. You might as well just eliminate the connection between U2 RXD pin and U1 TXD pin.

If you DO want to send messages and ACK bits back to the original bus, then you need some logic between the two transceivers to prevent the latching effect from happening. I have done this before with a small CPLD, but you can buy CAN bus repeater chips also.

Texas instruments has a good article on CAN repeaters that would be worth reading.

https://www.ti.com/lit/ug/tidudb5a/tidudb5a.pdf?ts=1653874091884&ref_url=https%253A%252F%252Fwww.google.com%252F

\$\endgroup\$
3
  • \$\begingroup\$ Are you sure J1939 says 3m? Because the general recommendation I've always followed was 0.3m. Maybe J1939 always assumes 250kbps or some such? \$\endgroup\$
    – Lundin
    Jun 1, 2022 at 6:48
  • \$\begingroup\$ @Lundin Max length varies a bit depending on which version of J1939 you are using. Most of the vehicle electronics I have designed were using CAN bus at either 250Kbps or 500Kbps. J1939-15 defines a 250kbps physical layer. In my 2008 copy, Figure 4 on page 10 shows 3m stubs going to each ECU and a (2.66m+5m) stub going to an OBD tool. J1939-11 also describes a physical layer for 250Kbps. Figure 8C on page 18 in my 2012 copy shows 1m stubs going to ECUs, and a (0.66m + 5m) stub for an OBD tool. J1939-14 describes 500Kbps physical layer. Section 4.2.1 allows stubs up to 1.67m in length. \$\endgroup\$
    – user4574
    Jun 1, 2022 at 19:17
  • \$\begingroup\$ I see. Well I know from practice that stubs are never a problem in automotive/machinery applications because CAN is rugged and probably because the overall bus length is so short. Industrial automation is another story though, where one can face hundreds of meters of cable. So I guess it all depends on what application the OP is using. \$\endgroup\$
    – Lundin
    Jun 2, 2022 at 6:23
0
\$\begingroup\$

CAN is a robust multidrop bus, just make a clean attachment in the middle and don’t use an excessive length of wire (ie making a star network out of the bus) and do not install a termination on your tap.

I’ve done this both for diagnosis/inspection and adding new nodes hundreds of times without issue on 500kbit/s and 1MBit/s busses.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.