-->
Page 1 of 2

esp not responding to input

PostPosted: Wed Jan 28, 2015 12:47 pm
by arcadeprecinct
Hello everyone,

I received my esp8266 a few days ago and couldn't establish a connection to my arduino yet. I don't have a usb-serial converter so I tried using the arduino (uno) via software serial and hardware serial (with and without grounding the reset pin). So I thought I'd just try to have the arduino communicate with the esp, using an lcd for the output. This is the code I used

Code: Select all 
#include <LiquidCrystal.h>

LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

int count=0;

void setup()
{
  Serial.begin(9600);
  Serial.setTimeout(5000);
  lcd.begin(16, 2);
  lcd.setCursor(0, 0);
  lcd.print("init");
 
  Serial.println("AT+RST");
  }
}
void loop()
{
  if (count%16==0) {lcd.setCursor(0,0);}
    if(Serial.available()) {
    lcd.print(Serial.read());
  }
}


I have wired it like this:

esp TX - arduino RX (via level converter)
esp RX - arduino TX (via level converter)
VCC - 3.3v (external power source)
GND - GND
CH_PD - 3.3v
RST - 3.3v
GPIO0 - 3.3v
GPIO2 - 3.3v

the last for are with a 10k resistor.

When I power up the esp while the arduino is listening, the arduino receives gibberish with a "ready" at the end, as it should. However, when I restart the arduino while the esp is already runing, it sends "AT+RST" (at least if I open the serial port on the computer) but receives nothing.

Does that mean that the RX pin on my esp is malfunctioning or am I doing something wrong?

Re: esp not responding to input

PostPosted: Wed Jan 28, 2015 1:19 pm
by alonewolfx2
i had something like your issue when i used with level converter . its working fine when i removed level converter and i wired directly(rx and tx pins)

Re: esp not responding to input

PostPosted: Thu Jan 29, 2015 6:49 am
by arcadeprecinct
alonewolfx2 wrote:i had something like your issue when i used with level converter . its working fine when i removed level converter and i wired directly(rx and tx pins)

Awesome, that worked. I thought it would be nicer if both lines go through the converter even though the esp tx -> arduino rx line isn't necessary but oh well... Thanks!

Re: esp not responding to input

PostPosted: Sat Jan 31, 2015 2:28 pm
by Michaelo
There are a few other options for connection without actual direct connections as the ESP is not suppose to be 5 Volt tolerant... Resistor divider didn't work for me so I went with resistor/diode on Arduino TX and just a small resistor on RX (just in case of any power-up spikes)... Search forum for discussion...