loading

This Instructable will teach you how to use those $5.00 ESP8266 modules, as well as provide you some basic knowledge about networking. I'll be using the Micromite Companion Kit in my examples which is programmed in BASIC, however all of these instructions should be adaptable easily to your favorite micro.

In short, the ESP8266 module is a TTL "Serial to Wireless Internet" device. Providing your microcontroller has the ability to talk to a TTL serial device (most do) you'll be in business! The original instructions have been translated from Chinese into cryptic data sheets. We'll try to change that with this Instructable.

The ESP8266 module is a 3v device, but it's no wimp. It draws quite a bit of power. In fact, you'll probably need to make sure that your circuit's power supply can handle at least 1 amp of power. (In my case, I was using a simple 7.5v 500ma power supply. When I started working with this module, I switched it for a 7.5v 1amp power supply and had plenty of power.) As it turns out there is good reason for this; some Youtube videos have surfaced recently with folks seeing anything from 500 meters to a couple miles of transmission capability from this module. That's a lot of horsepower for $5.00!

Step 1: Obtaining and preparing your 8266 module

I obtained my module from an Ebay vendor in the United States. The shipping was faster than China, but more importantly, the vendor provides the module without the pins soldered in.

The 8266 module isn't really breadboard friendly, but it's easy to convert it to a four pin module if you purchase the pin-less version. (or take a few minutes to remove the pins if you have obtained the other version)

You'll need 5 pin connections to make the module work. (See image 1)

RX, TX, ground, and 3v connected to two positions on the module.

I sourced a 4pin female cable from my parts box and cut off one end.

I used a small amount of nail polish to carefully paint over the unused pin, then looped the 3v connection from the power pin over the unused pin into the center. (See image 2)

The end result is a 4pin module that is now breadboard friendly to plug into your project.

