BLYNK
HOME       📲 GETTING STARTED       📗 DOCS       ❓HELP CENTER       👉 SKETCH BUILDER

ESP8266 (ESP-01) not responding noob


#1
//#define EspSerial Serial1

// or Software Serial on Uno, Nano...
#include <SoftwareSerial.h>
SoftwareSerial EspSerial(5, 6); // RX, TX

// Your ESP8266 baud rate:
#define ESP8266_BAUD 9600

ESP8266 wifi(&EspSerial);

void setup()
{
  // Debug console
  Serial.begin(9600);

  // Set ESP8266 baud rate
  EspSerial.begin(ESP8266_BAUD);
  delay(10);

  Blynk.begin(auth, wifi, ssid, pass);
  // You can also specify server:
  //Blynk.begin(auth, wifi, ssid, pass, "blynk-cloud.com", 80);
  //Blynk.begin(auth, wifi, ssid, pass, IPAddress(192,168,1,100), 8080);
}

void loop()
{
  Blynk.run();
  // You can inject your own code or combine it with other sketches.
  // Check other examples on how to communicate with Blynk. Remember
  // to avoid delay() function!
}

#2

I am using a nano and have tried pins 14, 15 as well.
on 5,6: [1617] ESP not responding
on 14,15: [1613} ESP not responding


#3

You don’t randomly try pins… you need to clearly pick and setup SoftwareSerial compatible pins - https://www.arduino.cc/en/Reference/softwareSerial - and code for such… as well as properly choosing the BAUD rate (9600 is correct) and programming the ESP for such - https://www.espressif.com/sites/default/files/documentation/4a-esp8266_at_instruction_set_en.pdf, as well as powering and wiring the ESP used (RX of Arduino to TX of ESP and visa versa), etc.

There are many, many, many existing topics all about the steps needed to use Arduinos and ESP as Shield… Please search for them and read up on all the processes. Then if still stumped, please provide clear details here.


#4

Right. Pins 5 and 6 are the only pins capable on my board for interrupts so I chose those. My ESP default rate is 152000 but I changed that to 9600 through AT commands. Maybe I am missing some steps, I wouldn’t know. I obviously wouldn’t have created a TOPIC had I found a solution, most end with that kind of reply, i.e., look in the forums. … Should I be using the standard Tx + RX pins (0,1) along with software serial. From my limited understanding I thought I should use different pins with software serial.

With an adapter, am I missing a resistor to make logic levels 3.3v on one of the pins?


#5

No… those are tied to the Arduinos USB so best to leave them alone for IDE programming and use SoftwareSerial at 9600 with appropriate cross wiring to the ESPs RX/TX. And proper, e.g separate, 3.3v power supply at 1A for the ESP and so on.


#6

I am powering the ESP with its own 5.5v for testing. Have tried 3.3v too. Have common grounds. Same error. So I don’t know how to really troubleshoot. The esp automatically connects to my Wifi, don’t know if that would cause conflicts with Blynk but besides that I’m at a complete loss. I’ve disabled echo through AT commands.


#7

What ESP are you using?? If it is a full development board, why not use it as a standalone again?

Normally I wouldn’t have used a full ESP8266 dev board as a WiFi shield for Arduino… but it was done recently with a NodeMCU <- here… so possible, but strange.


#8

It is not a standalone. It is a little wifi module on an adapter that makes it four pins. ESP-01 adapter. GND, VCC, RX, TX. Without the adapter it would have 8 pins, it has AT firmware v1.1.0. Maybe I am using the wrong libraries which is why I asked if I should be using a softwareserial library and not be using any esp8266 shield libraries…

