Fork me on GitHub

Project Notes

#510 USB to RS-232 Adapter

Building a USB to 3-wire RS-232 adapter with the CH340G and MAX3232 chipsets.



This project implements a USB to 3-wire RS-232 adapter by combining two chips and their supporting components:

  • CH340G USB to TTL UART
  • MAX3232 TTL to RS-232

As a cheat, I’m using a MAX3232 adapter module - widely availably from aliexpress/ebay sellers. The module connects two TTL to RS-232 lines with all the supporting capacitors per the datasheet.


I’ve sketched the actual layout of the module here. I didn’t measure all the capacitors, but I assume they are 100nF or thereabouts.





For a prototype, I’m using a CH340G on a SOP-16 DIP adapter, and a MAX3232ESE adapter board. Here’s the protoboard layout I used:


To complete the build, I’ve used a mini USB connector on one end, and a female DE-9 on a short IDC strip with connector to the board - so I could for example, swap it with a male DE-9 or other connector.


Connecting with Screen

NB: the CH340G may require drivers to be installed - see [LEAP#406 UsbUartCH340G] where I covered this in detail.

I’m using MacOSX, so (as with Linux) the most handy console utility is screen.

The device I am connecting to for a test requires 9600 baud, with 8 data bits, no parity and 1 stop bit. The CH340G adapter was connected on /dev/tty.wchusbserial1420 device, so a screen session is started with the command:

$ screen /dev/tty.wchusbserial1420 9600,cs8,-parenb,-cstopb,-hupcl

…and communication is up and running without any problem:


Credits and References

About LEAP#510 RS232SerialUSB
Project Source on GitHub Project Gallery Return to the LEAP Catalog

This page is a web-friendly rendering of my project notes shared in the LEAP GitHub repository.

LEAP is just my personal collection of projects, usually involving an Arduino or other microprocessor in one way or another. Some are full-blown projects, while many are trivial breadboard experiments, intended to learn and explore something interesting (IMHO!).

The projects are usually inspired by things found wild on the net, or ideas from the sources such as:

Feel free to borrow liberally, and if you spot any issues do let me know. See the individual projects for credits where due. There are even now a few projects contributed by others - send your own over in a pull request if you would also like to add to this collection.