CH340 is a very common USB-to-serial interface IC for different purposes. With Arduino, ESP, or even adding a USB-serial port with any microcontroller this IC is a kind of legend now. So, let’s check it out!
Disclaimer:
Handling electricity carries inherent risks. It’s essential to have the appropriate skills to manage it safely. Proceed at your own risk, as the author disclaims responsibility for any misuse, harm, or errors. All content on this website is unique and copyrighted; please avoid unauthorized copying. While most articles are open-source for your benefit, feel free to use the knowledge provided. If you find our resources helpful, consider purchasing available materials to support our work.
For assistance or guidance, leave a comment below; the author is committed to helping. Some articles may contain affiliate links that support the author with a commission at no additional cost to you. Thank you for your understanding and support.
Table of Contents
What is CH340:
CH340 is a USB bus conversion chip, it can realize USB to UART interface or USB to printer interface. In serial UART mode, CH340 provides a common MODEM liaison signal, used to expand the UART interface of the computer or upgrade the common serial device to a USB bus directly.
Download: CH340 Datasheet
Download: CH340 Driver for Windows
Download: CH340 Driver for Mac
Download: CH340 Driver for Linux
CH340 with Arduino:
For using with Arduino, you may find different circuits. But I’ve experienced faults with most of them. But there is one circuit, that you can follow blindfolded.
Many designs suggest using a resistor in series with the TxD and RxD pins between CH340 and Arduino. But those are really problematic. And I’ve faced many problems with those. But this circuit has no faults. Additionally, if you need to use LEDs, simply use them in the following configuration:
Notes: When you are using with Arduino, make sure the VCC of CH340 & Arduino is the same, and in most cases it’s 5V.
CH340 with ESP32:
When using with ESP32, it is little different because of ESP’s EN pin characteristics. In this case, the tested circuit is this:
Here Q1 & Q2 can be transistors, but with transistors, I experienced failure in some cases. But using MOSFETs, it never failed. But, one very important thing to keep in mind. When you are using CH340 with ESP32, make sure that the VCC is 3.3V.
For USB to Serial conversion:
Simple, use this diagram without any tension.
You can read my other articles too:
- Sine wave generation using dsPIC
- Internal Temperature of STM32
- PWM Generation with STM32
- STM32 as USB Device
If you still have problems installing the driver in Windows / Mac / Linux, follow this link.
End:
This article was written from my bad experience with CH340 and following useless circuits from online. Those killed my time and lots of production loss. So, here you get all tested and working diagrams which will save your time and money. See you soon, thanks.
For Professional Designs or Help:
0 Comments