Reset ESP8266 connection diagram

Master RESET ESP8266 Wifi Module using Arduino mega 2560

Master Reset ESP 8266 Wifi Module

Sometimes when working with ESP8266, the module stop replying to AT commands. To solve this issue, we have created a simple Master Reset Program to reset ESP8266 Module using Arduino Mega2560, however one can use Arduino UNO using Software Serial Library to achieve the same.

Connection Diagram:

Reset ESP8266 connection diagram

Connect ESP8266 with Arduino mega 2560 as shown in figure above.

Arduino PinsESP8266 Pin
RX1 (19)TX
TX1 (18)RX
3.3 VEN or CH_PD
5 (Digital pin 5)RESET
3.3 VVCC
GNDGND

 

After connections, compile the following program and upload it to Arduino Mega 2560.

void setup()
{
Serial.begin(9600);
Serial1.begin(115200);
pinMode(5, OUTPUT);
digitalWrite(5, LOW);

for(int i=0;i<=200;i++)
{
delay(50);
Serial1.println(“AT+”);
}

digitalWrite(5, HIGH);
delay(1000);
digitalWrite(5, LOW);
Serial.println(“RESET Complete”);
delay(1000);
Serial1.println(“AT”);
}

void loop()
{
if(Serial.available() > 0)
{
Serial1.write(Serial.read());
}

if(Serial1.available() > 0)
{
Serial.write(Serial1.read());
}

}

 

Download the Arduino Sketch to Reset ESP8266 Wifi Module: Reset ESP8266 Arduino Sketch

It may take 10 to 15 seconds to reset, and once it is done you will receive some unknown bytes on Serial monitor as shown in Figure below:

reset esp8266 output after reset

 

To Test ESP8266, if it is working or not, download a simple Sketch after executing this sketch, Serial Monitor should show “OK“.

reset esp8266 verify

 

Enjoy!

 

Version: 1.0 (dated: 22-03-2017)

4 comments

  1. Laercio Guerço Rodrigues

    Não é necessário divisir de tensão?

  2. hugo leonardo barbosa

    boa tarde tem uma parte do programa que nao funciona.
    Serial1.println(“AT”);
    como faço para corrigir isso.

    • Re-write this line by yourself in the code, sometimes when you copy the code, some of the characters are changed, that’s why the compiler shows syntax errors.

Leave a Reply

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