My cat is basically a gorge and puke kind of cat. We need to smooth his feeding out... to prevent gorging, and it's wearing on us to feed little amounts every 2 hours. But robots are good at this!
So we bought a feeder. It doesn't feed often enough, but with a little "help" I'm sure I could change that.
The problem: cat feeder has modes to advance every 6,12,or24 hours and has 6 feeding compartments (rotates an opening in a lid around a clock of food compartments). What I'd like to do is have finer resolution and more frequent advancements of food. For example, when set to 6 I'd actually like to advance every 2 hours, so the whole tray would be dispensed in 12 hours... (My controller would have the logic to not double dip near the 6 hour mark and just let the base cat feeder do that advancement).
The feeder runs on 9v battery. Its MCU has crystal that looks to be 32K so it's keeping time. It draws 0.1mA on average. There's lots of logic and motor control I want to keep with its native controller. It has a push button for manual advancement, which is going to be the output of my design, I'll push that button. It also has an LED that blips every 4 seconds to say it's alive and battery is fine. It looks stable enough to provide a clocked reference input to my design.
There's enough room inside for me to pack a 1 x 2 inch board... plenty of space. I got a variety of tiny's kicking around and a million tiny12... so that could be the heart. I'm basically going to make a supervisor MCU that counts LED blips to determine when an amount of time has passed, and when a couple hours have gone by, hit the output for a moment to advance the tray, and repeat forever (when switched on). I want LOW POWER consumption. It will share the same 9v battery, I have some great 3v low quiesce current low dropout regulators that can take 9v input, so my design will be 3v.
Here's where I can use your input... I'm thinking I base the design on using the power down sleep mode, MCU configured for internal OSC (1 MHz), hook the LED blip input up to external INT0, wake up on level change for INT, advance a counter & do the math to see if enough time has passed trigger output accordingly, and then re-sleep. Keeping values in registers, not going to EEPROM for anything. I'd like the lowest possible power consumption during the 4 second lull periods, then wake up and do a burst of work at 1MHz that will take a very short time, then... cycle. By the way, the LED looks to have about 100ms "on" time for it's blink, going by eyeball alone, scoping it out will tell me for sure. But that looks to be about what I'd catch on INT pin.
If there are other approaches I'd like to hear.
I considered maybe "sharing" the cat feeder MCU clock osc.. Or having that MCU hold mine in reset... or ... other sleep modes or interfacing ideas to this feeder ??
Other approaches welcome.