USB/Ethernet to 4-port isolated serial converter project  - Page 1
Forum section: electronics / projects

author: Georgy.Moshkin
author_rank: Frequent Contributor
timestamp: November 22, 2023, 05:52:22 am
content: I have been working on universal serial converter project in 2022. An STM32H7xx-based project which provides 4 to 8 serial ports with Ethernet and USB connectivity. Main problems with using microcontroller-based USB connection are: 1) drivers, 2) there are no enough USB endpoints for interrupts to support all control signals on every port (DCD, DTR, DSR, RTS, CTS, RI). Recently I decided to reboot this project, and use FTDI/WCH chip instead to ensure wide compatibility.What problem does this serial converter will solve?1) Provide multiple serial ports with port-to-port isolation. Isolated converters are more resistant to electrostatic discharge and more friendly for industrial devices connection. I have worked with many USB serial products, and they always have problems with ESD and require re-connecting, especially during the winter dry air season.2) Lower cost than existing isolated converters. Supporting all 9-pins (DCD, RX, TX, DTR, DSR, RTS, CTS, RI + ground)3) Encryption for Ethernet to serial converter4) Possibility to create serial bridge over Ethernet which preserves timings on all signal lanesOverall, this should be a converter that simply works better than any multi-port converter of similar or higher price.4-port USB to Serial (RS232/RS485) isolated converter structure4-port Ethernet to Serial (RS232/RS485) isolated converter structure- Instead of optocouplers, I use single 2-channel digital isolator with stm32-based serializer/deserializer. There are pros and cons, many depends on firmware implementation. Digital isolator provides 25 Mbps (25/5=5  after serializing). But the speed is limited by RS232 transceiver chip. I thought about using optocouplers: 6N137, ps9121, but didn't liked them for multiple reasons. E.g., I've replaced a lot of optocouplers during repairs, stock looked not very good in 2022, digital isolators are more digital-friendly.- Maybe there are other serial devices products that I should target. I did some research and it seems that 4-port/8-port usb to serial converters and ethernet serial servers are the best candidates for replacement product design.

author: NiHaoMike
author_rank: Super Contributor
timestamp: November 22, 2023, 12:20:32 pm
content: What about just use individual ESP32s for each port? Then you just need isolated power which can be provided using off the shelf USB chargers.

author: madires
author_rank: Super Contributor
timestamp: November 22, 2023, 02:54:06 pm
content: For the network converter you could implement RFC2217 which is commonly supported.

author: Georgy.Moshkin
author_rank: Frequent Contributor
timestamp: November 22, 2023, 10:45:28 pm
content: Quote from: NiHaoMike on November 22, 2023, 12:20:32 pmIt may be an interesting option. But isolators are still required, because we need port-to-port isolation as well for such converters. Otherwise something like ADUM4160 would be enough.

author: NiHaoMike
author_rank: Super Contributor
timestamp: November 23, 2023, 05:01:30 am
content: The data isolation is provided by Wifi.

author: fchk
author_rank: Frequent Contributor
timestamp: November 23, 2023, 08:39:02 am
content: I'd rather use two ADuM 14xx 4ch digital isolators per channel than messing around with aditional STMs for serial-parallel conversion. Avoiding the serial-parallel conversion reduces latency and the overall complexity of the project, and in manufacturing you only have to program only one uC, which is a huge benefit when the quantities get higher.The STM32 has enough power to to TCP/IP itself, so an Wiznet chip is not what I would choose. A simple RMII transceiver like LAN8742A is more cost effective. And the STM32H7 can easily be downgraded to an STM32F4, which also has got better availability.For galvanic isolation being in an 240V country I usually use parts certified for 5000V and at least 7.5mm of creep distance. This requires SOIC16W packages for the isolators and suitable packages for the DC-DC modules.

author: Georgy.Moshkin
author_rank: Frequent Contributor
timestamp: November 29, 2023, 03:40:57 pm
content: very helpful comments!1. I decided to keep 25Mbps isolator for tx/rx and use cheaper 120Kbps isolation for DCD, DTR, DSR, RTS, CTS, RI. Idea is to use 921600bps capable rs232 transceiver, this will guarantee 921600bps rate on tx/rx pins, but other pins toggling speed will be limited to 921600/8=115200bps. Thus, full compatibility for 115200bps and below and good compatibility up to 921600bps. Are there any devices that toggle additional signal lines at same rate as tx/rx?2. I am looking into ft4232 datasheet and puzzled by schematic that uses external 1.8v power instead of "highly integrated 1.8v ldo". I can imagine that 1.8v may be already available in some designs. Less heat from integrated LDO? Or maybe to achieve less power consumption when using external switching 1.8v regulator?3. Disassembled few serial converters and observed that they use 200,000bps transceiver chips (typical performance parameter from datasheet), but device is advertised as 460,800bps. Thinking about checking it on a scope. I found it interesting.