The ESP8266 chip inside the ticker
The chip and the module
Inside every CryptoTicr is an ESP8266, a Wi-Fi microcontroller made by Espressif Systems, on a small module called the ESP-12F. In one chip it has a 32-bit processor (a Tensilica L106, running at up to 160 MHz), its own memory, and a 2.4 GHz Wi-Fi radio (802.11 b/g/n, with WPA and WPA2 security). The module adds the flash memory that holds the program and a Wi-Fi antenna printed on its circuit board. The ticker’s screen hangs off the same chip.
IoT, in plain words
The Internet of Things (IoT) is the name for everyday objects that sit on your Wi-Fi and do one job: a plug you can switch from your phone, a bulb that changes color, a thermostat, a sensor, a camera, a price ticker. Each needs a small, inexpensive, low-power computer with Wi-Fi built in. Espressif’s chips are among the most common answers. In Espressif’s own words, they go into smart appliances, lighting, climate controls, cameras, wearables, entry control and sensor networks.
The story of the chip
- 2008. Espressif Systems starts in Shanghai (Espressif).
- 2013. Its first chip, the ESP8089, ships: a Wi-Fi radio for tablets and other devices.
- 2014. The ESP8266 puts that Wi-Fi know-how together with a whole 32-bit processor, a core licensed from Tensilica (the L106), on one chip, so a single part can run a product by itself.
- August 2014. Hackaday reports a Wi-Fi module built on it selling for $5, with all of its documentation in Chinese. Hobbyists around the world translate it and start building.
- October 2014. Espressif posts a full software kit (Hackaday), and the NodeMCU project begins.
- 2015. Volunteers bring the chip to the Arduino world (Hackaday). The Arduino core for ESP8266 reaches version 2.0.0 in November, and anyone who can blink a light on an Arduino can put a project on Wi-Fi.
- 2017. Espressif ships its 100 millionth chip.
- Today. Espressif counts over 1.5 billion chips shipped (Espressif), and over a billion of them since the ESP8266’s launch alone (Espressif).
Espressif does not publish a count for the ESP8266 on its own. By our estimate, from Espressif’s published totals, around 400 million ESP8266 chips have been sold, and millions are at work right now in plugs, bulbs, sensors and switches, day and night. Few Wi-Fi chips have been proven in so many homes.
Why it caught on
- One chip does it all. A Wi-Fi radio, the radio’s front end and a 32-bit processor share one chip, so it can run a whole product by itself instead of being a Wi-Fi adapter for another processor. Very few parts go around it, which keeps the boards small.
- Inexpensive. Few parts means a complete Wi-Fi module costs a few dollars, which put Wi-Fi within reach of plugs, bulbs, sensors and hobby projects.
- Low power. It runs on very little, and can sleep between jobs.
- Reliable. It has proved itself in a great many devices, and Espressif still makes the same chip and keeps it under its product longevity commitment.
- Open to everyone. Free tools and a large community grew up around it: the Arduino core for ESP8266, built by volunteers, lets anyone who can blink an LED on an Arduino put a project on Wi-Fi.
Open projects built on it
- Tasmota: open firmware for smart plugs, switches and bulbs, born on the ESP8266, for local control without a cloud.
- ESPHome: custom smart-home devices described in a short text file, working with Home Assistant.
- WLED: control for addressable LED strips, with a web page and an app.
- ESPEasy: sensors and switches set up from a web page, no coding.
- OpenMQTTGateway: a bridge from radio, infrared and Bluetooth gadgets to a home automation system.
- NodeMCU: one of the first ways to program the chip, in the Lua language.
No operating system
A computer or phone runs an operating system that juggles many programs at once. The ticker’s chip has none. Its program runs as one loop, over and over, and the Wi-Fi software does its work in between the passes of that loop, so every part of the program has to finish its job quickly and hand back control.
A whole ticker in very little memory
- Memory. The chip has about 80 KB of working memory for data, and Espressif says about 50 KB of it is left for a program while the chip is on Wi-Fi. The ticker runs in that, with about 11 to 14 KB still free while it runs. Every screen, chart and price is drawn within it.
- Program space. The whole program, with its fonts and the setup page, is a little over 1 MB. The setup page is stored compressed, and the coin icons are kept compressed and unpacked as each one is drawn.
- Updates. The ticker updates itself over Wi-Fi. The new program is downloaded beside the running one and checked before it takes over, which is why the program has to stay small enough for two copies to fit.
How it is programmed
The ticker is written in C++ on the Arduino core for ESP8266, built with PlatformIO in Visual Studio Code, and flashed the first time over USB with Espressif’s esptool. After that, every update arrives over Wi-Fi. The same tools are free for anyone: see Getting started with the ESP8266.