• 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

How to use MPU-6050 gyroscope and accelerometer to trigger and awaken from deep sleep?

Q&A Forum › Category: ESP32 › How to use MPU-6050 gyroscope and accelerometer to trigger and awaken from deep sleep?
0 Vote Up Vote Down
William Lucid asked 5 months ago

Is it possible?

Has anyone used  MPU-6050 gyroscope and accelerometer to trigger Deep Sleep and to be used as external trigger to awaken from Deep Sleep?

How was this accomplished?

Have a project box; when left stationary want it to go into deep sleep after a timer expires and box is stationary.  When box is not stationary to awaken from deep sleep.

William

Question Tags: ESP32, MPU-6050
4 Answers
0 Vote Up Vote Down
Sara Santos Staff answered 5 months ago

Hi.
 
Some sensors have a digital pin that will output a digital HIGH signal when the readings reach a certin threshold. That ignal could be used to wake up the board. However, I’m not sure if there is any MPU6050 gyroscope model with that feature.
 
The MPU6050 module usually comes with an INT (interrupt pin) that maybe can be used for that. I don’t know specific details about pin, but I think it may be a good starting point.
 
I hope this helps.
 
Regard,
Sara

0 Vote Up Vote Down
William Lucid answered 5 months ago

Hi Sara,

Found an article relatated to the question:

How to generate hardware interrupt in mpu6050 to wakeup arduino from SLEEP_MODE_PWR_DOWN mode?

Thank you for your feedback Sara.

Disadvantage of using MPU6050 is it consumes battery.  Thinking about adding a push button to wake ESP32 from deep sleep; then start a timer that until it expires, ESP32 would be awake.

Regards,
William

0 Vote Up Vote Down
William Lucid answered 5 months ago

Have decided to use  push button to awaken  ESP32 and start a timer that determines when to put the project box into deep sleep.
 
Deep_sleep_awake_timer.ino
 
Regards,
William

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

Ok.
Thanks for sharing that code.
I’ll close this issue. If you need further help, you just need to open a new question in our forum.
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

  • [eBook Updated] SMART HOME with RPi, ESP32, and ESP8266 (version 1.2) March 8, 2023
  • [eBook Updated] ESP32-CAM Projects (version 1.3) January 7, 2023

You must be logged in to view this content.

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

Copyright © 2013-2023 · 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.