Arduino Ch340g Troubleshooting, Fixing Errors and Drivers
by sainisagar7294 in Circuits > Arduino
2687 Views, 3 Favorites, 0 Comments
Arduino Ch340g Troubleshooting, Fixing Errors and Drivers
Solved errors: Sketch is not uploading to Arduino, stuck on uploading, programmer is not responding, Bootloader not working.
Supplies
Install Arduino IDE software in your PC.
Arduino Nano and Arduino UNO needed.
For connections: USB, Connecting wires, Breadboard.
Story:
Hello guys, When I am new to the field of electronics, Arduino Atmega328p is my first microcontroller. I don’t know how to program, use digital/ analog pins, interrupts and libraries. So, I bought Arduino UNO, Then I started learning Arduino IDE. After a few weeks, everything is understandable. Searching for a MCU board with a better form factor, I got Arduino NANO. This board has same MCU, clock and everything. A new Usb to serial programmer provided, that is named as CH340G. But Arduino UNO has 16U2 for this purpose.
Yes, I bought a clone board that costs me around $2. So, without installing ch341 drivers, I uploaded my first sketch. And this was the scene….
First, it complies the sketch successfully and then stuck when uploading, after 3-4 minutes I got error i.e. MCU Board is not responding or programmer is not responding.
After watching 2-3 YouTube videos and reading some articles. I installed the CH drivers. Link to them is here. That’s why I’m here, I want to give you full instructions to solve this problem of drivers and more.
Installing Process:
1) Download the drivers using link given above.
2) Extract the divers and install them.
Paste Ch341.SER Extracted Folder File to Arduino Driver Folder.
To Make Sure They Are Installed, Search Device Manager and See Ports Options.
Sometimes, Installing Process Can Be Affected by Antivirus Programs.
Stay Updated With Drivers.
Solving Troubleshooting After Installing Drivers, Software Troubleshooting:
So, now we can upload our sketch and use Arduino NANO. But in some cases, it will not work even after installing drivers and repeating the steps. The same problem is also with me. Then I search for the datasheet and found this.
About Crystal Oscillator
There are many varieties of these Usb to serial programmers. Our Arduino chip works on a clock of 16-20MHz. But CH340 works on 12MHz. Some of these tiny chips has inbuilt crystal oscillator like in case of CH340C, but these may cost a little bit more.
My Arduino NANO has CH340g with external 12MHz Smd Oscillator. So, I think everything is okay. Because it is same as in datasheet. So, I tried to upload sketch again and failed. After searching more in datasheets and web pages the same thing is given as before.
100% Fix- Using This Method
After some days, I got an idea to burn Arduino Uno bootloader in NANO. So, I connected Nano with my Arduino UNO using this schematic and burn bootloader. And this thing solved my problem, Here I am using Arduino UNO bootloader in NANO. I am very happy and curious to know why this thing is not work with NANO board directly.
Using UNO bootloader inside NANO board will limit the use of 2 analog pins i.e A6 and A7. Because smd package of 328P MCU has 2 extra analog pins.
Hardware Troubleshooting:
Mine is now working fine, but you can get hardware problems too. So here are some points I want to clear-
1) Make sure ch340g is powered, check using multimeter.
2) Check your chip variety and then, see for crystal oscillator.
3) Check for the capacitor between the DTR and Reset pin. If missing or damaged then change it.
4) Check for the 1k resistor between the TX and RX pins of Arduino Nano.
5) Check the 3.3 voltage on the Arduino Nano pin, if there is voltage on the pin then ch340 is in working.
This Video May Help You, Contains Full Instructions in Detail.
There are two videos, One in English and other one in Hindi.
English is not my mother language, so please co-operate with me.
My Own Usb to Serial Programmer:
I searched for the schematics of ch340 and made my own Usb to serial programmer. I made this circuit diagram using EasyEDA and Order my PCB from JLCPCB just in $2.
Links to Gerber files and circuit diagram is here.
Connect This Programmer:
Using This Schematic To Any Of Your Arduino Board And Upload Program Instantly.. Files of my version of ch340g USB to serial programmer is given above
JLCPCB:
JLCPCB is the one of the most popular PCB makers. Price is just $2 for 2, 4 and 6 layer PCB. They just launched new purple solder mask, aluminum Pcb and 3d printing service in very low cost. Pcb quality is not compromised at any cost. Check them out right now from Here.https://jlcpcb.com/IAT
JLCPCB Is also providing new user coupons and sign-up rewards of up to $30. So, check them out from here. Register using this link to get Free PCB assembly service coupons. Get your 2layer to 6-layer PCB’s just in $2, stencil and PCB assembly service in just $7.
More Methods to Program Arduino NANO:
1) Program using Own Usb to Serial programmer.
Help us on PayPal to bring more topics like this, Electroveins95@gmail.com
More projects from us:
1) How to make Arduino Uno clone board. 2) Breadboard constant voltage power supply module.
Think you enjoy my work, stay tuned. Follow us on Instagram (sagar_saini_7294) and hackaday.