A Proof Of Concept Project For The ESP8266

It’s hardly been a month since we first heard of the impossibly cheap WiFi adapter for micros, the ESP8266. Since then orders have slowly been flowing out of ports in China and onto the workbenches of tinkerers around the world. Finally, we have a working project using this module. It might only be a display to show the current weather conditions, but it’s a start, and only a hint of what this module can do.

Since the ESP8266 found its way into the storefronts of the usual distributors, a lot of effort has gone into translating the datasheets both on hackaday.io and the nurdspace wiki. The module does respond to simple AT commands, and with the right bit of code it’s possible to pull a few bits of data off of the Internet.

The code requests data from openweathermap.org and displays the current temperature, pressure, and humidity on a small TFT display. The entire thing is powered by just an Arduino, so for anyone wanting a cheap way to put an Arduino project on the Internet, there ‘ya go.

40 thoughts on “A Proof Of Concept Project For The ESP8266

      1. As in a secret Chinese government plot to plant backdoors in cheap wifi modules then make them accessible to the American hacker community in hopes that the hackers will build robots or wifi coffee makers with them which can then be taken over by the Chinese and used to attack us or ruin our morning cup of coffee?

        1. That is an evil plot and I wouldnt put it past them Stu :-) Before you know it the chinese know what the humidity of my garden is and screw up my watering scheme, just so I have to buy Chinese cabbage and paksoi rather than grow it myself: evildoers :-)

    1. Also, it could be possible that the modules would work, but getting stressed and eventually fail if you feed it 5v for a long period of time.

      But besides the 3.3v source that needs 300 ma , The only thing you need to connect it to a AVR, at least the atmega32u4 , is 2 resistances. A simple bridge works well with a 500 and 1k ohm resistor. There is no need to shift the TX pin of the module to 5v, because 3.3v is enough to drive the atmega’s RX pin. Now this is most likely mcu dependant, but I guess since the atmega series support 5 and 3.3V , then 3.3v is enough. I used this method for this wifi module , and also for the HC-05 bluetooth modules. I’m using a atmega32u4 flashed with the arduino micro bootloader, and a sketch that turn the AVR into a usb-serial converter, much like the bootloader is , except that this sketch will drive the AVR’s RX and TX pins.

      So my AVR is running at 5v/16mhz and the module at 3.3v. The module’s TX is connected directly to the AVR’s RX and its TX is bridged like this : AVR_TX-500ohm-MODULE_RX-1000ohm-gnd.

      I received 2 different module revisions when I ordered from electrodragon. They have different baud rates (57600 and 115200) and the newer revision requires CH_PD to be pulled HIGH to receive AT commands.

    2. I was playing with my ESP01 just now, made a voltage divider for 3.3v from 5v off the USB. I managed to accidentally, still, connected VCC and GND directly to 5v, and my ESP8266 works fine, I found out after an hour later, and it didn’t even feel hot to the touch. So maybe the chip *IS* 5v tolerant, and not just the TX/RX lines.

  1. well, this is a lot further than I got, I had quite some issues connecting them to the wifi and then ran out of time. still, if these will turn out to work well, I have a feeling I will use quite a lot of them.
    too bad that, even though they are great, you cannot really replace lower power radio modules with these everywhere…

    1. The english datasheet says:
      “The SDK includes the following library functions:

      WPA/WPA2 PSK, and WPD driver.


      Well, I don’t know what that’s supposed to mean. Does the standard firmware support WPA2 PSK? Do I have to write my own firmware to support it?
      Also, while reading the datasheet, I became aware that the ESP8266 only supports the WiFi channels 1..7. I knew there was a drawback.

      1. The limited channels are not a problem, if you don’t let your wifi choose automatically. My experience is that channel 1 is the most used(many routers default to it with the default auto settings), then is 11, and 5 is the least used.

        1. For me, it is. Because in Germany, we can use channels 1..13, and I have my whole property covered with several access points at different channels. I also have a separate AP for visitors, a p2p connection to a friends house, etc. So I’d very much like to be able to use all channels.

          1. Well, that is a more complicated situation then. You will have to shift the channels so that whatever the ESP uses it is on channel 1-7.
            Why do you have different access points on different channels?

      1. Thanks. I thought about it briefly but I was just trying to get something to work at the time. This at least shows that the device can easily work with a web service. It would take about 3 minutes to adapt the code to implement some data logging from a sensor, for example, which I think would be a primary use for something like the esp8266

  2. There are $2.37 5V USB-wifi modules at aliexpress and friends that support all of the modern features. You most likely won’t get them to work with Arduino because apart from simulating USB host you need to upload a firmware file to the chip on every boot. But for beefier boards they’re a better choice because they work out of the box.

    1. You mean emulate USB host, upload firmware, develop a whole TCP/IP stack on your microcontroller, develop an entire driver as well. This esp8266 are serial to wifi bridges with TCP/IP and everything else on board. All you are doing is opening a connection and sending stuff through.

  3. I just got one working last night :) The timings are a bit messed up for the original test sketch, has no checks to see if the module is busy so timings become even more messed up.
    Was able to pull search results from google.

  4. It will be interesting to see if a firmware update will ever be available for this device. At the moment it has hard coded DNS servers (28.4.192.168 4.255.26.2 2.64.31.1). Something as simple as that should be user selectable out of the box.

    Cheap is good. But a little more functionality would be nice.

Leave a Reply to BogdanCancel reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.