ESP8266 with Ardunio Nano problem

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

  1. Did you install the ESP8266 board in Arduino IDE?

  2. If you did, I highly highly suggest buying a USB-to-serial adapter. I just went through this myself, and you realy really really need one to help you establish communication to the ESP8266 module. You need to see it working, and then you could bring the Arduino Uno into use.

PS(12 v) --> 7805 --> 1 kOhm --> ESP8266 Vcc --> 2 kOhm --> Ground ( I did this voltage divider to supply the ESP8266 with 3.3 V)

This won't work. You must use a 3.3V regulator.

Just a note of caution - ( I see you eyeing the 3.3v pin on the nano as a power source for the ESP).
The 8266 can run 250ma or more when broadcasting (and with all the pretty lights flashing). I couldn't see what the max output was for the 3.3 pin on the nano spec sheet but on the bigger Uno it's only 50ma, so probably not enough on the Nano either.

I just saw three people attempt it this week so thought I'd put it out there.

jremington:
This won't work. You must use a 3.3V regulator.

Why this will not work? and whats the difference between it and 3.3 Voltage regulator.

I have measured the volt and its 3.3V exactly.

ieee488:

  1. Did you install the ESP8266 board in Arduino IDE?

  2. If you did, I highly highly suggest buying a USB-to-serial adapter. I just went through this myself, and you realy really really need one to help you establish communication to the ESP8266 module. You need to see it working, and then you could bring the Arduino Uno into use.

What is the use of ESP8266 board? I need to send commands from arduino to ESP not to program the ESP.

is second point means that may be the Wi-Fi may be damaged ?

jremington:
This won't work. You must use a 3.3V regulator.

I forget to mention that with my connection the volt is 3.3V at ESP Vcc but just after I power it up the volt drop to 1 V, is that what you mean ?

You must use a 3.3V regulator, not a resistive voltage divider, to power the ESP8266.

jremington:
You must use a 3.3V regulator, not a resistive voltage divider, to power the ESP8266.

Thx jremington

I have used 78R33 regulator and the red led in the module is now on, but still when I send an AT command still I don't receive anything I have started to suspect that the problem is in IDE?

sayedmosalem:
Thx jremington

I have used 78R33 regulator and the red led in the module is now on, but still when I send an AT command still I don't receive anything I have started to suspect that the problem is in IDE?

No, the problem is not the IDE.

If you have a ESP-01 version of the ESP8266, the baud rate is 115200. The last 3 I bought on eBay from two different sellers have been 115200.
You won't be able to use SoftwareSerial. You must be connected to D0/D1 the hardware UART pins.

If you are using the Arduino Uno as the USB-to-serial adapter, then you need RX Arduino to RX ESP8266 and TX Arduino to TX ESP8266.

If you want to continue to use an Arduino with the ESP8266 and to be able to debug, the Mega 2560 is the Arduino to use, because it has four hardware serial ports and you can use one to send AT commands to the ESP8266 and use another to debug to Serial Monitor.