Thursday, November 19, 2015

Programming and testing of ESP8266 by Arduino Due

Programming and testing of ESP8266 by Arduino Due


Hello friends J

If you want to program and test an ESP8266 (Wi-Fi SOC) you will normally use a USB to serial adapter like this one. In case you do not have one but you have an Arduino Due lying around. You can rig the Arduino as a bridge to program and test the ESP8266. Please be aware it does not make sense to buy an Arduino Due just for this purpose because it is usually more expensive than the FTDI chip (USB to serial).
Arduino Due is in particular good for this purpose because it does not need any level shifters. Arduino Due works at 3.3V which is compatible with the ESP8266. Here you have the steps how to do this:

Step 1: Get your materials


This is easy. As the title of this project says, you need
1) An Arduino Due
2) The ESP8266 chip and
3) Some wires.

Step 2: Wiring


The wiring is fairly simple. If you use a switch you can prepare the wiring for both programming and serial monitoring. VCC on ESP8266 goes to 3.3V on Arduino Due. GND from ESP8266 obviously goes to GND on Arduino Due. CH_PD from ESP8266 goes to 3.3V. RX from ESP8266 goes to TX1 on Arduino and the TX from ESP8266 goes to RX1 on Arduino. GPIO0 is connected to GND for programming or disconnected if it's just running the software.

Step 3: Program Arduino Due to act as a Bridge


This is a very simple step. You need to know at what speed your ESP8266 works. In case you do not know it you can just try. In most of the cases the speed would be either 9600 or 115200. Set Serial 1 on Arduino at that speed. Basically the program reads from Arduino main serial and transfers the data back and forth with Serial 1 on Arduino Due.

Step 4: Test the Bridge


Once you programmed the Arduino Due you can test the connection with ESP8266. Just open the Serial Monitor and make sure the speed matches the speed that you set for Serial (not Serial 1) which is the connection between the computer and Arduino and not between Arduino and ESP8266. ESP8266 is pre-programmed to support a series of AT commands. You can try them.

Step 5: Program the ESP8266


You can use any IDE to program the ESP with Arduino Bridge you just formed. In case you want to use Arduino to program the ESP8266 you need to use this release of Arduino. Once installed and made sure you set the port to the one connected to Arduino you need to set ESP8266 as target and the programmer to esptool.


Thanks for your view.
For more information you can visit to www.robomart.com

No comments:

Post a Comment