I am wondering if an Arduino Uno can go in and out of deep sleep automatically with some sort of cue such as a certain time. In my case I have a small light connected to my Arduino Uno as well as a DS1302 clock module which is being powered via a phone charger but overnight the light will be off and I do not want the Arduino idling overnight. So can it be programmed to turn on/off based on the time being read from the clock which would be the same time as the light turning on? I have seen many videos of entering/exiting deep sleep but they all require a manual input such as a button. If not possible are there any other power saving options out there?
1 Answer
The Arduino goes into deep sleep when you tell it to. It wakes up when it gets an interrupt. What that interrupt is is (pretty much) up to you.
If you are using an RTC most will have an alarm function that will trigger an IO pin which can be used as an input (like a button) to the Arduino. Or you can use a timer (the watchdog is common for that) to wake up periodically and check the time, then go back to sleep again.
The datasheet for the MCU on your chosen Arduino will tell you all you need to know about sleep modes and what interrupts can be used to wake from which modes.