Search code examples
serial-portusbusbserialdata-collection

Interacting with multiple RS232 devices through a USB hub


I am working on a project that requires pulling and sorting data from ten scales. Each scale has an RS232 serial port and I am wondering about the best way to connect them all to a single computer. It seems that there are two options to connect these scales to a computer:

  1. 10 RS232 to USB adapters into a single USB hub

  2. RS232 hub with 16 RS232 ports and 1 USB port

It seems that option 1 is less expensive so I am wondering if there are any compelling reasons to get the 16 port RS232 hub. I will be using Python in Windows to get data from the scales.

Is anyone able to shed light on what potential issues may arise from either of these approaches and why one may be preferred over the other.

Thanks in advance!

Some additional notes: I need each scale to be easily identifiable as they will each be used for a separate measurement.


Solution

  • Just for the record, and anyone else who might look for this information - Here are two potential issues to consider:

    COM port number assignment

    • If you use 16 independent USB-to-RS232 converters, you cannot rely on the COM enumeration, unless you do some extra tweaks.
    • If you have one converter box with 16 RS232 ports, this is usually an industry grade product and the drivers will make sure the COM ports are assigned in chronological order. E.g RS232 port 1 -> COM4, RS232 port 2 -> COM5, RS232 port 3 -> COM6, and so forth.

    Performance / Stability

    • If your option "10 RS232 to USB adapters" was less expensive, I assume these are standard consumer plugs, where you usually don't know which chipsets they use, or even worse, chipsets might vary within a batch. Usually the electrical characteristics (e.g. RS232 line levels) and overall reliability are inferior to industrial solutions. Handshake signals, if required, are sometimes not supported correctly.

    • Plus you might or might not run into driver stability issues, even if its just because the creators of this consumer product driver never assumed you'd be using more than two of these on a single computer. (Admittedly I have seen such side effect issues last time around twelve years ago, so I find it unlikely in 2015 to happen. But for any "no-name" plug, there is just no way to know for sure.)