ESP8266 Programming Using FTDI and Arduino IDE




Introduction: ESP8266 Programming Using FTDI and Arduino IDE

When I first tried to use an ESP8266 (01), I was really excited to work with the module. However, I found it really hard to get started. Coming from an Arduino background, I wanted to program the module using the Arduino IDE, since I knew that it is possible. Although there are many good tutorials in the web for doing this, none of them worked for me out of the box.

Dwelling a bit more in depth in how the module works, I realized that although it can be programmed using the Arduino IDE, there is a major difference in how you work when uploading sketches to an ESP-01 and an Arduino. Arduinos are always in a mode that allows you to upload sketches to them. However, this is far from the case with ESP8266. In order to upload a sketch to ESP-01, you must first set it in programming mode. To do so, one must apply the following steps:

  1. Power the module (3.3 Volts)
  2. Connect the RESET pin to the GND
  3. Connect the GPIO-0 pin to the GND
  4. Disconnect the Reset pin from the GND
  5. Disconnect the GPIO-0 pin from the GND
  6. Upload your sketch

Despite having to remember all these steps every time you need to change something in your code, this approach entails another problem as well. If the circuit that you are working on requires connecting GPIO-0 to the grounding somehow (e.g. connecting a LED to GPIO0), you are then forced to change your circuit every time that you need to make even a minor change to your sketch! I found this approach very unproductive. In my point of view, the only productive way to work with the module is to have a separate circuit for programming the ESP8266 and another for the component under implementation. This instructable shows how to make a component that allows you to program the ESP-01 easily, using the Arduino IDE. To hack the component, you need to have the following:

Step 1: Create the Circuit on the Breadboard

I am assuming that you have a mini solderless breadboard as the one described in the previous section. The first picture in this step contains a diagram of the breadboard, in which every pin is identified by a character (vertical) and a number (horizontal), pretty much in the same way as squares are mapped in a chessboard. The diagram also depicts the final circuit, showing which pins must be connected. To create the circuit you must apply the following connections:

  1. O1 --> P1 (wire)
  2. O10 --> P10 (wire)
  3. P5 --> P6 (wire)
  4. J8 --> P8 (wire)
  5. H10 --> M10 (wire)
  6. C10 --> G10 (wire)
  7. C5 --> C6 (wire)
  8. D5 --> G5 (wire)
  9. B5 --> J5 (wire)
  10. H1 --> M1 (wire)
  11. F2 --> P2 (wire)
  12. D3 --> I3 (220 Ohm resistor)
  13. M4 --> O4 (Push button)
  14. M9 --> O9 (Push button)

Step 2: Connect ESP8266 and Jumper Wires

Connect the ESP8266 to the breadboard so that the following apply:

  • ESP VCC --> G4
  • ESP RST --> H4
  • ESP CHPD --> I4
  • ESP TX --> J4
  • ESP RX --> G7
  • ESP GPIO0 --> H7
  • ESP GPIO2 --> I7
  • ESP GND --> J7

Also add the following Jumper wires:

  • Green wire --> B1 (ESP TX)
  • Yellow wire --> C1 (ESP RX)
  • Red wire --> D1 (ESP VCC)
  • Black wire --> F1 (ESP GND)

Step 3: Connect the FTDI and ESP8266 to the Circuit

Connect the FTDI component so that:

  • The TX of the ESP8266 is connected to the RX of the FTDI (i.e. green wire)
  • The RX of the ESP8266 is connected to the TX of the FTDI (i.e. yellow wire)
  • The VCC of the ESP8266 is connected to 3V3 of the FTDI (i.e. red wire)
  • The GND of the ESP8266 is connected to the GND of the FTDI (i.e. black cable)

Also connect the ESP8266 so that the golden lines of the component will point to the opposite direction from the one in which the buttons are

Step 4: Connect to Your PC and Set Up Programming Mode

