• Skip to main content
  • Skip to primary sidebar

RNTLab.com

The Ultimate Shortcut to Learn Electronics and Programming with Open Source Hardware and Software

  • Courses
  • Forum
    • Forum
    • Ask Question
  • Shop
  • Account
  • Blog
  • Login

Deep sleep and totally shut down wifi

Q&A Forum › Deep sleep and totally shut down wifi
0 Vote Up Vote Down
Michel Dubois asked 3 months ago
2 Answers
0 Vote Up Vote Down
Michel Dubois answered 3 months ago

I have written a code that record sensor data (BME280 and DS18B20) very hour and record it in a Google sheet. After recording, the ESP32 devKit V1 is in deepsleep is initiated with

  • esp_sleep_enable_timùe_wakeup(duration of 1 hour)
  • esp_deep_sleep_start()

However, when my router is ON, I see that it goes out of sleep about every 20sec and when the routeur is OFF, the wake up is every hour as planned. I tried many things including WiFi_Stop() btstop()… impossible to avoid the wake up after 20sec. 
The objective is of course to minimize consumption
Any Idea for solution to avoid unexpected wake up?
 

0 Vote Up Vote Down
Sara Santos Staff answered 3 months ago

Hi.
that’s a weird issue.
Maybe you need to disconnect from Wi-Fi before putting the ESP into deep sleep? Have you tried disconnecting from Wi-FI right before putting it into sleep?
See this tutorial for useful Wi-Fi functions: https://randomnerdtutorials.com/esp32-useful-wi-fi-functions-arduino/
What pins are you using for the sensors?
Regards,
Sara

Primary Sidebar

Login to Ask or Answer Questions

This Forum is private and it’s only available for members enrolled in our Courses.

Login »

Latest Course Updates

  • [New Edition] Build ESP32-CAM Projects eBook – 2nd Edition April 16, 2025
  • [eBook Updated] Learn ESP32 with Arduino IDE eBook – Version 3.2 April 16, 2025

You must be logged in to view this content.

Contact Support - Refunds - Privacy - Terms - MakerAdvisor.com - Member Login

Copyright © 2013-2025 · RandomNerdTutorials.com · All Rights Reserved

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.