ESP-01 board is different from NodeMCU DevKit (ESP-12E) board. It doesn't have USB support. You need a USB to TTL serial converter and a certain circuit to switch the board between normal boot and flashing mode. You can buy a USB to TTL converter as cheap as $1 or you can utilize your current Arduino board.
First, I want to show my simple circuit using a USB to TTL converter to flash ESP-01. I use Prolific USB to TTL. It's the cheapest device you can get in the market. If you use this device on Windows operating system, you must check Device Manager and validate that the device isn't in an error state. If it's an error, you can use the solution from HERE.
The following image shows the circuit for flashing ESP-01 using a USB to TTL converter. I use an external 3.3V supply because my Prolific can provide only a 5V supply from USB and the current is too low.
USB to TTL to ESP-01 |
If you are too lazy with push-button and resistor you can use the following circuit.
USB to TTL to ESP-01 jumper only (for lazy guy) |
In the second circuit, you just need jumpers without a resistor or push button. There are two floating jumpers. The rules of this circuit are:
- Connect RST (B) to Vcc to enable the device.
- To make ESP-01 at flashing mode, you need to connect GPIO0 (A) to GND
- To make ESP-01 at normal boot mode, you need to connect GPIO0 (A) to Vcc or floating
- To make ESP-01 can be flashed when at flashing mode, you need to connect RST (B) to GND then connect back to Vcc. It is just the same thing as the usual reset process. When the device's RST port is connected to GND, it will reset the device.
When you run the reset process with or without a push button, you just make sure that it's for two or three seconds before you release the reset. Now, if you want to flash the ESP-01 with NodeMCU firmware just follow my other post about it.
NOTE: By using this circuit for flashing ESP-01 you need to reset the device manually every time you want to run any esptool.py command so that it can be accessed by esptool.py. For example, I run the command:
If there are any questions or suggestions about this article, just leave them in the comment field below. If you think this article is useful, please share it with your colleagues.
esptool.py --port COM7 --baud 115200 flash_id
then I must reset the device manually before running another command. Any flashing-related commands can only be run at flashing mode (GPIO0 to GND) while AT commands can only be run at normal boot mode (GPIO0 to Vcc or floating).If there are any questions or suggestions about this article, just leave them in the comment field below. If you think this article is useful, please share it with your colleagues.
Comments
Post a Comment