So you're a Noob? Post your questions here until you graduate! Don't be shy.
User avatar
By jclmdt
#60637 Hi,

I connected my ESP8266 to an Arduino Mega. The connections are :
ESP8266 | Arduino Mega
TX --> RX (pin 19)
RX --> TX (pin 18)
CH_PD --> 3.3V
VCC --> 3.3V
GND --> GND

From the TX pin of Arduino, I connect it to a voltage divider circuit to step down the voltage to 3.3V before connecting it to the RX of ESP8266.

I uploaded a simple sketch to Arduino (below). The expected response in the serial monitor should be
what I type in the serial monitor (e.g AT), but I did not receive anything from the ESP8266 (It should print "SOFTSERIAL AVAILABLE" when the ESP8266 responds). The only response received is from the Arduino side's serial, where "serial available" is printed out. The ESP8266 blue LED did not light up too, when a transmission is present. The blue LED did flash briefly at startup so the chip should be working.

I read online that the Arduino may not have enough current to supply voltage to the ESP8266. But when I connect the 3.3V pin of Arduino Mega to power ESP8266, the ESP8266 has the red LED light up which means it is indeed running.

I tried another way of using a 9V battery and connect to a converter which then supplies 3.3V to the ESP8266. But once I connect the CH_PD and VCC pin of ESP8266 to the converter of 3.3V, the measured voltage immediately drop to about 2.5V with 160mA current. However, the ESP8266 is still able to run with the red LED on. I'm not sure if this is a correct way to do? Or is there something wrong with it?

Both situations described above (connect directly to 3.3V of arduino mega or connect to external power supply) will still result in the ESP8266 not able to receive or transmit messages and the blue LED is still not on/flash when there is a transmission. I tried changing to a new ESP8266 but it yields the same result. I am not sure if it got to do with the voltages or current??

I tried searching on the web and nobody has an issue with the blue LED not turn on at all, seems like I am the only one with this issue. Please help, I am stuck with this issue for 3 days already. All help is appreciated!!



Code:

void setup()
{
uint32_t baud = 115200;
Serial.begin(baud);
Serial1.begin(baud);
Serial.print(" @");
Serial.println(baud);
}

void loop()
{
while(Serial1.available() > 0)
{
Serial.print("SOFTSERIAL AVAILABLE");
Serial.println("");
char a = Serial1.read();
Serial.print(a);
}

while(Serial.available() > 0)
{
Serial.print("serial available");
Serial.println("");
char a = Serial.read();
Serial.write(a);
Serial1.write(a);
}
}
User avatar
By jclmdt
#60773 I am not sure which model is it because it is not indicated on the board, but I think is it the ESP-01 with reference to the image online.

May I know what is bootloader mode? Why do I need to connect the GPIO to GND? I thought it is connected to gnd only when you want to flash firmware in?

Many thanks.