ESP8266 – hardware

A new toy on the block!

Some of my students mentioned the ESP8266 modules to me. They looked very interesting, so took a closer look.

The ESP8266 chip combines an LX106 80 MHz 32-bit CPU with some firmware in ROM, some RAM, and WiFi hardware. With a few external components on a small PCB an ESP8266 modules is a complete WiFi node. It runs at 3.3V, so it needs a level shifter when used with a 5V micro-controller or 5V USB-serial converter.

An ESF8266 is not a micro-controller: it does contain a ROM, but this ROM contains a set of HW interface functions and a boot-loader. The boot-loader loads the application code from either a flash ROM, or over an asynchronous serial connection. In the ESP8266 modules that are sold, the flash ROM contains an application written by the manufacturer that communicates over the serial lines using a protocol that resembles the Hayes AT command set for modems. This is nice for a first experiment and for very simple projects, and there are quite a few projects on the web that use an ESP8266 module in this way. But people found out that they can write their own applications, so there are various alternative firmwares available, like Frankenstein, a ‘better’ command interpreter (composed from different ‘body’ parts found all over the internet), and NodeMCU, which contains Lua compiler/interpreter that allows you to write an application in Lua, and have it stored on the flash ROM, and run on the module.

Various ESP866 modules are offered, that combine the chip itself with a flash ROM, an oscillator, a few passive components and an antenna on a PCB. The main differences are the number of pins that are accessible, and the WiFi antenna (PCB trace, ceramic, or external). In most cases you can buy a module, but that’s all you will get: don’t expect a circuit diagram or any other documentation.

ESP-01

esp-01

esp-01-2

This seems to be the original module, and it is (probably for that reason) still the one that is most commonly shown in projects on the web. The form factor and pins are much like the popular 8-pin nrf24 modules. It has a PCB trace antenna. It has only 8 pins, of which 2 are for power, 2 for serial communication, and 2 for reset and power-down, which leaves only 2 free to interface to external hardware (but these pins also select the boot-mode). This can be a bit limiting. The pins are on a standard 2.54 mm 2 x 4 grid, but you can’t put it directly in a solderless breadboard because there is no gap between the rows. For a first experiment, I made an adapter by soldering a 2 x 4 part of a pin-header strip to a 2 x 4 part of a wire-cups strip.

ESP-02

esp-02

This is a very small variation of the ESP-01, probably meant for production instead of experiments. It is meant to be soldered onto a PCB, with its 8 castellated pads (edge-connections in the form of cut-trough holes) making contact to traces on the main PCB. It has an U-FL antenna connector instead of the PCB trace antenna. It has the same 8 connections as the ESP-01. I don’t have one at hand, but the pads seem to be on a 2.54 grid, so you could solder pins to this module and put it directly in a breadboard, but this arrangement will be brittle because the pads are not ‘full’ pads.

ESP-03

esp-03

esp-03-2

This module has a ceramic antenna on the PCB, and more pins of the ESP8266 exposed on the (castellated) pads. Alas, the pads are on a 2mm grid, so some creative soldering is required to use this module in a 2.54 mm breadboard. Note that the antenna is also connected to a pad, better leave this pad unconnected.

ESP-04

??????????e

esp-04-2

This module seems to be a copy of the ESP-03, but without the ceramic antenna. Instead, the antenna must be connected to a pad, which does not seem a sound HF design to me.

ESP-05

esp-05

This module has its 5 connections on a 2.54 mm grid and these are real pads, so you can solder a (90 degree) pin header to it and use it directly in a breadboard. But it has an antenna connector instead of an on-board antenna, and it exposes only the minimum of pins, so you can’t use it with other software than the default AT-command interpreter, which IMO limits is usefulness.

ESP-06

esp-06

This is a PCB with a metal shield. The connections, including the antenna, are PCB pads on the bottom side. This one is clearly meant for production, not for hobby or prototype use.

ESP-07

esp-07

This is IMO the most usefull of the smaller ESP-* modules: it has the HF circuit canned, a decent number of connections exposed, and both a ceramic antenna and an antenna connector. The pads are on the inconvenient 2 mm grid, but a cheap ‘breakout’ PCB exists for the ESP-07, ESP-08 and ESP-12 that brings the connections to a 2.54 mm grid. This PCB is too wide to use in a solderless breadboard, but instead of pins you can solder wire cups onto it, so you can plug in your breadboard wires directly.

ESP-08

esp-08

This module is like the ESP-07, but without the antenna or antenna connector. Like the ESP-06 this modules is meant for production, not for hobby or prototype use.

ESP-09

esp-09

This module looks like an ESP-06 without the shield.

ESP-10

esp-10

This looks like an ESP-05 but with castellated pads instead of full pads. It is not clear to me what it is meant for: hobbyists that only need the 5 pins will prefer the ESP-05, while professional designs will probably prefer a canned version. Maybe for very very low cost designs.

ESP-11

esp-11

esp-11-2

This version has a ceramic antenna and the same 8 connections as the ESP-01, but on a 1.27 mm grid. Not very usefull IMO.

ESP-12

esp-12

This version is like the ESP-07, but with (only) a PCB trace antenna. It is often used in other modules.

esp-12e

The ESP-12E seems to be an updated version of the ESP-12 with a larger flash chip and some more pins exposed on the lower edge. These pins however are pins of the flash chip, not of the ESP, so the are not that useful. Some versions do seem to expose 2 extra ESP8266 GPIO pins.

ESP-WROOM-01

esp-wroom-01

For a change, the wroom modules are designed by espressif, the manufacturer of the ESP8266, and they are documented at least to some extend. The marking on the wroom module pictures that I see on the web state “special client only”.

The wroom-01 is a module with two rows of pins that seem to be on the standard 2.54mm grid. Note that this does not imply they can be used directly on a solderless breadboard. From the pictures it is not clear what type of antenna the module has.

ESP-WROOM-02 (ESP-13)

esp-13

The wroom-02 module (sometimes called ESP-13) seems to be like the ESP-12, but with the can oriented 90 degrees rotated, so it should be wider and less tall than the ESP-12.

ESP-201

esp-201

This board is a bit larger than the other ESP-* boards, but it has a decent set of ESP8266 pins exposed, with real pins on a 2.54 grid, and it is still small enough to be used in a breadboard. (It leaves one row free on each side.) In contrast, the earlier versions of the NodeMCU, and the breakout-boards for ESP-07/08/12, take up the whole width of a solderless breadboard. The ESP-201 has a PCB-trace antenna and a connector for an external antenna. It also has a separate 4-pin connector for power and serial communication. Unfortunately the pins of that connector are often on the bottom side, so using them in a breadboard situation requires some creativity. (But note that the version on the photo has these pins on te top and at 90 degrees.)

The board has both a PCB-trace antenna and a small (UFL) connector for an external atenna. A small jumper (0-Ohm resistor) selects either one or the other. On the boards I have seen it by default selects the connector, so you’ll have to resolder it to use the PCB trace antenna.

Be prepared for funny bugs, I guess not just with this module but with everything you buy from random Chinese sources. This post by smarpldotcom shows that he received his board with the UFL connector placed wrong by 180 degrees, which connected the antenna to the gound. Responses to his post talk of crystals soldered in a wrong orientation.

ESP-210

esp-210

This looks like a nice experiments module (usb-serial converter, 3.3V regulator, pins on a 2.54 grid, can be plugged into a solderless breadboard while leaving some holes for connections) but it is mentioned in only a few places, and I did not see it available from the common sources like aliexpress.

LM02

lm02

This is yet another esp module with castellated pads, a PCB antenna, and no metal can.

NodeMCU

nodemcu

nodemcu-2

nodemcu-v10

NodemCU is both a board that combines an ESP-12 with a CH341 USB-serial interface and a 3.3V regulator. The default firmware for this board is the NodeMCU firmware, which is a LUA interpreter. This interpreter is not limited to the NodeMCU hardware, in fact it can be used on all ESP8266 modules (that support firmware updatuing), and this is often done. A user application can be stored in the Flash ROM in the form of a LUA script. I tried to develop a simple application this way (using an ESP-01), but found the edit/upload/test cycle too tiresome.

The yellow board is the version 0.9. The dark mone is 1.0, which has an ESP-12E and exposes some more pins (which were unused on the 0.9 version).

ESPToy

esptoy

The ESPToy is another print that combines an ESP module (ESP-12) with an UBS-serial converter and a 3.3V regulator. It comes with the Lua interpreter, so it is meant as an alternative for the NodeMCU. It has a single row of solder pads at 2.54 mm spacing, so you can solder a pin header strip to it and plug it directly into a solderless breadboard. The price is significantly higher than the other ESP modules.

Olimex mod-wifi-esp8266-dev

olimex

The ESP-* modules are all far east products, but this one is from Olimex (located in Bulgaria). Its price is somewhat higher than the ESP-* modules, but it has more pins exposed, and they are available on a 2.54 mm grid that has both real pads (for use in a breadboard) and castellated pads (for soldering directly on a larger PCB). It also has pads for the Olimex 2×5 pin UEXT connector to use it with other Olimex PCBs that support this connector. The board has both a PCB trace antenna and an antenna connector. Minor nitpick: as far as I can see on the pictures (I don’t have a real module right now) the antenna connector is on the bottom side of the PCB. Olimex also has a ‘reduced’ version that has only the UEXT connector (much less useful IMO), and an ‘evaluation’ board that has a relay and a 5V-to-3V3 converter. In sharp contrast to the ESP-* modules (and the NodeMCU), the PCB silkscreen of the Olimex boards tries to provide as much information as possible, and a page with some decent documentation is available, including the circuit diagram. The designs for these boards are open sourced, but I guess for the prices they ask you’d better order them ready made.

Unnamed yellow board

yellow

