The ESP8266 microcontroller from the Chinese manufacturer Espressif is one of the most popular solutions for IoT-based applications that works through a Wi-Fi receiver. It is intended to launch apps stored in its memory and makes a great foundation for quite advanced Wi-Fi device control systems.
ESP8266 chips can be used to manage devices through the wire-connected web as well (after some port forwarding). In particular, using GPIO contacts, you can program a module to turn lighting diodes or relays on/off. Algorithms can also be created with the help of a USB–TTL converter, through contacts, for subsequent communication (RX and TX) or Arduino circuits (for instance, Arduino Uno).
Note that the ESP8266 comes in lots of different versions – from 01 to WeMos D1 Mini.
Why is the ESP8266 so Popular?
The ESP8266 model became prominent in 2014 after the world-renowned Aliexpress marketplace hit the international market. Being pitched at a highly accessible price (about $3–4.5), these microcontrollers rapidly gained global attention and became a top solution for DIY systems.
Some time ago, in the fall of 2015 to be exact, the Espressif team of developers launched an enhanced successor of the super-popular chip – the ESP32 and other modules based on it.
Let’s take a rather more detailed look at these two circuits in order to help you choose the best option for your future IoT-related project.
ESP8266 & ESP32: Pros and Cons
As we’ve already mentioned, the Espressif ESP8266 is a very popular, accessible platform for the implementation of energy-efficient IoT apps that operate based on a Wi-Fi connection.
In turn, the Espressif ESP32 is a relatively new and more advanced solution where creators boosted the speed of the Wi-Fi, added Bluetooth 4.2 and Bluetooth Low Energy support, and increased the number of inputs/outputs. This newer chip costs more: around $5–6.
Here’s a comparison table for the technical specifications of the ESP8266 and ESP32:
|MCU||Xtensa® Single-Core 32-bit L106||Xtensa® Dual-Core 32-bit LX6 600 DMIPS|
|802.11 b/g/n Wi-Fi||Yes, HT20||Yes, HT40|
|Hardware/Software PWM||None / 8 Channels||1 / 16 Channels|
|Typical Frequency||80 MHz||160 MHz|
|SRAM||160 kBytes||512 kBytes|
As you can see, the ESP32 boasts higher performance due to a more powerful dual-core CPU. It also provides faster Wi-Fi connection thanks to the expanded channel, has a lot more static random access memory, 36 GPIO pins (as opposed to the ESP8266 with its 17 pins), and has more contacts as a whole. The ESP32 also has a multiplexing feature.
On the other hand, many amateurs consider the ESP32 to be much more difficult to work with and prefer the older version of the chip. Which should you choose? That’s your decision to make. Whichever you pick, however, we believe that you will make things much easier for yourself by using the Arduino Programming Language.
ESP8266 Use Cases
So, which particular tasks can be solved with the help of this microcontroller?
Lots of them in fact. The most trivial way to use it is to control system-connected sensors. The programmed ESP8266, basically, sends HTTP requests to the server where they are processed in a particular way and then are sent back to the sensors to enable certain actions.
For example, with this module you can create a web server that will process data on environmental temperature and humidity levels. All that could be done based on the Arduino IDE.
As an option, you could also build a small app for the chip that will send emails or publish tweets according to a set schedule.
There are lots of tutorials on the subject on YouTube and GitHub.
Our special attention, though, goes to the following case of employing the ESP8266.
Thus, one Charles Lohr (GitHub nickname – CNLohr) managed to overclock the module and multiply its calculating capacity. He noticed that when overclocked, I2C on this module remains functioning and works perfectly on the 80 MHz frequency, which is the range closest to analog television. As a result, he made the ESP8266 give out a signal at 60 MHz, which corresponds with the frequency of the third channel on analog TV.
Having added a wire serving as a transmitting antenna to the existing body, Charles also made the module’s processor dynamically generate 3D demo scenes. Moreover, the processor was handling the web server and Wi-Fi connection simultaneously. Mr. Lohr didn’t stop at that either and made the chip transmit a full-color image to a TV. For that, he had to adjust signals at two frequencies at once (61.25 MHz and 65.2 MHz).
You can try to repeat this experiment of the creation of an analog television transmission unit. Just make sure your TV supports the NTSC TV standard.
The ESP8266, as you can see in the table above, has a 32-bit processor that boasts low energy consumption. This allows the module to be used based on the self-contained power supply.
To be exact, the specifications of the chip are as follows:
- source voltage: 3.3 V
- energy consumption:10 uA…170 mA
- flash memory: up to 16 MB (usually 512 KB)
- CPU: Tensilica Xtensa L106, 32 bits
- CPU capacity: 80…160 MHz
- RAM: 32 KB + 80 KB
- GPIO pins: 17
- AD converter: one 1024 pin
- Wi-Fi compatibility: 802.11 b/g/n/d/e/i/k/r
- maximum number of TCP connections: 5
Looking at these specs, you may notice that it’s difficult to calculate precisely for how long the module will operate in autonomous mode. When used to the fullest, it can consume the whole 170 mA whereas in sleep mode, the power consumption is a minimum, comprising only 10 mA.
ESP8266 Challenges and Predictions
With the appearance of affordable solutions based on microcontrollers, self-taught developers gained the ability to connect smart home devices via the internet (including the wired connection). They can now also implement either a full-blown web interface or an accessible JSON API quickly and cost-efficiently.
In addition, you can employ the ESP8266 in quite complex domestic automation solutions – for example, for managing wireless sensors, light dimmers, and switches, electric water flow on/off systems, thermostats, or any other IoT sensors.
Summarizing our brief overview, we can say that the ESP8266 is an excellent budget Wi-Fi-based microcontroller. If you need something more energy-efficient and compatible with Bluetooth, however, consider its successor – the ESP32 module. In any case, both devices are good representatives of their niches.
Are you looking to implement a high-quality IoT-based solution? You shouldn’t go out in the field without professional help. We can help you create a reliable, scalable, cost-efficient system for devices interconnected within a centralized management environment.