USB to RS485 Adapter

I needed to interface PC to some RS-485 test circuits, so I decided to try this cheap USB to RS485 Adapter – Black + Green adapter for that. I selected this specifically because of the cheap price (it is considerably cheaper than anything else I have seen for the same purpose). There should not be any reason why you could not make a good adapter cheaply? Manufacturing of USB-RS485 adapter should not cost more than making USB-RS232 adapter (the difference is basically just changing the line driver IC and there is not much price difference in them between RS-485 and RS-232).

USB to RS485 Adapter – Black + Green adapter is a simple adapter with USB connector on other end and screw terminal for RS-485 signal wires. The terminal for signals is well marked: one pin has D+ and A letters in it; the other pin has D- and B letters in it.

The device promises automatic data flow control technology (automatic identification and control data transfer direction) like many modern RS485 adapters have. The device supports multipoint communications, standard RS485 feature,  allowing connecting up to 32 RS485 interfaces to this converter. The device promises to support 300-9216000bps baud rate and automatically detect the serial data rate signal. The device promises to TVS tube protection against over-voltages and USB self-recovery protection.

I first tried to connect this to my old Windows Vista PC. According the data it should work on it. No success with first trial on vista: no driver found. Windows asked for driver installation CD, but I only got the device and no driver CD. Searching for computer for driver did not find suitable driver. I had earlier installed USB-RS232 adapters made with FTDI and PL-2303 chips, so this product I had used something else. The device did not come with any documentation and web page did to tell tell where to download drivers (or which chip was used), so I was a little bit out of luck in finding the driver.

I decided to try it in another computer. This time the computer was running Windows 7. The device was identified as USB-SERIAL HC340 and Windows 7 found driver from Windows Update without problems. Now the device showed on TeraTerm as COM4: USB-SERIAL CH340 (COM4). Things worked and I had found the information on chip used in this adapter: CH340.

With chip name I could easily find that driver for older Windows versions was available from chip manufacturer CH340 page and at DriverGuide. I decided to download the driver directly from manufacturer. When I downloaded the driver and installed it, things worked well with Windows Vista PC as well.

I tested the communications against STM485S RS232-RS485 converter. First I had some problems in the communications, but they turned to be a bad connection on the bus wire. When everything was properly wired the communication worked well. I tested different baud rates from 1200 bps to 115200 bps (the highest speed STM485S RS232-RS485 converter supports) and the communication worked. I could send data nicely from computer RS-232 port through STM485S RS232-RS485 and USB to RS485 Adapter – Black + Green adapter to USB. The automatic data flow control technology seemed to work well. Adapters transmitted when they should, and whatever they sent was received by the other end (and not echoed back to transmitter).

Net take a look at what is inside USB to RS485 Adapter – Black + Green adapter:

 

As you can see the main components in the device are 74HC00D (TTL logic IC 4xNAND), MAX485 (RS-485 driver IC from Maxim), one large IC with no marking and a clock crystal without markings. From the previous test we can conclude that the large IC without markings is the CH340 IC that does USB-serial conversion.

The circuit board was glued to the bottom on the case, so I could not easily look what is under it (I expect that there is not anything interesting there worth to risk breaking the device.) The description on dx.com page mentions TVS tube protection, but I could not see any such component on the circuit board, so I expect that the product description is not entirely correct in the protection issue: There does not seem to be any protection between outside connections and and MAX485. MAX485 itself is short-circuit current limited and are protected against excessive power dissipation. The MAX485 receiver input has a fail-safe feature that guarantees a logic-high output if the input is open circuit. The receiver will accept voltages from -8V to +12.5V and is ESD protection up to ±15kV.

The RS-485 input is not terminated, but there is pull-up and pull-down resistors to keep the RS-485 line at well defined state when transmitter is turned off (there is 2.2 kohms from D+ to +5V and 2.2 kohms from D- to ground).

What I would have liked on the product would have been maybe better protection on the RS-485 port and also that signal ground would be available on screw terminal (so I could connect it when needed).

The verdict is that this product is cheap and seems to work pretty much as promised (except that it does not seem to have the over-voltage protection mentioned on product description). This product proves the theory that it is possible to make a well working USB-RS485 adapter cheaply.

If you need to have more features, you might to turn to more expensive options, from which most promising looks to be this FTDI chip based module or this USB 2.0 to RS-485 Serial Adapter Converter. I plan to interface next the RS-485 signal to Arduino with TTL to RS485 Module for Arduino.

