This week’s EYE ON NPI is Gon’ Give It To Ya, it’s the MaxLinear half duplex RS-485 transceivers an easy way to convert your every day UART serial connection to a RS-485 or RS-422 data link layer.
We’ve seen RS-485 most often in DMX512 lighting networks, where there are up to 512 lights/devices connected up to a control board ‘universe’. Each one is individually settable. While these could have used CAN bus or Ethernet, DMX ended up using RS-485 for simplicity and low cost.
It’s super easy and inexpensive to convert between UART and RS-485 using a MaxLinear chip because the encoded data is the same as 8N1 serial.
Each line of RS-485 consists of a differential signal pair, A + B, where A is inverted from B and B’s logic level is the bit being sent. This means it can go farther and more reliably than RS-232 which is single-ended and just has wide voltage swings.
However, instead of having ground, RX and TX for connection between two data ports – DCE and DTE – RS-485 cables as used in a DMX setup have the A and B wires plus ground. This means RS-485 going to survive signal degradation better than RS-232 but the downside is it’s uni-directional. That’s fine for lighting rigs because you just want to tell the light “turn blue” or fog machine “on”. RS-485 is also driven quite fast, the DMX standardizes on 250kbps comfortably, whereas RS-232 does best at 115.2kbps or less.
If you really want, it is possible to convert the line into a bi-directional setup as long as the transmitter knows when to expect signal from a remote device. Simply sent the Driver Output Enable pin of the MxL8321x low to tri-state the output driver buffer, then set Receiver Output Enable line low, this will swap the device from being a transmitter to a receiver.
The light on the other side will do the opposite, setting both pins high to turn into a transmitter. It can then send signal back down the line. Technically this is the difference between RS-485 and RS-422, which is really just the differential-ized RS-232 part without output/input enable and thus does not have the ability to change ‘direction’. For RS-422 you’ll probably want two MxL8321x’s, one for each direction.
While used often for DMX512, you don’t have to use the DMX protocol with your MxL8321x RS-485 converters: after all it’s just a new physical layer for UART serial, so if you have any design that already uses serial: GPS, MIDI, microcontroller communication, radio modules, you can pop these in between for no-fuss extension from a few inches to many meters, up to 500kbps. The MxL8321x uses 3.3v or 5V power/logic so its easy to integrate into any existing design. The family also comes in a few package sizes and speed variants, from the MxL83211‘s 250kbps to the MxL83214‘s 50Mbps. Pick the slowest one you can use to get the best line drive strength to reduce EMI and reflections. You’ll also need to set up a terminator on the end of the transmission line.
If you’re looking to add RS-485 or RS-422 support to your next design, MaxLinear is here to Give You What You Really Want with their wide range of half duplex RS-485 transceivers. And best of all, DigiKey has them all in stock for instant shipment to your door. Order today and you’ll have your MxL8321x in hand by tomorrow morning for instant integration.
See the video: