Breadboard and Program an ESP-01 Circuit with the Arduino IDE
ESP8266 Microcontroller/Wi-Fi Integrated Circuit
A new microcontroller has captured the attention of professional designers and hobbyists alike, and it has the potential to be a force majeur in the internet of things. Bearing the nondescriptive name "ESP8266," this highly integrated circuit consists of a 32-bit RISC processor with all the bells and whistles you would expect in a full-featured µC, but that's not all. The ESP8266 also includes a built-in 802.11 b/g/n Wi-Fi circuit that is ready to be directly connected to an antenna.
The ESP8266 is currently available only in a 32-pin QFN package, and there is just one IC in the family. The developer, Espressif, in Shanghai, China, has chosen to take full advantage of manufacturing efficiencies of scale and offer a single IC that is suitable for use on a variety of PCB assemblies. Presently, there are more than a dozen ESP PCB modules that differ primarily in antenna styles and the number of I/Os available. Because of the ESP8266's QFN package, most hobbyists will be pleased with that decision, especially since market prices start at less than US$5 for the low-end model, dubbed the ESP-01, and pictured below. Click the photo for a larger image.
A very active community support forum exists for the ESP8266, and is an excellent source for ideas and information. Originally, documentation was only available in Chinese, and firm application information can still be hard to come by. Currently, many DIY projects are operating in the "trial and error" mode, but there are many aftermarket suppliers who are selling development platforms and accessories. However, as you will see later in this article, it's not difficult to get an ESP8266 up and running on a solderless breadboard.
From the supplier, many (maybe all) of the ESP8266 modules are loaded with "AT" firmware, and can be programmed via a simple terminal program. If you are using the module primarily to exploit its Wi-Fi capabilities and controlling it with another µC, this could be all you need.
A more sophisticated option is available from NodeLua, which offers open source firmware based on the Lua programming language. NodeLua is still in development, but already contains extensive capabilities. Other choices include Python, BASIC, and the Arduino IDE, which is featured in this article.
ESP-01 Ins and Outs
The ESP-01 module contains the ESP8266 MCU and a flash memory chip. There are two LED's: a red one which indicates power is connected to the module, and a blue one which indicates data flow, and can also be controlled by user programming. The Wi-Fi antenna is the PCB trace that covers the top of the module; it's called a Meandered Inverted-F Antenna (MIFA,) is surprisingly efficient, and only mildly directional.
There are eight connection pads near the bottom of the module; the figure above identifies their functions. Usually, two 4-pin male headers are inserted in the rear of the module and soldered on the front. This makes the I/Os accessible, but is not breadboard friendly, and requires flywires from the ESP-01 to a solderless breadboard. This technique works, but it is messy. There is an alternative way as shown below.