ESP8266: the WIFI module for Arduino

ESP8266

Arduino started out as a simple board for education and makers who like DIY. A platform of hardware libre for lovers of electronics that could be programmed thanks to Arduino IDE and with a lot of possibilities. Little by little it evolved, emerging new versions and editions of the board, as well as kits and accessories such as the famous shields and modules that expanded the basic functionalities of these boards.

One of the add-ons that made a big leap forward in capabilities was the WiFi module, such as ESP8266, since this allowed that the projects that until now were isolated could be connected to a network and thus be able to monitor or manage the project from the Internet anywhere on the planet. That is why we are going to dedicate this guide to ESP8266, so that you can know everything you really need ...

A Little History

ESP8285

The first company that created this ESP8266 chip was Espressif, a Chinese company located in Shanghai, although currently there are other manufacturers that are developing and producing it. The exact date of its launch was in the summer of 2014, so it is not that old. It began to be marketed at a low price and that together with its capabilities made it soon become very popular.

La developer community It also had an important role in the success, since they began to translate and publish a large amount of documentation, create firmwares and other codes to be able to use on the ESP8266. That gave the makers all the tools they needed to be able to use the device to their full power.

But you should know, that as with transistors, the nomenclature or numbering It has not always been ESP8266, but first some early ESPs appeared, then versions like the ESP8285 from 2016 came that included an integrated 1MB flahsd memory, and then the ESP8266 that we know today would appear, which seems to have taken a step back because not it has such memory, but other external chips can be added to store programs.

What is it?

ESP8266

El ESP8266 can be integrated into a WiFi which provides a low cost chip with a full TCP / IP stack and a microcontroller. It is powered by 3.3v and has an 106 Mhz Tensilica Xtensa LX80 processor, 64 KB RAM for instructions and 96 KB for data, 16 GPIO pins, dedicated UART pins, and SPI and I2C interface.

La Tensilica CPU it can be made faster by overclocking that some, but not all, models allow. In fact, the clock frequency can be doubled. By the way, a 32-bit RISC type CPU. Also included in the module is a 10-bit ADC converter for the signals.

As a complement, it includes an external QSPI flash memory chip from 512 KB to 4 MB depending on the module, sometimes it can even reach 16 MB. Regarding the WiFi connectivity capabilities, it is compatible with the IEEE 802.11 b / g / n standard, in addition to supporting WEP, WPA and WPA2 security.

For what do you use it?

App for home automation

The ESP8266, simply put, adds WiFi connectivity capacity to our projects. That is, it allows wireless connection to a local network or to the Internet. This allows a lot of possibilities, such as being able to connect or disconnect electrical appliances (using a relay) or other types of mechanical systems of our home to domotize the house and control it over the Internet from our smartphone or any computer connected from anywhere.

It can also be used to control gardening and irrigation systems through the network, to automate industrial systems, control of IP video surveillance cameras, monitor data from sensor networks distributed at different points, for wearables with connection capacity, to IoT projects (Internet of Things or Internet of Things) and everything you can imagine ...

ESP8266 Module Features:

For you to know more in depth the ESP8266, here we give you a series of interesting facts that you will need to know about this module.

ESP8266 Datasheet

In previous sections we have described some of the main features of the ESP8266To get all the technical details in full, you already know that you can download the famous datasheets that manufacturers have from their official web pages. Some of the extra features that are detailed in the datasheet are:

  • Tensilica Xtensa L106 32-bit RISC 80Mhz CPU
  • 10-bit ADC converter
  • RAM 64KB i / 96KB d
  • 16-pin GPIO (not all can be used, also the GPIO16 is connected to the RTC or Real Time Clock)
  • UART
  • SPI
  • I2C
  • Voltage 3v and 3.6v
  • Intensity 80mA
  • Operating temperature -40 to 125ºC
  • WiFi IEEE 802.11 b / g / n with IPv4 support and TCP / UDP / HTTP / HTTPS / FTP protocols
  • Consumption 0.0005 to 170 mA depending on signal strength
  • Modes: Active mode (active), Sleep Mode (asleep), Deep Sleep (deep sleep) - Affect consumption

For more information, download datasheet:

Unfortunately only are in english, but it is easy to understand all the details if you have technical knowledge.

Module pinout

Another detail that can be seen in the datasheet is the pinout, that is, the pantillage. How many sideburns do you have and what is each one for? Depending on whether it is only the ESP8266 chip or if it comes in another format or module, the pinouts may vary as you can see in the images above.

Integration with Arduino and wifi.h

For programming you have at your disposal a library called wifi.h specific so that you can use functions included in it when creating the source codes with Arduino IDE to program the microcontroller. You can see more information on these two GitHub pages where these projects are hosted: Arduino Wifi.h Library / Wifi.h Espressif Library.

As for the integration with Arduino, it could be done whether it is a module or the ESP8266 chip separately. However, it is recommended to use modules. There are several types, but the best known are those provided by the well-known manufacturer AI Thinker:

  • ESP-01: it is a module of the first that appeared. Its price is usually between € 2 and € 4. It's a bit dated and only has two usable GPIOs to control its sensors and actuators. This module has a built-in WiFi antenna, LEDs, the ESP8266 chip and BG25Q80A flash memory.
  • ESP-05: its price is similar to the previous one, and it is quite simple. Its pins can easily be used to work as a WiFi shield for Arduino or to use it on a breadboard, but it does not have any accessible GPIO.
  • ESP-12Although it is quite used, it may not be the most practical of all, especially for beginners. Its price is about € 4, and it has 11 accessible GPIO connections, one of them is 10-bit analog (1024 possible digital values). But it has a big defect, which you will have to solder, because it does not have pins.
  • ESP-201: the price is € 6 and is the preferred one for makers and recommended for most users. It also has 11 GPIO ports, although not all of us can use them. In this case, it does have pins to fit it on the breadboard or with Arduino without soldering.

Know that there are more modulesIn fact, in the next section we talk about one that has become popular today and deserves a special mention.

NodeMCU

ESP8266

A module very popular today is the so-called NodeMCU, with a price similar to ESP-201, that is, approximately € 6. It is the module that you can see in the main images of this article and that is extremely easy to use, with everything you need already integrated. That is, you can work autonomously from the beginning, without having to add other extras as in the case of the previous modules.

NodeMCU also includes an ESP8266 chip, a serial / USB adapter, powered by microUSB, and is based on the characteristics of the ESP-12. Several versions of this NodeMCU have appeared, such as 1 or 2 more updated and improved. But the most interesting thing is the firmware that it includes, which it can be downloaded and it allows programming in languages ​​like Python, BASIC, JavaScript and other less popular ones like LUA. Remember that firmware is a code, a very low-level program that is stored in memory ...


Be the first to comment

Leave a Comment

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

*

*

  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.