Maybe it is because of my Nano clone. When I plug everything into my … UNO it works as intended. I finally don’t get not responding error. The clone doesn’t come with a ftdi chip or something, but a CH430 driver. I’m not sure if this would cause issues. Also the nano would not allow me to send codes to the ESP through AT with a bare minimum sketch. So, I do not mind that it doesn’t work but would appreciate it if it does. Also do you think this would be resolved with a genuine Nano? The UNO really is not going to fit x[
Thanks for your patience.


#9

OK, ESP-01 is a common WiFi Shield use case.

But it only takes 3.3v… Technically even the RX from the Arduino should be level shifted, but I have really not seen much issue there. A simple resistor divider works well if needed.

You DO use these libraries…

#include <ESP8266_Lib.h>  // ESP-01 Link
#include <BlynkSimpleShieldEsp8266.h>  // ESP-01 Link

Uno, Nano, Micro, Mega… all should work just fine with proper use of available Serial1 or SoftSerial settings. Clones are not an issue… that is all I use.

The big issues with a shields are…

Use this on the ESP - AT+CIOBAUD=9600 or AT+UART_DEF=9600,8,1,0,0
And this in the sketch - #define ESP8266_BAUD 9600

  • Power - ESP-01 uses 3.3v but CANNOT run off the 3.3v pin on the Arduino as it needs more current then avail. Typically a 3.3v 500mA - 1A PSU is perfect.

#10

Yes my adapter specs:

  • Working voltage: 4.5~5.5V (On-board 3.3V LDO Regulator)
  • Interface logic voltage: 3.3V / 5V compatible(On-board level shift circuit)

5,6 are the correct pins I should try with a Nano? I have another clone still in its static protection bag maybe I bricked something on this one since I cannot send AT commands through this one?

I have already set the Baud on this module. AT firmware is v1.1.0, is a flash necessary? I am just more confused now that it works with the uno and doesn’t comply with the nano.


#11

Flashing firmware and programming AT commands is dependent on the sketch you use (basically turning the Arduino into a USB-Serial adapter for the ESP and only used that one time)… Or you simply use a TTL-USB adapter and run a terminal program like Termite to handle the PC side. And you do all that before hooking it up the Nano for use with Blynk.

I use this sketch for programming my ESP-01 via my Mega and it’s Serial1 port - 19(RX), 18(TX)

/*
Accessing AT commands on ESP8266-01 with integrated WiFi login.
ESP connected to Serial1 on Mega
AT commands via IDE Serial monitor.
*/

// ===== VOID SETUP LOOP =====
void setup()
{
  Serial.begin(115200);  // Set IDE Monitor baud rate
  Serial1.begin(115200);  // Set ESP8266 baud rate... change this as needed
  delay(10);
  Serial1.println("AT+CIFSR");  // just displays network connection IP and MAC so I know it is online.
}

void loop()
{
  // read from port 1, send to port 0:
  if (Serial1.available()) {
    int inByte = Serial1.read();
    Serial.write(inByte);
  }

  // read from port 0, send to port 1:
  if (Serial.available()) {
    int inByte = Serial.read();
    Serial1.write(inByte);
  }
}

It should be adaptable to use an UNO/Nano and SoftSerial if you do NOT have a TTL-USB adapter.


#12

Um, I am not exactly sure what the above sketch is supposed to do but if it was supposed to make my Nano responsive to AT commands it did not.

#include <SoftwareSerial.h>
SoftwareSerial Serial11(5,6);
/*
Accessing AT commands on ESP8266-01 with integrated WiFi login.
ESP connected to Serial1 on Mega
AT commands via IDE Serial monitor.
*/

// ===== VOID SETUP LOOP =====
void setup()
{
  Serial.begin(9600);  // Set IDE Monitor baud rate
  Serial11.begin(9600);  // Set ESP8266 baud rate... change this as needed
  delay(10);
  Serial11.println("AT+CIFSR");  // just displays network connection IP and MAC so I know it is online.
}

void loop()
{
  // read from port 1, send to port 0:
  if (Serial11.available()) {
    int inByte = Serial11.read();
    Serial.write(inByte);
  }

  // read from port 0, send to port 1:
  if (Serial.available()) {
    int inByte = Serial.read();
    Serial11.write(inByte);
  }
}

Sorry. But I am beginning to think it’s a problem with these makerfire branded boards from amazon. The ESP works with the UNO, braud rate is correct. Serial Monitor shows nothing. The nano just doesn’t want to allow communication through to the ESP. I cannot reply for 10hrs. Thanks for the help.


#13

It allows what I type in my IDE Serial Monitor to be sent to the ESP (in AT mode).

It is basically an Arduino Mega & IDE equivalent of a TTL-USB & 3rd party Terminal program combo.

As it is it will NOT work on your Nano… that uses SoftSerial NOT Serial1. But you can adapt it to use, if you do NOT have a TTL-USB adapter. It is NOT for flashing the ESP, but just for simple changes like testing and setting the BAUD rate, etc.

You CAN use an Arduino (UNO is a good choice) as an intern USB-TTL adapter by simply wiring it to the ESP/Arduino RX-RX and TX-TX (NOTE: this is backward to “normal” connections, and probably should still use a voltage divider between the RX pins), then jumpering GND to RESET. Then your flashing software will pass through the UNO hardware as if it was a TTL-USB adapter… no sketch required.

PS, when posting code here, please format it accordingly…

Blynk%20-%20FTFC


#14

Hmmm… Change this all to something less confusing :stuck_out_tongue_winking_eye: … like EspSerial

Then connect your Pin 5 to the ESPs TX and Pin 6 to the ESPs RX

IF your ESP is already set to 9600 and power and connection is good, then when you load the sketch you should get a response in the Serial Monitor showing your connected IP and ESP MAC. Then when typing an AT in the Serial monitor it should return a OK

image

If nothing else, it is a good way of confirming your ESP-Arduino connection.


#15

Ok. Do not bash me here. I am new to all of this, and I did a few tutorials and I have tested my project with regular code with the UNO and then again with the NANO. For some reason when I went to trying to setup the wifi, I started assigning the breadboard pin number, e.g, 5,6 for pins D2 and D3 with the Nano and this was likely the root of all my issues. I wouldn’t be surprised if was doing the same with the HC-08 ble module. I was pretty sure I tried troubleshooting this previously because all the topics say they are generic errors for improper connections but apparently that was not the case. Either way thanks for helping me through this.