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”
So it’s a “proof of concept”. Which concept exactly did he prove?
The concept that they figured out the operation.and the translations were correct.
esp8266 : simple, low cost …good
I’m more worried about functionality we don’t know about. A backdoor in something so complicated and undocumented would not be unheard of.
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?
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 :-)
As i can see from this post ,on seedstudio wiki and here http://tminusarduino.blogspot.sk/2014/09/experimenting-with-esp8266-5-wifi-module.html ,
this chip is 5V tolerant on TX/RX pins.They are not using any logic level shifter.
Datasheet saysmax 3.6V…hmmm
If you read the linked github project, then you’ll find a writing on the schematic that says:
“Arduino UNO modified to operate at 3.3V. Use level shifters for 5V Arduino.”
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.
I haven’t tried it, but at 115200 baud, it might be fast enough for resistor divider to cause problems.
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.
P.S. Try this is of you don’t mind breaking one, or have spares as I have only done this accidentally.
Bring it online, … wait….., and another entry in the NSA’s treasuremap.
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…
Anyone got this working with WPA/PSK instead of WEP yet?
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.
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.
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.
But… isn’t the point of having multiple APs because the signals don’t reach beyond a certain distance? In that case, you can use that same channel again.
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?
When you look closely you see that the channel table actually has two columns with channels 1-7 and 8-14 ;)
I could not connect it to my WPA2 ISP given router.
I could connect to WPA router(default settings TL-WR841), but cannot start any connection. The module does respond to ping, though. I didn’t try open wifi.
Yes no problem
My proof-of-concept project has been up for a while: http://www.joshuanewell.com/electronics/esp8266-5-wifi-module-demo-internet-controlled-led-dimmer
Code and schematic: https://github.com/imjosh/espLedDimmer
That is a good proof of concept. Have you given it a thought about how to keep a permanent connection and avoid polling ?
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
your hackaday prize entry-> holy smokes! I’ll have to give that a good read.
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.
Do tell about this please!
I got some of these (http://www.aliexpress.com/item/New-Mini-150M-USB-WiFi-Wireless-LAN-802-11-for-ngb-Adapter-100-FreeShipping-Brand-New/1494451678.html) while they were 10% off, worked nearly out of the box with the O-LinuXino-Nano making the USB host no longer useless in my multicopter.
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.
I thought about ordering some of these from China. I’d rather pay twice as much and get them from the US. Does anyone know of a local source?
From electrodragon (china) with the rather mid range shipping (about $6 i think) took 4- days to get to EU.
Ebay has them now with US sellers.
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.
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 (126.96.36.199 188.8.131.52 184.108.40.206). Something as simple as that should be user selectable out of the box.
Cheap is good. But a little more functionality would be nice.
To be fair, that’s a pretty nice bunch of servers, all things considered (I’d probably personally replace the Level3 one with one of Google’s, but that’s just me).
Someone make this talk to twitter and I’d love you long time.
Visit us at http://www.esp8266.com for full support of this IC!
Please be kind and respectful to help make the comments section excellent. (Comment Policy)