Friday, May 3, 2013

RS422 to RS485 Adaptor

I got a radio with a RS422 port and got to hook up a camera with a RS485 port.  Electrically, the two are much the same, but RS422 is four wire, full duplex and RS485 is two wire half duplex.

On the RS485 side, the transmitter only drives the bus while sending a byte.  It is enabled at the start bit and disabled after the stop bit, allowing another device to send.  (BTW, Maxim makes nice little devices that will do this automatically).

On the RS422 side, the transmitter is permanently enabled.  Therefore, I cannot simply hook the Tx+ to Rx+ and Tx- to Rx-, since then the transmitter will permanently clash with the RS485 transmitter.

I need to somehow disable the RS422 transmitter when it is idle, to relinquish the bus and allow the other side to respond.

Looking at it a little more carefully, the RS422 transmitter uses a push-pull output stage, so one transistor is always on and the Tx+ line idles high, while the Tx- line idles low.

The trick therefore is to use two series diodes, to disable half of each push pull circuit and then use bias resistors to pull the lines into the idle condition, as shown in the sketch below (thanks for the tip Mike).

If necessary, add a 5V voltage regulator and Bob's your Uncle.

The purpose of C3, is to prevent a constant DC current flowing and reduce the power consumption, while the bus is still AC terminated into 120 Ohm.

Depending on the transceivers, an even simpler circuit can be used (thanks Latifa).  This one actually performed best in Latifa's tests and it uses only 3 resistors.

The whole circuit will fit inside the back shell of a DE9 or DB15 connector.

La voila!

No comments:

Post a Comment

On topic comments are welcome. Junk will be deleted.