• 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

On Off switch on ESP32 devices with battery

Q&A Forum › Category: ESP32 › On Off switch on ESP32 devices with battery
0 Vote Up Vote Down
Hugo Articardi Calabrese asked 5 years ago

Hi,

I have some devices Lolin32 with battery and also powered by usb connector.

In order to build a usable device, I need to add an on/off switch… which is the better way ???

Hack the hardware ?

Put a switch to an GPIO and use sleep mode ??? If this is a solution… can you explain it ?

Thanks in advance !!!

4 Answers
0 Vote Up Vote Down
Sara Santos Staff answered 5 years ago

Hi Hugo.

I’m sorry for taking so long answering your question.

What do you mean by an ON/OFF switch?

Do you want to cut power completely? If that’s the case, the best way is to put a switch in series with the power supply.

However, depending on your application, deep sleep mode might be a better scenario. But it really depends on your project.

Can you provide more details?

Regards,
Sara

0 Vote Up Vote Down
Hugo Articardi Calabrese answered 5 years ago

Dear Sara, thank you for your response.
In my case, I think deep sleep is a good solution.
Can you suggest me an example to do this ???
I mean, start and quit deep sleep mode with a switch to a GPIO. May be ?
Thanks in advance. Hugo.

0 Vote Up Vote Down
Sara Santos Staff answered 5 years ago

Hi Hugo.
In that case, you’re talking about deep sleep with external wake-up.
You can take a look at the ESP32 course Module 3, unit 4: https://rntlab.com/module-3/deep-sleep-external-wake-up/
Then, let me know if you need further help.
Regards,
sara

0 Vote Up Vote Down
Hugo Articardi Calabrese answered 5 years ago

Hi Sara, thanks again. I will follow your suggestions.
And I will keep you informed !
Best Regards. Hugo.

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

  • [eBook Updated] Learn Raspberry Pi Pico/Pico W with MicroPython eBook – Version 1.2 May 26, 2025
  • [New Edition] Build ESP32-CAM Projects eBook – 2nd Edition 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.