Arduino with UTC, controlling a servo if the time is within given timeintervall

Hello everyone,

I have a thought I am curious about.
My mom has a dog that drinks and eats late at night, and aren't able to hold herself until morning. so that ends in a mess, so she has started to remove the access to food and water after 11 pm, and everything is ok the morning after.

so my idea is to have an automatic feeder, and automatic water bowl for her dog, and build a structure around these two items and with an access lid in front that opens and closes at specific times.

my initial thought was to use a pair of stepper motors to open and close the lid.
an Arduino board connected to a micro USB and wall outlet that is on a timer (ie. on at 06:00 and off at 22:15)
so the power to the Arduino would be shut off, so I was thinking of using a UTC that runs on a coin-cell.
that once the Arduino awakens it pulls the current time from that UTC, and if time is within "opening hours 06:00-22:00 the lid opens.

so the steps would be
Power outlet turns on ->Arduino turns on->Arduino checks UTC to get the current time->If it's time it opens, and if not it stays closed.
and also a pushbutton on top of the structure to override and open the lid.

so the UTC is just to have a mean to keep track of the time even when Arduino does not have any power.

what sort of feathers, boards, items would I need and is it achievable?
(i hope it was clear, as English is not my native language :stuck_out_tongue: )

RTC (Real Time Clock) modules usually have battery backup so that they keep time when the power is off. I use the DS3231 modules. They connect with and Arduino via the I2C interface.

ahh, perfect.
and there would not be a problem implementing a code that pulls the time from that RTC to sync the time and then have the code on Arduino to rotate the motors accordingly if the time matches within certain time?

andreaswals:
ahh, perfect.
and there would not be a problem implementing a code that pulls the time from that RTC to sync the time and then have the code on Arduino to rotate the motors accordingly if the time matches within certain time?

The time is permanently available from an RTC so there's no syncing needed. The rest is simple enough though I'd probably be looking at servos rather than stepper motors.

Steve

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.