Go Small Go Wireless Outcome – ESP8266

Introduction to ESP8266

What is ESP8266?
“ESP8266 is a highly integrated chip designed for the needs of a new connected world. It offers a complete and self-contained Wi-Fi networking solution, allowing it to either host the application or to offload all Wi-Fi networking functions from another application processor.”
(from Seedstudio http://www.seeedstudio.com/depot/WiFi-Serial-Transceiver-Module-w-ESP8266-p-1994.html)

ESP8266 has many versions, from ESP-01 to ESP-13.
You can see the spec differences here >> http://www.esp8266.com/wiki/doku.php?id=esp8266-module-family

During the focus-group experiments, we tried out ESP-01 and ESP-12

links
Espressif is the company producing ESP8266 >> http://espressif.com/en/products/esp8266/
ESP8266 community forum >> http://www.esp8266.com/
Arduino Forum thread on ESP8266 >> http://forum.arduino.cc/index.php?topic=273745.0
Seeed-Studio ESP getting started >> http://www.seeedstudio.com/blog/2014/09/11/getting-started-with-esp8266/
a book about esp8266 >> http://neilkolban.com/tech/esp8266/

 


Hardware setup

1. pinout
you can find the pinouts here >> http://www.esp8266.com/wiki/doku.php?id=esp8266-module-family

When the ESP is powered correctly a red LED lights up.
A blue LED indicates data traffic.

ESP-01
esp1_pinout

connections for programming
Any ESP Module can be programmed via serial, when it is put into programming-mode by pulling pin-0 to ground when it starts up. To program the Modules we used a FTDI USB programmer. You will need to connect GND to GND, VCC to 3.3V, RX (ESP-01) to TX (FTDI), TX (ESP-01) to RX (FTDI), CH_PD and RST to VCC, GPO-0 to a pull-up resistor (20kohm or bigger) and a button that connects to GND. To do this, it is convenient if you make a special plug for it as it shows on the picture below.

IMG_1939 IMG_1940
plug_ill

The programming-cable is missing a button to reset the module. The chip has to be disconnected and reconnected for a reboot. You may want to add a reset-button.

ESP-12
esp12_pinout

connections for programming
As ESP-12 breakout does not have header pins mounted, we soldered sockets with a 2mm pitch onto the board to test and program. (The holes on the module has a 2mm pitch, which does not fit to a breadboard)
For programming, you can also use a FTDI USB programmer. You will need to connect GND to GND, VCC to 3.3V, RX (ESP1) to TX (FTDI), TX (ESP1) to RX (FTDI), CH_PD to VCC, GPO0 to Pull-up resistor (20kohm or bigger) and a button that connects to GND, RST to Pull-up resistor (20kohm or bigger) and a button that connects to GND.

IMG_1946

(maybe an image of the breadboard connections?)

Connection for using it
No need for serial-connections if you don’t use serial

 


Software Setup

ESP-Modules can be programmed using the Arduino-IDE and it’s libraries.
The Arduino project for ESP-8266 Boards is here: https://github.com/esp8266/Arduino

This is a step-by-step guide how to setup your Arduino IDE for ESP-support.

1. download the Arduino IDE:
https://www.arduino.cc/en/Main/Software

2. add ESP board-description to Arduino
Since 1.6.4 Arduino has a Board Manager. In order to get support for the ESP-8266 boards, this link has to be added to the Arduino preferences:
http://arduino.esp8266.com/stable/package_esp8266com_index.json

gsgw-arduino-preferences

3. install the boards
Use the Board-Manager to install support for ESP-8266 boards.

gsgw-arduino-bm-open

When opening the Board-Manager, the additional Board descriptions are downloaded.
In the Board-Manager search for the “ESP”.

gsgw-arduino-bm-selecting

Click “Install” to install the ESP-8266 Baords into your Arduino IDE

gsgw-arduino-bm-update


4. use the boards (in arduino)


Choose “Generic ESP8266 Module” from your Board selection

gsgw-arduino-esp_select

After choosing the ESP-Module, you will see more items in the Tools-Menu.
Leave the default settings.

gsgw-arduino-esp-board

5. where is it going to be installed
Additional boards are installed into these locations:

OSX: ~/Library/Arduino15/packages/
Linux: ~/.arduino15/packages/
Windows: C:\Users\*username*\AppData\Romaning\Arduino15\packages\

 


Programming ESP8266

In order to program a ESP8266 Module pin-0 (GPIO-0) hast to be pulled to ground when the device boots. If pin-0 is pulled to ground when the modules is connected to power or is reset, then it goes into programming-mode. If pin-0 is _not_ pulled to ground, the module would go and start the program it was programmed with.

1. pull GPIO-0 to GND

2. power up or reset the device
Either connect your USB-cable, or press the reset-button

3. upload sketch
When the device is in programming-mode, upload your sketch as usual using the Arduino IDE.

 


Using direct socket connection

Try out the examples in ESP8266WiFi for a direct Socket connection.
When we tested the Modules with max/msp we ran into problems using the client example. Data transmission stopped after sending a couple of messages. This problem seems to be related to the server implementation of max/msp.
When using the examples to communication between ESP-Modules it works fine.

An alternative Socket implementeation can be found here (work in progress):
This implementation works fine with max/msp.

One Response to Go Small Go Wireless Outcome – ESP8266

  1. Pingback: Go Small Go Wireless Outcome – MQTT |

Leave a Reply