-->
Page 1 of 2

Arduino IDE works but ESP8266 "forgets" sketch after reboot

PostPosted: Wed Jun 03, 2015 8:45 pm
by jetblackstar
Ok,

So I've fumbled with the ESP8266 for months on and off.

I was extatic to see the Arduino IDE support and pulled it out.
After much trial and error with some stupid mistakes wiring on my breadboard I managed to get the WiFi Server sketch to upload and work. Immediately after it's uploaded the code is evidentially started and it spits out details to the console and I can turn on and off an led with my web browser.

However when I power down the ESP, disconnect all but 3.3v, gnd and GPIO-2 and power up, I just get a red light on the ESP and no console output. I've tried the blink sketch with the same issue.

Some details. I've used a FTDI board in 3.3v mode. power is provided by a 5V power supply passed through a 3.3v regulator.
To program I am setting CHPD, RST, and GPIO-0 to 3.3v. and ensuring GPIO-2 is disconnected. Anything else and I get the esp_comm error. (ok rst may be optional, but seem to hurt)

After it finished uploading and I see the console output start, I can connect the LED to GPIO-2 and then see the results.
But the second I take off power and put it back on nothing.

I get the feeling the memory in the unit may be playing up, or I'm not de-initialising properly after programming. Or just booting it in "normal mode" wrong. I've tried lots of put pull ups and downs to see if I could coax it out. but no luck.

I have used the ESP8266 very early on via an Arduino Uno 5v TX/RX to play with AT commands briefly before I realised I was potentially harming the ESP. I've since had access to the AT commands via the FTDI board with no issue and it responded fine. (of course until I put the sketches on there)
Could I have fried my memory?

Any tips would be appreciated.

Re: Arduino IDE works but ESP8266 "forgets" sketch after reb

PostPosted: Thu Jun 04, 2015 1:12 am
by alextu
It sounds like it is not booting.

When you restart it, leave the led disconnected and be sure to connect CH_PD to VCC as well.

See here for minimum configuration:
https://github.com/Links2004/Arduino#mi ... nning-only

i was able to boot esp01s by not connecting anything except to vcc, gnd, ch_pd to vcc and rx tx on the ftdi

/edit: try the above just as a test, connect led after it has booted.

Re: Arduino IDE works but ESP8266 "forgets" sketch after reb

PostPosted: Thu Jun 04, 2015 12:36 pm
by jetblackstar
Ok, really good suggestion with testing just on the FTDI boards power. Thank you.
It worked. Pins as you suggested (CHPD, GPIO-0, vcc, all wired to hi) but this time it doesn't freak out and starts the lil web server. TX and RX are still connected to the FTDI too.

So I presumed my 3.3v regulator might be buggered (I used my own capacitors set for smoothing). I've since received some little boards from China with everything built in to go from 5v to 3.3v and tried one of those. Same issue.

It is worth noting (now that I'm sure I've got the pins right) the LED on GPIO-2 goes on/bright the second power comes on. In addition it now seems a bit more consistent that the blue activity light on the ESP goes solid on the separate 3.3v supply.


And when I switched back it took a few powerups and power downs before it worked on the FTDI boards power alone again. Presumably it was in a pickle and needed to de-charge.

Perhaps I've got a sneak circuit and it's back conflicting or back powering the FTDI?
I'll try stripping it down to bare basics with the 3.3v board.

Re: Arduino IDE works but ESP8266 "forgets" sketch after reb

PostPosted: Thu Jun 04, 2015 12:46 pm
by jetblackstar
Ok, interesting development.

Using the 5v-3.3v board and booting with GPIO-2 unplugged it now consistently boots. Then I can plug in GPIO-2 to the led and I can control it. This is completely disconnected from the FTDI now.

So presumably it doesn't like the potential of current flow through GPIO-2 on boot?