Electronic – Running CAN bus with RS-485 transceiver

canrs485

Recently I had a discussion whether one could use RS-485 transceivers for a CAN-bus network in order to gain the flexibility to use the same hardware either in a CAN-environment or in half-duplex RS-485 network, albeit with different software.

schematic

simulate this circuit – Schematic created using CircuitLab

The idea is to use a RS-485 bus driver as usual when utilizing the board in RS-485 setup. That this the transmitter is enabled by DEN when one wants to transmit and the bits are presented at the D input as usual. Additional pull-up and pull-downs are provided to ensure valid bus-level upon open bus lines.

When in CAN-Mode, the D input is tied low (dominant) and the DEN input is used to present the bit stream when transmitting. When DEN=1 (driver enabled) the bus is driven low (dominant), otherwise the line remains recessive. This should then mimic the open-collector nature of the CAN bus since only one state is actively driven while the other is only passively pulled by the pull-up resistors.

The part I consider is the SN64HVD11 and the SN65HVD230 as reference for a 3V3 CAN transceiver.

The driver-enable timings of the SN64HVD11 are given as max. 55ns and the fall time is bounded at 30ns which is less than comparative figures of the "real" CAN driver.

Has someone tried this before? Are there issues I might miss completely?

Clarification: the whole system is intended for a small-scale unmanned vehicle control in the academic domain thus interoperability with 3rd-party components is not deemed important.

Best Answer

It can probably be made to work, although I wouldn't call it a "production solution"!

One thing you'll need to do is invert the DEN signal as CAN is low-dominant, not high-dominant.

You'll also need to adjust the termination as although both CAN and RS485 are designed to be terminated by a single 120ohm resistor at each end of the bus, the additional bias resistors that RS485 usually includes will pull the bus lines to voltages slightly "either side of the centre-point", whereas CAN needs to idle recessive at ~2.5V on both lines.

IIRC, there is about 0.5V of differential voltage allowed before a dominant bit is detected.