Meet the ESP 8266 WiFi Serial Transceiver

esp8266Look what I found under the Christmas tree about a week ago – ESP8266 modules 😉

A tiny module with a size comparable to a Fibaro Universal Sensor. Basically, the ESP8266 enables you to add wireless connectivity to your hardware – to anything that does serial; for example your Arduino or Raspberry Pi. But there’s more to this module – you can build your own firmware, program it in Lua and do stuff that might make that additional MCU obsolete.

But for now, all I have to tell is about my experiences during the first few hours with the ESP8266.

After unwrapping the modules the first thing I had to find out the purpose of the 8 pins of the ESP8266 board. VCC, GND, RX, TX and found out about those really quick; I also found a small Arduino sketch that would allow me to test some basic functions of the ESP8266 so I set things up on a breadboard and uploaded a sketch to a spare Arduino.

No go.. I had been a bit too hasty, thinking that a single webpage would provide all the information I needed to get things going. After a while I found out that the CH_PD pin had to be pulled up to VCC to set the ESP8266 to ‘normal operation’ mode. Cause when pulled to GND, the ESP8266 will just sit and wait for a new firmware to arrive … OK, got that. Still no go; that’s when I read about the different baud rates – some models work with 9600 bps, others with 57600 bps so maybe the ESP8266 and the Arduino weren’t using the same bps. So I decided to just hook up the 2nd ESP8266 to my PC with a PL2303 serial to USB cable and see if I could get the module to respond to some AT commands.

ESP8266 with PuTTYPuTTY is one of my favorite tools for telnet, ssh and it can also do serial communication, so I used PuTTY to send some AT commands to the ESP8266, but after some time I gave up… I knew I was using the right speed (9600 bps in my case) but the module just didn’t respond after- no OK; nothing.

ESP8266 with TermiteChanged some settings, still no answer. Made PutTTY add an additional LF after a CR but still no luck? Eventually I switched to Termite, cause I found out that I wasn’t the first having problems with the combination PuTTY + ESP8266.

 

Now that I knew it was 9600 instead of 57600 bps I could proceed with the sketch mentioned earlier. Another ‘problem’ was that the Arduino operates @5V and the ESP8266 @ 3.3V, so I had to do something about that too; I saw all kinds of solutions with level shifters, resistors, diodes and decided to go the easy way – a JeeNode which operates @ 3.3V:

ESP8266 on a JeeNode

The result in the PuTTY window that was connected to the ‘debug’ Serial port (pins 6 & 7):

ESP8266 PuTTY screen

Neat. Needless to say that this is just a small example of what this ESP8266 can do; it can do much more than just fetching a small web page – I haven’t even scratched the surface yet! A Wifi Door sensor for the price of an ESP8266, a reed switch + magnet and power supply.. the latter is the only downside of the ESP8266: it consumes too much power to run on batteries. Well, you can’t have ’em all … (yet?) Besides that, I love this little powerful Wifi module.

Tagged , , , . Bookmark the permalink.

7 Responses to Meet the ESP 8266 WiFi Serial Transceiver

  1. Germán Martín says:

    Hi Robert,

    I asked Santa for 2 esps but I am still waiting.

  2. Germán Martín says:

    Hi. My last message was sent partially. Esp8266 has some sleep modes to reduce supply current making it possible to get it working on batteries. I haven’t had the opportunity to play with it yet but my intention is to build some wireless sensors that send data to arduinos or rPis through Wi-Fi to get info about my home environmental conditions. I’ll let you know when I put my hands over my new esps.

    • Ah OK, I haven’t read enough about the ESP8266 yet I guess. Personally I’d love to work with the ESP8266 as a MQTT client; if that could be combined with low power modes that would be really great!! I think it’s time for me to dig a little further then 🙂

  3. Loo says:

    I use for already two years the products from USR IOT Technology Limited.

    USR-WIFI232-T or USR-TCP232-E (ethernet-dual Serial)
    Configurable through the webinterface.

    I think it is used by Omniksol-Wifi if I look at the web-userinface.

  4. Pingback: MQTT client for Arduino with the ESP8266 - Digits Domotica Blog

Leave a Reply

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