Sponsored links

Make a circuit using CH340K for ESP32 writing (failed).

Sponsored links

CH340K

In order to write the ESP32 from the Arduino IDE, a USB serial conversion IC is required. This time I would like to make a circuit using CH340K as a USB serial conversion IC.

Sponsored links

NodeMCU method

Writer Circuit

Here is the circuit for writing ESP32-DevKitC. It is a NodeMCU type circuit consisting of a CP2102 USB serial converter IC and a transistor that generates signals to enter the write mode using the DTR and RTS signal lines.

The CP2102 is very reliable and can communicate at high speed, but it has a small package and a large number of components, so I looked for a cheaper and simpler component.

CH340K

In the CH340 series, which is often used for USB serial conversion of inexpensive Arduino compatible products, I found a part called CH340K that has DTR and RTS signals used for writing with ESP32.

It's a 10-pin ESSOP package and a 1 mm pitch package that I've never heard of. I bought it immediately.

CH340K

On the left is the commonly used CH340C, and on the right is the CH340K we purchased. It is small, about half the size of a 16-pin SOP.

CH340K writer circuit

It's very simple. I will use CH340K for the SUB serial conversion and use BSS138, a MOS-FET that can be turned on and off at low voltage, instead of a transistor, for the write signal generation circuit. By using MOS-FETs, there is no need to put in a resistor to connect to the base of the transistor, so I decided to try it to make it smaller.

With this, a writer circuit can be realized using only CH340K and BSS138.

Soldering

Mount the USB connector board, CH340K, and BSS138 on the double-sided universal board.

Soon the circuit was complete.

Embedding

Replace the ESP32-DevKitC write circuit with the circuit we have created. To do this, we need to remove the CP2102 that is originally attached to it.

So I used hot air to locally heat only the CP2102 and removed it with tweezers.

Hot air is a good tool to use if you often have to repair multi-pin devices, as it can easily remove them.

I was able to replace the ESP32-DevKitC's write circuit with the CH340K's circuit.

Problem occurred

Not recognized

Normally, as soon as you connect the USB, it should be recognized and appear in the list. On a mac, in a terminal

ls -l /dev/tty.*

After executing the above, the recognized USB serial ports will be displayed. However, CH340K is not shown. I connected another ESP32-DevKitC to test it out.

/dev/tty.usbserial-0001

It is recognized as normal. Only CH340K cannot be recognized.

Installing the driver

Download the driver from the official website and set it up.

I completed the setup and rebooted. However, the symptoms are the same and it is not recognized at all.

When I look at the USB in the system information, it seems to be connected.

How about Windows

Windows recognized it fine without any drivers. When I try to write in Arduino IDE, I get a timeout error at the connection.

I tried to send and receive data with Teraterm, but no data was sent or received at all. It is recognized, but it does not seem to be working properly.

Like mac, I downloaded the driver installer from the official website and set it up. However, it did not work.

CH340K may not work

CH340K

Unfortunately, I could not get the CH340K to work properly on either mac or windows. I have no choice but to make a write circuit with CH340C.

Comments

Copied title and URL