How to connect an ESP8266 to an Arduino UNO

There are a lot of guides online on how to connect an ESP8266 to an Arduino uno but there’s too much confusion and not enough explanation. So I’m going to give you the quick version along with the details.

Connecting the ESP8266 to an Arduino

The steps you need to take are simple. This is written for the ESP8266-01 but you can find the pinout for other models easily and use the same pins. First we will connect the Arduino UNO to a breadboard:

  1. Connect the Arduino’s 3v3 (3.3V) output to the red line on a breadboard. The ESP8266 works with 3.3V and not 5V, so this is necessary. If you want to connect other components that use 5V, you can connect the 5V output to the other red line of the breadboard, just make sure you don’t connect the two.
  2. Connect GND (ground) to the blue line.
  3. Connect the RES or RESET pin to the blue line. When you ground the reset pin, the Arduino works as a dumb USB to serial connector, which is what we want to talk to the ESP8266.
  4. Connect the RXD pin of the Arduino to the RX pin of the ESP8266 (yellow color in the picture).
  5. Connect the TXD pin of the Arduino to the TX pin of the ESP (green color in the picture). Usually, when we want two things to talk to each other over serial, we connect the TX pin of one to the RX of the other (send goes to receive and the opposite). Here we do not have the Arduino talk to the ESP8266 though, our computer is talking to it via the Arduino.
  6. Connect the GND pin of the ESP to the blue line and the VCC pin to the red line.
  7. Finally CH_PD goes to the red line, supposedly it will not work if you do not connect this. According to a discussion I found:

ESP-01 and ESP-03 were initially meant to be used as an Arduino WiFi module. In that aspect it made sense to break out CH_PD so that the user could disable the device when not in use (to save power).

Arduino UNO connected to ESP-8266-01

Using the Arduino IDE

In the Arduino IDE, you don’t need to choose a board, as we’re not uploading anything to the ESP8266. Just choose the right port in the Tools menu and go to ToolsSerial Monitor. Then simply set your baud rate to 115200 (the default ESP8266 firmware uses it) and your line endings to Both NL & CR.

If you type AT in the message field and press enter, it should respond with OK.

And since we talked about the CH_PD pin, remember that if you want to flash the ESP8266 you should connect the GPIO0 pin to GND (blue line), which puts the ESP into flash mode.

So there you have it! If you have any questions, ask below and I’ll do my best to answer!

86 thoughts on “How to connect an ESP8266 to an Arduino UNO”

  • can someone help me out on how to use this module to control servo motors

  • have done all process above and it worked am having issue on how to control servo motor with the module all resource on the internet are not helping i dont know if anyone can help me out on this

  • HII

    Hi sir

    command AT+CWLAP is not working
    pls help

  • i want to send the sensor data to php my admin in aws cloud. But i am unable to get actual connection between esp8266 and arduino uno….in this context whether i will use rx to rx or alternates i.e rx to tx and tx to rx…..i am not getting chinese values …i am also not getting any respond from AT commands. I have tried most of the possibilities but i failed….please please please help…..

  • Connected the RST pin of the ESP to Arduino 3.3v nd it worked

  • Hello, i’m having problems sending the data ( integer / character ) to ESP 01 from Arduino UNO. I want to establish bidirectional communication between these two modules.
    Thank you.

  • How to send a string (dynamic) to a particular url using ESP8266 & Wifi Router.

  • Hi, there are 2 power supply errors: You need an external power supply of 3.3v (300mA), and a logic level converter for esp Rx pin (arduino logic is 5v, so need to convert to 3.3v logic)

    • I think so too. It still works as the logic ports are not so sensitive to the 3.3V instead of 5 V required. But a converter is required nonetheless

  • Hi Teo I am making home appliance control wifi so can you tell me whole procedure and documentaion and realted code thank You

  • Iَve done whatever you said but nothing happened as the last time and i face the same errors each time

  • Once connected, how do I make a http request?

  • only display this ???

  • I want to use the arduino pins to control the led instead of using the GPIO pins from the esp8266. How would i proceed into doing that?? i notice that a lot of tutorials out there refer to using GPIO pins from the esp8266 to connect it to an LED.

  • can 5 volts power damage the esp 8266 module ?
    or how can i change my 5 volts to 3.3 volts power ?

  • No reply for at command (ok is not seen ) tried different baud rate…

    • “No reply for at command (ok is not seen)”
      It works for me if I send ctrl-m + ctrl-j (\r + \n, or 0x0d + 0x0a) after the AT command. Just sending either one does not seem to work.

  • I just gave power 3.3v and connected gnd to gnd. RX to TX of arduino and TX to RX of arduino. Then I typed AT on the serial monitor. But nothing happened. I want to check whether my wifi module is working well. And later I want to build a UDP client as the wifi module.
    Can you pls help me…

    • Hai Mr.Ruchira connect TX to Tx and RX to RX {Adruino to ESP-8266} and open Arduino IDE and uplode empty file to clear the previous loaded Program and then check the serial monitor you can find ESP module working good. Note: Connect CH-PD to 3.3v pin always..

      • Hi Karthik,

        Is there any way to run the AT commands from arduino code?
        So that we can connect to a router and do other stuffs.

  • Unfortunately this didn’t work for me. I just followed the instructions in this video and it worked fine then:

  • How to send data from Arduino to ESP8266? We’re able to store data on the digital pin of Arduino but unable to send to ESP. We’ve tried serial communication (straight as well as cross) and wireless communication as well.. The hardware units are working perfectly.

1 2 3

Leave a Reply

Your email address will not be published. Required fields are marked *