How to connect to the ESP8266 using a FTDI adapter

If you haven’t purchased the ESP8266, you should.  The cheapest hackable Wi-Fi module you will find for makers bar-none.  Just look on Ebay or Alibaba and you will find plenty of vendors to choose from.

Once you have one the next step is to connect to it. It’s not breadboard friendly and so you’ll need jumper wires to hook things up. You will also need either an Arduino or FTDI adapter.  This tutorial is about connecting the ESP8266 through a FTDI adapter.  I had tried connecting it with a standard Arduino Uno but everything I read suggested the need for another adapter with a serial interface to communicate with it.  I’m sure there is a simple way to hook up an Arduino Uno so if someone wants to let me know, I’ll be happy to try it out.

I had a simple FTDI Basic 5V adapter from Sparkfun so took a chance this could work. The ESP8266 is a 3.3V device so the key is to convert the input power going to the Wi-Fi module to 3.3V. It is also wise to make sure your inputs driving the GPIO pins are also 3.3V. This is not the case with Arduino Uno which outputs 5V signals from its IO pins (another reason to use this FTDI adapter). To be on the safe side you should either level shift your GPIO input signals to 3.3V or use a FTDI 3.3V adapter as a source.

 

ESP8266 Pinout

esp8266_pinout_h-569x236

Hookup

Take a look at the diagram to see how to hookup the power lines and Tx/Rx pins.  Note that in addition to power and IO pins, you need to drive the CH-PD pin HIGH for you to talk to the Wi-Fi module through a serial monitor.

4-15-2015 8-44-19 PM

 

Once this is wired up, connect the USB cable between the FTDI adapter and your PC or MAC and open up your favorite serial monitor app.  I just use the Arduino IDE for this which is free and I’m sure already installed on your computer if you are a maker.

Open up the Tools -> Serial Monitor and make sure the settings are fixed to Both NL & CR and 9600 baud at the bottom of the popup window.

Type AT within the input window at the top and you should see OK!  Success!

4-17-2015 9-40-02 PM

 

To configure your ESP8266 you will need to learn a few AT commands which is the way you communicate with the module. Here is a set of AT commands.

1 thought on “How to connect to the ESP8266 using a FTDI adapter”

  1. For the breadboard users: if you get yourself a experiment-board (pertinax with rows of 3-hole leads on them) you can cut yourself a 6×6 hole piece of board (comprising 12 rows of 3-hole leads) where you solder the ESP on AND 2 x 4-pin rows of header-connector pins. The ESP in the middle and the headers on the rows beside the ESP.
    This gives you just enough adaption to confortably use the ESP on a standard breadboard, and no flying leads are necessary anymore 🙂

    Reply

Leave a Comment