Author Topic: RTC with an alarm triggered by an exact date (including a year)?  (Read 2579 times)

0 Members and 1 Guest are viewing this topic.

Offline BBBbbbTopic starter

  • Supporter
  • ****
  • Posts: 289
  • Country: nl
Is there by any chance an RTC with an alarm that can be triggered by an exact date, but not just annual?
I'd like to be able to set an alarm for example for 1/1/2019.

Best I could find were annual alarms (e.g. ST M41T80), but I'd like to be able to go further than a single year cycle.
I know an MCU could solve this easily, but for a purpose I have in mind it would be lovely if I could keep it simple with just an RTC running on battery. 
« Last Edit: May 04, 2017, 09:08:37 pm by BBBbbb »
 

Offline Rerouter

  • Super Contributor
  • ***
  • Posts: 4694
  • Country: au
  • Question Everything... Except This Statement
Re: RTC with an alarm triggered by an exact date (including a year)?
« Reply #1 on: May 04, 2017, 09:13:58 pm »
You can still do the micro approach, have the alarm output turn on the micro, say with a mosfet to its vcc, the micro wakes up, checks if its the right year on the rtc and if not turns itself off for another year.
 

Offline BBBbbbTopic starter

  • Supporter
  • ****
  • Posts: 289
  • Country: nl
Re: RTC with an alarm triggered by an exact date (including a year)?
« Reply #2 on: May 04, 2017, 09:42:55 pm »
You can still do the micro approach, have the alarm output turn on the micro, say with a mosfet to its vcc, the micro wakes up, checks if its the right year on the rtc and if not turns itself off for another year.
That's the current idea, but since the only thing MCU would need to do after checking the year is switch a mosfet I just wondered if it would be possible to eliminate the middle man here.
It seems there isn't such RTC out there, but anyways I wanted to check here with you guys.   
 

Offline hdj80r

  • Newbie
  • Posts: 5
Re: RTC with an alarm triggered by an exact date (including a year)?
« Reply #3 on: May 04, 2017, 11:20:35 pm »
You could use one of the elapsed time recorders from Maxim. Something like a DS1682 can have an alarm set up to 34 years in the future.

Work out the number of elapsed seconds in the future you want the alarm to activate, program that into the DS1682 and it will trigger its alarm output when the elapsed time has passed.  Of course, the oscillator accuracy etc will mean your alarm in 30 years time may be out by a day or two  :)
 
The following users thanked this post: BBBbbb

Offline BBBbbbTopic starter

  • Supporter
  • ****
  • Posts: 289
  • Country: nl
Re: RTC with an alarm triggered by an exact date (including a year)?
« Reply #4 on: May 05, 2017, 04:24:07 pm »
You could use one of the elapsed time recorders from Maxim. Something like a DS1682 can have an alarm set up to 34 years in the future.

Work out the number of elapsed seconds in the future you want the alarm to activate, program that into the DS1682 and it will trigger its alarm output when the elapsed time has passed.  Of course, the oscillator accuracy etc will mean your alarm in 30 years time may be out by a day or two  :)
That could work, I can tolerate a few hours out for a 2yrs period. I'll go through some available options and datasheets during the weekend.   
 

Offline BBBbbbTopic starter

  • Supporter
  • ****
  • Posts: 289
  • Country: nl
Re: RTC with an alarm triggered by an exact date (including a year)?
« Reply #5 on: July 23, 2017, 09:29:15 pm »
You could use one of the elapsed time recorders from Maxim. Something like a DS1682 can have an alarm set up to 34 years in the future.

Work out the number of elapsed seconds in the future you want the alarm to activate, program that into the DS1682 and it will trigger its alarm output when the elapsed time has passed.  Of course, the oscillator accuracy etc will mean your alarm in 30 years time may be out by a day or two  :)


Once again, an advice in a good direction, but as I am finding out DS1682 is not a way to go, since the ALARM is not resettable (Alarm Flag). Well actually you could reset it once as you reset the whole RTC (Reset Sequence), but that locks completely the config register, bricking it fully from any further changes. My system is working perfectly, but since I'm testing it under various conditions with and w/o the AF, I've already bricked 4 counters, while waiting for the DS1683.

So bottom line DS1683 is way better than DS1682 for my purpose as the Alarm is resettable in that version. Luckily the pinout is the same, so no changes needed on my PCB. I should have read the datasheet more carefully in the first place.

DS1682 is probably better in commercial products where you want to hard limit the time of usage.
« Last Edit: July 23, 2017, 09:31:29 pm by BBBbbb »
 

Offline Ash

  • Regular Contributor
  • *
  • Posts: 161
  • Country: au
Re: RTC with an alarm triggered by an exact date (including a year)?
« Reply #6 on: July 24, 2017, 12:51:26 am »
I've used a RTC from Abracon, the AB-RTCMC-32.768kHz-EOZ9-S3. But it is a small SMT part 2.5mm x 3.7mm - however it does contain its own "calibrated" crystal. It does temperature compensation to help minimise drift. It is an I2C part, but there is also an SPI version.

It has a calendar based alarm. but it only deals in years between "00" and "79", basically 2000 - 2079, but it does leap year correction over that range.

