openhaystack icon indicating copy to clipboard operation
openhaystack copied to clipboard

implementing deep/light sleep

Open strik3 opened this issue 3 years ago • 6 comments

I've been racking my brains for the past week trying to think how it would be possible to implement deep/light sleep into the esp32 firmware. this would drastically reduce power consumption but I'm a complete novice when using the esp ide. is this something you may be able to implement.

strik3 avatar May 06 '21 13:05 strik3

@strik3 it should be not very difficult to implement, maybe this example can help (at least I would try it first): https://github.com/espressif/esp-idf/blob/1cb31e50943bb757966ca91ed7f4852692a5b0ed/examples/system/light_sleep/main/light_sleep_example_main.c

mowtschan avatar May 06 '21 15:05 mowtschan

Managed to get it working. its not the prettiest or most efficent but it saves a lot of power and gets the job done

https://github.com/strik3/openhaystack/blob/main/Firmware/ESP32/main/openhaystack_main.c

strik3 avatar May 15 '21 11:05 strik3

Great that you added sleep to the esp32 firmware. I'll definitely give this a test run this week.

Sn0wfreezeDev avatar May 17 '21 08:05 Sn0wfreezeDev

Great that you added sleep to the esp32 firmware. I'll definitely give this a test run this week.

I notice that this suggestion hasn't made it to the main branch. I was just wondering if there are any plans to implement the light sleep mode for the ESP32 firmware?

mearsy avatar Feb 15 '22 16:02 mearsy

Any success with deep sleep?

0raculo avatar Mar 20 '22 17:03 0raculo

Did you try to measure how long your device last with battery ?

thebigboss84 avatar Jun 12 '22 09:06 thebigboss84