Alarm interupt using DS3231

Hi everybody !

I have a project on a battery, and to improve the range of my battery, I would like to make my Arduino sleep. Then, the DS3231 can wake up it every hours.

I found how to make the arduino sleep, but I didn't find any example of alarm interrupt with the DS3231...

Do you know any tutorial or a programm to help me ?

Thank you very much

The DS3231 has an alarm interrupt output, which can be connected to INT0 or INT1 on the Arduino (which will wake the Arduino from sleep). The DS3231 interrupt output is open collector, so if the DS3231 is battery powered, you need a pullup resistor from the interrupt output to the Arduino Vcc.

Note that some cheap eBay DS3231 modules have a built in pullup resistor to the DS3231 power, so those MUST be removed in order for the above technique to work. See this post.

First make sure that you understand how to set an alarm and read the DS3231 interrupt output using a digital pin, before trying to implement the alarm interrupt on the Arduino.