Dear All,
I am just a beginner with ESP-32 and need a tip how I solve a problem with my sensors.
Structure is as follows:
- ESP32 wakes up from deep sleep after a defined time, powers up all sensors via a MOSFET SSR and then read all attached sensors and then falls back asleep.
- after all sensors are read it sends via ESPnow the data to an indoor station.
So far all works well with temperature, humidity, pressure, but there is a problem when it comes to counting impulses for example from a anemometer or a Geiger counter. when I had the whole code separated in void setup and void loop all was working, but as I understand I can not use a loop together with deep sleep mode. Is that correct?
Second question is if there is an other way to count falling flanks for 20 seconds and then go to deep sleep again
Any tip is welcome.
Pulse counting and Deep Sleep
- ESP_krzychb
- Posts: 400
- Joined: Sat Oct 01, 2016 9:05 am
- Contact:
Re: Pulse counting and Deep Sleep
Hi ASTEG14,ASTEG14 wrote: ↑Tue Jan 21, 2020 9:19 amSo far all works well with temperature, humidity, pressure, but there is a problem when it comes to counting impulses for example from a anemometer or a Geiger counter. when I had the whole code separated in void setup and void loop all was working, but as I understand I can not use a loop together with deep sleep mode. Is that correct?
Second question is if there is an other way to count falling flanks for 20 seconds and then go to deep sleep again
You can count pulses in deep sleep using ULP.
Using Arduino I would check https://github.com/duff2013/ulptool
Example of counting pulses in deep sleep - https://github.com/espressif/esp-idf/tr ... system/ulp
Who is online
Users browsing this forum: No registered users and 76 guests