Flashing firmware on ESP8266 WiFi Shield

Internet beholds the power of IoT. To solve every day problems smartly we need to connect our devices with internet. For Adruino based applications you can use Ethernet or Wifi shields. Most popular WiFi shield available in market is ESP8266. There are different variants of this WiFi device the one I will be using is WiFi shield by Wang Tongze.

IMAG1196

Softwares required:

  1. AI-Thinker Firmware:  https://raw.githubusercontent.com/sleemanj/ESP8266_Simple/master/firmware/ai-thinker-v1.1.1-115200.bin
  2. ESP8266 Flasher tool: https://doc-00-9s-docs.googleusercontent.com/docs/securesc/a9b1254bs1us64pqmr38r78ccvertirr/st5stip3lcmlm7ijjk63pmti6kl2ctbk/1498903200000/05702476862157177151/02970016904424219159/0B3dUKfqzZnlwVGc1YnFyUjgxelE?e=download&nonce=9li1ovn7lekh0&user=02970016904424219159&hash=n3kvk8tkjal7jmbco10l3o7jspku5el0

Hardware requirements:

  1. Arduino Uno/Mega
  2. ESP8266 WiFi Shield/Module
  3. FTDI cable (Optional)
  4. Connector cables

Circuit diagram:

ESP8266_flash_circuit

Firmware upgrade:

  1. Connect Arduino RESET pin with Arduino GND pin as shown in picture below:IMAG1198
  2. Connect ESP8266 TX and RX with Arduino TX and RX as shown in picture below:

  3. Connect ESP8266 +5v and GND with Arduino +5V and GND as shown in picture below:

  4. Turn on switch 3 and 4 as  shown on ESP8266 shield. It will enable firmware upgrade mode on shield.
  5. Connect Arduino with PC.
  6. Open esp8266_flasher.exe which you downloaded from link given in software requirement section. Locate firware path and set you com port. Click Download to start firmware upgrade.

esp8266_firmware_flashing

 

Setting up baud rate:

By default this shield be configured to communicate at 115200 baud rate. But Arduino serial comm supports 9600 baud rate only. In order to change baud rate we need to hook up ESP8266 with Arduino.

  1. Turn on switch 1 and 2 as  shown on ESP8266 shield. It will enable TTLSW mode on shield.
  2. Connect Arduino with computer and open Arduino IDE.
  3. Go to Tools > Serial Monitor
  4. Type following command and click Send button: AT+UART_DEF=9600,8,1,0,0

That’s it you are ready to start programming with your ESP8266 WiFi Shield.

Note: There are various ESP8266 modules available in market and most of them operate on 3.3v. In such case make sure you are using a voltage regulator otherwise you might damage your board. Always double check your connections and switch positions.

References:

  1. https://github.com/sleemanj/ESP8266_Simple/tree/master/firmware
  2. https://room-15.github.io/blog/2015/03/26/esp8266-at-command-reference/
  3. https://www.indiegogo.com/projects/cheapest-ardunio-esp8266-wifi-shield-more-gpio#/

 

Advertisements

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s