WiFi for less than a fiver

Last week, the excellent hackaday ran a story about a new WiFi module (the Wi07c) based on the ESP8266 chip. It is eminently suitable for attaching to an arduino or similar, but it only costs $5. As I’ve been whining for some time about the high cost of WiFi shields for arduino, this piqued my interest. I bought a couple from the electrodragon store and have now had a bit of time to play with them. It seems that for once I’m a little ahead of the game – other people seem to be waiting a long time to receive theirs. The documentation is a little sparse, but enough to be going on with. There are three main sources, mostly community-supported: electrodragon, a hackaday.io project and nurdspace. The device is serial-driven, using a limited set of AT commands which will feel familiar to anyone who has worked with GPRS modems.

I’ve connected one of the modules to an arduino, and done some testing. I’ve also driven it directly from a serial terminal on my PC. These are my findings so far:

  1. The module runs at 3.3V, not 5V. The 3.3V available from an arduino can’t provide enough current to power it (though it may seem to). The WiFi module won’t even respond to commands without a separate power supply. Powering it from one of these works fine.
  2. In the version of the module I have, you must connect the CH_PD pin to +3.3V. Don’t be put off by the suggestion in the diagrams on Nurdspace.com that the four pins in the middle of the connector are not connected to anything. CH_PD is the pin next to the TXD pin.
  3. The AT commands mostly work. AT+CWLAP briskly returns a list of visible access points. AT+CWJAP connects to my home router (or claims to). Beyond that, things get flaky. Actually setting up a TCP connection to a running server does not seem to work. Nor does sending UDP. both allow me to get to the point of sending data, but then simply respond ‘busy’ to any further command or data until the device is rebooted (by unplugging it from the power supply). I’m not convinced that the device is ever genuinely connected to my router: the router doesn’t show it in the list of active clients.

I’ll keep experimenting with it, but I’m frustrated. It seems so close to being functional, but isn’t quite there yet. It feels like the firmware is missing some useful commands and diagnostic information. Or maybe it’s the documentation. Perhaps if my Chinese was better…

2 thoughts on “WiFi for less than a fiver”

  1. Interesting what you said about the ESP8266 detecting AP’s but failing to talk to them. I had exactly the same issue with the devices I have recently started using. I suspected that the problem occurred the first time they tried to transmit and use more power than before. I found that a 100uF capacitor across the supply lines (3.3V – 0v) reliably cured the problem. Now my ESP8266’s reliably connect to my AP and push data out to the ‘net.

    1. That’s an interesting observation. I have noticed that running the module off a decent battery is quite reliable; perhaps the combination of being able to pull as much current as needed and the lack of noise from a cheap power supply makes a difference. I’ll certainly try adding a a capacitor, though. I’ve had a lot more success recently, after reflashing the chip with nodemcu. I’ve now got a single esp8266 (no arduino or other MCU) connected to nothing more than two temperature sensors and a battery (ok, and one resistor) reporting minute-by minute temperature data to a server over my WiFi network. I’ll be posting full details soon.

Leave a Reply

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