ds3231 alarm/interrupts

hi, I hired a guy to write a program for me. The short version is: the “project” is supposed to wake up from POWER_DOWN_FOREVER @ 8:00 pm. It runs a script from 8:00pm till 5:00 am. At 5:00am it POWERS_DOWN_FOREVER. Well, it is supposed to!

(2) “power” / “sleep” modes are used in the program. (1) is SLEEP which appears to work correctly. It is from a library, The other is POWER_DOWN_FOREVER, from a standard library. Low Power consumption.

I explained, that I thought my RTC (DS3231 RTC) had to be POWERED (not be running on the battery back up) to facilitate an INTERRUPT. I was told NO.

I believe that the “sleep_mode” of the low power library runs off the WDT.??? (it doesn’t get in to the ADC and BOD parameters, it’s basic, but still saves power. and that works for this project.

I also believe that the RTC has to be POWERED to enable an interrupt. for the simple reason that the back up battery that keeps time in the event of a power outage to the 328 chip isn’t powerful enough to output the square wave signal needed to generate the interrupt. (question MARK)

I could be wrong, I am a novice at this. I don’t usually get frustrated, but I’m on a time schedule.

My question to you seasoned veterans of the Arduino platform and RTC’s, is which case is true.

  1. The RTC Must be powered from an external/separate power source to be able to generate an interrupt?
  2. The RTC can provide an interrupt by simply using the coin cell back up battery?

as long as I am here…is it necessary or required that the “interrupt” be “programmed” into the RTC? or can it simply be called from the arduino sketch. standard ALM1 = match hour.

ANY! clarification GREATLY APPRECIATED.

Thanks

Every component deserves a power source. Power down means that only minimum current is drawn from the power source, not that it is fully disconnected. A WDT is not required for power down, it only assures that the controller is woke up again even if the external interrupt source fails.

If the required voltage is the same for all components, a single power source can be used. A battery backup for a RTC is always a good idea, because it can bridge an inadvertent failure or forced disconnect of the main power source.

The RTC is not very different from an Arduino, it only consumes less power. Digital controller inputs typically have a high impedance, so that the RTC output can drive one or more at the same time, without any extra current drawn from its power source. If you want to use an interrupt, the RTC must know the wake time, so that it can generate that interrupt. Else the Arduino can wake up every now and then (by the WDT), to check the current time supplied by the RTC.

every component has a power source and they all get shut down when not in use and also when the 328 is in POWER_DOWN, (the most power saving mode). the SLEEP_MODE is a little different. the RTC has a battery back up. the RTC knows what time to wake up the 328.

is the coin cell battery powerful enough to activate an interrupt? or does the RTC need to be powered up from the power source?

Thank you

A coin cell can power the RTC for many months, and the interrupt signal generation does not draw additional current from the power source.

does the RTC need to be powered to perform an interrupt? or can it perform an interrupt using only the coin cell?

You should try to read and understand the answers to your questions.

I also believe that the RTC has to be POWERED to enable an interrupt. for the simple reason that the back up battery that keeps time in the event of a power outage to the 328 chip isn’t powerful enough to output the square wave signal needed to generate the interrupt. (question MARK)

I could be wrong, I am a novice at this. I don’t usually get frustrated, but I’m on a time schedule.

My question to you seasoned veterans of the Arduino platform and RTC’s, is which case is true.

  1. The RTC Must be powered from an external/separate power source to be able to generate an interrupt?
  2. The RTC can provide an interrupt by simply using the coin cell back up battery?

does the RTC need to be powered to perform an interrupt? or can it perform an interrupt using only the coin cell?

You should be able to disconnect the 5v supply from the rtc get an interrupt when running from a battery back up. The interrupt is active low with an open collector switched to ground so there is no power source required. There is an external pull up required. The internal pullup on the Arduino interrupt pin should work, or you may need an external pullup to Vbat.

If you are using a ds3231 module, there are different designs. Some modules can work and others may need modification. The popular ZS-042 does need modification.

This thread might provide some information https://forum.arduino.cc/index.php?topic=346940.0

See especially replys 47-50/

"You should try to read and understand the answers to your questions."

I'm terribly sorry, but in my mind the answer was a simple "yes" or "no"

"A coin cell can power the RTC for many months, that's a D'oh' and the interrupt signal generation does not draw additional current from the power source." (so it "HAS" a POWER SOURCE)? see, that's what I was asking

It can actually power an RTC for "years" because this particular one also charges the battery when power is supplied. (in addition to the coin battery) a rechargeable lithium battery is required. so says the data sheet.

"You should be able to disconnect the 5v supply from the rtc get an interrupt when running from a battery back up."

some say yes, some say no!

so what I take from this is- you don't need to power the RTC to get an interrupt to wake up a power_down, 328 P-PU bare bones chip.

that correct?

thank you

you don't need to power the RTC to get an interrupt to wake up a power_down, 328 P-PU bare bones chip.

The RTC needs to be powered by Vbat. It does not need to be powered from 5v Vcc. The interrupt output pin on the RTC needs an external pullup. That external pullup should not be connected to Vcc like on the Zs-042.

Fredric58:
"A coin cell can power the RTC for many months, that's a D'oh' and the interrupt signal generation does not draw additional current from the power source." (so it "HAS" a POWER SOURCE)? see, that's what I was asking

No, it doesn't have a power source.

Unless you add one, like a coin cell...