ESP8266 first steps

It’s amazing how small today’s electronics gets. Imagine a microcontroller equipped with a full featured WiFi interface on a 5x5mm chip! Yes, that’s the ESP8266. Various boards with the ESP8266 can be obtained for under $ 4,00 and are called ESP-01 to ESP-12. I recently ordered two pieces of the ESP-03 from Banggood together costing just € 7,00. The units are advertised as Remote Serial Wifi port which is correct for that is what they do initially. But when the smart guys found out how to program the chip it seems to be able to turn the thing into a Lua programmable, MQTT capable Internet-of-Things Wifi interface… Now you’ve got my attention! Let’s find out.

ESP-03

ESP-03

In this post i will not repeat all the info but will just refer to the websites i have found valuable in getting the thing operational.

As the ESP8266 comes in a number of different boards you need to select which board. Prices are all between € 3,00 and € 4,00. The difference is how many of the GPIO leads can be accessed. I choose the ESP-03 as it looked real easy to solder some leads to it. The problem however is that the spacing between the leads is 2.0 mm and not the regular 2.54mm. So i had to leave the leads a bit longer to get it properly into the prototype board.

The second question was how to supply it and interface it to the USB port of the PC. Using a FT232 adapter seemed to be simplest and most reliable (there seem to be fake FTDI FT232 chips which won’t work with Windows7). It also provides 3.3V for the ESP-03. The ESP-03 consumes 50mA but with WiFi it may burst to 200mA. A big capacitor (100uF is as big i had available and seems to work) is used to help providing these current peaks.

Yesterday the FT232RL arrived, time to see if i can get the ESP-03 alive! Scargill’s post helped to get the wiring done and i happily borrowed his picture:

Wiring for the ESP-03

Wiring for the ESP-03

All placed on the protoboard to look like this:

ESP-03 and FT323RL on protoboard

ESP-03 and FT323RL on protoboard

Then the moment of truth. After driver installation Putty  (a simple terminal program) is run on Com5 at 9600, no parity, 8 databits and 1 stopbit. Typing AT responds OK ! The Nurdspace page list another number of AT commands to try. Here some examples: AT+CWLAP (list WiFi access points), AT+CIFSR (IP status of WiFi AP and AP connected to), AT+CWJAP? (Accesspoint currently connected to).

AT
OK
AT+CWLAP
+CWLAP:(2,"xxxxTN21",-56,"00:22:6b:xx:xx:xx",3)
+CWLAP:(4,"SpeedTouchAxxxxx",-86,"00:14:7f:xx:xx:xx",6)
+CWLAP:(3,"xxxxTN21B",-80,"00:0f:94:xx:xx:xx",9)
+CWLAP:(4,"VGV7519xxxxxB",-78,"18:83:xx:xx:xx",10)
OK
AT+CIFSR
+CIFSR:APIP,"192.168.4.1"
+CIFSR:APMAC,"1a:fe:34:9f:db:dc"
+CIFSR:STAIP,"192.168.1.xxx"
+CIFSR:STAMAC,"18:fe:34:xx:xx:xx"
OK
AT+CWJAP?
+CWJAP:"xxxxTN21"
OK
AT+CWSAP?
+CWSAP:"TEST","TEST",3,0
OK

Enough excitement for now. Next on the list is investigating how to flash the unit with other firmware like NodeMCU to turn this little gem into an IoT interface. Can’t wait!

Advertisements
This entry was posted in ESP8266. Bookmark the permalink.

2 Responses to ESP8266 first steps

  1. HL says:

    Very nice post, curious on your next steps (IoT interface)
    brgds

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s