Fish feeder device

Discussion in 'The Projects Forum' started by Manmeet Singh, Dec 9, 2010.

  1. Manmeet Singh

    Thread Starter Active Member

    May 21, 2008
    I have decided to design an automated fish feeder in which a user can preset a certain time per day for food to drop through a pushbutton and LCD interface. This would then rotate a compartment (via a stepper motor) and feed his/her fish. Overkill yes but I think its a good way to gain more knowledge on microcontrollers.

    So right now I have my arduino uno and my real time clock module (ds1307)

    The thing is though I dont care about what year or month it is. What I want is my RTC to just keep track of 7 days. The one hacked solution I can think of is picking a week that actually has this correspondance where monday is the 1st and sunday is the 7th (The first week of November 2010 has this). By doing this I would just keep adjusting the date when sunday transitions to monday and instead of having it be the 8th as the DS1307 would do I would change it back to monday the 1st. I am trying to make this project as realistic as it would be and this just seems like a hack fix to me.

    An alternative solution is using a timer that ticks every millisecond and stores the value to a register which my uC can then read and based on this easily determine what day (1-7) it is and the exact time during that day, I would have this timer rollover to 0 at the end of sunday therefore essentially resetting to monday day 1. Problem is I dont want to have my uC controlling this timer I just want to have the ability to change the current time and the current day and read back that data.

    How exactly is this done for a timed power bar? It is not as if they need the data for what year or month it is just wether its monday,tuesday etc and what time it is on that day.

    Would appreciate anyones input on the matter, thanks.
  2. tyblu

    Active Member

    Nov 29, 2010
    You can set Monday through Sunday to read as day 1-7, as detailed in the datasheet (eg: if you want Monday to be day 2 and today is Thursday, set the "day" address to be 4). It seems like what you need are addresses 01h and 02h.
  3. GetDeviceInfo

    AAC Fanatic!

    Jun 7, 2009
    wouldn't you just program it as a 24 hour alarm? If you auto feed Mon to Fri, why not sat and sun as well?