This is a project to create a low cost and versatile USB to serial adapter board based on the CH340G, with selectable (via slide switch) power and IO voltages (1.8, 2.5, 3.3, and 5V for both). Input and output protection is also provided via PTC fuses and series resistors + IO buffers.
List of Features
- Supported Baud Rates: 50, 75, 100, 110, 134.5, 150, 300, 600, 900, 1200, 1800, 2400, 3600, 4800, 9600, 14400, 19200, 28800, 33600, 38400, 56000, 57600, 76800, 115200, 128000, 153600, 230400, 460800, 921600, 1500000, 2000000, 3000000 (not officially listed in datasheet, but tested functional)
- Output Voltage (PWR pin): 5V, 3.3V, 2.5V, 1.8V
- Output Current (PWR pin): 500mA
- I/O Voltage (Tx pin): 5V, 3.3V, 2.5V, 1.8V
- Input Voltage (Rx pin): 1.65 to 5.5V
The full board schematic is shown in the image below. The circuitry contains basic rBOM for the CH340G chip, 2 adjustable LDOs with slide switches for voltage selection (feedback ground side resistor selection), and buffers/level translators.
The PCB is laid out with 2 headers, one for the main Tx/Rx/GND/Pwr outputs, and another for the less commonly used CTS/DSR/RI/DCD//DTR/RTS/R232 signals and GND. 4 M3 mounting holes are available in the corners of the board, with separation of 0.85" on the short side, and 1.6" on the long side.
The board was then manually panelized into a 6-up board to fit within the 100x100mm "$2" PCB size for fab by JLCPCB.
UART SI was measured using a 100MHz oscilloscope (Rigol DS1102E) at a 0.1" header. Signal shows sharp edges and correct IO voltage levels. No measurable crosstalk (down to 10mV) was detected on the adjacent Rx line during Tx.
The CH340 12 MHz crystal output was measured, which shows a relatively clean sine wave with little visible distortion.
This is the first revision of the USB to serial adapter board.
- None known
- Add ESD diodes to inputs/outputs and USB lines (todo)
- None known
- Here is the Eagle schematic file for the USB to serial adapter board v1.0: http://rev0.net/Files/adp_v10.sch
- Here is the Eagle board file (1-up) for the USB to serial adapter board v1.0: http://rev0.net/Files/adp_v10.brd
- Here is the Eagle board file (6-up) for the USB to serial adapter board v1.0: http://rev0.net/Files/adp_v10_panels.brd
- Here are the gerber files (6-up panel) for the USB to serial adapter board v1.0: http://rev0.net/Files/adp_v10_panels.zip
The enclosure for the USB to serial board was created in Fusion 360 and is made up of x pieces which can be 3D printed and assembled with M3 screws.
Here are the Fusion 360 files for the USB to serial board enclosure: http://rev0proto.com/files/tbd.zip
Total Project Cost
|Slide switch (SP3T)||$0.21||LCSC|
|NL17SZ125 Buffer/Level Shifter (qty 2)||$0.07||LCSC|
|12 MHz Crystal||$0.05||LCSC|
|500mA 1206 PTC (qty 2)||$0.05||LCSC|
|rBOM (passives) (under $0.08)||$0.10||LCSC|
|Total Price (Per board, qty. 60, incl. extras from MOQ)||$1.09|