Last update to this log: 13.12.2018

Added link to a small USB UART adapter by @Jan--Henrik 


What's this chip, the CH330N?

It offers USB to UART function and allows to connect your microcontrollers "directly" to USB for programming and communication with your PC or phone.

Features

What are the available footprints?

It does come in a standard SOP-8 case. Pin spacing is 1.27mm. Dimensions (Lx Wx H measured) of the real part are: 4.9x 6.1x 1.6mm

Pinout

Pin functions are as follow:

Pin
NameFunctionI/O
1UD+
USB Data + (USB cable color white)
I/O
2UD-
USB Data - (USB cable color green)
I/O
3GND
Ground
-
4RTS#
request to send
O
5VCC
positive power supply (3.3 or 5V)
I
6TXD
Data out from the chip
O
7RXD
Data into the chip
I
8V3
- If VCC is 5V, there's 3.3V out on this pin.
- If VCC is 3.3V, you need to connect it to VCC and
decouple it with 100n to GND. See below for details!
I (O?)

The "mysterious" pin V3

There's been debate on what this pin does. I did test it with the following configurations.

VCC = Vusb = 5.05V

Both USB data cables are connected. Here's what I found out, when V3 is

  1. left floating: V3 measures 3.222V in this configuration.
  2. decoupled with 100n to GND: 3.225V
  3. connected to VCC (3.3V): to be found out (might short it out, tested later)
  4. connected to 5V: to be found out (might short it out, tested later)

Idle power consumption in this configuration is 5.61mA when pin V3 is decoupled with 100n to GND. When left floating, power consumption is 5.58mA.

At VCC = 3.3V idle current consumption with USB data cables connected is 3.65mA.

When USB data+ and data- are not connected, the chip draws 0.09mA. RxD measures 5.05V (= VCC), TxD is the same. This is consistent with the datasheet. At 3.3V the idle current consumption without USB data lines connected is: 0.014mA.

VCC = 3.3V

  1. left floating: to be found out
  2. decoupled with 100n to GND: to be found out
  3. connected to VCC (3.3V): to be found out
  4. connected to 5V: to be found out (might short it out, tested later)

Current delivering capability of pin V3

For the following tables I used resistors to simulate a current-draw from pin V3 to GND. The current is the total current (0.09mA IDLE + I_V3)

VCC = 5V

Left open, the voltage is 3.22V.

Resistor V3_to_GND (R)
I_total (mA)
V_V3 (V)
180 (5%)
18.063.205
150 (1%)
21.573.203
120 (5%)
27.313.201
100 (1%)
32.053.200
62 (1%)
51.83.190
33 (1%)
88.82.900
24 (5%)
1032.430

VCC = 3.3V

When VCC is 3.3V you can not draw much current from this pin. The datasheets advises to connect V3 to VCC in this configuration. I think the chip doesn't bypass the internal voltage source but the voltage offset is too small to deliver any serious current. I did a few tests anyway:

Resistor V3_to_GND (R)I_total (mA)V_V3 (V)
390 (5%)
8.2343.140
330 (5%)
5.5723.106
200 (5%)
15.0812.960
150 (1%)
19.172.844

Conclusion

The tables above shows what you could expect to draw from the internal 3.3V source when powering the chip off of 5V. A safety-rule would be to not draw more than 50mA from it, as the voltage drops quite a bit going much higher than that. Powering the chip off of 3.3V, you're expected to connect V3 to VCC.

Sample circuits

The following circuits have been tested by me. They do work. Details under the corresponding headline.

Standard (datasheet) circuit

The standard circuit is as follows:

simple circuit, R6 can be shorted or omitted. I like to add a series res. here for current measuring / current limiting

It is pretty basic and features no protection whatsoever. Rx and Tx are on a 5V level here, as the CH330 is powered with 5V! So do not use this circuit, if your micro's Rx/Tx are not 5V-tolerant!

VCC = 3.3V, USB-power not connected

Here it gets interesting. I just pushed the datasheets and rules of good design aside and tried the following:

chip powered by external 3.3V, USB power not connected

The chip is powered by external 3.3V while the 5V from the USB is not connected. I just connected GND and D+/D-. Voltage levels at Rx and Dx of the CH330N are 3.3V then. Data transfer from the CH330n to an FTDI 232RL does work at 256000BAUD with no problems.

Programming an Arduino Pro Mini 3.3V, 8Mhz

The RTS pin is pulled down by the Arduino IDE, when data transfer starts. This signal needs to pull the reset of the Atmega328P down. The Arduino Pro Mini boards have a DTR connection, which serves the same purpose.

Uploading programs is as easy as using an clone Arduino Micro which usually come with an CH340G.

Power consumption and sleep modes

In this section I'll go into detail on how much current the chip draws in each state. This will include the two voltage levels of 5V/3.3V, if the USB data lines are connected etc.

First, we'll look into the details when powering the chip off of 5V:

FAQ

Articles / further reading