However, leaving an RTC running alone over that period, then the time is going to drift, probably a lot. Especially with temperature changes. Also, keeping it powered for long periods could also prove tricky. The RTC above has inbuilt backup supply charging for a small battery or super cap which at least allows you to ensure small periods of power loss.

Good luck.. curious about the application :)

Ash.



 

Offline BBBbbbTopic starter

  • Supporter
  • ****
  • Posts: 289
  • Country: nl
Re: RTC with an alarm triggered by an exact date (including a year)?
« Reply #7 on: July 24, 2017, 01:24:30 pm »
I've used a RTC from Abracon, the AB-RTCMC-32.768kHz-EOZ9-S3. But it is a small SMT part 2.5mm x 3.7mm -

Wow! - regarding the specs and size. Seems to be what I was originally looking for. Only hustle looks to be the size. I've never soldered that package, but here is an opportunity to try something new :)

However, leaving an RTC running alone over that period, then the time is going to drift, probably a lot. Especially with temperature changes. Also, keeping it powered for long periods could also prove tricky. The RTC above has inbuilt backup supply charging for a small battery or super cap which at least allows you to ensure small periods of power loss.
Well it would run unattended for max of 2yrs (end case), and a day off is not a big deal, temperatures should be rather stable room temps (aircon allways).
I have no experience with Abracon, you're overall opinion is positive I guess in terms of reliability?

.. curious about the application :)
A friend and I are making like DIY playground for various laser heads he accumulated over the years, so there is a lot of stuff to monitor for "expiration date" - sensors, gases, coolants... As this is a side project for both of us, priority is low and everything is going slowly, and we're aware we'll forget to take care of something, so once we set something, setup the reminder. Usually the devices from which the laser heads originated had those monitoring systems in place, but we need an external one now.

Of course this could have been done with some cloud based calendar on a computer or a phone, but this is just us playing.

First idea was the most logical MCU+RTC+Relay+battery (CR1225 -small but just for prototype), but as a dare I started trying to make it as small as possible, so now it is DS1682(3)+power switch (AP22802) and the size od the PCB is determined by the holder for the CR2032.
Final idea is RTC+PWR switch + something like 1/2AA w/ axial leads, so the minimum size of the PCB would be determined by the size of the battery.
Not a big fan of a super cap for something that I don't know if I will power up tomorrow or next year.

Anyways, as I said it's a slow project and this is really just a small part of it, we've just finished the gas system (and this was expensive... e.g. 1m pipe for fluorine gas like 700eur, 2 stage fine reducers a lot more...) and the next priority is a modular optical bench.
 

Offline Ash

  • Regular Contributor
  • *
  • Posts: 161
  • Country: au
Re: RTC with an alarm triggered by an exact date (including a year)?
« Reply #8 on: July 25, 2017, 02:21:51 am »
Wow! - regarding the specs and size. Seems to be what I was originally looking for. Only hustle looks to be the size. I've never soldered that package, but here is an opportunity to try something new :)

It is not too bad with either hot air or a small iron. A microscope will help..

Well it would run unattended for max of 2yrs (end case), and a day off is not a big deal, temperatures should be rather stable room temps (aircon allways).
I have no experience with Abracon, you're overall opinion is positive I guess in terms of reliability?

You can be in for other weird effects as well that could cause you problems. It has an internal "lock up" detector and will reset if it finds a problem. But how do you know it reset? How will you know it is actively counting? You would need a monitoring program, where you attach to each device say every month and check it.

Reliability, can't say.. maybe I'll know in a year or so.. :) It wasn't too hard to get going in my application..

A friend and I are making like DIY playground for various laser heads he accumulated over the years, so there is a lot of stuff to monitor for "expiration date" - sensors, gases, coolants... As this is a side project for both of us, priority is low and everything is going slowly, and we're aware we'll forget to take care of something, so once we set something, setup the reminder. Usually the devices from which the laser heads originated had those monitoring systems in place, but we need an external one now.

Of course this could have been done with some cloud based calendar on a computer or a phone, but this is just us playing.

Yep, sounds like fun.  :scared:

I was going to say why not just use Google Calendar.. Or even a physical tag with a written date...  :-//

But I'm not going to judge you for wanting to play with other stuff, I'm becoming a volt-nut for no other good reason than I find it interesting..  :)

First idea was the most logical MCU+RTC+Relay+battery (CR1225 -small but just for prototype), but as a dare I started trying to make it as small as possible, so now it is DS1682(3)+power switch (AP22802) and the size od the PCB is determined by the holder for the CR2032.
Final idea is RTC+PWR switch + something like 1/2AA w/ axial leads, so the minimum size of the PCB would be determined by the size of the battery.
Not a big fan of a super cap for something that I don't know if I will power up tomorrow or next year.

Anyways, as I said it's a slow project and this is really just a small part of it, we've just finished the gas system (and this was expensive... e.g. 1m pipe for fluorine gas like 700eur, 2 stage fine reducers a lot more...) and the next priority is a modular optical bench.

I'll leave the playing with fluorine to those with the experience, that's one of those nope chemicals for me..

Actually the super cap isn't needed, it was an example. Basically the RTC has a charge circuit and automatic switch over for back up supply. I used two 4.7uF ceramic caps and I get about 30 seconds of hold up time on the RTC if I loose power. Great for changing batteries etc.

Have fun.
Ash.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf