ESP8266 ESP-05 WiFi Module – Getting Started

I recently purchased three ESP8266 ESP-05 WiFi modules. These are very cheap WiFi modules costing around $4 USD each, so are ideal for hobbyists, makers and hackers to use in various projects. My idea was to try to get an Arduino web server working on WiFi as a cheap alternative to using an Ethernet shield or WiFi shield.

Although the same module is available from several suppliers, the particular module that I bought was from SainSmart: SainSmart Neu ESP8266 Esp-05 Remote Serial Port WIFI Transceiver Wireless Module AP+STA

ESP8266 ESP-05 WiFi Module

ESP8266 ESP-05 WiFi Module

ESP8266 ESP-05 Pinout and Documentation

The supplier web page for the ESP8266 ESP-05 had no pinout for the module and no documentation. Some of the information on the web page for the module was also completely wrong, for example they state that the module has 5V compatible I/O, however this is wrong. The I/O pins only work with 3.3V logic and are not 5V tolerant.

They also state “on board antennae”, but this module does not have an on board antennae, it has a connector for an external antennae.

ESP8266 ESP-05 Pinout

After some searching on the web I found a pinout diagram for the 5 pin version of the ESP8266 ESP-05. A new article with pinout and power requirements for the ESP-05 is now available on the Starting Electronics website.

ESP8266 Documentation

The manufacturer of the ESP8266EX chip found on the ESP-05 and other modules is the Espressif company. Documentation for the module must be taken from the ESP8266EX datasheets on the Espressif website. Look under Documentation on the ESP8266 resource page where you will find datasheets, user guides, application notes, technical references, etc.

Getting Started with the ESP8266 ESP-05 WiFi Module

You bought a ESP8266 5-pin ESP-05 module, now what? Here are the steps necessary to get the module working for the first time. Once you have a basic understanding of the module and where to find further information you will be able to start your own project development.

Soldering the Header

The module comes with a separate 5-pin header that must be soldered into the module. After the header is soldered to the module it is easy to use the module in a breadboard.

ESP8266 ESP-05 with Header Soldered

ESP8266 ESP-05 with Header Soldered

The following video shows how to solder the header to the module.

 

Aerial / Antennae

I found that the module works fine without an aerial / antennae as long as it is near enough to the WiFi router that it is connecting to. Connecting a wire to the aerial connector does give it more range and picks up the second WiFi router that I have on the other side of the house.

Testing the Module

Use the pinout diagram to correctly connect the ESP8266 module power and UART data pins. An Arduino Due is ideal for testing the module. This is because a Due can supply enough current from its 3.3V pin and works with 3.3V logic. The Arduino Due is therefore completely compatible with the ESP8266 module.

The article on testing the ESP8266 ESP-05 module using an Arduino Due shows how to connect the ESP8266 module to the Due and test it. Use this article to get started with sending AT commands to the WiFi module.

Documentation and Staring your Own Projects

Once you have the ESP8266 module working, it is a matter of sending the correct AT commands to the module to set it up for your project.

Find example AT commands in the ESP8266 AT Command Examples document.

Find all of the AT commands in the ESP8266 Instruction Set document.

Arduino Projects for Beginners

A list of easy to build Arduino projects for beginners and kids. These projects use easy to obtain components and can be built on an electronics breadboard. Suitable for use with an Arduino Uno or similar board.

Arduino projects for absolute beginners below list very easy projects for first time Arduino users. The section that follows lists projects for beginners who have learned the basics of how to use an Arduino.

Arduino Projects for Absolute Beginners

The simple projects below are suitable for absolute beginners with Arduino. They are part of a series of tutorials that introduce beginners to basic electronics. For beginners who have not yet used an electronics breadboard, see how to build a simple circuit on breadboard.

Arduino Projects for Beginners

The Arduino projects for beginners area on the Starting Electronics website has various projects for beginners such as:

Other projects suitable for beginners:

Programming Arduino

Beginners wanting to learn how to program Arduino can look at the Arduino programming course.

Arduino Ethernet Shield

For those wanting to know how to use the Arduino Ethernet shield as  a web server, the Arduino Ethernet shield web server tutorial explains all you need to know.

Other Arduino Resources

Also see the following areas on the Starting Electronics website:

  • Arduino Projects – various Arduino projects for beginners and more advanced users.
  • Arduino Tutorials –  interesting Arduino tutorials.
  • Arduino Articles – various articles and small projects such as how to battery power an Arduino, connecting a buzzer to Arduino, using Arduino to measure voltage and more.
  • Arduino Software – various Arduino software projects and information on installing Arduino software.

Another useful resource for projects is the Arduino tutorials page on the Arduino website.

