For ESP8266 modules of type ESP-01, this module functions as a USB programmer. This is a convenient-to-use programming module because to program the ESP8266, you must connect the ESP-01 to the module and the module to your computer. “ESP8266 ESP-01 USB Serial Programmer”.
We don't think this is a good program, however, since it has to be altered for it to work correctly. However, it is aware that many of our readers use this program and have difficulty flashing new sketches at first. To address the “problem” with the ESP-01 USB Serial Programmer, we wrote this tutorial.
Where to Buy ESP-01 USB Programmer
In one of these shops, you may get an ESP-01 USB Serial Programmer (even more recent programmers may still have the “problem” with programming).
Diitao ESP01 Programmer Adapter,WiFi Developent Board Module UART GPIO0 ESP-01 Adaptaterr ESP8266 CH340C USB to ESP8266 Serial Wireless
$8.99
Installing CH340 Drivers
You must have the CH340 drivers installed on your computer to upload code to the ESP8266-01 since this module is based on the USB-UART bridge CH340 chip.
ESP-01 Board
If you don’t have an ESP-01, you can get one at the links below.
Makerfocus 4pcs ESP8266 Esp-01 Serial Wireless Wifi Transceiver Module Compatible with Arduino
$12.69
ESP-01 USB Serial Programmer Pins
The ESP-01 needs to have GPIO 0 pulled to GND, which isn't the case in the original module, to enter serial programming mode. The figure below shows that GPIO 0 is not linked to GND.
For reference, here’s the ESP-01 pinout.
You may solder a pushbutton to the ESP-01 USB Serial Programmer between GPIO 0 and GND pins, as illustrated in the following figures, to pull GPIO 0 to GND to put the ESP-01 into programming mode.
Here’s the final result:
Programming the ESP8266 ESP-01 with the USB Serial Programmer
We'll show you how to program the ESP-01 with this module after your serial programmer is fixed. As shown, connect the ESP-01 board to the USB serial programmer.
Then, follow these steps:
- Hold the soldered pushbutton firmly.
- Plug your computer's USB port into the ESP-01 programmer while holding the pushbutton down.
ESP8266 ESP-01 USB Serial Programmer with CH340 (Fix Programming Issue)
April 25, 2021 By Rui Santos
This module is a USB programmer for ESP8266 modules of type ESP-01. This is a convenient programmer module because you need to connect the ESP-01 to the module and the module to your computer to program the ESP8266.
However, we don’t think this is a good programmer because you must modify it to make it work properly. However, I know that many of our readers have this programmer and experience problems flashing new sketches when they first try it. So, we wrote this guide that explains how to fix the ESP-01 USB Serial Programmer “issue”.
Where to Buy ESP-01 USB Programmer
You can grab an ESP-01 USB Serial Programmer at one of these stores (even newer programmers might still have the programming “issue”).
Installing CH340 Drivers
This module is based on the USB-UART bridge CH340 chip, so you must have the CH340 drivers installed on your computer to upload code to the ESP8266-01.
ESP-01 Board
If you don’t have an ESP-01, you can get one at the links below.
ESP-01 USB Serial Programmer Pins
To make the ESP-01 go into Serial Programming mode, GPIO 0 needs to be pulled to GND – which doesn’t happen in the original module. As you can see in the figure below, GPIO 0 is not connected to GND.
For reference, here’s the ESP-01 pinout.
To pull GPIO 0 to GND to make the ESP-01 go into programming mode, you can solder a pushbutton to the ESP-01 USB Serial Programmer between GPIO 0 and GND pins, as shown in the following figures.
Here’s the final result:
Programming the ESP8266 ESP-01 with the USB Serial Programmer
Now that you have your Serial Programmer fixed, we’ll show you how to program the ESP-01 using this module. Attach the ESP-01 board to the USB Serial programmer as follows.
Then, follow these steps:
- Hold down the soldered pushbutton;
- While holding down the pushbutton, plug the ESP-01 USB programmer into your computer.
Note: If you don't fully depress the pushbutton before connecting the ESP-01 to your computer, it may not start in flashing mode, which would result in an upload error for the new code.
After installing the ESP8266 board, launch the Arduino IDE. Choose the right COM port and the “Generic ESP8266 Module“.
A blank sketch will then be flashed to your board once you click the “Upload” button. You ought to see the “Done Uploading” message within a little while.
[SOLVED] esptool.FatalError: Failed to connect to ESP8266
If you try to upload a new sketch to your ESP-01, you get the following error message:
esptool.FatalError: Failed to connect to ESP8266 Timed out waiting for packet header
This indicates that your ESP-01 didn't receive flashing or uploading mode, which means it wasn't receiving a new code.
Removing the board from your computer and restarting the process is one solution to this problem.
- Remove the ESP-01 USB programmer from your computer;
- Hold down the soldered pushbutton.
- While holding down the pushbutton, plug the ESP-01 USB programmer into your computer.
- Ensure that the programmer Port is selected in your Arduino IDE;
- Press the Arduino IDE “Upload” button.
You might also try holding the soldered pushbutton down while uploading a new sketch. If the error persists, use a multimeter to ensure that your pushbutton is properly soldered and linked to the right GPIOs.
Wrapping Up
With this post, we hope you were able to get your ESP8266 ESP-01 USB Serial Programmer with CH340 Chip to work properly. After you've resolved the problem, you'll see that this module makes it convenient to upload code to an ESP-01.
If you want to buy a USB serial programmer like this one, keep in mind that you will need to make a few changes to make it work.