AT commands not responding on ESP8266-01

OK, good.

Then I took that working ESP8266 again, the one that was working 1 minute ago, I open serial monitor again , type AT - no response. I disconnected the VCC pin of esp, connected it back again and now it is working again
Making sure that you have correctly identified the Vcc pin on the ESP8266-01, are you saying that when you have that pin DISCONNECTED completely, the ESP8266-01 works? Because that just can't be as far as I can tell.

Forgetting the Arduino completely for the moment.

Do you have a USB to serial converter board. There are many different kinds, here is a picture of one kind. No matter if you don't.

Assuming that you don't, there are two issues for using the chip with the Arduino as the serial communicator with the AT commands, that you have to remedy.

First, the Arduino UNO will be transmitting on the Tx pin at 5V and will want to receive on Rx also with 5V. The ESP will be transmitting with 3.3V and will want to receive with 3.3V. It is a BAD idea to connect the Arduino TX to the ESP RX without accounting for that voltage difference.

You can do that with a converter on both tx and rx or you can get away with just using two resistors to drop the 5V to 3.3 v.
Look at this pic (ignore everything else except the 1K/2K resistor connection)

See the 1K and 2K resistors and how the ESP RX line is connected to the Arduino TX line (shown as D3)? That is what I mean.

The second issue is the 3v power supply. That has to be used because the Arduino can not supply enough power to run the ESP8266-01. So, Vcc on the ESP Vcc needs to be connected to the external 3.3V power supply AND the GND on the external external power supply also needs to be connected to the GND on the Arduino.

Is this making sense?
 

Thread Starter

zazas321

Joined Nov 29, 2015
936
Okay now Im trying to do the same thing but with Arduino UNO. Very strange things are happenings...



I am not getting any response to AT commands with arduino through serial monitor, termite and putty as well.

I have opened a blank arduino page, opened serial monitor and typed AT in different baud rates but didint get any response to any of them. I have tried restarting the ESP at all baud rates as well - no response at all.

One strange thing that I have noticed, is when i press the reset button, nothing happens to ESP at all. Before, the Red led used to blink every time i press the button, but now nothing happens
 

Thread Starter

zazas321

Joined Nov 29, 2015
936
Connceted back to FTDI adapter as before - not working anymore :DDDDDDDDDDD
How is that possible to make this little chip that complicated and non user friendly
 

Thread Starter

zazas321

Joined Nov 29, 2015
936
OK, good.



Making sure that you have correctly identified the Vcc pin on the ESP8266-01, are you saying that when you have that pin DISCONNECTED completely, the ESP8266-01 works? Because that just can't be as far as I can tell.

I meant unplugged it for one second, then plug it back in
Yes I have one of those :


And I have used potential divider from arduino TX as you have mentioned
 
Connceted back to FTDI adapter as before - not working anymore :DDDDDDDDDDD
How is that possible to make this little chip that complicated and non user friendly
That is a different question. But, you are actually making good progress. Have you connect GND on the Arduino with GND on the external 3V supply?
 

Thread Starter

zazas321

Joined Nov 29, 2015
936
You have ESP8266-01 reset connected to GND through a resistor. Connect it to 3.3V through the resistor and see if that changes things.
I have just noticed that there is a mistake on the schematic that I have sent you. I have a switch between the reset pin and ground as well as switch on GPIO
_0 pin. I use reset switch to reset the module when needed but it does not seem to work most of the times - it is best to take out Vcc pin and put it back in.

I have figured out why my ESP8266 was not working again when i plugged it in back again with FTDI adapter - one of my serial pins was corrupted when I plug in and out many times it happens and fixes when I restart the PC

So now I am back with my ESP and FTDI and they seem to work fine.

The next step is how do I do it with Arduino? Because in my project I would need to use an Arduino not ftdi.
 
I have just noticed that there is a mistake on the schematic that I have sent you. I have a switch between the reset pin and ground as well as switch on GPIO
_0 pin. I use reset switch to reset the module when needed but it does not seem to work most of the times - it is best to take out Vcc pin and put it back in.

I have figured out why my ESP8266 was not working again when i plugged it in back again with FTDI adapter - one of my serial pins was corrupted when I plug in and out many times it happens and fixes when I restart the PC

