0

I am working on esp8266 with Arduino.

I have connected pins like arduino-esp 3.3-vcc gnd-gnd 3.3-CH_PD RX-TX TX-RX and reset to gnd using 3k resistor.

I couldn't send AT commands in serial monitor in Arduino IDE.

Later I connected a capacitor between Vcc and Gnd. Now I could send AT commands and I am getting same commands back. Whatever I entered, I am getting the same back.

I didn't get reply as OK. And I got some random characters too. Can anyone help me with this?

3
  • I think TX needs to go to TX and RX to RX, if you are sending the command via the computer instead of the arduino-sketch. You also need to convert the 5v to 3.3v on the RX line.
    – Gerben
    Nov 5, 2015 at 19:42
  • You also need to convert the 5v to 3.3v on the RX line. - s/he needs to do what?
    – Nick Gammon
    Nov 6, 2015 at 6:20
  • I have connected pins like arduino-esp 3.3-vcc gnd-gnd 3.3-CH_PD RX-TX TX-RX and reset to gnd using 3k resistor. - you connected what to what? This is very unclear. Please edit your question and clarify what you have done. Also try to write proper English if possible. Sentences start with a capital letter.
    – Nick Gammon
    Nov 6, 2015 at 6:22

2 Answers 2

1

Looks like your connection is somewhere missing.

Connect CH_PD and reset pin to high--i.e. 3.3v.

1
  • 1
    Please do not insert advertisements into your post. You are welcome to add this to your profile page, but not into the post itself. I've edited it out. Thanks! Nov 5, 2015 at 23:31
1

I made the following connection with Arduino Mega 2560 and AT commands was working perfectly well.

Connection:

ESP8266 - Arduino Mega 2560

Vcc, CH_PD, RST - 3.3V pin

GND - GND

Rx - Tx(18)

Tx - Rx(19)

Program:

void setup() {
  Serial.begin(115200);   // USB serial port of Due (PROGRAMMING)
  Serial1.begin(115200);  // ESP8266 on Serial Port 1 of Due (UART 1)
}

char rx_byte = 0;

void loop() {
  // send terminal byte to ESP8266
  if (Serial.available() > 0) {
    rx_byte = Serial.read();
    Serial1.print(rx_byte);
  }
  // send ESP8266 byte to terminal
  if (Serial1.available() > 0) {
    rx_byte = Serial1.read();
    Serial.print(rx_byte);
  }
}

Select Tools>Board> Arduino/Genuino Mega or Mega 2560. Upload the code. In serial monitor, select 115200 baud rate and Both NL & CR option. Enter the AT command and it works!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.