loading

Hi.

I am Matej and in this instructable I'm going to show you how to use the ESP8266 Wi-fi module. I know that there is a lot of videos and forums telling how to use this device, but none of them were colorfull or easy enaugh to understand. I also didn't manage to make the device work by following other's people steps. I hope that you will find this tutorial usefull.

I also apologize for any misspelling.

*A little update. As promised, I made another instructable. This is about much easier wireless comunication, the Bluetooth. I Combine Bluetooth AND ULTRASONIC SENSOR. I also used this in my car for a school project. Make sure to check that one out :) *

*UPDATE*

MAKE SURE YOU WATCH MY NEW INSTRUCTABLE ON AN ARDUINO WEATHER STATION WITH BLUETOOTH THAT WILL SOON CONTAIN ESP8266 AS I PROMISED I WILL DO A PROJECT WITH IT AND A WEATHER SERVER SOUNDS FANTASTIC.:

https://www.instructables.com/id/DIY-Weather-Statio...

Step 1: THE ESP8266

To make everything work, you need to understand what each part does and what is the pinout for that part.

I'll start with the ESP8266. As shown in the picture, ESP8266 has 8 pins, 4 in the row of 2. The first pin on the top left is GND. The two pins right from the GND are GPIO 2 and 0. I'm not going to use these pins, as they are not impirtant for the operation. The pin on the top right side is the RX pin and the pin on the lower left is TX. These are the pins for comunication. The middle pins on the bottom are CH_PD(chip power-down) and RST(reset).

The main thing to remember is, that this device works with 3.3V;even the RX and TX pins. Arduino or many USB to serial converters work with 5V. The solution for this project is in the next step.

Step 2: THE FTDI232R

For this project I used this FTDI232R module. I bought it from ebay to have a reliable USB to serial converter. I didn't noticed it when I bought this part, but when I got it I saw, that it has a jumper to switch the operation from 5V to 3.3V. This makes everything easy, as we can connect the two parts together as it will be shown in the later picture.

I also soldered an extra connector for the 3.3V power to make connecting easy.

If your device doesn't have this option, than I will tell you how to work with 5v devices in the next few steps.

