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 ⚠️
Working with electricity involves serious risk. Ensure you have the necessary skills and take proper safety precautions before attempting any electrical projects. Proceed at your own risk — the author assumes no responsibility for any damage, injury, or issues resulting from the use or misuse of the information provided.
All content on this website is original and protected by copyright. Please do not copy or reproduce content without permission. While most of the resources shared here are open-source and freely accessible for your learning and benefit, your respect for our intellectual effort is appreciated.
If you find our tutorials helpful, consider supporting us by purchasing related materials or sharing our work — it helps keep the content flowing.
Need help or have questions? Leave a comment below — the author is always happy to assist!
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.
Liked this article? Subscribe to our newsletter:
or,
Visit LabProjectsBD.com for more inspiring projects and tutorials.
Thank you!
0 Comments