Browse over 10,000 Electronics Projects

Homebrew WiFi Shield

Homebrew WiFi Shield

Having just finished development of the new m0xpd / Kanga ESP8266 – AD9834 board, I find myself with a few WiFi components knocking about on the bench – so I figured it would be fun to try to make a WiFi shield for an Arduino…

Using an ESP8266 (in a module, such as an ESP-12) as a WiFi shield for an Arduino is a little like using the proverbial ‘steam hammer to crack a nut’ – but these modules are frighteningly cheap and I do want a WiFi shield (which are surprisingly expensive).

I have a spare ESP-12 module on a nice breakout board with 0.1 inch pitch headers, just crying out to be used once again (it having done service in the early stages of the development of the connected beacon etc)

This could be a great opportunity to press the module back into some useful work and to teach myself something new.

I found a nice page about Sparkfun’s ESP8266 WiFi shield and realised I could easily make a cut-down version with the module. Here’s my schematic…

All that’s needed is a power supply to ensure the current demands of the ESP8266 (on transmit) don’t frighten the Arduino and a level converter for the software serial interface.


Regular readers will recognise my old favourite level converter, originally used in the Si570 board and later developed in quad and octuple parallel versions (although this time I’m using the familiar 2N7000 device, as I did in the level converter for the display driver in Occam’s Dirk, rather than the fancy surface mount BSS138). To be perfectly honest, I’m not absolutely sure this level converter is required (I’ve seen some folks doing without it ) but it only takes a couple of shakes to build it and it only costs two FETs and four resistors, so it may as well go in!

Here’s the completed circuit taking up almost no space on a prototyping shield:

 and here’s the shield with the actual ESP module plugged in:

I fiddled around for a while with the code and eventually got the Arduino UNO (underneath the shield in the photo at the head of this post) to serve up a very simple web page, via the WiFi shield, on which it reported the analog levels read at each of its six analog input pins:

The response above is produced with A0:A4 floating (open circuit) and A5 grounded (hence the zero).

This success was obtained using ‘brute force’ AT commands (I started from the code prototype given here). My attempts to use WiFi AT libraries – including SparkFun’s, – have not yet been completely successful. I don’t yet know why – given that the shield is obviously working.

All-in-all, an interesting exercise and a nice way of getting a WiFi shield for ‘nothing’.

…-.- de m0xpd