-->
Page 1 of 12

[SOLVED] Need multiple resets to start the esp8266

PostPosted: Sat Jan 17, 2015 7:12 am
by Suxsem
SOLUTION:
1) GET A VERY GOOD POWER SUPPLY (you can use a 5v power supply with a AMS1117 voltage regulator and a 100uF cap (or 470uF))
2) PULL CH_PD, RESET AND GPIO0 TO 3.3v (and probably GPIO2 too) WITH A 10Komh AT LEAST
3) BE SURE YOU HAVE THE LATEST FIRMWARE (both AT firmware or nodemcu firmware)!
4) IF YOU CAN, AVOID BREADBOARDS AND SOLDER ALL COMPONENTS ON A PCB

And this is a my fritzing diagram of connections!

Image

OLD MESSAGE:

Hi all!
I'm going a little crazy :D

After days of work I'm very close to a working arduino + esp8266 setup.

This is what I have:
1) 5v 2A max main power supply
2) Voltage regulator (LM317, 1.5A max) set to provide 3.3V
3) 100uF decoupling cap between 3.3V and GND
4) Voltage divider (R1=476omh R2=1komh) on RX pin of esp8266 to connect with Arduino TX
5) 100omh resistor on TX pin of esp8266 to connect with Arduino RX (just for safety)
6) CH_PD tied on 3.3V
7) Voltage divider (R1=476omh R2=1komh) on RESET pin of esp8266 so I can reset the esp8266 from Arduino
8) Both GPIO floating
9) Firmware of esp8266: nodemcu-firmware 0.9.5


The problem is that almost 2 times out of 3 the esp8266 starts with garbage data and doesn't complete the boot.
For now i fixed the problem with this little hack running on Arduino:
Code: Select all  Serial.setTimeout(1000);
  for (int i=0; i <= 10; i++){
    digitalWrite(pinres, LOW);
    delay(1);
    digitalWrite(pinres, HIGH);
    if (Serial.find("> "))
      break;
  }   

basically the Arduino resets the esp8266 until the prompt char ("> ") is found.


So......why the hell this damn thing can't boot fine EVERY time?
I tested with another esp8266 and i get the same behaviour, so unless i broken both of them i don't think that my esp8266s are broken...

Please, help me

Re: Need multiple resets to start the esp8266

PostPosted: Sat Jan 17, 2015 11:19 am
by Suxsem
Ok i think that i found the problem!

The voltage regulator i'm using (the lm317) has a dropout voltage of 3V! So i can't supply the circuit with a 5V power supply!
I'm searching another voltage regulator with a lower dropout.
For now i found the LM1117 that has a maximum dropout of 1.4V and a maximum current output of 800ma, it's just a little expensive.

Do you know other alternatives?

Re: Need multiple resets to start the esp8266

PostPosted: Sat Jan 17, 2015 12:54 pm
by MeNoGeek
Hmm... How expensive do you find this?
http://www.ebay.com/itm/251675956064

Re: Need multiple resets to start the esp8266

PostPosted: Sat Jan 17, 2015 1:06 pm
by Suxsem
I already bought this :D http://www.ebay.com/itm/5PCS-LM1117T-3- ... OC:IT:3160

Looooong wait now :)