Friday, 20 November 2015 22:46

Upload sketch to the ESP8266 (ESP-07/ESP-12) using Arduino IDE

ESP 07 Arduino IDE
The ESP-07/ESP-12 is a generic ESP8266 module which have no bootstapping resistors on board, insufficient decoupling capacitors, no reset circuit, and no USB-serial adapter. This is an article shows you how to connect the bootstapping resistor to the ESP-07 module and upload sketches onto the ESP-07/ESP-12 using the familiar Arduino IDE.

In order to use the ESP-07/ESP-12 module, you need to solder 4 pcs 10K ohms resistors & a filtering capacitor onto the module as shown in figure below.

ESP 07
JP1 and SW1 is required when uploading sketch, you can remove them after sketch has been uploaded.

 

Power the ESP-07/ESP-12 module

The ESP-07/ESP-12 module is a 3.3V device. Power the ESP-07/ESP-12 module from the USB port (5V) without a 3.3V regulator could damage the module.

During uploading sketch, I'm power the module from my USB-Serial adapter which the voltage is switched to 3.3V. However, using the power available from USB to Serial adapter is not recommended.

 

Hardware setup

As shown in table below is the connection between USB-Serial adapter & ESP-07/ESP-12

USB-Serial adapter ESP-07/ESP-12 module
VCC (3.3V) VCC
GND GND
TX RX
RX TX

usb serial

 

Testing the ESP-07/ESP-12 module

The ESP-07/ESP-12 comes pre-programmed with AI-Thinkers firmware, it has the AT command set preinstalled. Before uploading sketch to the ESP-07/ESP-12, it's important to test it directly via a serial interface.

Assumes you already have Arduino IDE running on your computer. If you do not have Arduino IDE software on your computer, please download it from Arduino official website & install it to your computer.

  1. Complete the hardware setup as described in the Hardware Setup
  2. Plug in the USB-serial adapter to computer via USB
  3. Run the Arduino IDE
  4. Click on Tools from the Arduino IDE menu
  5. Choose the correct COM port for your USB-Serial adapter
  6. Open the Serial Monitor
  7. Choose the correct baud rate, mine is 9600
  8. Push the SW1 to reset the ESP-07/ESP-12, you should see the following output on the serial console

    [Vendor:www.ai-thinker.com Version:0.9.2.4]

    ready

  9. Congratulation! Your ESP-07 is working.

Installing ESP8266 package for Arduino IDE 1.6.4 or 1.6.5

Do not use Arduino 1.6.2 and 1.6.6, if you do not have Arduino IDE1.6.4 or 1.6.5 software on your computer, please download it from Arduino official website.

  • Choose Preferences from the File menu in the Arduino IDE
  • Enter http://arduino.esp8266.com/stable/package_esp8266com_index.json into Additional Board Manager URLs field
    Preferences
  • Choose Board from the Tools menu in the Arduino IDE, click on Boards Manager from the dropdown menu
  • Use the Board manager to install the ESP8266 package
    Board Manager
  • Restart the Arduino once completed installation

 

Uploading sketch to ESP-07/ESP-12

  • Select the correct configuration for the ESP-07/ESP-12 as shown in figure belowArduino IDE settings
  • Load a sketch into the Arduino IDE editor windows.
  • .As described in the Hardware Setup, place a jumper (JP1) between GPIO0 and GND in order to start the bootload mode.
  • Push the SW1 button to reset the ESP-07/ESP-12.
  • Click on Upload button from the Arduino IDE, the blue LED which is wired to TXD (GPIO1) will start blinking rapidly indicated uploading process is going on.
  • Remove JP1 after successfully uploading.

8 LEDs light up in sequence

8 LEDs light up in sequence

Read 50199 times Last modified on Sunday, 12 June 2016 11:47

23 comments

  • Comment Link Shafeek Sunday, 13 March 2016 01:19 posted by Shafeek

    Was able to uplode the first program. But after a while no response from the board.i was powering it from 3.3v of arduino uno and connected it via cp2102. It worked without any problem for a while then it went off and is not turning on.the led doesnot glow anymore sometims gives a dim const glow.

  • Comment Link admin Sunday, 03 January 2016 00:40 posted by admin

    It is the external components such as resistors which allows the ESP-07 works without any problem.

    C1 is a decoupling capacitor, it is 0.1uF

  • Comment Link cyril Saturday, 02 January 2016 06:25 posted by cyril

    Hi !

    Sorry for my ignorance but I cannot find any explanations online.

    Why are you the only one who talks about the lack of bootstrapping for the ESP-07 ?

    I don't know what bootstrapping means in electronic terms but I'm very surprised that I did not see anything about that in the dozen of tutorials I just read/watch.

    Is that absolutely necessary and why ?

    Also, what is the c1 value ?

    Thank you very much :)

Leave a comment

Back to Top