BLYNK
BLYNK.IO       📲 GETTING STARTED       📗 DOCS       👉 SKETCH BUILDER

My esp 8266 is not responding with my mega

I’m doing a project with esp - 8266 and arduino mega, but when i upload and opened my serial monitor appeared " [1659] ESP is not responding". My ESP firmware is At version: 1.1.0.0; SDK version: 1.5.4 (this version came with the ESP). I also changed the baud rate of my ESP to 9600.

I believe everything is connected correctly
RX > D18
TX > D19
VCC > 3.3V (alternate power supply)
GND > GND

I’ve read other forum posts and I cannot figure it out for the life of me

This is my code

// See the Device Info tab, or Template settings
#define BLYNK_TEMPLATE_ID "TMPLNuy3YkX3"
#define BLYNK_DEVICE_NAME "Bioreactor"
#define BLYNK_AUTH_TOKEN "AUDK4qyLRZhr01zcJeeX1d-nPHxVTWwd"

// Comment this out to disable prints and save space
#define BLYNK_PRINT Serial


#include <ESP8266_Lib.h>
#include <BlynkSimpleShieldEsp8266.h>

char auth[] = BLYNK_AUTH_TOKEN;

// Your WiFi credentials.
// Set password to "" for open networks.
char ssid[] = "Whitesky-2-344";
char pass[] = "56423928";

// Hardware Serial on Mega, Leonardo, Micro...
#define EspSerial Serial1


// 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", 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!
}

@PeteKnight @John93 I have seen you help others with similar problems and would appreciate the help here!

How did you do this, and why?
Do you have any way to confirm that this baud rate has seen set correctly?

It’s only necessary for the ESP-01 to use 9600 as its baud rate when using the Uno/Nano and software serial. With the Mega, because it has three hardware serial ports, virtually any baud rate can be used.

What about the CH_EN pin on the ESP-01 ?

I guess the biggest question is why are you using this hardware combination? This is 12 year old hardware and you’d be far better using something with built-in WiFi connectivity such as an ESP32.

Pete.

1 Like

I used AT+UART=9600,8,1,0,0

It is connect to 3.3V

I am doing a school project and these are the components that an old group had. I need something that can control about 6-8 stepper motors and connect to the IOT to monitor temp, pH, and flow rate.
What hardware combination do you recommend?

So how EXACTLY did you issue this command to the ESP-01, want response did you receive, and what happens when you use the same approach to issue an AT command at 9600 baud?

It depends on what stepper motor drivers you are using, but an ESP32 would be by first choice of board.

Pete.

When I checked the flash on the ESP I inputted that AT command and it replied OK, I also tried the script with a brand new ESP with the correct baud and it still didn’t work

ESP 32 alone will be enough to connect everything that I need?

But you’re not telling me how you achieved this. You can’t simply issue an AT command from the serial monitor with the ESP connected as you’ve described above.

Pete.

I used a TTL serial converter to connect the ESP alone to my computer and input the AT commands

So, when you use that TTL to serial converter, open a serial monitor at 9600 baud and issue an AT command what do you get in response?

Also, can you provide more info about how you’re powering the two boards?

Pete.

If I input AT+GMR it tells me what AT and SDK version the ESP is running

The mega is powered from my lap top and the ESP is powered from a 12V power supply that is split into 3.3V and 5V along the two sides of the breadboard

Do you have a common ground between the two power supplies?

What happens if you power the ESP from the 3.3v pin on the ESP?

Pete.

Common ground?

Do you mean from the Arduino?

Sorry, yes - the 3.3v pin on the Arduino.

Pete.

I heard that it may not be strong enough so I didn’t try it
And what do you mean by common ground?

This was the problem. I feel so stupid, I spent hours trying to troubleshoot. Thank you so much Pete!

1 Like