rugged and reliable alarm, JChristensen DS3232 RTC ?

Hi all,
I'm looking for an extremely rugged (up to 80C), precise and reliable timer/alarm/RTC, which activates a relay every 12 hours for 30 seconds or so.

Ages ago we would use some RC driven 4060 counter, shielded and whatnot.

Here we need to be quite precise with the timing (max +/- 2 seconds per day).

Researching some RTCs, I came across the DS3231, which looks so perfect.

However, reading through the excellent library and support threads from JChristensen

I learned that the flags of those alarms might need to be reset each and every time the alarm happens.
Is that true?

I'm looking for a standalone unit which is not connected to anything, except a battery and a relay.
A black box which just clicks each 12 hours for 30 seconds, that's it!

Powered by AA Batteries, which will be exchanged regularly.

Does the alarm flag of the DS3231 RTC need to be cleared really?
Also, how long is the actual alarm output? Never found that spec.

Any ideas and suggestions?

Thanks in advance!

tiny bump

Does the alarm flag of the DS3231 RTC need to be cleared really?

Yes. What is wrong with that?

Pete

Also, how long is the actual alarm output?

What do you mean? The alarm pin (SQW) will be set until you clear it.

Pete

The plan was to setup the RTC, pack it into a small box with the relay, and let it be for a year.

After a year it is taken out and batteries get replaced and the time synchronized.

I want to minimize external parts like another Arduino, which's purpose would just be to clear that flag.

Is there any other RTC or timer which doesn't need to be cleared after each alarm?

I understand that it is probably due to interrupt arbitration that this flag is flipped, and would need to be cleared.

But here just an active output every 12h is needed, nothing else.

Thanks!!

It’s nothing to do with interrupt arbitration. The datasheet says that when an alarm occurs, the alarm bit is set. It is cleared by writing a zero into that bit. Nothing else clears it - unless you power it off and on again.

Ages ago we would use some RC driven 4060 counter, shielded and whatnot.

If the ds3231 will power up such that it generates either a 32kHz or 1Hz pulse on the SQW output, you could feed that into a 4060. Unfortunately, a quick glance through the datasheet suggests that on power up, the oscillator is off. BUT I’ve tried powering on a DS3231 and the SQW pin is generating a 1Hz signal. It wouldn’t give you an alarm but the 1Hz output will be just as stable. Might be worth a try.

Pete

Pete, thank you for your reply!
Yes, the DS3231 comes delivered in an "off" mode, so the attached battery is not used.

And setting it up is no problem, as this timer needs to be synchronized to the real world once in a while (preferrably each half year).

Setting it from the default 8.192 kHz to 1Hz is also not a biggie, but even then the 4060 wouldn't do it.

4060 goes only up to 2^14, (:16384), but we would need :43200 for the 12h cycle.

And I really need to keep the complexity and chip count low, have extremely little space and it needs to be handleable, i.e. soldering these tiny SMD chips is really a pain.

Do you think a watchdog would work here? Like those external CPU watchdogs?

Or is there a RTC which won't need to have that flag cleared each and every time?

Thanks!

32kHz crystals are very accurate - over a limited temperature range (20-40C).

At 80C they'll be miles out.

2 seconds/day is about 20ppm. Even a common computer crystal is 30-100ppm.

You need a better reference. eg a VCTCXO rated and calibrated at that temperature. It will take several mA.

And components rated for 80C continuous - no electrolytics! And I doubt your batteries will stand it for long.

80C is outside the standard commercial -20....+70C range. You need mil-spec to handle up to +125C.

Not so easy. Or cheap.

Allan.

ps I once quoted for a transmitter sending a temperature profile of a wagon containing bricks at various places in the brick stack as it travelled through an oven. This took about a week, and reached temperatures of up to 1200C...

How did I do it?

Everything used here is industrial, i.e. for up to 85C ambient.
Some parts are even for automotive, like the battery (125C).
The envisioned (industrial) DS3231SN is spec'd up to 85C.

I chose the DS323X series because they contain a temperature compensated crystal oscillator.

A whole board (ChronoDot) with that chip and some headers can be had for $6.

But I'm wondering if I'm having the right approach with this RTC, or if I should use a different way altogether?

Thank you all for helping with this difficult task.

Anybody worked with SN74LV8154 ?
They would have the counter depth for 12 hours, however their output is multiplexed.

The multiplexing would make it awkward to detect 12 hours. Could you use two 4060s chained together - either as a 32-bit counter with logic to detect 43200, or one 4060 counts seconds per hour which then toggles the other one whose output detects 12.
The problem with any of these solutions is that if you want the thing to "fire" at, say, 1am and 1pm every day, you can't set the counters to an arbitrary value to set their count to correspond to "now".

Pete