ESP8266 'Zombie' very occasional boot failures - Page 1
Forum section: electronics / projects

author: gareth
author_rank: Contributor
timestamp: February 03, 2015, 03:54:41 pm
content: Hello all eevblogers, got a weird problem here that I'm hoping someone with broad experience will have some ideas on.Basically I'm working with the new ESP8266 wifi chip and it's really amazing what it can do. BUT - although there is a great community of people hacking on it, there are some weird problems that aren't documented and are causing pain.In this case, the chip isn't reliably returning from deep sleep mode, occasionally going into firmware upload mode despite the relevant pin being held in normal boot mode. During this mode, the control pin has a heavy oscillation - the voltage goes higher than vcc - at 1kHz when this zombie mode occurs. (EDIT this has not been confirmed, and frequency actually seems to be 26MHz!)Help! what an earth is going on - how can the voltage be swinging above vcc - does this point to a silicon bug or something in firmware that could potentially be fixed? I'm hoping that this is a known issue in another context from the esp chip itself and someone can help resolve it.If you need more info then there is athread about it over on the esp8266 forumor just ask and I'll try to supply it and/or ask over there - sort of acting as a human forum gateway here!!Many thanksGareth

author: amyk
author_rank: Super Contributor
timestamp: February 03, 2015, 04:14:15 pm
content: Perhaps it has an integrated boost converter - how much higher is the voltage?Either way it's hard to tell without some good documentation of the chip and/or careful analysis of the firmware.

author: LabSpokane
author_rank: Super Contributor
timestamp: February 03, 2015, 04:45:05 pm
content: What dash # version of the board are you using? Photo of setup? Connection schematic? Firmware rev? Scope trace of power pin? What is the voltage range of this oscillation? Frequency? What antenna is being used?Happy to help. Have one on my desk, but give us some details and don't make us play where's Waldo to assist.

author: gareth
author_rank: Contributor
timestamp: February 03, 2015, 05:28:22 pm
content: Quote from: LabSpokane on February 03, 2015, 04:45:05 pmmodified ESP-01 in original postQuoteNot yet available, I'll askQuoteI've tried to draw it out (attached) from this description "2xaa battery, esp-01(ch_pd pin connected vcc with 2.2k resistor)((XPD_DCDC connected to rst pin)(470mf cap connected between gnd and vcc)(ds18b20 connected gpio2 without resistor.)"QuoteI think this problem has been observed with both older firmware (nodemcu_512k_20141222.bin probably) and later nodemcu_20150126.binQuoteattached to post further downQuotefrom GeoNomad and manawyrm on ESP8266.com forum: GPIO0 is oscillating from 0.8 to 3.15 volts at 26 MHz (the crystal frequency). Current draw is about 20 mA (including LED)."QuoteOnboard patch pcb antennaThanks for giving some pointers as to which details are useful to aid troubleshooting. Please do ask for more if it would help anyone further. I'll return to edit and add information from the originators, I'm trying to reproduce the problem myself right now so that I can help more directly (although I don't have a scope myself).EDIT - now it seems voltage may not be beyond vcc - other people are also trying to reproduce the problem, thanks for input so far, appreciated!

author: LabSpokane
author_rank: Super Contributor
timestamp: February 03, 2015, 08:03:11 pm
content: Well...first off...why are you trying to power a radio that requires 3.3V off a 3.15V source? I realize that it might run below that but radio does draw some power during TX. Between the low voltage and the internal resistance of the batteries, you might be dropping the voltage the IC sees below what it needs to operate, forcing it into a brownout.Go use 3 to 4 AA batts with a voltage regulator or buck converter set to 3.3V and try again.I wish I knew what the draw on the 8266 but I forgot to document it in my lab notebook.

author: gareth
author_rank: Contributor
timestamp: February 03, 2015, 08:23:23 pm
content: HiyaI should have mentioned already that when this problem occurred, the batteries were suspected and replaced with a decent power supply, the problem was reported to still occur but less often. I've most often seen the power draw of the ESP reported at ~250mA peak whilst transmitting, around 70mA perhaps 'normally' (I think radio powered up and listening) and ~15 mA for the MCU without radio powered on.Other things which have been tried and did not stop the zombie booting occasionally are leaving the GPIO0 floating high and clearing the watchdog timer periodically. If anyone else wishes to reproduce the problem then code has been supplied (attached) which runs under the latest (pre-built) nodeMCU firmware. Please ask if you need any help reproducing the issue and I'll try my best!I also have some images here of the scope trace, now seemingly confirmed at 26mHz:The poster with the rigol reported not using any termination - but my understanding is that the scope provides 50 ohm termination - as indicated in the upper left side? Is my understanding correct? See below in attachments

