0 votes
asked in ESPaper by (210 points)
edited by
Hi there,

You don't owe me any support. I did not buy this kit. I just happened to have a 2.9" waveshare eink display, and some ESP12F's laying around. I was planning on doing something very similar to your project, figured hey, your code is MIT licensed, why reinvent the wheel..

Anyway, I've managed to set everything up and your code seems to work great. The ESP8266 boots up, connects to wifi, gets NTP data, fetches WU data, displays it on the screen, everything's peachy, then it seems to go into deep sleep mode. Presumably after 20 mins it should wake up and refresh the display. Unfortunately that never happens.

I've tried changing UPDATE_INTERVAL_SECS to 60 so it should update every minute, but again, it only ever seems to update the first time, before it goes into deep sleep.

Is there any hardware I'm missing here in order to wake from sleep mode? Does the reset pin need to be hooked up to something in order for it to wake? I just have mine pulled high to the 3.3v line.

I also noticed in the code that the battery monitor uses ADC1 to sample voltage. Does that go straight to the battery or maybe through a resistor/voltage divider?

Sorry to be a pain. Had I known it existed, I really should have just bought your kit. It seems to be really well made and would have saved me a bunch of hassle.

Thanks for any help you can provide!

1 Answer

+1 vote
answered by (8.9k points)
selected by
Best answer

My first guess would be that you are missing a connection from GPIO16 pin to RST. When the sleep timer fires for wakeup it does so on PIN 16. If the pin is not connected to RST the ESP8266 cannot wake up again...

commented by (210 points)
Excellent, thank you!

I've wired GPIO16 to RST, but it didn't seem to help. Maybe I need a resistor on the pullup line from VCC to RST? I'm gonna guess maybe GPIO16 is trying to pull it low, but it's connected directly to VCC, so uhh, that'd create a short? Idk.
I think I need RST pulled up for the thing to run, is that right? Your kit probably uses a normally closed pushbutton for this I'd guess?

Anyway thanks again. I don't have any formal electronics training, so this is all a learning experience for me.
commented by (210 points)
Ok, never mind, got it figured out.

I guess I was mistaken and you don't need reset pulled up. I'm not sure why I thought that was the case. VCC needs to go to EN, but not RST.

Thanks for your help, and cheers for the excellent software. I'll very likely buy one of your kits, as these would make cool gifts.
commented by (210 points)
Thanks for your help so far, and I'm sorry to keep bugging you, but the analog pin is used for measuring battery voltage. Is there any resistor or voltage divider I should use, or is it okay to hook the adc pin directly to the battery positive terminal?

I definitely owe you a beer for this, so I'm going to hopefully set up my paypal account tomorrow so I can teleport you one.
commented by (8.9k points)
The ESP8266's ADC pin can only measure 0-1V, so hooking up your battery directly would not give you nice results, but rather destroy the ADC or the hole ESP. You have to use a voltage divider...
commented by (2.7k points)
The most common voltage divider (e.g. used on the Wemos D1 Mini) is  220K to VBat (say) and 100K to ground, with the intersection of the two 220K-100K) going to ADC input. I've measured the ADC input impedance at ~1Mohm. This gives an input range of 0-3.2volts but for most practical applications where you'd want to measure say a 4.2v LiPo battery a better choice would be Vmeasure---330K---ADC---100K---Gnd giving a 0 to 4.3 volt range.

Welcome to ThingPulse Q&A, where you can ask questions and receive answers from other members of the community.