A few weeks ago we caught wind of a very cool new chip. It’s called the ESP8266, and it’s a WiFi module that allows you to connect just about any project to an 802.11 b/g/n network. It also costs $5. Yes, there was much rejoicing when this chip was announced.
Since we learned of the ESP8266, there has been a lot of work done to translate the datasheets from Chinese, figure out how the SOC can be programmed, and a few preliminary attempts at getting this module working with an Arduino. Keep in mind, very few people have one of these modules in hand right now, so all this information is completely untested. Here’s what we have so far:
Over on Hackaday Projects, [bafeigum] has been working to research the capabilities of this module. Most of the comments deal with the AT Command set for the module and figuring out what is actually returned when certain commands are called.
The ESP8266 community forum is about a week old, but already there’s a wealth of information. Most of the efforts seem to be centered on getting GCC to program this chip, something that would make the ESP8266 a single-solution chip for anything that needs WiFi and a bit of processing power. Everyone (including the great [Sprite_TM]) has currently hit a roadblock, so if you have a ton of experience with GCC and the Xtensa microcontroller, check out that thread. Failing that, we’ll have to wait until someone from Tensilica, the company behind the guts of this chip, to chime in and help everyone figure out how this thing actually works.
The Arduino-heads out there will have a much easier time. There’s already a tutorial for using the ESP8266 as a serial WiFi module. Note the ESP operates on 3.3 Volts, so connecting this module to the 5V pin means you’ll be out $5 and several weeks of shipping time.
This is an incredible amount of development in a very short amount of time, made even more remarkable by the fact that no one has one of these WiFi modules yet. When these modules do arrive to workbenches around the world, we’ll expect the Hackaday tip line to be flooded with very small and somewhat battery friendly WiFi builds.
Why would do so few people have one of these? They are available in mass at AliExpress and even a guy on ebay sells them.
http://www.aliexpress.com/wholesale?SearchText=ESP8266
http://www.ebay.com/itm/251636525924
Muchas gracias for the ebay link. You are the real MVP.
I ordered a pair of these from an aliexpress vendor on a Thursday. By the vendor’s own admission, it wasn’t shipped until Friday of the following week (8 calendar days after it was paid for). It may be that my vendor didn’t actually have the modules in hand when they sold them.
No, that’s par for the course on aliexpress. You get stuff dirt cheap (You can get ESP8266 modules for less than 3 bucks now) , but keep in mind that they’re not joking about the estimated time for delivery being up to 60 days.
thanks for the ebay link, i’ve just ordered 3pcs, we will see…
Yea, I was confused by that as well, I’ve had half a dozen modules here for awhile now, they’re not exactly rare or anything… A co-worker had purchased a lot of 100 modules for just over $300 including shipping, and I bought the 6 I have from him for $20…
Man I should have made a deal with that guy, he sold about 50 units today because of my link.
So few people have them RIGHT NOW – many others, such have myself, have indeed already purchased them – but it’s going to take awhile to get here from China…
They’re available on ebay from the US now for a bit of a premium: http://www.ebay.com/itm/131290524413
Thank you! I also bought some from Ebay, Didn’t see them last week when I was looking around
Actually, they are not even $5. I found them yesterday on aliexpress for $4.50 – and 2 versions, 1 with integrated antena, one with connector for external one.
http://www.aliexpress.com/snapshot/6225755427.html
http://www.aliexpress.com/snapshot/6225755428.html
There’s a few sellers on aliexpress offering them at $8 for 2, and at least one seller under $35 for 10.
They’re even cheaper on Taobao if you can read enough chinese to order them
This seller has all 5 versions
http://www.aliexpress.com/item/Free-shipping-ESP8266-serial-WIFI-industry-milestone-invincible-price-agent-supply-five-optional-large-spot/2035794108.html
Async serial wifi modules are slow, so I think the best potential for these modules is native code. And for ubiquitous wireless sensors $5 still adds up. I’ve made wireless sensors with a nrf24l01 module, an attiny88-au, and cr2032 coin cell. In qty 25, total cost per node is $1.50.
I could see using esp8266 modules for a wired gateway to a bunch of low power wireless sensors, but not for battery-operated wireless sensors themselves.
You are right. However, I would not like the communication with my garden sprinklers be unencrypted… Somebody with nRF will come close enough just once and… ;)
For me, this is a huge advantage – until now I was using TP-Link TL-MR3020 for connection and its internal serial for arduino communication, however this would solve the same task for way less than $25 :)
I would agree with both of you. $5 is a great improvement but still a hurdle for mass deployment of sensors.
I see this device as lowering barriers of entry for prototyping though, which is a value in itself. The thing I’m not sure about is cluttering the spectrum. Can an average home router support a dozen dozen of these if the houses on either side also have such a network deployed?
Spectrum is no more of an issue than it already is with wifi. Most routers do auto channel assigment, so if one neighbor is on channel 6 and another on channel 11, your router will likely pick channel 1. And all the wifi nodes on your network will be using that channel. If your router changes channels, the clients will switch with it once they see the SSID broadcast on a different channel.
Re security, note I said I built *sensor* nodes with the nrf modules. So for the sprinkler example you could have a nrf sensor in your garden reporting soil moisture, temperature, etc.
For remote home controls, I could see the desire for something more secure. In reality, most people aren’t too concerned about wireless security … at least until break-ins by hacking garage door openers become common.
Forgive my lack of education on the subject, but in terms of functionality how do these new modules differ from the nRF24L01 modules that we’ve had access to for quite some time now?
They can connetc to wifi networks directly, while the nrf modules can only connect to other nrf’s.
The main difference is the nRF’s don’t talk 802.11 or have a networking stack you have to do all of that, With these they have a TCP/IP stack built in. They’re closer to the wiznet cc’s than nRF’s
And i just bought a bunch of wiznet/nRF’s to do a xmas light thing, tsk…
Thanks Michael and Charliex. That makes sense to me now.
also, i dont think anyone is able to use nrf24l01 without an other mcu. Being able to reprogram them as a single wireless mcu would really make them a cheap wireless platform
If I’m correct nRF24 modules only connect with nRF24 modules. Same with bluetooth, zigbee etc. They all use the same wireless frequency but they all use a different protocol to communicate. (the difference is also in range, power, interface etc.)
This cheap module is compatible with 802.11 b/g/n that is really awesome. Its possible to connect to your home network with these modules. And it doesn’t have to be an unprotected setup.
I would use this module to connect my LEDs to the internet and the nRF24 for point to point wireless connections.
Just ordered a bunch off aliexpress, luckily i’d only just started sketching my WS2811 controllers.
>so if you have a ton of experience with GCC and the Xtensa microcontroller
well, there was this guy:
http://hackaday.com/2012/10/08/stm32-driving-a-pcie-video-card/
but he removed his github repo and never ever spoke again about it, never replied to emails and pretty much acts like it never happened
Interesting how you feel the need to inform Arduino people to not connect 3.3V to 5V! Presumptuous and unflattering.
There’s also wireless router module (HLK-RM04) available which offloads all WiFi overhead onto it’s own built in micro-controller (the RT5350F, 360MHz MIPS core with built-in WiFi support), it’s more expensive ($13) but looks like it’d be worth the added cost for more advanced projects, considering what its capable of…
http://www.hlktech.net/product_detail.php?ProId=39
I have a couple on order just to see what its capable of…
Yes ! I’ve received my HLK-RM04 last week. It is working quite straight forward.
There is also USR-WIFI232-G2 which can be both AP+STA at the same time, I didn’t received it yet. I will order some ESP8266 soon, since they are cheaper.
Sadly the basic hlk-rm04 is a serial to wifi only, you can’t do data packets. From what I can see of these esp modules they will let you construct tcp or udp packets etc. This is FAR more powerful. You can flash the hlk-rm04 with openwrt though, so there is that.
But you can install OpenWRT and then you have linux machine, with small ram and even smaller rom.
So it’s somewhat like Bluetooth LE, but for Wi-Fi?
Well it consumes 40x the amount of power that Bluetooth LE needs..
Did anyone simply contact the manufacturer and /ask/?
To be honest I think the TI CC3200 modules are going to be worth the extra money over this thing. The serial interfaces on these sorts of modules is usually very poor. And that goes for even “proper” vendors that supply wifi-uart style modules.
You want a module that has the wifi interface, a fairly decent applications processor, a socket-like interface for doing TCP/IP and working implementations of stuff like DNS etc. The CC3200 has that. There are 3 other modules that have that stuff but they are under NDA and hard to obtain.
Alternative:
MTK7681 based modules.
The chip seems to be similar, but as Mediatek is behing this, I’m hoping for better docs and support. There seems to be a SDK available, but I couldn’t find a download link so far.
There’s and Indiegogo project using this chip, though: https://www.indiegogo.com/projects/xwifi-a-fingertip-sized-wifi-module-open-source
And some modules available on alibaba:
http://www.alibaba.com/product-detail/GWF-KM22-MT7681-150mbps-electronic-control_60035474664.html
the developers have already quadrupled their US$4 500 funding goal with 50 days left in the campaign. At this rate, there’s no telling how much the project will raise by the end of its two month stint.
http://igg.me/at/xwifi/x/8402360
Any idea if it is possible to listen on a port? My first project would be a garage door opener …
I want to do the same – I use NETIO normally and Android Basic to talk to a socket server – usually Ethernet board and Arduino – which send simple text back and forth. I want to do the same thing with the WIFI board – have it simply set there until someone connects with it – I cannot find any examples yet – did you get anywhere?
Yes and no. According to the translated datasheet AT+ CIPSERVER should do the trick, as far as I understand. I plugged a test together yesterday, but couldn’t start the module. Might be a problem with the level shifter or I made a stupid wireing mistake, didn’t have much time. I don’t know when I will get to the next try. Let me know if you get anywhere with the AT command.
You’re going to love me – you have to set CIPMUX=1 to get CIPSERVER to work – I was just about to cut my wrists having discovered the command and it went no-where. I set AT+CIPMUX to 1 – and the command CIPSERVER now works… so now I have a working open socket. I set my NETIO package to have 2 buttons on that port (I set AT+CIPSERVER=1,4000 so looking at port 4000) – I pressed a button on the phone and a little package +IPD,0,4:YES came through (the button was programmed to send YES on pressing… button remained depressed awaiting a response (CRLF). I sent AT+CIPSEND=0,4 indicating I wanted to send to ID 0 (see response above) 4 letters. The little “>” comes up – I send UK and hit enter and LO the button on my phone pops back to default state.
In other words – it works! (every now and then I get an unlink text back followed by link – but it’s not stopping it working reliably – been sitting there for 10 minutes now with me occasionally sending button presses. I’m still doing this manually via a terminal but it won’t take long to get it into a program.
Fantastic, thanks. Then nothing is between me and a Tasker scene to oben my garage door via smartphone :)
So I’ve now just had the phone send a request for a message in a label – spotted it in the terminal and sent back HI – and it appeared on the phone – so the answer is – you’re in business. If you have any issues ensure you have the latest version of the software (last resort I’d say) as per my blog. I’m still updating here.. (got the address wrong elsewhere)… http://scargill.wordpress.com/2014/10/05/esp8266-working/
As others will be reading this – may well have gotten this far themselves – or if not will now be able to make gadgets – expect a flurry of little WIFI toys this Christmas – HAH!
i got my 5 today … ordered 27.Aug
I got a demo working http://i.imgur.com/ecIRovH.gif
Now its available for 3.50 euros
http://www.banggood.com/ESP8266-Remote-Serial-Port-WIFI-Transceiver-Wireless-Module-p-947259.html?p=T10119124688201302XC
Arduino compatible?
Arduino compatible: In general, yes (there are already some examples).
HOWEVER, the module is 3.3V:
https://nurdspace.nl/ESP8266#Translated_datasheet states consider
The current stated there are higher than the 50mA the 3.3V output pin of the Arduino is rated for. Also, the max input HIGH voltage is stated as 3.6V, so even if you can power it, according to the stats the logic level would be too high.
So there are 3 possibilities:
1. do it anyway. This put both your Arduino and the module at risk, but people did it and claim that it worked. The module is cheap, an Arduino can be cheap, so why not?
2. Use a 3.3V Arduino, e.g. the Pro Mini.
3. Use an additional 3.3V supply and a level shifter.
Also note that the module will use the HWSerial pins. So if you don’t have 2 on your board, you cannot connect it to you computer at the same time. The Arduino Micro would be great for this purpose, but then you have the problems above, since it is 5V.
Voltage regulator or level shifter which to use? just use a 3.3 mini or micro
For level shifting- I feed the output of the board straight into the Arduino – and the other way I simply reduce the Arduino serial voltage a little with a divider. 560r from Arduino to ESP8266 input, resistor 1.2k from ESP8266 input to ground. Works a treat, values chosen out of a limited range of available parts so I’m sure you could be more precise if you want to.
Right, now I’m starting to MOVE on this. The ESP8266 can of course be used as as web server, or web client… or indeed a socket listener – but what might be useful for a car would be to use it as it’s own access point. Most of the docs out there miss off the important information. I now have it working – read here to get your own secure access point running.. so MANY possibilities.. bit.ly/esp8266
Got mine 4 modules yesterday. Spent 5 hours trying to make them work- nothing…
…until I touched the “CH_PD” pin with my finger and got some random data on serial.
1 hour later I figured out that “CH_PD” in my version is connected to RST and that module runs serial at 115200 baud, so be aware.
Even if it looks just like second version mentioned somewhere on forums.
Works fine since then, so consider connecting “CH_PD” to 3v3 and trying 115200 baud serial if you have trouble connecting your module
The latest software reverts at first to 9600 baud and you can then set your own speed – which survives power cycling. Yes, CH_D has to be tied to 3v3 and GPIO_O left floating unless you’re uploading new firmware in which case that needs grounding and the power cycling.
Ohh… I spent few hours on this one…. Thank you guys…