author: jeremy
author_rank: Super Contributor
timestamp: February 03, 2015, 08:31:37 pm
content: I don't believe the DS1000Z has 50ohm termination. The 50 in the pictures is referring to the timebase, 50ns/div.

author: gareth
author_rank: Contributor
timestamp: February 03, 2015, 08:45:24 pm
content: oh yes, now I can't understand why I didn't 'see' the ns units!! Thanks.

author: LabSpokane
author_rank: Super Contributor
timestamp: February 03, 2015, 09:51:38 pm
content: OK,I'm still seeing "3.15V". That does not inspire confidence in the testing.Please define "decent power supply." What pray tell does that mean? New batteries?I do realize that you have a large cap in there, but you really need to have that thing running at 3.3V because 1/4 amp is hell of a load for a pair of AAs.I have not loaded code onto the 8266 device. Since it is documented so poorly, my incorrect, but off-the-cuff response would be "stop doing that." The 8266 seems to have some type of issue with booting up "stupid" until it is reset. It seems like one has to flash the reset line after power on in order to force it into a defined state. Once it's running, what I've seen is rock-solid comms. I've set up TCP connections that have remained live for days at a time - much to my surprise.I know that this doesn't answer your question, and maybe this is due to the small amount of time I have/want to invest into the 8266, but I really see it as a device that's best used as a radio with an external microcontroller. Power it up and beat it into submission with the uC, then turn it off when you're done.

author: gareth
author_rank: Contributor
timestamp: February 03, 2015, 10:05:52 pm
content: Well, I appreciate you advice, given it is a dark horse, that may well be a pragmatic way to go, use an ATtiny or somesuch to drive it, shoot it in the head if it misbehaves etc.I am also surprised by the abilities - like the solidly keeping connections alive, having better range than my laptop/phone and a few other surprising things.I think this problem occurs in deep sleep - so may not be an issue for many users either.There have been several experienced users of the ESP reproducing this issue and power supply problems are indeed a real issue but I assume that most of them are aware of this, the original problem with 2xAA was reported as such because the goal here is to have a battery powered ESP8266 sensor - not because everyone is using that as a power source.I am following up a suggestion that it is firmware related now - one report of it working under an old version of the firmware.Many thanks for the help so far - much appreciated.G

author: LabSpokane
author_rank: Super Contributor
timestamp: February 03, 2015, 10:32:13 pm
content: Holy cow! There's a real data sheet from the manufacturer now! When did that happen?https://nurdspace.nl/images/e/e0/ESP8266_Specifications_English.pdfThey rate it down to a Vcc of 1.7V, so I don't think you're pulling it too low based on their specs. My apologies for clobbering you.I hope that they fix the 26Mhz oscillation via firmware. That would be great for everyone. I too am impressed by the performance of the little guy. If Espressif can pull all the pieces together, they could be the standard for the interwebs of stuff. The AT command setup certainly sets the standard for easy entry.

author: gareth
author_rank: Contributor
timestamp: February 03, 2015, 10:47:08 pm
content: I think that 'data sheet' is only 23 pages, compared to most other data sheets it only gives some very sketchy info, although it is useful. Incidentally, it's only officially available under a NDA. I'm a bit concerned about the repercussions of reading it and then using that info (or be accused of using it) to develop an open-source project, and somehow get sued or something?Am I worrying about nothing there?

author: LabSpokane
author_rank: Super Contributor
timestamp: February 03, 2015, 11:02:50 pm
content: It's in the wild now, at least the Oct13 version. And that's a damned sight more info than was there 90 days ago. As long as *you* didn't sign an NDA and violate it, you should be fine. NDAs are contracts between signatories, not third parties.Not a lawyer, but that's how it works in my line of work.

author: amyk
author_rank: Super Contributor
timestamp: February 04, 2015, 04:20:29 pm
content: Don't worry, this isn't Broadcom.Welcome to the world ofgongkai.