(I bought this ft232r and came in a nice package http://www.ebay.com/itm/400800529480?ru=http%3A%2F%2Fwww.ebay.com%2Fsch%2Fm.html%3F_ssn%3Dsseariver2009%26_armrs%3D1%26_from%3DR40%26_sacat%3D0%26_nkw%3D400800529480%26_rdc%3D1 )

Step 3: CONNECTING THE PARTS TOGETHER

The picture shows how to connect the two parts together.

The CH_PD and the RST pins must be high(connected to 3.3V) to have a normal operation.

If you have any questions about the connections or that your part isn't working, write in the comments :)

Step 4: A Little Bit of Hardware

As you have already noticed, those 8 pins of the ESP8266 are not breadboard friendly. So that's why I made an adapter with female and male headers. I hope that the pictures describe it well.

Step 5: Connecting to the Computer

The pictures are showing the final resault. if you connected everything right, like I sowed you before, you're good to go.

To connect the FTDI232R to the computer, I used this USB mini cable. Than I installed the drivers and connected power to the ESP8266.

Step 6: Talking to the ESP8266

To comunicate with the ESP8266, I used Arduino IDE( http://arduino.cc/en/main/software ) and don't be confused of the version 1.5.8. I have Arduino DUE, so I need that version.

So, when you open the IDE, choose the correct serial port for your FTDI and click on the Serial monitor.

Once you have opened the Serial monitor, you must set the first option to NL & CR and the baud rate. When it comes to baud rate you have 2 choises. I bought this esp8266 around 3 weeks ago. Therefore, it has firmware 902 apart from older esp8266 that have firmware 900. For this newer model, the default baud rate is 9600, for the older is 115200.

Once you set that, type in the box AT and it sould return OK. This device comunicates via AT comments( http://www.electrodragon.com/w/Wi07c )

(every command step is a separate picture)

To check firmware type AT+GMR

To set the module to accept connections type AT+CWMODE=3(my was already in this mode, as shown in the picture)

To search Wi fi networks around type AT+CWLAP
It will display Wi fi networks around you

To connect to a network type AT+CWJAP="Wifi SSID","password"

To find your IP adress type AT+CIFSR

After every command it returns you OK

You can also see it transmiting Wi fi signal on the last picture.

Step 7: COMMUNICATION WITH 5 VOLT DEVICES

So, if you have a communicator like ftdi, that doesn't have an option to set the logic voltage, do the following.

Almost every USB to serial converter has built-in voltage regulator for 3.3 volts(the chip operates with that). So, you can find that pin or a pad and connect it to the pins like normal. FOr the communication is a liitle bit trickier.

The signal from the esp8266 from TX pin is 3.3V which is enaugh for the communicator. But the 5v from the TX of the communicator can kill the esp8266!!!!!! Therefore you must build a voltage devider. If you don't know what that is; it's a simple construction made of resistor. In our case, we will use 1k and 2k resistor. We connect these two in series with TX pin of the communicator to 1k resistor and GND to the 2k resistor. The junction between the resistor is connected to the RX of the ESP8266.

The picture describes this perfect.

Step 8: OTHER

You can also watch this guy who also explained how to update the firmware for older models. He did all the same, but I showed it much slower and colorfull. Credits to him as well. ( https://www.youtube.com/watch?v=9QZkCQSHnko )

Now I'm working with connecting ESP8266 to Arduino(Uno or Due) for email notifier and making use of a little ethernet board, to make wifi spot.

If you have any questions you can write down in the comments. I will respond to as much as I can.

Thank you for watching :)

<p>Thanks for this. I used it as a guide to get me started.</p>
<p>hi, can you explaine hot to wire breadboard\ywrobot 3.3/5 v and esp 8266?</p>
<p>YOUR CAPS LOCK IS ON!!!!1!!</p>
<p>I'm glad it helped you started. Make something nice and share it. :)</p>
<p>Hey, first of all, thanks for making this, and i am just curious, if you're from Slovenia... Just wondering, because i live in SLO. It's just nice to see my nation on this website...</p>
<p>Yep, sm ja. Hvala ti. Zaključujem srednjo, in po tem planiram naredit novo verzijo za esp8266 in nekaj v povezavi z merjenjem, kot moja vremenska postaja.</p><p>*English*</p><p>Yes, I am. Thank you. I'm finishing high school now and I'm planing to make a new version of the tutorial for esp8266 along with measuring as in my weather station project.</p>
<p>No, super! Veliko sreče pri zaključku srednje šole in izdelovanju novih projektov!</p>
<p>Is it possible to connect arduino board and wifi ESP8266 module without additional FTD1232R?</p>
<p>Thanks I got it going</p>
<p>i made all stepps for it successful.</p><p>But it's impossible to get a WIFI connection. What's running wrong?</p><p>Greetings, Mathias</p>
अगर कोई भाई हिंदी समझता हो तो प्लीज मेरी प्रॉब्लम को सॉल्व करें मुझे esp 8266 ki gpo pin0 or gpo 2 से led ऑन ऑफ करनी है इंटरनेट के थ्रू मेरी सारी एटी कमांड ओके आती है सीरियल मॉनिटर पर ? लेकिन नेट से कनेक्ट नहीं हो पा रहा मेरा whatsapp नंबर है 9811340617 प्लीज मुझे whatsapp पर कांटेक्ट करें अगर कोई मेरी प्रॉब्लम को सॉल्व कर सकता हो तो आप सभी का धंयवाद
Hi
Hi
<p>How to interface ESP8266 12E with PIC microcontroller through SPI?</p>
<p>Also, if you use Arduino code to program <br>the ESP, I highly recommend you to use ESP.config() and setup static IP,<br> Mask and Gateway. In this way you will save some time and delay when <br>connecting to your router or Access Point. ESP.eraseConfig() method can <br>be used to clear the cache in the end.</p><p><a href="https://www.codemade.io/board/arduino-tutorials/5874/" rel="nofollow">Arduino tutorials</a></p>
<p>My wifi module is not responding for the commands as OK</p>
<p>After establishing connection how to give the data on to the internet</p>
Nice article....<br><br>My que. Is how to access internet once i connected to network hosted by ESP8266.<br>Means how to connect ethernet / broadband modem to ESP8266 to have access internet.<br><br>Thank you<br>Waiting for your precious reply<br><br>You can ans me on<br>bagal.vaibhav74@gmail.com
When i connect all the pins as in datasheet, except ch_pd.<br>But when i connect ch_pd to 3.3v , the red light on esp8266 goes dim. I used 3.3v, 250 mA power supply. What is the reason for this.please give me an answer.
<p>can I do secured communication(https)with this? </p>
<p>Hi can this esp8266 be used to surf the web like normal? just wondering how to do it,i think it needs a driver to do so,can any one help me with this? ive got the devkit board so it has usb etc thanks</p>
<p>&quot;Is the ESP8266 Uart Serial to Wi-Fi Wireless Module reliable with Arduino for long term projects?</p>
<p>Dear sir,</p><p>I am sasikumar right now i am using ESP8266 first i am connecting esp8266 to FTDI chip and i by using cool term i am giving the AT commands to it and it is working fine and also i tested with TELNET app what ever i am pinging the messages from mobile app it is displaying on coolterm but when i am trying to connect TX and Rx pins to LPC1343 microcontroller it is immediately going to disconnecting stage so pls help me regarding this issue..</p>
<p>I don't know really where to look, so if anyone can help me, i'd appreciate it. I'm working with an ESP module connected to an arduino nano. I used this sketch (<a href="https://github.com/bonggeek/Samples/blob/master/Arduino/SerialRepeater.ino" rel="nofollow">https://github.com/bonggeek/Samples/blob/master/Arduino/SerialRepeater.ino</a>). The module turns on an the communication seems to work. However, any command I type in, even just AT, gives me an ERROR response. Oddly the AT+CIOBAUD works just fine and gives me OK. Does anyone know what it might be?</p>
<p>Thanks for the tutorial,</p><p>I'm connecting ESP8266 with Atmega8 via uart and it further connected to an android device through TCP. It will Simply transmit the received data from Atmega to android device via TCP. Do i need to program ESP8266 for this or hoe it will work. </p><p>Thanks. </p>
<p>Thanks for the tutorial,</p><p>I'm going to connect it with android phone through TCP. How can I find out the socket port number of ESP8266 to be connected.</p>
<p>It's almost 1000 views. Thank you all for watching and I hope that you made something great with that. And remember, have fun :)</p>
<p>Hi I am using esp8266 12E module and have connected arduino with the module. Connections are as follows</p><p>ESP8266 ARDUINO</p><p>Tx Tx</p><p>Rx Rx</p><p>Vcc 3.3v</p><p>GND GND</p><p>EN 3.3v</p><p>And reset pin of Arduino to GND.</p><p>But when i am using serial monitor and AT Commands I am not getting any response.</p>
<p>Hey..<br>if you upload blank code to ardunio and you want to acess through serial monitor of arduino then can connect these pin connection....</p><p><br>but if you are using serialsoftware then you should cross connect RX and Tx pin<br><br>cheers Arduino..</p>
<p>hey... just connec the Tx pin to Rx and Rx to Tx...</p><p>i think it should work....</p><p>cheers to the Arduino...</p>
<p>I'm using Arduino nano with ESP8266 but after establishing all the connections when I use serial monitor to communicate using AT commands I do not get any response.</p><p>There is no error coming up either regarding baud rate or anything, but sometimes IDE freezes.</p>
<p>Are you using 3.3v for the serial logic? Most Nanos will be using 5v so you have to shift it to talk to the ESP8266... </p>
<p>hi there,</p><p>i am a newbie for esp 8266. i use it with a arduino uno. but not with a ftdi converter. i take the 3.3v supply from uno itself. every time i send an at command to 8266 the only response i am getting is &lsquo;-1&prime; (minus one). whats wrong here?.. is it the absence of ftdi? pls help me out</p>
<p>You also need to convert the TX and RX logic from 5v (used by the Uno) to 3.3v (used by the ESP8266). You could use the FTDI method here or purchase a logic level shifter (like this https://www.sparkfun.com/products/12009). They are very cheap and useful components so it might be worth buying a few :)</p>
<p>i am having some problem in arduino code. our project is home automation in which we are controlling home appliances through android app using esp8266 wifi module. we want to control light whose response will be given by ldr sensor to arduino digital pin so i couldn't understand that how to send response of ldr to android app so pls help us my mailid is nishiagarwalgd@gmail.com </p>
<p>Hi I am using esp8266 12E module and have connected arduino with the module. Connections are as follows</p><p>ESP8266 ARDUINO</p><p>Tx Tx</p><p>Rx Rx</p><p>Vcc 3.3v</p><p>GND GND</p><p>EN 3.3v</p><p>And reset pin of Arduino to GND.</p><p>But when i am using serial monitor and AT Commands I am not getting any response.</p>
<p>The issue is you're connecting (TX &lt;-&gt; TX) and (RX &lt;-&gt; RX). They need to be flipped so that the devices can communicate. It should be (TX &lt;-&gt; RX) and (RX &lt;-&gt; TX).</p>
<p>how to connect to pic</p>
<p>i have use pic 18</p>
Hi pls help mi my esp8266 is not connect in web server my all AT command is ok pls pls help my whatsup namber is 9811340617 pls send mage<br>Thanks
<p>Thanks for guidance but I had already done this before.</p><p>for more knowledge, queries , contact me - shashank.arora07@gmail.com</p>
<p>heyy..</p><p>is ftdi necessary?</p><p>we can directly use arduino tx rx with voltage divider. isn't it?</p><p>and there is a 3.3v on arduino which can power it.</p><p>please reply.....i have to order these components asap</p>
No ftdi is not necessary , you can use the voltage divider for tx rx and also use 3.3v of arduino to power it.<br>
<p>Going to back up BrettS28. While the Arduino has enough juice to flash the ESP I found it didn't have enough to actually use it as the ESP dropped out quite a lot.</p>
<p>I'd do some more digging into whether an arduino's 3.3V regulator can actually power the module. I'm pretty sure I read on the product page that most arduino's don't have the capacity to output enough current from the 3.3V output to sufficiently power the ESP8266. Give the datasheet a run through for both products and make sure :)</p>
<p>There is a 3.3V voltage regulator on the arduino uno and the pin is located betweeb the 5V and the reset pin i belive.</p><p>I used ftdi as another way of programming it.</p>
<p>Here's my explanation of this: http://www.teomaragakis.com/hardware/electronics/how-to-connect-an-esp8266-to-an-arduino-uno/</p>
<p>All well and good like most tutorials out there, including mine, but for more data or actually, for longer workings of the module, make sure to shift voltage on arduino Tx to esp Rx line.</p>
<p>my esp8266 only works when i connect tx of arduino uno to tx and rx of arduino to rx.</p><p>and even then the esp8266 doesnt work when i convert 5 to 3.3 volts. but when i dont convert the voltage it gives me ok for almost every at command except for GET and POST . it doesnt seem right since every tutorial i see connects it like you did.</p>
<p>And also, some Chinese products such as maybe your arduino or Wifi module, might have rx and tx labeled wrong and has happened to me as well, so that might explain why your Tx - Tx and Rx- Rx connections are working fine.</p><p>Cheers</p>

About This Instructable

625,817views

298favorites

Bio: I'm a high school student that likes electronics, Arduino projects and photography. I began working with electronics when I was 11 and got my ... More »
More by Matej Blagšič:Wi-fi weather station with Bynk Simple 20 LED VU meter + datasheet guide Guide to Neopixel 
Add instructable to: