Go Down

Topic: Long Duration Timer for Egg Incubator (Read 2 times) previous topic - next topic

Nick Gammon

Yeah, a $9 RTC seems like a safe bet to me.

Quote
Chicken eggs need to be turned a minimum of twice a day for 18 days then not turned for the last 3 days.


You need a clock for this. Without it, if you have to reboot the processor for any reason, how does it know if it is the last 3 days or not?

PeterH


Yeah, a $9 RTC seems like a safe bet to me.

Quote
Chicken eggs need to be turned a minimum of twice a day for 18 days then not turned for the last 3 days.


You need a clock for this. Without it, if you have to reboot the processor for any reason, how does it know if it is the last 3 days or not?


It would be possible to use EEPROM to keep track of progress through the program. I don't see that the RTC solves anything really - you would still need to know when the program started in order to figure out where you were up to from the current time. If you need to have a persistent store to record when the sequence was supposed to start/end (and then have some way to program and display that) then you might just as well have the sketch store the time remaining when it was told to start and then count down as time elapsed. Given the low timing resolution needed it would only need to count down the number of hours remaining, so I don't see EEPROM life being an issue.
I only provide help via the forum - please do not contact me for private consultancy.

Nick Gammon

Good point, Peter. Clearly recording in EEPROM the date/time you started this batch would be essential. But without a RTC, if you lose power, you don't know how much time elapsed before it came back.

If you run the thing off a battery, and are certain you won't lose power, just counting up from the start point could be adequate. However it's not as if RTCs are expensive or hard to use.

PeterH


Good point, Peter. Clearly recording in EEPROM the date/time you started this batch would be essential. But without a RTC, if you lose power, you don't know how much time elapsed before it came back.


That's true, and I was assuming that the duration of any outages was negligible compared to the accuracy required for the overall sequence. Granted that RTCs are well known things, but the OP is evidently an Arduino novice working against the clock, and I would have thought that any complexity that could be avoided should be.
I only provide help via the forum - please do not contact me for private consultancy.

Go Up