USB to RS-485 & DMX – First Look

In a recent post we interfaced a small DMX RGB LED Par Light with an Arduino Uno through a MAX485 module. In this post we will learn how to work with a compact USB to RS-485 Converter Module. This adapter is very useful in DMX and industrial electronics projects. Let’s get started!

USB to RS-485 Converter Module – Introduction

The USB to RS-485 converter module introduced pairs a MAX485 RS-485 transceiver chip with an FT232RL USB UART IC to convert a USB stream to RS-485. It supports various devices with RS-485 communication interface like a Programmable Logic Controllers (PLCs). Below are its features, copied from an online seller’s page.

  • Onboard chips: FT232RL & MAX485
  • Supports wide baud-rate of 300-9216000 bps
  • Can also be used as USB to TTL & TTL to RS485 Converter
  • Supports Windows 98, ME, 2000, XP, WIN7, Vista, Windows8, Windows10
  • No external power supply required (Powered via USB Port)
  • Supports multi-point communication
  • Each converter allows up to 32 RS485 devices to be connected

As you can see, the module is a very compact and ready to use piece of electronics. It performs the USB (Universal Serial Bus) to two wire RS485 (Two-Wire Half-Duplex) and vice versa conversion. The module holds an FT232RL USB UART IC with MAX485 to switch between the USB and RS-485 communication standards.

Note that the FT232RL is also linked to the transmit and receive enable inputs of the MAX485 to control the communication mode of the RS-485 transceiver. With the proper drivers (available for Windows, Mac and Linux) installed, the FT232RL will enumerate as a virtual COM port (VCP) – See below.

Note:A COM Port will only be assigned to the USB to RS-485 converter module if the correct driver for the module has been installed successfully. VCP Drivers Download Link https://ftdichip.com/drivers/vcp-drivers/

To put it simply, the FT232RL is configured in the standard way as USB to UART chip, and it drives the MAX487 RS-485 transceiver chip while the direction is controlled by the TXDEN pin. The USB port is a standard USB-B female connector and the RS-485 connections are made by a 3-way screw terminal connector. The Power status and Tx/Rx states are indicated by three onboard LEDs.

The 4 jumper caps (5V/RX/TX/GND) simply link the USB interface to the RS-485 interface. If the jumper caps are removed, the FT232RL circuitry may be used as a standalone USB-TTL interface, and/or the MAX485 circuitry as a TTL-RS485 interface.

As an aside, RS-485 is simply an electrical interface (not a communication protocol) commonly used in a broad range of computer and automation serial communications systems. Here, the electrical signaling is balanced, and multipoint systems are naturally supported. If you’re not well informed about RS-485, now it would be a good time to read my previous blog posts on the RS-485 and DMX themes available elsewhere in this website.

Getting back to the integral electronics of our module, I hope the following partial system diagram clarifies things better!

— Termination & Bias Resistors

You can see two 4.7KΩ resistors on the A&B differential lines on the module. These bias resistors (RB1-RB2) maintain the lines to a known state when data is not being transmitted. There is a single 120Ω termination resistor (RT) between the A&B differential lines. Finally, there are three transient voltage suppressor (TVS) diodes on the A&B lines as a protection circuitry for transient immunity (https://www.planetanalog.com/safeguard-rs-485-links-against-electrical-transient-threats/ ).

Note: The 120Ω resistor is only required if the module is the first or last device in a multi-drop RS-485 system, to meet RS-485 termination requirements. So, you may need to remove it in certain situations.

Likewise, in some cases when termination is enabled, unexpected zero bytes can be received at the beginning or end of a message. To resolve this, bias resistors are often added to the Data+ (A) and Data- (B) lines to ensure that the lines go to an idle state when no node is driving data onto the bus. At this point, remember, only one set of bias resistors should only be used on the bus. So, the bias resistors should be removed from the module if another node on the bus is already providing the bias. Unfortunately, this module does not have jumpers for easy switching of the termination and bias resistors 😥

USB to RS-485 Converter – Isolation Thoughts

It’s straightforward to convert the RS-485 line to the unbalanced UART interface using a dedicated IC. The simplest solution (as the one discussed here) does have reasonable protection features but is not galvanically-isolated ⚠

Keep note, many of the users did not like the idea of ​​using a converter without galvanic-isolation especially in an industrial environment.

While doing more research for meliorations, I came across several design ideas. The first one is based on the ISO308x series isolated 5V full-and half-duplex RS-485 transceivers from Texas Instruments (https://www.ti.com/lit/ds/symlink/iso3088.pdf). Below you can see an “Isolated RS-485/RS-422 Arduino Shield” centered on the ISO3080 chip (https://www.rhydolabz.com/wiki/?p=19270).

Another chip that seems perfect for this application is the ADM2882E from Analog Devices (https://www.analog.com/media/en/technical-documentation/data-sheets/adm2582e_2587e.pdf). This chip is a signal and power Isolated RS-485 Transceiver with ESD protection, and you can see a related project here https://bikerglen.com/blog/p1am-100-isolated-rs-485-shield/

Note that the ADuM1201 can also be picked to design and build a budget isolated converter. Analog Device’s ADuM1201 is an automotive grade dual-channel digital isolator tailored for efficacious bidirectional communication (https://www.analog.com/media/en/technical-documentation/data-sheets/ADuM1200_1201.pdf).

Shown below is the partial snap of a pretty great “ADuM1201 Isolated USB to RS-485 Adapter” schematic once borrowed from the web (https://i0.wp.com/olegkutkov.me/wp-content/uploads/2018/05 /rs485_v1_schematic.png). Thanks Oleg Kutkov!

USB to RS-485 Converter Module – Get to Work Now

After a short detour, we are now back in the mainstream! The following information will tell you how to use your USB to RS-485 converter module with common DMX LED fixtures and free Windows DMX applications.

The hardware setup is ridiculously simple and straight forward. After confirming the physical connection (see below figure), all you need is to go through the final step ie, simply begin running your favorite DMX application to test the entire setup.

Note: Try to keep the RS-485 bus as short as possible because long wires may add extra interference. You can use regular cat5e networking cable for the wiring but after twisting the A and B wires, it is not very crucial.

Coming to the software, Freestyler is a free lighting control DMX software used by many leading DJ’s, venues and lighting designers and supported by a vast network of users worldwide. Just click on this link http://www.freestylerdmx.be/ to download the latest release (Version 4.1.0 / Windows).

The “DMXControl 3” (https://www.dmxcontrol.de/en/downloads/file/208-dmxcontrol-3-2-1.html) is another wonderful DMX control software for the disco, stages and basement hobby room lighting (Latest version is 3.2.1 at the time of writing).

Note: DMX software tutorials are not included here due to the paucity of space, thus you need to spend enough time learning more about them!

Now It’s Simple!

As you might observed, professional DMX controllers are usually high-ticket equipments, so it may not be a happy buy for the average electronics hobbyist. Luckily, the DMX communication is fundamentally the same as the RS-485, therefore we can use any (readymade or homemade) USB to RS-485 converter/adapter to control DMX devices. Enjoy!

This is the inside view (image from web) of another cheapo USB to RS-485 dongle built around CH340G (http://images.100y.com.tw/pdf_file/34-WCH-CH340G.pdf) and MAX485 (https: http://datasheets.maximintegrated.com/en/ds/MAX1487-MAX491.pdf) ICs.

Going Further…

I have some hobby project ideas that include small lamps, displays and relays that can be controlled via RS-485. So, keep your RS-485 modules and accessories intact, because we have a lot to do. See you then!

Leave a Comment