header image
Flashing the ESP-12 with Arduino UNO
April 17th, 2018 under Electronics. [ Comments: none ]

I recently I bought a Webduino-Smart. It’s an easily available ESP-12/ESP8266 chip in my country and it can be powered through a micro USB power supply. However, I’m not fond of the javascript based development methodology. Hence I wanted to move to a different firmware.

For me the ESP8266 Arduino Core was exactly what I was looking for. Especially, because I was already familiar with Arduino development.

Unfortunately, the Webduino-Smart does not feature a USB-TTL adapter. As a consequence, the Webduino Smart cannot be programmed/flashed as easily as I was used to from the Arduino UNO. After doing some research I was able to misuse the Arduino UNO board as an USB-TTL adapter.

So here is how I could upload my sketch from the Arduino IDE through the Arduino UNO to my Webduino-Smart.

  1. Remove the ATMEGA microcontroller from the Arduino UNO. The Arduino is still accessible through the device /dev/ttyACM0.
  2. Then connect the communication channels tx and rx from the Arduino to the Webduino. (TX <-> TX, RX <-> RX)
  3. Connect the grounds of the two boards (GND <-> GND).
  4. Pull the GPIO0 of the Webduino to 0 by connecting it to the ground of the Arduino (GND <-> 00). This puts the ESP-12/ESP8266 into flash mode and lets you flash a new firmware to the device.
  5. Power the Webduino with 3.3V by connecting the 3.3V ouput from the Arduino to the power input VCC of the Webduino (3.3V <-> VCC).
  6. Select the ttyACM0 connection in the Arduino IDE (Menu Tools -> Port).
  7. Choose “Generic ESP8266 Module” as your board in the Arduino IDE (Menu Tools -> Board). This option is only available if you installed the ESP8266 Arduino Core.
  8. Leave all other settings to their default values
  9. Upload the sketch by pressing the upload button in the Arduino IDE.Note: I had to disconnect and reconnect the power of the Webduino before uploading a sketch.

In order to run the sketch I simply removed the (GND <-> 00) connection so that the Webduino boots no longer into flash mode. Then reboot the Webduino by disconnecting and reconnecting the power supply.

I read somewhere that it is not necessary to remove the ATMEGA microcontroller. The entire process should also work with the controller in place. I never tried this since I was fine flashing to Webduino without the controller.

Disclaimer: I know that the Webduino runs on 3.3V but the TX/RX pin of the Arduino are 5V. So, there is a risk of frying the Webduino. It worked for me without problems though. So, just for the record, use this procedure at your own risk!