Adafruit Huzzah doesn't wake

I’ve an Adafruit Huzzah doing something odd, and I’m looking for ideas for finding the cause.

My program sleeps for a minute, wakes up, takes a temperature reading from a DS18B20 on GPIO4, transmits, and then goes back to sleep. GPIO16 (XPD_DCDC) is tied to RESET_5V on JP4, to support the wake up.

Everything works fine for about 15 to 20 minutes. Eventually, the red GPIO0 LED lights up. When that happens, the ESP8266 does not wake up.

When working, the 3V pin is 3.289V, as is GPIO0. When the module is locked up, the 3V pin is 3.283V and GPIO0 is 1.824V. (using a DC multimeter).

Removing power for one second fixes the problem for another 15 to 20 minutes.

When the module is locked up, pressing reset does not reset; it extinguishes the GPIO0 LED for the duration of the press, and blinks the blue LED on the ESP-12, but otherwise does nothing.

I’ve made sure all unused pins are grounded, tied to 3.3V, or driven as outputs. No change.

I noticed the schematic ties GPIO0 to a 1k resistor R2 then to the red LED D3, then to 3.3V. I figure the forward voltage of the LED will not work as a pullup, so I’ve added a 270k resistor to 3.3V just to make the logic level unambiguous. No change.

The same program works fine on ESP-01, and a Sparkfun Thing, but the Huzzah has an ESP-12. There’s nothing in the program that is timed for about 20 minutes, and the wake is a reset anyway. There’s no writing to flash.

I’ve inspected the board with a microscope, it looks fine. I’ve tried using an external 3.3V regulator. I’ve replaced the sensor. I’ve checked the pullup resistor (4k7). I’ve tried different power sources; LiPoly battery, 5V USB adapter, and 5V FTDI adapter.

Sorry quozl, I have no idea what you need to do to sort this out, but it sounds exactly like what I’m planning on doing (apart from the not waking up bit) - any chance you could share you code + wiring etc.?

I had something similar that turned out to be a string variable that I was saving the data to overflowing. All the readings were being appended instead of overwriting the first one.

@damo, thanks for your interest, but it’s on breadboard at the moment, no wiring diagram yet. The Adafruit Huzzah was programmed in this sequence;

  • use esptool to flash firmware NodeMCU 0.9.6 from 2015-07-04, or from 2015-07-15 branch dev096 commit 697c8c9,
python esptool.py --port /dev/ttyUSB0 write_flash 0x0 nodemcu.bin
  • configure as a client for my network,
> wifi.setmode(1)
> wifi.sta.config('network', 'password')
  • send the ds18b20.lua file from the source of the same firmware branch, in the lua_modules folder,

  • write my program in Lua and send it as init.lua so that it is started on power up or wake, http://dev.laptop.org/~quozl/z/1ZpSZp.txt (if you have not yet programmed in Lua, read it from the bottom up),

@awootton, thanks, but as the code works fine on ESP-01 and Sparkfun Thing, it can’t be an overflowing string variable. Also, the wake up reset clears all variables. However, to exclude programming error, I’ve tested with a minimal program that sleeps for 55 seconds each minute;

and the problem still happens. At least the problem is now much simpler!

Edit: the problem does not happen if the sleep is omitted, so it is an instability in sleep or wake.

Thanks for the ideas.

In a thread on Espressif BBS, there may exist variants of the ESP-12 with different wiring of RESET or GPIO16 pins. On the sample I’ve got, there is no link between the pins on the ESP-12 itself. There is on the Huzzah, via D1.

The problem still happens if D1 is bypassed, tying RESET to RESET_5V to GPIO16 (XPD_DCDC).

In a thread on the Adafruit forum, other people have failed to get the Huzzah to sleep and wake reliably, and Adafruit didn’t try to make sleep work, so I’ll write the device off as a bad buy, and dedicate it to always-awake jobs. For that it is great; wide supply range, good on board but linear regulator.

Our sponsors here haven’t said in product description that it will sleep and wake, so nothing to worry about guys!

1 Like

I’ve another Adafruit Huzzah now, and it is able to sleep and wake reliably, so the first one must have been damaged. Everything above should now be read on that assumption. Hurray.