<p>Hi! I want to use esp8266 module as an normal wi-fi adpter to make my computer wi-fi enabled. Can i use this module.. Thanks in advance..</p>
<p>Simple answer is no. But it is possible by a very complicated way. But why? U can purchase usb wifi adaptor for same price.</p>
<p>i want to send and receive data between my esp 8266 and a web server,how can i do it?</p><p>thanks</p>
<p>how to store an array with the set of values of rssi and can i send them back to pc p.s. u would save my semister :D?</p>
<p>Very well written. Thank you. :)</p>
<p>Brilliant - took a little of the mystery out of ip addresses for me. I've ordered a 8266 to try out now. Thanks for a very clear instructable</p>
Hi. After connecting my esp-01's vcc and ch_p0 to 3.3V to the arduino and started the serial monitor at 115200 baud, i got the cheerful OK after entering AT and even the version info after AT+GMR but that's about it.<br>All other commands end up with ERROR. Tried toggling the baud rate but with same results.<br>Any thoughts?
<p>Ok, so I get the following on my terminal when I put the STA IP address into a browser window after manually sending the CIPMUX and CIPSERVER commands. After that I try to manually send the &quot;&lt;TITLE&gt;&quot; string from your BASIC program. I get the response back on my terminal program that the correct number of bytes were sent along with a &quot;SEND OK&quot; message. But I see nothing in the browser window to indicate that it received anything. Where are these bytes going if not to the browser?</p><p>+IPD,0,255:GET / HTTP/1.1<br>Accept: text/html, application/xhtml+xml, */*<br>Accept-Language: en-US<br>User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko<br>Accept-Encoding: gzip, deflate<br>Host: 192.168.1.88<br>DNT: 1<br>Connection: Keep-Alive</p>
<p>how can i make the esp's IP static(assigned by router,something like 192.168.1.17).</p>
<p>If you want to change static address; this is the command at</p><p>AT+CIPAP=ip<br></p><p>example:</p><p>AT+CIPAP=&quot;192.168.1.100&quot;</p>
<p>check out this instructable for code to assign static, configurable IP for ESP8266</p><p><a href="http://www.instructables.com/id/ESP8266-WiFi-Shield-for-Arduino-and-other-micros/" rel="nofollow">A Cheaper ESP8266 WiFi Shield for Arduino and other micros</a></p>
<p>My esp8266 is disconnect to client app after some time when i use esp8266 as webserver.</p>
<p>how to change IP address of esp8266???</p>
<p>Hello,</p><p>I am working on a project with the ESP8266 and need to define requirements so I have different options. I want to use the ESP8266 Version 12 connected to Arduino to collect sensors data and communicate with a mobile app that sends these data to the cloud. So I am trying to figure out how to set the ESP8266 to talk to the mobile app. The mobile app would be like a bridge between the ESP/Arduino system and the cloud. The mobile phone can be set as tethering or portable hotspot via Wifi and connect to the cloud via 4G. Would like to have some suggestions for the best setup for the ESP8266/Arduino in this configuration?</p>
<p>I suggest setting the mobile as an Access Point and then connecting directly from ESP8266 to cloud. I will soon put up an Instructable showing how to use ESP8266-01 as a passthrough Wifi connection for Arduino connected via Serial (or Serial1)</p><p>P.S. Using the AT command set is asking for trouble (although I have a library that works, see www.pfod.com.au)</p>
<p><a href="http://www.instructables.com/id/ESP8266-WiFi-Shield-for-Arduino-and-other-micros/" rel="nofollow" style="">A Cheaper ESP8266 WiFi Shield for Arduino and other micros</a> posted now</p>
<p>Hey,</p><p>I am too working on this type project. Instead of arduino I am using Atmel8051. It will be very help full if you give me some information on the same. Thanks in advance</p>
Hi would you be able to assist in making a schematic with the esp8266?
<p>Try this instructable, <a href="http://www.instructables.com/id/ESP8266-WiFi-Shield-for-Arduino-and-other-micros/" rel="nofollow" style="">A Cheaper ESP8266 WiFi Shield for Arduino and other micros</a></p>
<p>Thanks for sharing..</p>
<p>Very nice. This article has made a lot of things clear to me. Thanks for sharing.</p>
<p>hey, is it possible to set the it up as an access point? i.e make it discoverable by an SSID?</p>
<p>Yes it is. I have 6 named GEOCACHE1, 2 , 3 and so on for various geocaches hidden in the area, I am working on some type of solar for the supply, was triggering by infrared to start the device, then moved on to solar. In ap mode , you can look at the wifi settings on your phone or download an app for range of wifi's and as you get closer to the geocache the signal gets better etc. This is the primary use at this time for me. I have 2 other controlling relays and am using another for rgb led mixing. The rgb color mixing I am going to expand to use on a mini remote control car , color mixing will be the control voltage for right, left and foward [ no reverse yet ] buffered off a 3 transisters. This is just for fun and where I am now. I had it connected to the web with no other interest. I am applying them to surge strips and out lets naming them outlet one, or TV or kitchen light etc using a different code to control the on off of each device, yes I know smartswitchs and plugs are out their but when you make it yourseld it is fun.</p>
<p>Kevin, what firmware did you use for configuring your ESP's as configurable access points? I want to create unique SSID for the device, that I can connect to on any device, preferably housing a cut-down webserver. Is there any particular flavor you found easier than others?</p>
<p>I forgot to tell you that every time they came out with a newer firmware i had to have it and began to have problems if is not broke why fix it? I went back to 9.2 wep you can program 4 manuel the esplorer has 3 built in but their is 4 anyway i went to as far as 1..1 or something and went back to 95 9.2 for the switch. The newer firmware I am still playing with and is not working up to my expectations yet...it suppose is set up to control the output power so you can lower it. Several at commands have been dropped and/ore changed and the way you enter the at commands are different. Still playing I have about 35 esp devices whats cool if you have an annoying neighbor try running about 15 at a time....on the wall tends to block out any wifi connection even to his router....too much interference. This may not work for you but it does a great job here placing them on different channels...name the router their name on all devices and vary the channel big confusion on their part if they dont know the mac address.. </p>
<p>0.9.2 use this app</p><p><a href="https://play.google.com/store/apps/details?id=kr.co.tskit.ESP8266Manager" rel="nofollow">https://play.google.com/store/apps/details?id=kr.c...</a></p><p>use the info from his web site here </p><p><a href="http://tskit.co.kr/zbxe/download/2587" rel="nofollow">http://tskit.co.kr/zbxe/download/2587</a></p><p>download the cool esplorer programer </p><p><a href="http://esp8266.ru/esplorer-latest/?f=ESPlorer.zip" rel="nofollow">http://esp8266.ru/esplorer-latest/?f=ESPlorer.zip</a></p><p>download the flasher </p><p><a href="https://github.com/nodemcu/nodemcu-flasher/blob/master/Win32/Release/ESP8266Flasher.exe" rel="nofollow">https://github.com/nodemcu/nodemcu-flasher/blob/ma...</a></p><p>note ypu will have to make changes in this flasher to his page inf examp, load his 0000 and 4000 to the appropriate location on node mcu program page. you will have to select the comm port for it also. If you played with the esp befort this should be easy for you. If not use his loader at :</p><p> <a href="http://tskit.co.kr/zbxe/?module=file&act=procFileDownload&file_srl=2598&sid=de0b39f9eed0df28363437f0e363fea2" rel="nofollow">http://tskit.co.kr/zbxe/?module=file&amp;act=procFileD...</a> this is his xcomm loader after the 9.2 is loaded load his 0000 then load his 4000 as described on his page at:</p><p><a href="http://tskit.co.kr/zbxe/download/2587" rel="nofollow">http://tskit.co.kr/zbxe/download/2587</a></p><p>If you want me to preload one for you I will do it for free ...either send me a esp8266-01 or a the cost of the chip ( about 2,75) . The 201 and the 12 will take the same program....note that the 12 and 201 have several outputs but you have to run lots of wire to control various items this could be ok in like a car short runs to a multi relay box but in a house several long runs....i use only 1 esp8266-01 per relay to control ...the only downside is that you have to connect to that wifi esp directly for each switch. Hope this helped a little. Google hangouts for me is scramplepad@gmail.com</p>
<p>Hey great! thanks for the information</p>
I was thinking of doing the same with te geocaches but then perhaps also letting people get cords from the web pages or even have a pizzel builr into the page that then could open the locked cache
<p>Also here is a link to some KUHN smart sockets for about $21.00 fre shipping. http://www.ebay.com/itm/Smart-Wifi-Plug-Socket-Remote-Control-Power-Socket-for-Andoid-iPhone-App-US-Plug-/181588872808?pt=LH_DefaultDomain_0&amp;hash=item2a478a4e68</p>
<p>How can i access my esp8266 from any where in the world..??</p>
<p>Great job! For those wanting to talk from their PC, you can use this breakout board to convert from USB to TTL: <a href="https://www.sparkfun.com/products/9873." rel="nofollow">https://www.sparkfun.com/products/9873.</a></p><p>There is a program called CoolTermWin that's free that lets you communicate to the board: http://freeware.the-meiers.org/. Be sure to set your baud to 115K in the options.</p>
<p>Can you use the module in a framework like Temboo &amp; grovestreams</p>
<p>Hi. My module seems to be acting strange and differently from both this example and all others I've found.<br><br>I can connect to my access point. But for some reason, AT+CIFSR shows my device having TWO ip-addresses when I use AT+CWMODE=3; One actualy IP address in my LAN (10.0.0.52), and another (192.168.4.1) which id doesn't get from my router.<br><br>If I use CWMODE=1, I only get the actual IP address in my LAN.</p><p>But, in either case, I'm unable to ping the device. I just get &quot;Destination host unreachable&quot;, also after setting AT+CIPMUX=1 and AT+CIPSERVER=1,80. And I cannot connect to port 80 with a terminal program either.&gt;</p><p>Any ideas?</p>
<p>The ping command is sent over your Ethernet network to the device, a couple things could be going on. </p><p>1. You are seeing a response from your device over serial, but it's not actually connected to the network. </p><p>2. The device is on the network, but your IP address and/or subnet mask are causing communication issues. Try to make sure the first three octets of your IP address and subnet mask match on both devices (pinger and pingee). </p><p>3. A firewall or other piece of software is blocking communications. </p><p>I didn't write this instructable but I hope that helps if you haven't gotten it working already. </p>
<p>Hey guys, check this out!</p><p>A lua based firmware for wifi-soc esp8266</p><p><a href="https://github.com/nodemcu/nodemcu-firmware" rel="nofollow">https://github.com/nodemcu/nodemcu-firmware</a></p>
<p>yeah it is a cool firmware - Here's an example for a project with this firmware if you are interested<br>http://www.whatimade.today/esp8266-and-the-water-heater/</p>
<p>WoW ! Excellent Tutorial. I liked it very much. Easy to follow, and I just connected my ESP module in 15 minutes. Great Work.</p>
<p>how do we enabled DHCP? im trying to connect my mobile phone to it...... or does this only allow infrastructure to other esp8266's?</p><p>i have made a successfull TCP Messengers!</p>
<p>DHCP serving is a feature of your router / modem. Are you trying to get your 8266 to acquire an IP address by DHCP? If you were to allow this, then the other devices on your network (eg your phone) wouldn't &quot;know&quot; the address of the 8266 and couldn't communicate with it. It's best for &quot;servers&quot; (like the 8266) to have fixed IP numbers.</p>
<p>well the code inside the 8622 has DHCP, and why be an access point it cant assigned IPs to other connections?</p><p>you saying that you can only connect to these 8622 softAP if other connections TO the device is using preset IPs? </p><p>(im not using a router; i want to connect my mobile to communicate to my robot)</p><p>my phone is meant to ask for an IP from the 8622 DHCP, says that it has one</p>

About This Instructable