Flash ESP8266 using Arduino Uno only

Wei-Fen
2 min readJun 1, 2018

--

The ESP8266 module is a cheap Wireless module.It has SOC(system on chip) that is capable of providing wifi to any micro controller/microprocessor. Esp8266 needs a external 3.3 v for working properly. If you are using esp8266 with arduino, it is usually recommended not to provide power from arduino. The main reason is that arduino maximum current providing capacity is 40mA while ESP8266 draws 250mA. However, it still works for me in a particular circuit wiring scheme. I like to share it with whoever might like to give it a try. If you have trouble uploading the blink sketch to your ESP-01, you can follow my approach to see if it works for you especially in the circuit wiring part.

Step 1. Install the ESP8266 library — Follow the link below to install the ESP8266 software library in the Arduino IDE.

Step 2. Circuit wiring setup

The Pin Diagram of ESP8266

ESP01 has 8 pins. From left to right and top to down, they are TX, GND, CH_PD(must be 1 to enable WiFi), GPIO02, GPIO01, RST(Reset)、VCC(3.3V), and RX。 The following wirings need to be made.

TX (ESP) — TX (ARDUNIO)
RX(ESP) — Rx (ARDUINO)
GND(ESP) — GND(ARDUINO)
VCC, CH_PD — 3.3V(ARDUINO)
Rst(ARDUINO) — GND(ARDUINO)
For programing: GPIO0 — GND, GPIO2 — VCC
For Booting from Flash: rst once and GPIO0 — VCC, GPIO2 — VCC

There are some references on the internet for similar tasks. Many of them ignore the GPIO0 and GPIO2 pins. Some of them even use a voltage regulator. The above wiring scheme works for me, does not require a voltage regulator, and seems to work without external power for the ESP8266 module.

ps. The errors I ran into are similar to the issue in a github discussion thread.

Step 3. Upload the blink program for testing

/* We use GPIO2 pin for testing */void setup() {
// initialize GPIO2 as an output.
pinMode(2, OUTPUT);
}
// the loop function runs over and over again forever
void loop() {
digitalWrite(2, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(2, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second
}

Step 4. Plug in LED for testing

After the upload is done, you can remove the GPIO2 wire and plug in a LED to see if it blinks. Note that the long pin of the LED has to be connected to the GPIO2 pin of the ESP-01 and the short pin of the LED has to be wired to GND.

--

--

Wei-Fen
Wei-Fen

Written by Wei-Fen

Computer Architect/ Professor in NCKU SOC

No responses yet