So now I am back with my ESP and FTDI and they seem to work fine.

The next step is how do I do it with Arduino? Because in my project I would need to use an Arduino not ftdi.
Well, I'm glad that you have it up and working. Using the simple program that you already posted with the Arduino and software serial should now work fine. But, I think that the next step is for you to figure out why there is a switch on the reset line and why there are other resistors. That will help you understand the chip and make it easier.

Right now, however, the next step for me is a toasted cheese sandwich :)
 

Thread Starter

zazas321

Joined Nov 29, 2015
936
Well, I'm glad that you have it up and working. Using the simple program that you already posted with the Arduino and software serial should now work fine. But, I think that the next step is for you to figure out why there is a switch on the reset line and why there are other resistors. That will help you understand the chip and make it easier.

Right now, however, the next step for me is a toasted cheese sandwich :)
Thanks and enjoy your sandwich :)
I will try to get it working on arduino
 

Thread Starter

zazas321

Joined Nov 29, 2015
936
Hey. I have uploaded a sketch to arduino:
C:
#include <SoftwareSerial.h>

SoftwareSerial mySerial(2,3);

// When a command is entered in to the serial monitor on the computer
// the Arduino will relay it to the ESP8266


int LEDPIN = 13;

void setup()
{
pinMode(LEDPIN, OUTPUT);

Serial.begin(9600); // communication with the host computer
//while (!Serial) { ; }

// Start the software serial for communication with the ESP8266
mySerial.begin(115200);

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 ( mySerial.available() ) { Serial.write( mySerial.read() ); }

// listen for user input and send it to the ESP8266
if ( Serial.available() ) { mySerial.write( Serial.read() ); }
}
with a circuit:


At first it did not work, but after I disconnected to Vcc pin and connected it back again, i managed to get some output!
upload_2019-1-25_17-19-12.png

at 9600 baud rate, I am able to send AT command and get an answer, but when I send AT command once, the TX led on Arduino UNO keeps flashing very fast and it is not stopping. It has been flashing for like a minute now and it is putting those question marks as you can see on the serial monitor

Any clue why would that happen?
 
Last edited by a moderator:

Thread Starter

zazas321

Joined Nov 29, 2015
936
I have put 1s delay in between those two lines and now the LED is flashing every 1 second. If the TX LED is blinking that means the arduino is receiving something from ESP even though I am not sending anything

C:
if ( mySerial.available() ) { Serial.write( mySerial.read() ); }
delay(1000);
// listen for user input and send it to the ESP8266
if ( Serial.available() ) { mySerial.write( Serial.read() ); }
}
 
Last edited by a moderator:

Thread Starter

zazas321

Joined Nov 29, 2015
936
I can see that this guy is using 9600 Baud rate for his ESPserial. I assume that my ESP8266 is set to 115200 so I in my code I used 115200. Perhaps I should somehow change my ESP8266 baud rate to 9600 and use his code?
 
I can see that this guy is using 9600 Baud rate for his ESPserial. I assume that my ESP8266 is set to 115200 so I in my code I used 115200. Perhaps I should somehow change my ESP8266 baud rate to 9600 and use his code?
You have it working, it is probably a good idea not to flash anything until you have a better understanding.

Why not just change this one line in his program:

esp8266.begin(9600);

to

esp8266.begin(115200);

and it will work. Then go read about software serial.
 

djsfantasi

Joined Apr 11, 2010
9,237
@zazas321 A couple more thoughts..,

What happens if you send multiple “AT” commands using your test program?

The question mark looking characters are a typical sign of a mismatch in your comm parms. And it’s happening in the middle of your “AT+GMR” command. That’s why I want you to try multiple commands that are not the “AT+GMR” command.

Secondly, the repeating characters indicate that there is something left in the buffer or being appended to the buffer. To clarify, do these characters eventually stop? Or do they keep on going until you reset the chip or remove power?

Personally, I use a
while(Serial.available())
loop, grabbing all available characters and putting them into a string or char array. That way, nothing perturbs the comm input.

But first, convince me that:
1) the grounds of both devices are connected;
2) The problem occurs even with multiple “AT” commands.
 
Top