11 Comments

  1. Ethernet Wire says:

    Nice Usb I also have a lot of problems when it comes to drivers lol

    Reply
  2. Tomi Engdahl says:

    DX seems to have added a new USB-serial converter that can do many things including RS-485, looks somewhat interesting.

    6-in-1 Multifunction USB 2.0 to CP2102 TTL RS485 RS232 6-Pin Module Serial Converter – (3.3 / 5V)
    http://dx.com/p/6-in-1-multifunction-usb-2-0-to-cp2102-ttl-rs485-rs232-6-pin-module-serial-converter-3-3-5v-304669?r=8527370

    Reply
  3. Tomi Engdahl says:

    Understanding RS-485 passive fail-safe biasing
    http://www.edn.com/design/analog/4442598/Understanding-RS-485-passive-fail-safe-biasing-?_mc=NL_EDN_EDT_EDN_weekly_20160825&cid=NL_EDN_EDT_EDN_weekly_20160825&elqTrackId=984125dee6db498f92125f3d6ff1ebd4&elq=10bc8150a4de4c878cd07ccabbc27c00&elqaid=33591&elqat=1&elqCampaignId=29365

    With RS-485 networks, there are periods of time when no driver is actively driving the bus, such as when one driver relinquishes the bus to another driver. During this time, the termination resistors collapse the differential bus voltage to 0V, which is an undefined input level for many RS-485 receivers. Faced with this undefined input, a receiver might output the wrong logic state or worse yet, it might oscillate. The oscillation may be interpreted as an endless stream of message start bits, causing the controller to waste valuable bandwidth trying to service these phantom messages. Fail-safe bus biasing is one way to alleviate this problem.

    Passive fail-safe biasing is accomplished through resistor networks of pull-up, termination, and pull-down resistors whose voltage divider action provide a differential dc bus voltage, VAB, when no driver is actively driving the bus

    Reply
  4. gaoodgle.com says:

    Thanks on your marvelous posting! I genuinely enjoyed reading it, you happen to be a
    great author. I will make sure to bookmark your blog and may come back later
    on. I want to encourage you to ultimately continue your
    great work, have a nice weekend!

    Reply
  5. H Amir says:

    Thank you, this article solved my problem with find driver

    Reply
  6. stavros says:

    Good day i am cctv installer in Athens Greece
    i have to connect
    a HIKVISION DVR DS-7216HQHIK1 with USB input for keypad
    and
    a HIKVISION DS 1003KI KEYPAD CONTROLLER with RS485 Half-duplex
    Baud Rate : 12~19200bps

    what module converter do you recoment ?

    what cost and how soon you ship out .

    Reply
  7. Antonio says:

    Thanks for the post. This adapter was detected by my Linux Ubuntu Xenial as QinHeng Electronics HL-340 USB-Serial adapter and the kernel automatically loaded ch341 module. It works, even on an Oracle Virtual Box Windows XP with the proper driver loaded (CH341SER). The only mod I did was to install a ground wire running from the USB connector shield to the ground of the target circuitry. TX control by RTS/DTR was found working as it should.

    Reply
  8. Wolf_ says:

    Hi,

    One question that I cant figure out. I dont have any experience with modbus and RS485.

    I have order several of thouse USB to RS485 adapter (haven’t got them yet). So to my question. I have a RTU modbus slave I liked
    to communicate with. Is it enouhg to connect to wires between my USB adapter and modbus slave (TX and RX)?. What about the resistance that should be in the loop of a RS485 communication? Is this inside the USB adapter?

    Reply
    • Tomi Engdahl says:

      Typically in RS-485 loops the adapters do not have line termination in them (unless on same cases they have switches to turn line termination on/off).

      The RS-485 line is typically terminated with 110-120 ohms resistance on both ends of the line (on short lines you might be able to live with termination on one end or even no termination sometimes).

      Reply
  9. Tomi Engdahl says:

    Hacker Dictionary: RS-485 Will Go The Distance
    https://hackaday.com/2022/04/05/hacker-dictionary-rs-485-will-go-the-distance/

    RS485 is a communication standard that should be part of the advanced hardware hacker’s arsenal; it’s not commonly encountered, but powerful exactly when you need it. It’s a physical layer interface for wired communications that uses a single differential pair for noise immunity, has good long-distance properties, and allows many connections to a single bus. Because of that, you will encounter it in security systems and even cameras, wired sensor networks, DMX512 lighting and all sorts of industrial electronics. For our hobbyist goals, you can absolutely use RS485 to build your home (or room) automation system, or a relatively large robot – without all those worries that wireless brings.

    Reply

Leave a Comment

Your email address will not be published. Required fields are marked *

*

*