Hello all,
It's my first time to use WiFi ESP8266 module, and I have faced a problem sending AT commands.
my connections are as below:
PS(12 v) --> 7805 --> 1 kOhm --> ESP8266 Vcc --> 2 kOhm --> Ground ( I did this voltage divider to supply the ESP8266 with 3.3 V)
ESP8266 Vcc ---> CH_PD
ESP8266 Vcc ---> RST
ESP8266 Tx ---> Arduino D2
Arduino D3 ---> 1 kOhm ---> ESP8266 Rx ---> 2 kOhm --> Ground ( I did this voltage divider to convert arduino 5V to 3.3 v)
ESP8266 GND ---> Ground
Arduino GND ---> Ground
all Grounds are common.
Then I downloaded the below Sketch:
#include <SoftwareSerial.h>
SoftwareSerial ESPserial(2, 3); // RX | TX
void setup()
{
Serial.begin(9600); // communication with the host computer
while (!Serial) { ; }
// Start the software serial for communication with the ESP8266
ESPserial.begin(9600);
Serial.println("");
Serial.println("Remember to to set Both NL & CR in the serial monitor.");
Serial.println("Ready");
Serial.println("");
}
void loop()
{
// listen for communication from the ESP8266 and then write it to the serial monitor
if ( ESPserial.available() ) {
while( ESPserial.available())
{
Serial.write( ESPserial.read() ); }
}
// listen for user input and send it to the ESP8266
if ( Serial.available() ) {
delay(1000);
String command = "";
while ( Serial.available())
{
command += (char)Serial.read();
}
ESPserial.println(command) ;
}
}
Every time I write anything in Serial Monitor window nothing returns even the "AT".
Also the led in ESP8266 is not blinking ... is that normal ? I have measured the current going to ESP8266 module and I found it 25 mA, while I saw a lot of talks in the internet saying that ESP8266 consumes about 180 mA.
If this the problem How should I fix it while it's supplied by a stand alone power supply.
Edit 1: I have tried the connection in the image below but still didn't receive any response in serial monitor