How to wake up arduino with RTC DS3231?

Hello !

I'm trying to do a project in Arduino in which: to water one flower a day, but I want that when Arduino has finished ordering the water pump to switch to sleep mode, I managed to make it control the pump, to make it he sleeps, but I would like to wake him up with the help of an RTC-DS3231, I looked for tutorials but I couldn't find anything that could help me. Do you have any materials or ideas on how to do this?

You could get the Arduino to wake up at intervals check the time , then sleep again If the time interval you want hadn’t passed .
Or maybe use the alarm output from the DS to generate an interrupt - have a look at how to do this with the info on the library; for example:

What RTC module do you have? Some of them require hardware modifications to be compatible with waking an Arduino from sleep. There are old threads on how to do this, on this very forum, in fact they kind of beat the subject to death, perhaps try searching for them using the search box above. You also didn't mention which Arduino you have.

aarg:
What RTC module do you have? Some of them require hardware modifications to be compatible with waking an Arduino from sleep. There are old threads on how to do this, on this very forum, in fact they kind of beat the subject to death, perhaps try searching for them using the search box above. You also didn't mention which Arduino you have.

It is a DS3231 module and I use it on the Arduino Uno

Most DS3231 module have the SQW/INT pin broken out

Connect that to an interrupt pin on the Arduino. Use the RTC library to setup an alarm interrupt and use that to wake up the Arduino from sleep

aaa.png

aaa.png

Arduino has started the pump and then the MCU has gone into sleep.

For how long the pump will be running and then will it be automatically stopped without the intervention of MCU?

Do you want that the RTC Module will wake up the MCU after certain time (day: 30 mins) and then the MCU will stop the pump?

Arduino controls the pump to run for about 2 minutes, after 2 minutes, I want Arduino to enter sleep mode until the next day. I thought he would start at 12 o'clock and go to sleep at 12:02 am until the next day at 12 o'clock.

Is the Arduino to be battery powered? If not, why bother going to sleep? The pump will have a power source, yes?

Anyway, as others have said, use the noted output pin of the DS3231 to an interrupt pin on the Arduino to wake it up at the desired Alarm time:
"Active-Low Interrupt or Square-Wave Output. This open-drain pin requires an external pullup resistor
connected to a supply at 5.5V or less. This multifunction pin is determined by the state of the INTCN bit in
the Control Register (0Eh). When INTCN is set to logic 0, this pin outputs a square wave and its frequency
is determined by RS2 and RS1 bits. When INTCN is set to logic 1, then a match between the timekeeping
registers and either of the alarm registers activates the INT/SQW pin (if the alarm is enabled). Because the
INTCN bit is set to logic 1 when power is first applied, the pin defaults to an interrupt output with alarms
disabled. The pullup voltage can be up to 5.5V, regardless of the voltage on VCC. If not used, this pin can
be left unconnected."

Note the part number on your module and select the correct data sheet so you can program it correctly: