How to Flash NodeMCU Firmware to ESP8266 ESP-12 WiFi Module

ESP8266
Photo credit: Adafruit ESP8266 SMT Module – ESP-12 via Photopin (License)

You may be struggling to find how to flash firmware to ESP8266 module. This article provide you step-by-step instructions on how to successfully flash the NodeMCU firmware to ESP8266 ESP-12E module.

ESP8266 is a compact and cheap WiFi module that provide wireless connectivity to electronic systems. Also it can be used as a small scale microcontroller. This module was developed by Espressif Systems and AI-Thinker of China.

What is ESP8266 WiFi Module?

This device consist of over a dozen different models each providing different features and capacities. ESP8266 ESP-12E is one of those models.

In this section we will discuss on how to flash NodeMCU firmware into the ESP8266 ESP-12E module.

Before inserting your code to this device you should install a suitable firmware into the device. Then only this module becomes capable of running a user written code. Follow through the step by step guideline mentioned below to successfully flash the firmware.

Before starting this task make sure you have gathered following items.

  1. ESP8266 ESP-12E Module
  2. CP2102 USB-Serial Converter
  3. 3.3V Regulator
  4. A DC 5V 1A power supply
  5. A desktop or laptop computer
  6. A prototype board
  7. Jumper wires

 

Step 1

Download NodeMCU Flasher Software

NodeMCU Flasher is the software used to download firmware into the ESP8266 module. You can download it from the official github page.

Download NodeMCU Flasher

Then install the software in your computer.

 

Step 2

Download Firmware File

Next you need to download the ESP8266 firmware file. This is what you insert inside the ESP8266 module. There are 2 different languages supported by ESP8266 module called Lua and AT. There are 2 different firmwares for those 2 languages. You should choose one from these two languages and download the firmware related to it. In this article we focus on the Lua language and it’s firmware. The firmware is a bin file. You can get this firmware file from following github page.

Download Lua Based Firmware Files

In the github page click on releases tab in top of the page. Then scroll down until you see two bin files with names similar to following.

nodemcu_float_0.9.6-dev_20150704.bin

nodemcu_integer_0.9.6-dev_20150704.bin

One of these bin files is named as float and the other one is names as integer. If you are doing floating point calculation in your code you should get the float bin file. Or if you are doing integer calculations you should get integer bin file. If you are not concerned about calculations you can download any of those bin files because both are almost same.

 

Step 3

Set up ESP8266 Module in Firmware Flash Mode

Now you need to set up your ESP8266 module to firmware flash mode in order to download the firmware file. To do it set up your ESP8266 module as in following circuit diagram.

ESP8266_Wiring_Flash_Firmware

Important: ESP8266 module operate in 3.3V voltage. Therefore you should be careful to supply only regulated 3.3V voltage to the ESP8266 module.

 

Step 4

Flash the Firmware

Now connect the CP2102 USB-to-Serial converter to your computer. Computer will detect the ESP8266 module in one of its COM ports. Go to your computer’s device manager and check which COM port the ESP8266 module was detected on.

Then open NodeMCU Flasher software that was installed in step 1 above. Select the correct COM port from the list of COM ports available.

ESP8266Flasher_1

Now click on Config tab.

ESP8266Flasher_2

Then click on the first gear icon and browse towards the firmware downloaded in Step 2 above. Locate the firmware file, select the file and click on Open.

ESP8266Flasher_3

Finally go to Operation tab and click on Flash button. It will start flashing the firmware to your ESP8266 module. Once completed successfully you will be able to observe a green color tick at bottom left corner of the software.

If any error occurred, go to the Log tab and read logs to find what went wrong.

ESP8266Flasher_4

 

Congratulations! You have successfully downloaded firmware to your ESP8266 module.

Now you can write your own code and download it into the ESP8266 module.

If you encounter any issue please leave a comment. We might be able to help to resolve your issue.

Share This Article

Add a Comment

Your email address will not be published. Required fields are marked *