3
\$\begingroup\$

I need to interface with a device that talks UART, but with CAN bus signalling. Here's a picture where a tester (which I want to replicate) talked to that device:

Scope

While RS485 seems similar, the device doesn't want to recognize it, so I need to convert the behavior.

What kind of circuitry would be the best way to approach this? Is there something existing?

\$\endgroup\$
3
  • 1
    \$\begingroup\$ If it's actually using a CAN transciever to drive the lines, then just use a CAN transciever to interface with it? Are you sure it's UART? Can you share a scope trace of the signal? \$\endgroup\$
    – Attie
    Commented Jun 4 at 9:38
  • \$\begingroup\$ What does any of this "logic 0 is CANH = CANL = 2 V" even mean? That you have a bus with that characteristic or that you want one? Where are these voltages coming from? The nominal differential voltage of CAN is 2V so if you have CANH=3.7V, CANL=0.3V that's invalid noise. All of this sounds like an "XY problem", what is the actual problem you are trying to solve here? \$\endgroup\$
    – Lundin
    Commented Jun 4 at 10:38
  • 1
    \$\begingroup\$ @Attie I have updated the question. 100% sure it's UART over CAN, yeah. \$\endgroup\$ Commented Jun 4 at 12:34

1 Answer 1

5
\$\begingroup\$

Normally you would just use a CAN PHY.

The problem is, if what you say about the logic levels is true, it for some weird reason is contrary to the usual logic levels, where the idle state of CANH == CANL == 2.5V is logic 1, and UART also idles at logic 1.

If you are sure, you need to invert the UART output to CAN PHY input.

It might be possible to use RS485 PHY to interface with the device, but then you need to control the driver enable with the UART data to simulate CAN bus.

Obvious to say, your buses need to be terminated with proper termination resistors and use a common ground reference between the devices for it to work.

\$\endgroup\$
2
  • \$\begingroup\$ I mixed up the levels. It‘s indeed idle voltage for logical 1, not otherwise. \$\endgroup\$ Commented Jun 4 at 13:30
  • \$\begingroup\$ Thanks @Attie and Justme – coming from scenarios where it's always a CAN controller controlling the CAN transceiver, it never occurred to me that I can just hook a CAN transceiver to an UART and control it myself :-) Me thinking using RS485 plus level conversion was a fallacy. \$\endgroup\$ Commented Jun 4 at 15:33

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