ESP8266 Wifi Module

  • Posted 5 January 2015

I recently bought a few of these modules ESP8266 to play with.
They have great potential as they are small, integrated, and low cost (below $2 in 100's).
It supports client, access point and client+ap modes. This is great if you want to connect to existing wifi networks or if you want to create a new one just for this device.

The module communicates over serial AT commands. The full list can be found at http://www.electrodragon.com/w/Wi07c
Connecting it to a computer or arduino is very simple, simply provide a decent (200ma) power source and RS/TX to the module and your set.

Due to the serial communication you are limited to those speeds, whoever for small batches of data it is more than plenty.
You could use it as a remote sensor, temperature, humidty, open/close, garage state, and many other uses.
It can connect to a remote server, TCP and UDP.
It also supports local server that can be connected too remotely.

There is also and SDK which people have used to write custom software that runs on the ESP8266 itself, removing the need for an arduino for simple tasks.
More can be found at http://esp8266.com

 

Test Circuit

The test circuit I build sends a udp message to a simple node.js application with the temperature and humidity from a DHT11 sensor.

It is connected so that the arduino's hardware serial port connects to the ESP8266 and a software serial port on pin 10/11 connects to PC for debugging.
The ESP8266 is connected via a logic level converter, see the "Bi-Directional Logic Level Converter Hookup Guide" for detailed explanation.
More details on connections can be found in the ardunio code file.

There is a 10k pull up resistor on RST => VCC, and CH_PD => VCC, soldered right on the ESP8266 module.
As well as a 10uf capacitor between VCC and GND.

DHT11 Sensor: (click for larger version)

ESP8266 Pinout (click for larger version)

 

Parts

  • ESP8266 Module - Ebay
  • Logic Level Converter - Ebay
  • Arduino Pro Mini - 5v or 3.3v version
  • USB RS232 Converter - CP2102 or FT232R based
  • DHT11 Temperature/Humidity Sensor - Ebay

All these parts can be found on Ebay or Aliexpress or Dealextreme and many local electronics stores.
Small quantity are available for sale directly from me, contact me for details.

 

Code

Every two seconds the UDP Listener will show the temperature it received from the arduino/dht11.

 

Misc/Notes

  • The new modules (v092 fw) work at 9200 baud by default
  • Firmware update mode works at 115200 baud
  • Giberish in the terminal is usually due to not enough current power supply - minimum is 200ma.
    • Technically its the module going into update mode and sending out crash dump at 115200 but its due to too low current supply
  • RST pull up is weak on ESP8266, save the headache and add pullup on RST line.


Tags: