Connecting the ESP-01 module to a breadboard and FTDI programmer

ESP8266 breadboard connections
Published: by Renier Delport
Last updated: 11 January 2018

When compared to other microcontroller boards (e.g. the Arduinos), the ESP8266 is slightly more complex to hook up to a serial port for programming. This post will show how to connect the ESP-01 module to a breadboard and FTDI programmer for ‘flashing’ purposes.

This is an ongoing post. Please suggest corrections, explanations, etc. in the comment section at the bottom of this page.

Introduction

The ESP8266 is the micrcontroller chip that is used on the ESP-01 module / microcontroller board. The chip has at least two different boot modes: ‘normal mode’ and ‘programming mode’. ‘Programming’ (or ‘flashing’) refers to uploading any (custom or default) software (or firmware) to the ESP8266’s flash memory. Flashing will overwrite the previous programming/firmware (including the AT command set if that was flashed). The breadboard setup in this post will allow booting into programming mode which will allow the module to be flashed with a new firmware. A FTDI USB/UART module will be used as communication module.

To get started you will need

These were the parts that was used. Most are available from BangGood, eBay and RS Components.

ESP8266 programming mode vs. normal mode

While (and only while) booting up, the status of GPIO0 and GPIO2 is used to check which mode the ESP8266 needs to enter.

ESP8266 boot options

Apart from the Tx and Rx connections, the main difference between the wiring for programming mode and normal operational mode is the connections of GPIO0 to GND. During the normal operational mode, the status of GPIO0 and GPIO2 will be high (by default). By grounding GPIO0, it is being pulled down to low, to enter programming (bootloader) mode. GPIO15 should also be grounded, but does not need any consideration here and will not be discussed for the purpose of this post.

The FTDI USB/UART module (FTDI programmer)

The purpose of this post it to be able to flash new firmware onto the ESP-01 module. For this to happen, another device containing a copy of the firmware needs to be connected to the module. Because ESP-01 modules do not contain any sort of serial communication chips/ports, serial communication to other devices need to be done using a serial to USB converter. There are many such devices available, but for the purpose of this article the FTDI USB/UART module will be used.

The FTDI USB/UART module is an universal asynchronous receiver-transmitter board with a FT232R chip. The chip is manufactured by FTDI (Future Technology Devices International). It is able to transform RS232 or TTL serial data into USB signals.

FTDI Programmer
FTDI USB/UART module with a 5/3.3V DC voltage regulator, a mini-B USB port and 6 I/O pins.

The FTDI USB/UART module has a mini-B USB port which is connected to a device with an USB input (e.g. a PC), and on the other side it has breakout pins (Tx, Rx, Vc and GND) that is connected to the ESP-01 module.

When looking for a new serial to USB converter, make sure it is 3.3 VDC compatible. It also needs to be able to supply an excess of 300 mA to power the ESP-01 adequately. The  FTDI USB/UART module in the Getting started section above has a 3.3/5V DC jumper and will supply 500 mA through its Vc pin.

The pins on the FTDI USB/UART module are clearly marked. The FTDI pins are also breadboard friendly.

Drivers

Some devices might need drivers to register the FTDI USB/UART module to be able to appear as a COM port. This allows application software to access the module in the same way as it would access a standard COM port. Although some operating systems might install the drivers automatically after its first use, others might need these drivers to be installed manually. For more information, visit the official FTDI Virtual COM Port Drivers page.

The ESP-01(s) module

To flash an ESP-01 module, it needs to be connected to the FTDI USB/UART module and GPIO0 needs to be connected directly to GND. Generally, the pins on the ESP-01 are not marked:

ESP8266 pinout
ESP-01 pinout

The ESP-01 is not breadboard friendly. To achieve the goal with this post, it needs to be. The simplest solution I came up with was by using two, 4 Pin 2.54mm stackable long legs female connector headers. The legs can be bend and the two parts can be ‘superglued’ together.

ESP8266 breadboard connectors
Home made ESP-01 breadboard friendly connector using 2, 4 Pin 2.54mm stackable long legs female connector headers.

Connecting the ESP-01 with the FTDI USB/UART module

The FTDI USB/UART module is used as power source and to program the ESP-01. To use the FTDI USB/UART module as a ESP-01 programmer, the connections need to be as follows:

 

ESP8266 to FTDI programmer connection
Image from Pixhawk.org

The connection can be made directly, for example by using modified 30 cm female-to-female breadboard jumper wire cables, or indirectly using a breadboard. The breadboard solution takes a little more time, but is easier to use, looks neater, is upgradable and a is little more sustainable.

When connecting to an ESP-01, the working voltage of the FTDI USB/UART module needs to be set to 3.3V (instead of 5V). On some modules this can be done by changing the jumper on the FTDI board itself.

The breadboard can be wired with solderless breadboard jumper cables. On the top left corner, an optional 6 pin 2.54mm stackable long legs female connector header that is bent inwards can be used to connect the FTDI USB/UART module. This will allow the module to lie flatter instead of perpendicular to the board. The 4 pin 2.54mm stackable long legs female connector headers are where the ESP-01 will be plugged into.

ESP8266 breadboard connections
Initial breadboard wiring, which will allow the ESP-01 to boot directly, and only, into programming mode.

In addition to 3.3V DC (red wire) and ground (black wire), this configuration connects the Tx/Rx (yellow/green wires) of the FTDI USB/UART module to the RX/Tx of the ESP-01.

On the ESP-01, both Vcc and CH-PD needs to be connected to 3.3V DC (red wires) and GPIO0 needs to be connected to ground as well (brown wire). As mentioned earlier, by grounding GPIO0 it is being pulled down to low which makes it boot into programming mode.

Connecting the ESP8266 to a breadboard and FTDI programmer
This board will allow the ESP-01 boot up in program mode, and only program mode. It works well, but when it comes to testing, the ESP-01 has to be transferred to another board. Rebooting is also only possible by disconnecting the USB cable from the FTDI USB/UART module (i.e. disconnecting the entire setup, which often crashes the operating system).

To overcome these shortcomings, a reset switch and a SPDT slide switch can be added:

ESP8266 breadboard connections

To be able to reset the board, a tactile push button is wired between the ESP-01’s GND and the RESET pin (purple wire). The tactile button should be normally open (NO) so that when it is pressed, the connection is made.

ESP8266 breadboard connections

Finally, a SPDT slide switch can be used to connect GPIO0 to ground (or not). This will allow switching between program mode and normal boot mode. After switching, the reset button can be pressed to enter that state. Programming can start immediately after all the components has been added to the breadboard.

This is an ongoing post. Please suggest corrections, explanations, etc. in the comment section at the bottom of this page.

More ESP8266 related posts

Online micro-electronic components, consumables & accessories
Online micro-electronic components, consumables & accessories
Buy great value for money micro-electronic components online from BangGood.com. Free international delivery, including to South Africa.
23 February 2018

Save, share, comment & Disqus

Use the buttons below, on the left or the bottom of this page to share this post. Your comment is important, but don't be a shit. Keep it constructive and polite.
Share on FacebookTweet about this on TwitterShare on Google+Share on LinkedInPin on PinterestShare on StumbleUpon

Comment via Facebook

Disqus

About the author
Renier finds himself busy with creative web design and his websites, motorcycling, photoshopping, micro electronics, non-commercialised music, superhero movies, badass series and many other things that are not interesting to most people.