Monat: Januar 2017

The Problem

Recently I became quite addicted to my new Arduino Uno. To maximize the fun, I ordered a variety of shields. Today I received my ESP8266 Shield ESP-12E, which turned out to be quite a hassle.

I ordered this:

an received this:

But apart from this the „Shiald“ seemed to be fine, but the problem was: There was absolutely no documentation available and searching for tutorials revealed a lot of people having problems, but most of them being unresolved and no consistent tutorial. Combining the information they gathered (and adding some trial & error), I was able to get my shield working.

Disclaimer: All this comes without any warranty. Although I got it working now, I think I damaged the RX/TX pins on my shield in the process!

Preparing the shield

By default the shields UART is set to 115200 baud. Since the Arduino Uno doesn’t have a hardware serial (except the one for the USB connection), we have to use a software serial connection, that cannot handle this speed. Therefore we have to set the ESP8266 to 9600 baud, which can be done sending the following command through the serial connection (NOTE: this will survive reboots, so we have to do this only once):

AT+UART_DEF=9600,8,1,0,0

Problem is: We need a serial connection to get the serial connection working! If you have the equipment, you can connect the „Debug Port“ directly to your computer and use this serial port. Since I don’t own the necessary cable, I had to do it differently. I detached the shield from the Uno and did some manual wiring:

Warning the Esp8266 is running on 3.3V, while the Uno uses 5V. I’m not sure this is handled on the debug port, so a direct connection (without level conversion) might damage your WiFi shield! Do so at your own risk!
(Note: No need to do anything to the 3.3V Port). The shields COM Port is now connected the same one the Uno is using for USB communication. To make sure they are not interfering, additionally we have to connect the Unos Reset pin to the Unos GND. Also make sure to set all 4 dip switches on the shield to off (down).

If you open the serial monitor now, set it to 115200 baud and reset the shield, you should see some gibberish follow by „ready“. Once you select „Both NL & CL“ in the lower right corner of the serial monitor, you should be able to send the send the AT command to switch the baud rate (result should be „OK“). Once you do another shield reset, you should see gibberish only, until you switch the serial monitor to 9600 baud.