Adding WiFi to any project can be difficult. There are a few off the shelf options that make it easier. One option is the official Arduino WiFi shield. This full-featured shield uses its integrated microcontroller to handle the WiFi protocol, security, and the TCP/IP stack for you. From “plug it in and go” perspective, this is an awesome option for Arduino-based projects. Plenty of example code supports the nicely designed hardware. The main downside to some people is the price.
The more popular option these days is the ESP8266, typically advertised around $5US. They are about the size of a TO-220 packaged transistor. How do they get so small? Using a technology known as “System On a Chip”, or SOC, these tiny modules pack everything on the Arduino WiFi shield inside of a single chip! SOCs are great when space is limited. If production volumes are high enough, there can even be a cost advantage.
After spending some time with an ESP8266 I bought on eBay (which I don’t recommend..), I’ve found some things you need to know before building your ESP8266 based project.
1. Not Breadboard Friendly
Most modules come with male pin headers pre-soldered. However, the pinout makes it impossible to plug directly into a breadboard. This pinout style means you are going to need to use jumper wires. You might be thinking, but why do you need a breadboard? Isn’t this an entire SYSTEM on a chip?
Yes, but there’s still some stuff missing.
2. Not 5V Compatible
The ESP8266 modules are based on 3.3V power and I/O (aka 3v3) . If you are going to connect the ESP8266 to an Arduino, LaunchPad, or any other 5V-based Microcontroller system, you’ll need to do some logic conversion. Directly connecting to 5V I/O, like that from an Uno, can destroy the I/O of the sensitive ESP8266 chip.
See the section below on the connection nightmare for an example diagram.
3. Power Hungry
Don’t be fooled into thinking that because the board runs at 3.3V or has a small footprint that it is a “low power” device. The current draw is high when WiFi runs. In my tests, I saw my little board draw over 50mA while idle. When WiFi went active, there are large spikes.
The built-in regulator on an FTDI chip or even the slightly larger 3.3V regulator on an Arduino board is not enough. You need to use a dedicated 3.3V source or dedicated, high current, regulator. When trying to power from my Uno, my ESP8266 would not boot and I got no blinking blue lights.
4. Two ways to use the ESP8266
Keep in mind that inside of that SOC, is a microcontroller. When powered, these little boards are running some code or firmware. The default firmware that ships allow them to work as a “UART to WiFi” adapter.
However, it is also possible to overwrite this firmware and make the board do something else.
UART or Serial Interface
The default firmware makes it relatively easy to add WiFi to a project. Open up a serial port at 9600 or 115200-baud and you can start sending ASCII string commands. What kind of commands? So-called “AT-Commands.”
Back when computers used modems to communicate at 300 baud, the Hayes Corporation created a command set that the industry quickly adopted. The Hayes command style is still used today, even though Hayes is long gone. (In fact, your super modern smartphone uses it…)
It works like this. The types in a command and gets response. Hopefully like this:
AT -something
OK
Sometimes, however, it’ll say:
ERROR
Then you have to figure out what you (not the modem) did wrong.
That is how the ESP8266 communicates, by default, with the outside world. Using this handy ESP8266 command chart, you can see the different types of commands. It is relatively straightforward, for example, to list all of the WiFi Hotspots it detects, Connect to One (even if it has WPA2), and then send a raw HTTP request to our friend google.com.
AT
OK
AT+RST
OK
AT+CWLAP
6,”Hi There”, -85, “f8:7b:8c:1e:7c:6d"
AT+CWJAP=“Hi There”,”-yeah-right"
OK
AT+CIFSR
192.168.1.249
OK
Crude but effective.
Standalone system
The second use model is to program directly the microcontroller inside of the ESP8266 SOC. In fact, you can even use the latest Arduino Board Manager to install support for ESP8266s into the Arduino IDE. So if you are familiar with Arduino, this sounds great. Just install support, write your code, connect the board, and upload.
Connecting the ESP8266 is a nightmare
The third step in that sequence, connect the board, is the problem.
Most of the common ESP8266 modules are NOT designed for external programming. The intended use is a low-cost Serial/UART communication. Some of the signals from the SOC may not be broken out and to save cost passive components like pull-up and pull-down resistors are missing.
Here’s a schematic of the extra hardware necessary to make it possible to program a cheap ESP8266 through the Arduino IDE.
Yikes! What a mess!
Even after doing all of that I still couldn’t get my module to program through the IDE. Eventually, I gave up and decided to look for alternatives.
There are Alternative Boards
Vendors like Sparkfun, Seeedstudio’s Grove UART WiFi, and Adafruit HUZZAH make their own variants of boards based on the ESP8266. They all carry a higher price tag than the cheap boards found on eBay.
The difference is property connected signals, clean breakouts, and strong vendor support. I ordered some boards from Adafruit after writing this post, and can’t wait for them to show up.
If you are just getting started with the ESP8266, I highly recommend going with one of these boards first. You can always switch to the lower cost boards once you get your project going.
[shareable]Don’t waste your time with cheap ESP8266 eBay crap![/shareable]
Conclusion
The IoT fever has hit the maker community with the availability of the ESP8266. As long as you understand how it is powered, how it connects to a circuit, and the difference between ESP8266 boards, adding WiFi to any project is a breeze.
For more information check out this vibrant ESP8266 Community Forum.
Another excellent resource is this NURDspace ESP8266 Wiki page.
Fan of making things beep, blink and fly. Created AddOhms. Writer for Hackster.io News. Freelance electronics content creator for hire! KN6FGY and, of course, bald.
Nothing in this article is inherently wrong – on it’s own these chips aren’t the easiest to use for beginners….. however if instead a beginner gets a NodeMCU then they get all the benefits of the above and none of the downsides that you describe, except maybe that it’s a 3v3 device, but that’s not the end of the world at all.
I’ve used 20+ NodeMCUs all bought from Aliexpress for under €3, just one has failed me and that was after 4 months of ultra heavy usage. You really can’t go wrong.
Honestly, if you’re a beginner learning ‘Arduino stuff’ in 2018, getting 3 or 4 NodeMCUs makes far more sense than buying any of the Arduino boards if you want to just get up and running with some buttons, sensors, LCD screens and LED strips etc.
… (to add context) I think the reason for the tone of the most of the comments on this page (and why I decided to comment) is that on your MQTT tutorial page you say “Read my ESP8266 caution post for why I use the Adafruit Huzzah and not the junk from eBay.”. I think all we’re trying to say is that “not the junk from eBay” isn’t relevant in 2018. NodeMCUs and ESP8266s from Aliexpress (and most likely Ebay) tend to be absolutely fine for home hobby projects.
Next time I write a post, I’ll travel 3 years into the future to see if conditions change. (Although, my opinion of buying designed parts from AliExpress or eBay probably never will.)
No need to be defensive: not the whole world can agree with your articles, and most of the comments I read here are on the mark. Personnly too, I found the ESP8266 (I use the 12F versions) to be extremely powerfull and versatile. And with the Arduino IDE able to program them it has been a hit for many of my projects.
Admitted: I developped a board able to auto-reset the ESP controller, making it as much a easy-to-go thing as any Arduino board. But I can hardly think of any project now I would use any Atmel product instead of an ESP.
All you need to program a ESP8266 is to pull GPIO00 low on power-up and download using a 3.3V serial interface (TX-RX, RX-TX). Reset and off you go. No mess at all. Using the Arduino ESP8266 generic module board.
I find this board to be the best since sliced bread and a real competitor for otherwise Arduino-based projects.
Hello,
My favourite model is the ESP-201 which allowing me an external antenna : I read MANY bad words about this model and I faced lot of random crash at the beginning … but the board wasn’t guilty, problems were elsewhere.
So the 2 golden rules are :
* You can’t avoid a decoupling capacitor : NO YOU CAN’T ! WiFi is very power hungry as said, and this capacitor is the main key for stability. I’ve put a 470uF and not suffered for stability pb any-more.
* the 2nd things is **breadboard are bad** : connections are random and it caused all those crashes especially at bootup. It’s not only true for the power pins, but also for RESET one : if not secured, crashes will happen frequently.
So, this 201 model is clearly my favourite one :
* many GPIO exported unlike ESP-01
* almost breadboard compliant
* 1 Mb flash on newer models
* no power wasted on unneeded stuffs like on the NodeMCU.
* and … this external antenna connector. YYYeeeeaaaahhhhh !
I had similar problems with module, i found a fix, connect rx pin of the module to ground via a 10k pulldown . Then flashed micropython firmwire. Now i got myself a standalone module that i can program and play around from my web browser using micropython REPL.
As previously mentioned, you may want to check out the NodeMCU dev board 1.0, which can be had from eBay for around $5 shipped. They are breadboard friendly, leaving a pin on each side, no adapter needed. They include a micro USB connector, a USB to serial chip, and a voltage regulator. They break out all the pins, and they’ve got 4GB of flash storage.
The Arduino core for the ESP8266 includes the board, so you can just plug in the USB cable, select “NodeMCU 1.0 (ESP-12E Module)” and you are ready to compile and program.
Very old blog post now admittedly but still remains rather biased (and rather silly) view. The chips are 3.3v so of course they are not 5v friendly. They consume moderate power when wifi is transmitting, of course wifi is power hungry by design. A nightmare to connect? Just like anything can be a nightmare to connect to an arduino, if you haven’t done some research first. 3 out of 10 for this blog.
The title and content of the blog is “4 gotchas” not “4 reasons to not use the ESP8266.” These were the 4 things that I ran into and wanted other new users of an ESP to know about. It is comical you say “if you haven’t done some research first” because that’s exactly what this post is meant to address. Lastly, obviously this was not meant as a slam on the ESP8266 since I wrote a complementarity article on 5 Reasons to Switch from Arduino [Uno] to ESP82666 shortly after.
Please take your inappropriate attitude elsewhere.
The Connection Diagram has some unnecessary parts for connecting to FTDI.
The only requirements for programming the board are that CH_PD is pulled-up to enable the board, this does not need a 10k resistor, you can connect straight to VCC, GPIO0 needs to need held low with a resistor to ground. TX and RX need to be attached to the corresponding FTDI pins and then I just power the board from the FTDI using a voltage regulator to convert from 5V to 3.3V.
The resistors connected to CH_PD, RESET and GPIO15 are not needed and nor is the capacitor across VCC-GND. Also GPIO0 does not need to be connected to DTR.
I use it to connect to wifi log some data on a remote server and then go to sleep for 71 minutes, I can run the ESP on 3AA batteries for 14 days, and my revised version will last 60 days according to my calculations, not too bad..
1 – You say not breadboard friendly, that’s true but there are many SMD adapters check the the one from ElectroDragon that also one include a small 5V->3.3V regulator (Vin power only not I/O) and also have two micro-switchs for Flash mode and Reset.
2 – I/O not 5V friendly, that’s true but it is only a problem when using it with 5V devices and as ESP8266 like model 12-E comes with a lot of I/O (only one ADC and 0-1V range that’s true) you often don’t need an Arduino. And instead using resistors you can use small 2, 4 or 8 port logic converters that cost nothing.
3 – Power Hungry when using WiFi that’s true … what did you expect ? any WiFi chipset are power hungry that’s normal. But when not using WiFi the ESP can also go Sleep and Deep Sleep and use very low power.
4 – Two ways to use ESP8266, yes and that’s the main point (should I say problem), many web sites and blogs present the ESP as a simple UART->WiFi gateway, but ESP is much more than this and I would present it on exact opposite, ESP is a full microcontroller with a lot of I/O and embedded WiFi that “may” be used as UART->WiFi for Arduino’s project for example. And on ESP you can develop in C but also LUA, MicroPython and also Basic depending which firmware you use. So please everybody stop talking about ESP as a basic UART->WiFi gateway !
In fact many of my Arduino’s projects that needed WiFi has been fully replaced by an ESP8266 12-E (except when I need more than one Analog I/O)
Do not forget there are many versions of ESP with more or less PINs I/O, choose the one you need but the price is nearly equal.
You say not breadboard friendly, that’s true but there are many SMD adapters
Yup. Needing an adapter means not being breadboard friendly.
I/O not 5V friendly, that’s true but it is only a problem when using it with 5V
Yup. That’s true. In other words, not 5V friendly (as you just said yourself.)
There are not meant to be “negatives.” They are the things new users may not be aware of when using an ESP8266 for the first time. There’s a difference between those two ideas.
FInishing up a low-volume hobbyist product with an ESP8266. Very daunting. Most endearing feature: They spit out stuff at weird bit rates when they reset which invariably causes one’s terminal emulator to lock up or go wonky.
Like other websites, this one uses cookies to remember things. Mostly, I use Google Analytics to know how many people come here. ¯\_(ツ)_/¯
By clicking “Accept”, you consent to the use of ALL the cookies.
This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary cookies are absolutely essential for the website to function properly. These cookies ensure basic functionalities and security features of the website, anonymously.
Cookie
Duration
Description
cookielawinfo-checkbox-advertisement
1 year
Set by the GDPR Cookie Consent plugin, this cookie is used to record the user consent for the cookies in the "Advertisement" category .
cookielawinfo-checkbox-analytics
11 months
This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics".
cookielawinfo-checkbox-functional
11 months
The cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional".
cookielawinfo-checkbox-necessary
11 months
This cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary".
cookielawinfo-checkbox-others
11 months
This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other.
cookielawinfo-checkbox-performance
11 months
This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance".
CookieLawInfoConsent
1 year
Records the default button state of the corresponding category & the status of CCPA. It works only in coordination with the primary cookie.
viewed_cookie_policy
11 months
The cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data.
Functional cookies help to perform certain functionalities like sharing the content of the website on social media platforms, collect feedbacks, and other third-party features.
Cookie
Duration
Description
language
session
This cookie is used to store the language preference of the user.
Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.
Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics the number of visitors, bounce rate, traffic source, etc.
Cookie
Duration
Description
_ga
2 years
The _ga cookie, installed by Google Analytics, calculates visitor, session and campaign data and also keeps track of site usage for the site's analytics report. The cookie stores information anonymously and assigns a randomly generated number to recognize unique visitors.
_ga_LHR6J24XSY
2 years
This cookie is installed by Google Analytics.
_gat_gtag_UA_42726312_1
1 minute
Set by Google to distinguish users.
_gid
1 day
Installed by Google Analytics, _gid cookie stores information on how visitors use a website, while also creating an analytics report of the website's performance. Some of the data that are collected include the number of visitors, their source, and the pages they visit anonymously.
browser_id
5 years
This cookie is used for identifying the visitor browser on re-visit to the website.
CONSENT
2 years
YouTube sets this cookie via embedded youtube-videos and registers anonymous statistical data.
Advertisement cookies are used to provide visitors with relevant ads and marketing campaigns. These cookies track visitors across websites and collect information to provide customized ads.
Cookie
Duration
Description
VISITOR_INFO1_LIVE
5 months 27 days
A cookie set by YouTube to measure bandwidth that determines whether the user gets the new or old player interface.
YSC
session
YSC cookie is set by Youtube and is used to track the views of embedded videos on Youtube pages.
yt-remote-connected-devices
never
YouTube sets this cookie to store the video preferences of the user using embedded YouTube video.
yt-remote-device-id
never
YouTube sets this cookie to store the video preferences of the user using embedded YouTube video.
yt.innertube::nextId
never
This cookie, set by YouTube, registers a unique ID to store data on what videos from YouTube the user has seen.
yt.innertube::requests
never
This cookie, set by YouTube, registers a unique ID to store data on what videos from YouTube the user has seen.
23 Comments
Anyone knows where to find ESP8266-09 schematics?
Nothing in this article is inherently wrong – on it’s own these chips aren’t the easiest to use for beginners….. however if instead a beginner gets a NodeMCU then they get all the benefits of the above and none of the downsides that you describe, except maybe that it’s a 3v3 device, but that’s not the end of the world at all.
I’ve used 20+ NodeMCUs all bought from Aliexpress for under €3, just one has failed me and that was after 4 months of ultra heavy usage. You really can’t go wrong.
Honestly, if you’re a beginner learning ‘Arduino stuff’ in 2018, getting 3 or 4 NodeMCUs makes far more sense than buying any of the Arduino boards if you want to just get up and running with some buttons, sensors, LCD screens and LED strips etc.
… (to add context) I think the reason for the tone of the most of the comments on this page (and why I decided to comment) is that on your MQTT tutorial page you say “Read my ESP8266 caution post for why I use the Adafruit Huzzah and not the junk from eBay.”. I think all we’re trying to say is that “not the junk from eBay” isn’t relevant in 2018. NodeMCUs and ESP8266s from Aliexpress (and most likely Ebay) tend to be absolutely fine for home hobby projects.
Next time I write a post, I’ll travel 3 years into the future to see if conditions change. (Although, my opinion of buying designed parts from AliExpress or eBay probably never will.)
No need to be defensive: not the whole world can agree with your articles, and most of the comments I read here are on the mark. Personnly too, I found the ESP8266 (I use the 12F versions) to be extremely powerfull and versatile. And with the Arduino IDE able to program them it has been a hit for many of my projects.
Admitted: I developped a board able to auto-reset the ESP controller, making it as much a easy-to-go thing as any Arduino board. But I can hardly think of any project now I would use any Atmel product instead of an ESP.
Not if you want a few analogue inputs, complete library compatibility and works with existing shields.
All you need to program a ESP8266 is to pull GPIO00 low on power-up and download using a 3.3V serial interface (TX-RX, RX-TX). Reset and off you go. No mess at all. Using the Arduino ESP8266 generic module board.
I find this board to be the best since sliced bread and a real competitor for otherwise Arduino-based projects.
Hello,
My favourite model is the ESP-201 which allowing me an external antenna : I read MANY bad words about this model and I faced lot of random crash at the beginning … but the board wasn’t guilty, problems were elsewhere.
So the 2 golden rules are :
* You can’t avoid a decoupling capacitor : NO YOU CAN’T ! WiFi is very power hungry as said, and this capacitor is the main key for stability. I’ve put a 470uF and not suffered for stability pb any-more.
* the 2nd things is **breadboard are bad** : connections are random and it caused all those crashes especially at bootup. It’s not only true for the power pins, but also for RESET one : if not secured, crashes will happen frequently.
So, this 201 model is clearly my favourite one :
* many GPIO exported unlike ESP-01
* almost breadboard compliant
* 1 Mb flash on newer models
* no power wasted on unneeded stuffs like on the NodeMCU.
* and … this external antenna connector. YYYeeeeaaaahhhhh !
I had similar problems with module, i found a fix, connect rx pin of the module to ground via a 10k pulldown . Then flashed micropython firmwire. Now i got myself a standalone module that i can program and play around from my web browser using micropython REPL.
As previously mentioned, you may want to check out the NodeMCU dev board 1.0, which can be had from eBay for around $5 shipped. They are breadboard friendly, leaving a pin on each side, no adapter needed. They include a micro USB connector, a USB to serial chip, and a voltage regulator. They break out all the pins, and they’ve got 4GB of flash storage.
The Arduino core for the ESP8266 includes the board, so you can just plug in the USB cable, select “NodeMCU 1.0 (ESP-12E Module)” and you are ready to compile and program.
Very old blog post now admittedly but still remains rather biased (and rather silly) view. The chips are 3.3v so of course they are not 5v friendly. They consume moderate power when wifi is transmitting, of course wifi is power hungry by design. A nightmare to connect? Just like anything can be a nightmare to connect to an arduino, if you haven’t done some research first. 3 out of 10 for this blog.
The title and content of the blog is “4 gotchas” not “4 reasons to not use the ESP8266.” These were the 4 things that I ran into and wanted other new users of an ESP to know about. It is comical you say “if you haven’t done some research first” because that’s exactly what this post is meant to address. Lastly, obviously this was not meant as a slam on the ESP8266 since I wrote a complementarity article on 5 Reasons to Switch from Arduino [Uno] to ESP82666 shortly after.
Please take your inappropriate attitude elsewhere.
The Connection Diagram has some unnecessary parts for connecting to FTDI.
The only requirements for programming the board are that CH_PD is pulled-up to enable the board, this does not need a 10k resistor, you can connect straight to VCC, GPIO0 needs to need held low with a resistor to ground. TX and RX need to be attached to the corresponding FTDI pins and then I just power the board from the FTDI using a voltage regulator to convert from 5V to 3.3V.
The resistors connected to CH_PD, RESET and GPIO15 are not needed and nor is the capacitor across VCC-GND. Also GPIO0 does not need to be connected to DTR.
I use it to connect to wifi log some data on a remote server and then go to sleep for 71 minutes, I can run the ESP on 3AA batteries for 14 days, and my revised version will last 60 days according to my calculations, not too bad..
Hi, take a look at nodemcu boards to avoid complicated connections.
Hello,
1 – You say not breadboard friendly, that’s true but there are many SMD adapters check the the one from ElectroDragon that also one include a small 5V->3.3V regulator (Vin power only not I/O) and also have two micro-switchs for Flash mode and Reset.
2 – I/O not 5V friendly, that’s true but it is only a problem when using it with 5V devices and as ESP8266 like model 12-E comes with a lot of I/O (only one ADC and 0-1V range that’s true) you often don’t need an Arduino. And instead using resistors you can use small 2, 4 or 8 port logic converters that cost nothing.
3 – Power Hungry when using WiFi that’s true … what did you expect ? any WiFi chipset are power hungry that’s normal. But when not using WiFi the ESP can also go Sleep and Deep Sleep and use very low power.
4 – Two ways to use ESP8266, yes and that’s the main point (should I say problem), many web sites and blogs present the ESP as a simple UART->WiFi gateway, but ESP is much more than this and I would present it on exact opposite, ESP is a full microcontroller with a lot of I/O and embedded WiFi that “may” be used as UART->WiFi for Arduino’s project for example. And on ESP you can develop in C but also LUA, MicroPython and also Basic depending which firmware you use. So please everybody stop talking about ESP as a basic UART->WiFi gateway !
In fact many of my Arduino’s projects that needed WiFi has been fully replaced by an ESP8266 12-E (except when I need more than one Analog I/O)
Do not forget there are many versions of ESP with more or less PINs I/O, choose the one you need but the price is nearly equal.
You say not breadboard friendly, that’s true but there are many SMD adapters
Yup. Needing an adapter means not being breadboard friendly.
I/O not 5V friendly, that’s true but it is only a problem when using it with 5V
Yup. That’s true. In other words, not 5V friendly (as you just said yourself.)
There are not meant to be “negatives.” They are the things new users may not be aware of when using an ESP8266 for the first time. There’s a difference between those two ideas.
Can I use this board in the mass production ?
Guess it depends on the production run, but I wouldn’t.
The ultra-cheap eBay modules don’t have any certifications, so you’ll still need those anyway.
FInishing up a low-volume hobbyist product with an ESP8266. Very daunting. Most endearing feature: They spit out stuff at weird bit rates when they reset which invariably causes one’s terminal emulator to lock up or go wonky.
Wow. I saw that too but thought it was just my module doing that.
I do not understand which bit rate are you talking about ? don’t you talk about “baud” rate on UART port that is 74880 by defailt at boot time ?
“Weird” not common baudrate has been reported by other users