You just bought a new aftermarket, cheap Arduino. “What a good deal! Less than $10 for an Uno, and a Nano is cheaper than $5, while an original Uno costs €24!” But as soon as you try to upload a new project, something goes wrong: the upload fails! The power LED is on and the L LED is probably blinking too, so what’s wrong?
0. Correct Arduino board and port
It seems like a rookie mistake, but even experienced developers forget to set the correct board and port, especially when they have multiple active running projects. Select the correct board and COM port.
But what if it’s already selected, or not even showing up?
1. Board not showing up
Still sounds like a “guide for noobs” but check the USB cable. I had several bad USB cables and they don’t magically repair themselves. Heck, one friend just experienced a “But it was working YESTERDAY!!!” moment, so really, just swap it for a different cable.
If you plug in your Arduino and a message pops up saying “USB device not recognized”, then it’s probably a bad cable. Or if something smells really bad and the board gets really hot: unplug immediately, it has some hardware issue, which is not covered here.
The cable is OK? At least it’s working, let’s check the Device Manager (in Windows).
If you see a “faulty” device, it’s 99.9% a driver issue. Most original Arduinos have another ATmega microcontroller just for handling the USB, and their driver is installed with the Arduino IDE. So we are left with the 4 most common USB-UART ICs: FT232RL, PL2303, CP2102, CH340.
FT232, the OG
The FT232 is infamous and newer designs don’t use this. The IC was expensive while being useful, so working counterfeits flooded the market. Our problem is the FTDIgate: the original manufacturer released a driver which first fried the cheap clones, then it was “tamed”, now it only refuses to work. Find an old but working driver.
PL2303, the really problematic
The PL2303 from Profilic is another problematic one: the default driver doesn’t work, but says “phased out since 2012 please contact your supplier”. Thanks, really useful. Find an old but working driver.
CP2102, the best
The CP2102 from Silicon Labs is my personal favorite: the driver installs automatically in most cases and just works. 10/10, it should work for you too. If not, grab a current driver.
CH340, not only in Arduino
The CH340 is a tricky one. Lot of unsigned drivers can be found on the Internet, and whole articles can be found just on installing the driver. Newer Arduino clones and ESPs usually come with this inexpensive USB-UART bridge.
At this point, you should have a working COM port, but what if it still refuses to work?
2. Old bootloader (Nano)
Counterfeit Arduinos, especially Nanos can be tricky. Many of them are shipped with an old bootloader. This doesn’t mean they won’t work but it needs an extra step while setting up. Select the correct board and the correct processor too.
3. Missing Arduino bootloader
Some manufacturers don’t even care to flash a bootloader, but they upload a blinky example! It’s really rare but happened to me. If you plug in, the L LED blinks but you just can’t upload new code. Well, if you don’t have a bootloader, you can’t utilize it! So try to get a working Arduino and flash the bootloader, you will be fine.
4. avrdude error
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x64
Sounds familiar? It shouldn’t be, but here we are. Some Arduino boards “forget” to connect the reset pin to the USB-UART, or works buggy. The code upload works like this:
- PC sends a “reset” signal, but since there is no reset in the standard UART, just TX and RX, one other control pin (RTS or DTR) is used to give the reset signal
- Arduino reboots, and for a brief time, the bootloader waits for code upload messages
- if the PC starts sending proper data, the bootloader overwrites old code in flash
- either after waiting for too long (a few seconds) or the code upload finished, the bootloader jumps to the main code and your program starts
So, if the reset functions doesn’t work, provide the reset signal manually.
- start compiling-uploading in Arduino IDE
- push the reset button on the board, but don’t release yet
- when the IDE says “I’m finished with compiling, trying to upload”, release the reset button
This may take some time and practice, but at least works in most cases.
5. Just refuses to work
An error occurred while uploading the sketch
Okay, that’s not useful at all. It’s not a proper error message. If none of the above helped, it’s really the time to restart everything. It’s a software, it can have bugs (and it has). These helped me before:
- restarting the Arduino IDE
- plugging it in a different USB port
- restarting the whole computer
If none of these worked, it’s time to get another board. Your time isn’t cheap, don’t waste it on faulty hardware!
Conclusion – buy cheap Arduino again?
Most of the issues are easy to resolve, don’t give up! If you still have a question, pop by and I’ll try to answer it in the Electronics, Robotics group. Also, treat yourself with some free materials: download the Arduino cheat sheet at no cost!