Moving Light Display Arduino Project for Beginners

This easy Arduino project for beginners can be built on an electronic breadboard and uses only four LEDs and four series resistors to make a moving light display. The Arduino sketch for the project can be modified to change the rate at which the pattern on the LEDs is updated. The patterns to display on the LEDs can also be changed.

Moving Light Display Arduino Project for Beginners

Moving Light Display Arduino Project for Beginners

Details of this Arduino Project for Beginners

A breadboard is used to connect four LEDs with series resistors to an Arduino which can be an Arduino Uno or other Arduino. Four wire links connect the LEDs to four of the Arduino pins which are set as outputs. A common GND wire from the Arduino is connected to the breadboard which connects the other side of each of the series resistors to GND. This completes the circuit and enables the LEDs to be switched on by the sketch running on the Arduino.

Moving LED Arduino Project

Moving LED Arduino Project

The full project includes the circuit diagram, Arduino sketch code and instructions on how to modify the sketch to display different moving light LED patterns on the LEDs.

Other Arduino Beginner Project Resources

Those new to Arduino may be interested in the beginners electronics series of tutorials that includes an introduction to Arduino.

The same tutorial series includes ten Arduino projects for absolute beginners which is a sample of various Arduino built-in examples with instructions on how to build each project.

Installing Arduino Software and Drivers in Windows 10

There are some choices to be made when installing Arduino software and drivers in Windows 10. Arduino offer two ways of installing the Arduino IDE on a Windows PC — Windows installer file and a Windows zip file. Windows 10 will also install a default driver when an Arduino is plugged into the USB port of a PC. This driver can be replaced by the Arduino driver that comes with the Arduino software.

Arduino Software and Drivers

Installing Arduino software using the Windows zip file is the simplest method of installing the software. It is just a matter of copying the folder out of the downloaded zip file into the desired location on the PC. This allows the software to easily be removed by deleting the folder.

When Windows 10 installs a driver automatically, the Arduino just looks like a COM port in Windows Device Manager. It is not recognized as an Arduino, although it will work properly and code from the Arduino IDE can be loaded to it. After installing the Arduino driver that comes with the Arduino software, the Arduino will be shown as an Arduino on a COM port in Device Manager. The difference is shown in the image below.

Windows Default COM Driver and Arduino Driver

Windows Default COM Driver and Arduino Driver

As can be seen in the image, with the default Windows 10 driver installed, the Arduino appears as USB Serial Device (COM4) (left), but after the Arduino driver is installed the same Arduino appears as Arduino Uno (COM4) (right).

Full instructions on installing the Arduino IDE software and updating the Arduino driver can be found in the article on how to install Arduino software and drivers on Windows 10.

Arduino Internet Voltage Monitoring

Arduino Internet voltage monitoring can be achieved in several ways. The Arduino can be set up as a client or a server in order to display measured voltage on a web page. In this article an Arduino is set up as web server that hosts a web page stored on SD card. The web page displays the voltage measured on Arduino analog pin A2 in near real-time. The web server also interacts with ThingSpeak, a Internet of Things (IoT) service which logs voltage over time. Voltage is displayed on the hosted web page on a gauge and in a ThingSpeak generated graph or chart.

Arduino Internet Voltage Monitoring

Arduino Internet Voltage Monitoring

How Arduino Internet Voltage Monitoring Works in this Project

The Arduino web server hosts a web page that communicates with the Arduino using JavaScript / Ajax. This allows the voltage to be sent from the Arduino to the web page over the Ethernet connection to update the voltage in the gauge on the web page. A potentiometer is used to vary the voltage on Arduino pin A2 between 0 and 5 volts.

The raw value from the Arduino analog input is sent to the web page and converted to voltage in the JavaScript that runs on the page. The raw analog value is also displayed on the web page and will be between 0 and 1023.

After the voltage is calculated, it is sent to ThingSpeak by JavaScript. ThingSpeak logs the voltage and plots the graph of the voltage. The graph in the above image is created by copying graph code from ThingSpeak which then updates the graph with the data from the ThingSpeak server.

Voltage Update Timing

Voltage is measured by the Arduino and updated on the web page every 200ms. ThingSpeak only updates graph or chart values every 15s (fastest update speed), so the JavaScript code only sends updates to the ThingSpeak server every 20s.

Tutorial for the Project and Other Resources

A full tutorial is available which explains how to set up this project on your own Arduino.

Learn how ThingSpeak works and how to set up a channel to send data from an Arduino to an account on the ThingSpeak server — ThingSpeak is a free service.

Learn about measuring voltage with Arduino.

Arduino Ethernet shield tutorial explains how to set up an Arduino and Ethernet shield as a web server.