-
Notifications
You must be signed in to change notification settings - Fork 89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wake up triggered by either the RTC or a momentary switch? #37
Comments
Hello. If deepsleep interval is 5 mins, and 'tipping bucket rain gauge' generates low pulse deepsleep : can't sleep more than 7 ~ 8 mins using internal rtc( http://www.esp8266.com/viewtopic.php?f=32&t=7867 ) I think attiny85 + DS3231 + momentary switch + esp8266 is good choice.
|
Thanks for the fast and comprehensive response. It seems not to be as simple as I'd hoped.
It can use another GPIO if the circuit can deal with the pin acting as an input during deep sleep. Then GPIO16 could be used to provide its usual wake up signal.
This hits the simplicity criterion. The tipping bucket magnet closes a reed switch as it tips to produce a momentary closure which can be configured to be either VCC or GND. The bucket could tip anytime which means a running program could be interrupted and that is why I was looking around for alternatives. Thinking about it some more though I wonder if there is an algorithm that will work. The issues :-
Possible Solution
Possible Algorithm If just powered up set to wake up in 5 minutes with WiFi off. If woken with WiFi on and (if woken by RTC or (reported tip counter - tip counter>10)) then report temperature and tip counter.
If WiFi is off, there has been a bucket tip or temperature change and message failure counter = 0 wake up in 30 sec with WiFi on. Not sure that it covers all the scenarios?
That is more physically complicated than I hoped but makes for a simpler algorithm. |
Some more information on the weather station is at https://forum.makehackvoid.com/t/weather-station-wake-up-triggered-by-either-the-rtc-or-a-momentary-switch/972 |
Ken, You might want to look at a hardware alternative. I had a temperature Once the ESP is woken, it reads the sensor and sends the reading to the I have a second version where the MOSFET has a momentary switch across This second version is used in doorbell/dash-button type applications Both versions completely remove power from the ESP8266 when its task is Either way, this idea of switching power using a p-channel MOSFET isn't Hope this gives you some food for thought on the project. Please keep
|
Thanks @PuceBaboon and @chaeplin for providing input on the rain gauge switch design. I've incorporated some of the feedback into an updated discussion and revised design. |
PuceBaboon , does your door bell wireless send a trigger packet to a receiver? If so how long does it take to go from a doorbell press>>>start the esp8266>>>connect to receiver/AP>>>transmit the "button pressed" packet? |
Union7,
It's not too long; about two seconds from the press to arrival of the
packet at the MQTT server. It's a noticeable delay for something like a
light switch, or a doorbell, though. I distract the user by having an LED
light display (which is actually also showing debug progress ...different
colours for WiFi connecting, connected, MQTT connecting, message sent, etc).
-John-
…On 13 July 2017 at 15:37, union7 ***@***.***> wrote:
PuceBaboon , does your door bell wireless send a trigger packet to a
receiver? If so how long does it take to go from a doorbell press>>>start
the esp8266>>>connect to receiver/AP>>>transmit the "button pressed" packet?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#37 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AKLtWQlHufaKOzZ_jgr-cSxSCeaxNWjsks5sNbs3gaJpZM4KqbEk>
.
|
thanks for the quick response! i'll try a deep sleep solution first since i am datalogging something with timetamps,,, and the stamp occurs at the AP hub (local wifi network of esp's) |
Thanks for providing this information, circuit, videos and explanation at http://chaeplin.github.io/project-01-button.html.
It can detect the momentary switch while awake which is nice but as far as I can tell it is not suitable for the case described by @me-no-dev at esp8266/Arduino#1488 (comment) where the ESP wake up from deep sleep is to be triggered by either the RTC or a momentary switch. Is that correct and if so, is there a simple modification?
I have ambitions of sampling temperatures at regular intervals and detecting contact closures from a tipping bucket rain gauge while the ESP remains mostly in deep sleep and am puzzling over a simple circuit that doesn't drain the battery to achieve it.
The text was updated successfully, but these errors were encountered: