Very simple question about RTC

Hi All,

I am trying to make an automatic feeder for my turtles, but never used rtc, all I need to turn my servo at an exact time(similar to alarm). Is there any project I can take a look and figure out?

Thanks in advance.
Best regards.

Do you have the RTC? There are libraries readily available.

Have you done a search (top of this page)?

There have been many posts on RTCs so it is a matter of looking. Any specific questions will be answered in this forum once you have done your research first.

Weedpharma

If you don't already have an RTC module, the DS3231 modules are better, (more accurate), than the DS1307 modules. Very cheap on eBay.

Then, aside from a library to suit the RTC itself, the "DS3232RTC" library for example, (suits the DS3231), take a look at the "Time" and "TimeAlarms" libraries, along with the example code for all three libs.

That should give you a good introduction to RTCs.

OldSteve:
If you don't already have an RTC module, the DS3231 modules are better, (more accurate), than the DS1307 modules. Very cheap on eBay.

Sounds like what I often say. But in this case I wonder if the turtles would notice the difference. :slight_smile:

aarg:
Sounds like what I often say. But in this case I wonder if the turtles would notice the difference. :slight_smile:

Didn't you know that turtles have an exceptional sense of time? :smiley:

Actually, I was thinking of how often the RTC needs adjusting back to correct time if it's also displayed on an LCD. And since DS3231s are as cheap as DS1307s, there's no need to buy the less accurate one (like I did initially).

I already have a ds1302. And actually my turtles don't care a few microseconds delay I hope :slight_smile:
Actually I made a little research but I have a dilemma, I saw a sample for feeding without rtc, make the process with delay, but I want to use an arduino nano I'm not sure this method could work properly also system would lost time information if electricity gone for a reason, so I think using a rtc will be much better, but the only thing I need is a signal per 24 hours so firmware gets a little complex with rtc for that kinda simple circuit I think.
What's your suggestion about using rtc or not?

If you want to feed at roughly the same time each day, you're better off using an RTC than 'delay()' or 'millis()'-based code.

An Arduino is absolutely hopeless at long-period timing, and you would need to reset the Arduino very regularly to keep the timing even moderately accurate.

Since you already have the RTC, why not put it to good use?
Besides other considerations, it will be a good learning exercise for you. :wink:

OldSteve:
Didn't you know that turtles have an exceptional sense of time? :smiley:

Damn, you're good! I completely forgot!

The algorithm for a once a day pulse is super simple. You just look to see whether the day register has changed. If you want a different time of day than midnight, you could just set the RTC time ahead or back.

aarg:
You just look to see whether the day register has changed.

Gawd, why didn't I think of that..