Comparison

CH340G vs CP2102N

The two most common USB-serial chips on Arduino clones and ESP boards.

Almost every inexpensive development board has a USB-UART bridge, and most of the time it is one of these two: the CH340G from WCH or the CP2102N from Silicon Labs. Both show up as a virtual COM port on the computer and break out TXD, RXD and the modem lines RTS and DTR, which Arduino and ESP boards use to enter the bootloader automatically.

They differ clearly when designing a circuit. The CH340G comes in an SOIC-16 package and needs an external 12 MHz crystal on XI and XO. It runs at 5 V or 3.3 V; at 5 V the V3 pin needs a 100 nF capacitor, at 3.3 V V3 is tied to VCC. The CP2102N comes in a small QFN package, has an internal clock and its own voltage regulator that can be powered straight from VBUS. It supports higher baud rates and can be configured with the Silicon Labs tool, for example with a custom serial number or product name. The CH340, on the other hand, is very cheap and also available without a crystal as the CH340C.

Because package and pin count differ, the table matches the pins by signal: D+ and D−, TXD and RXD, the modem lines and the supply.

Not pin-compatible

The pinouts differ. Use the tables below to rewire the signals.

Overview from the pinout data

PropertyCH340G USB to Serial UART Bridge ControllerCP2102N USB-to-UART Bridge Controller
ManufacturerWCH (Jiangsu Qinheng)Silicon Labs
TypeChipChip
Compared pinoutSOIC-16 Top ViewQFN28 Top View
Pins1629
Supply pinsV3, VCCVDD, VREGIN
Ground pins12
InterfacesUART, USB–

Interface pins

UARTCH340G USB to Serial UART Bridge ControllerCP2102N USB-to-UART Bridge Controller
TX2 · TXD26 · TXD
RX3 · RXD25 · RXD
RTS14 · RTS–
CTS9 · CTS–
USBCH340G USB to Serial UART Bridge ControllerCP2102N USB-to-UART Bridge Controller
D+5 · UD+4 · D+
D−6 · UD-5 · D-
VBUS–8 · VBUS
ID––

Pin number · pin name. "+n" = further pins with the same function.

Pin by pin

The pins are numbered differently, so they are matched by signal: 12 signals exist on both.

SignalCH340G USB to Serial UART Bridge ControllerCP2102N USB-to-UART Bridge Controller
GND1 · GND3 · GND
TXD2 · TXD26 · TXD
RXD3 · RXD25 · RXD
UD+5 · UD+4 · D+
UD-6 · UD-5 · D-
CTS9 · CTS23 · ~CTS
DSR10 · DSR27 · ~DSR
RI11 · RI2 · RI / CLK
DCD12 · DCD1 · ~DCD
DTR13 · DTR28 · ~DTR
RTS14 · RTS24 · ~RTS
VCC16 · VCC6 · VDD

Only on CH340G USB to Serial UART Bridge Controller

4 · V37 · XI8 · XO15 · R232

Only on CP2102N USB-to-UART Bridge Controller

7 · VREGIN8 · VBUS9 · ~RSTb11 · ~SUSPENDb12 · SUSPEND13 · CHREN14 · CHR115 · CHR016 · GPIO.3 / WAKEUP17 · GPIO.2 / RS48518 · GPIO.1 / RXT19 · GPIO.0 / TXT20 · GPIO.621 · GPIO.522 · GPIO.4EP · GND

Verdict

For low-cost boards that are easy to hand-solder, the CH340G (or the crystal-less CH340C) is practical. For compact designs, high baud rates and stable driver support, the CP2102N is the more solid choice.