Connect the FTDI to your PC through a USB port. The red led of the ESP module will switch on.

The button on the side of the breadboard in which the jumper wires are located is the reset button, while the other button is the one that grounds the GPIO0.

  • Press the reset button and keep it pressed.
  • Press the GPIO0 button and keep it pressed.
  • Release the reset button
  • Release the GPIO0 button

If a blue light will switch on momentarily on the ESP module, then your ESP is in programming mode.

Step 5: Upload Your Sketch

Add ESP8266 as a board in the Arduino IDE (as described here).

In the Arduino IDE, under Tools --> Board, select "Generic ESP8266 Module".

Select the port in which the ESP module is connected.

Upload an empty sketch to your ESP module and check if the progress of uploading is displayed in the console of the Arduino IDE (should display the progress in orange color). If so, you can now write any sketch you want and program your ESP8266 easily.

1 Person Made This Project!


  • Tinkercad to Fusion 360 Challenge

    Tinkercad to Fusion 360 Challenge
  • Woodworking Contest

    Woodworking Contest
  • Home and Garden Contest

    Home and Garden Contest



1 year ago

I found this article really helpful However, I am having a problem. I cannot upload my program to my esp module. I follow the instructions that puts the esp8266 module to programming mode but the blue light doesn't blink and the program doesn't upload to the esp8266. Al last, error message occurs saying timed out waiting for packet header. I checked my circuit so many times and all is correct. I am using arduino UNO instead of FTDI. A little help please.


1 year ago

WOW, have to say, "KIS" Keep It Simple is true for this post. Well done to you for such a good post with clear and detailed instructions. Within 10 mins of this arriving in the post it was up and running. I will now make a PCB with the switches mounted for ease of use.

2020-12-30 16.48.38.jpg2020-12-30 16.48.46.jpg

2 years ago

I would like to use this configuration on the ESP8266 wifi module(esp12). do you think it would work?


Question 3 years ago on Step 5

hi, i've tried to do it on your way because with the arduino i had always the same error: espcomm_upload_mem failed. however when i download the program with the FTDI i realized i have the same issue, so have you any solution?


3 years ago

This is the absolute simplest procedure I've seen. I've tried some others that required pullup resistors etc and couldn't make them work. I assume that Rx & Tx are required to be connected appropriately which I have done.

Unfortunately, this didn't either. Here is the error messages I get:

Arduino: 1.8.7 (Windows Store (Windows 10), Board: "Generic ESP8266 Module, 80 MHz, Flash, ck, 26 MHz, 40MHz, QIO, 512K (no SPIFFS), 2, v2 Lower Memory, Disabled, None, Only Sketch, 115200"

Sketch uses 246076 bytes (49%) of program storage space. Maximum is 499696 bytes.
Global variables use 27568 bytes (33%) of dynamic memory, leaving 54352 bytes for local variables. Maximum is 81920 bytes.
warning: espcomm_sync failed
error: espcomm_open failed
error: espcomm_upload_mem failed
error: espcomm_upload_mem failed

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

I'm a newby to this so I'm begging for help!



3 years ago

Thanks for taking the time to post this article. I've had 2 or 3 previous configurations that would work sometimes then out of the blue no longer work. To me, the key information was power on procedure to put the esp in flash mode. Works every time on every esp8266-01 I have.


4 years ago

i wants to connect Two (2) ESP modules with single Arduino Mega and wants to transmit and receive data at same time on both ESPs.

Any one have idea please share methods.

DIY Hacks and How Tos

Interesting module. I am going to have to check this out.


Reply 4 years ago

or you use the nodemcu dev board with esp on board. plug it with usb to your computer en upload your sketches to the esp.
a bit bigger but v1.0 is also useable on standard breadboard.


Reply 4 years ago

Agreed, but nodemcu is a different component than ESP-01. I prefer using ESP-01 for simple projects that don't require many GPIO pins, because its smaller and cheaper.