How to switch off all the components before deep sleep?

aneeshp123
Posts: 6
Joined: Thu Jun 05, 2025 10:18 am

How to switch off all the components before deep sleep?

Postby aneeshp123 » Mon Jul 07, 2025 4:55 am

I've gone through all the forums, documentation, and YouTube videos, but I still haven't found a solution to my problem. I'm using an ESP32 development board with an AHT10 sensor module. I am also using a JHD202C LCD display and a DS3231M RTC module. My code, written in Espressif IDE, works flawlessly. However, I’m unsure how to properly turn the module on and off. I plan to run everything on battery power and want to shut down all possible components to conserve energy.

If you have any suggestions or tips on how to implement this in a simple way, I’d really appreciate it.

Thank you!

Sprite
Espressif staff
Espressif staff
Posts: 10593
Joined: Thu Nov 26, 2015 4:08 am

Re: How to switch off all the components before deep sleep?

Postby Sprite » Mon Jul 07, 2025 7:38 am

What board specifically are you using?

aneeshp123
Posts: 6
Joined: Thu Jun 05, 2025 10:18 am

Re: How to switch off all the components before deep sleep?

Postby aneeshp123 » Mon Jul 07, 2025 10:22 am

ESP-32 DEVKIT V4

Sprite
Espressif staff
Espressif staff
Posts: 10593
Joined: Thu Nov 26, 2015 4:08 am

Re: How to switch off all the components before deep sleep?

Postby Sprite » Tue Jul 08, 2025 1:03 am

Okay, and how did you connect the other hardware to it?

(Note that by starting from the DevkitV4, you're already at a bit of a disadvantage... those boards aren't really optimized for battery use as they use a LDO with a fairly high quiescent current.)

aneeshp123
Posts: 6
Joined: Thu Jun 05, 2025 10:18 am

Re: How to switch off all the components before deep sleep?

Postby aneeshp123 » Tue Jul 08, 2025 11:09 am

I connected the sensors, lcd and rtc by connecting them to gpios with wire and breadboard

MicroController
Posts: 2661
Joined: Mon Oct 17, 2022 7:38 pm
Location: Europe, Germany

Re: How to switch off all the components before deep sleep?

Postby MicroController » Tue Jul 08, 2025 11:49 am


aneeshp123
Posts: 6
Joined: Thu Jun 05, 2025 10:18 am

Re: How to switch off all the components before deep sleep?

Postby aneeshp123 » Wed Jul 09, 2025 4:37 am

Can you tell me how much current will the ldo consume

MicroController
Posts: 2661
Joined: Mon Oct 17, 2022 7:38 pm
Location: Europe, Germany

Re: How to switch off all the components before deep sleep?

Postby MicroController » Wed Jul 09, 2025 7:43 am

The AMS1117-3.3 has a specified quiescent current of 5-11mA.

aneeshp123
Posts: 6
Joined: Thu Jun 05, 2025 10:18 am

Re: How to switch off all the components before deep sleep?

Postby aneeshp123 » Wed Jul 09, 2025 10:13 am

What if I use a esp32 S3 board instead?
Or else which board would You suggest using for power management

Jamil.Rohan
Posts: 1
Joined: Wed Jul 09, 2025 2:21 pm

Re: How to switch off all the components before deep sleep?

Postby Jamil.Rohan » Wed Jul 09, 2025 2:27 pm

I've gone through all the forums, documentation, and YouTube videos, but I still haven't found a solution to my problem. I'm using an ESP32 development board with an AHT10 sensor module. I am also using a JHD202C LCD display and a DS3231M RTC module. My code, written in Espressif IDE, works flawlessly. However, I’m unsure how to properly turn the module on and off. I plan to run everything on battery power and want to shut down all possible components to conserve energy. In the same way developers optimize for efficiency in fitness apps dev I’m looking for a minimal-power strategy for my setup.

If you have any suggestions or tips on how to implement this in a simple way, I’d really appreciate it.

Thank you!
I’ve worked with a similar setup before, and the biggest power drain in my case turned out to be the AMS1117 itself — its quiescent current is just too high for battery-powered projects. Also, if your peripherals are constantly powered from VCC, they’ll keep drawing current even when the ESP32 is sleeping. I ended up using a P-MOSFET to cut power to the sensor modules and switched to a low-IQ LDO instead of the AMS1117. That brought the idle consumption way down. You might want to look in that direction too.
Last edited by Jamil.Rohan on Mon May 18, 2026 2:44 pm, edited 1 time in total.

Who is online

Users browsing this forum: Amazon [Bot], ChatGPT-User and 10 guests