There are various PCBs available from aliexpress shops that combine an ESP modules with some other stuff. This one appears frequently. It has an ESP-12, and provides access to its pads via two pin-header strips. The GND, RX and TX are also provided on an extra 3-pin header (why?). It has a 3.3V regulator, an LDR, a power LED, 6 more LEDs and a 3-color LED (the PCB looks as if this could be replaced by 3 more normal LEDs) and a jumper that is as yet mysterious to me. And in my case, a case for 3 AA batteries. I guess there must be a circuit diagram or at least a connection table somewhere on the web, but I have not found it yet.

ESP8266 SDK ‘gold necklace’ board

esp-gold

This is a baseboard for an ESP-201. It has no English designation, but it has a rim of holes around it outside the white finish, so to me it seems to have a coppery necklace around it.

The board has a nice set of peripherals: two switches, an RGB LED and a normal one, a buzzer, a relay with LED indicator, a multiturn potentiometers and a DHT11 (temperature + humidity sensor). It has two USB power inputs, one is also the serial connection to the CH340G USB-to-serial chip, a power switch, and a 3.3V regulator. (It baffles me that they did not connect both connectors to the CH340G chip.) The peripheral pins of the ESP are available on pinheaders that are marked with their names, and the peripherals can be enabled by dip-switches. (The serial connections to the CH340G chip by two jumpers.)

Watch out how you connect the DHT11 sensor: at least one blog post mentions that he fried his because some photos on the web show the sensor connected the wrong way.

The board has four mounting holes, but came without stand-offs. I put some rubber feet on it.

This blog shows a circuit diagram, pin assignments, and has links to other info. It mentions that he fried his because some photos on the web show the sensor connected the wrong way. One of the comments state that you have to use the switches and/or jumpers to download to the ESP. This blog also has some usefull info.

STC15W408AS board

esp-8051

This is a baseboard for an ESP-01. It has its own micro-controller, an STC15W408AS, for which I could find no English information at all. A table on the manufacturers website shows that it has 8K (Flash?) ROM and 512 bytes RAM, and hints that it i 8051 compatible. The board has various buttons with LEDs, a relay, a 3.3V regulator, a buzzer, dip switches to activate various peripherals, an antenna connector (not the small UFL but a larger screw-on version), an LDR, place for another LDR and a DS1820, a barrel connector for power, and an USB connector for serial communication (CH340G USB-to-serial chip), pinheaders for (presumably) the pins of the micro-controller, and finally connectors for an NRF24L01+ and/or an ESP-01. On my board the ESP-01 was put on some sub-board that plugged into two 2×4 connectors. I have no idea why, for an ESP-01 itself has a 2×4 connector.

A pity I have no documentation on this board, it looks like a nice test board, and I have never used an 8051 before, so that would be a first for me. Maybe English documentation will pop up in due time.

Communication

In theory the boards that have an USB-to-serial should provide an easy hands-off way to download software to the it, but the blogs and pages I have seen suggest that this is not as easy as it should be. The advice on which pins exactly should be pulled up or down or left floating to get the ESP8266 in boot-mode (or have it run the stored application) vary. Sadly, without more hands-on experience that’s all I can say.

Atennae

On all boards that have both an on-board antenna and a connector for an external antenna you should probably disable the on-board antenna if you want to make the best use of the external antenna. On all boards I have seen the on-board antenna is coupled by a small capacitor or 0-Ohm resistor which you should remove (or for ESP-201 boards: put in a different position). The general experience seems to be that an external antenna with the on-board antenna disabled gives the best performance, followed by an external antenna and the on-board antenna both connected, and just the on-board antenna comes last. The choice between a PCB trace antenna and a ceramic antenna seems to be more difficult: theory is that a PCB trace antenna performs better in the open air, and the ceramic one better with metal or other disturbances nearby.

FCC?

On most modules that have the chips canned an FCC logo can be found on the metal, but that doesn’t mean that a product that uses such a modules is approved too. Some people doubt that the such modules are approved at all: you can instruct those Chinese factories to print anything you want. A message on the piclist states that an approval paper is on the FCC site for the ESP-12. Of course that doesn’t necessarily refer to an ESP-12 you buy from some random aliexpress supplier. But the consensus is that a canned modules has at least a much better chance of passing a real FCC test.

A book!
Neil Kolban has written a 300+ page book on the ESP8266, and it is freely downloadable from his
webpage! Better download it before he changes his mind 😉

In a next blog I’ll explore the software side of the ESP8266.

12 thoughts on “ESP8266 – hardware”

  1. Hello,

    if i remove the additional isp Flash Memory from the board, the user Programm would be not loaded. due to the bootloader the user Programm must be in an additional isp Memory saved.

    so can i reproduce any of those board with any other Memory chip? I think the boards of esp 12 for instance don t contain the same Memory chip!

    thx.

  2. The two images in ESP-03 section are not from the same board. The second image is from a upside-down board, but the order of the pins is not the same.

Leave a Reply

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