When you live in a busy household, often you do not know how many times your pet has been fed. Probably you arrive at home and your pet asks for food even it has just been fed by someone else who is not in the house right now.
Somehow, your pets are getting fatter and fatter. You do not want to buy an automatic pet feeder because you have a better connection to your pet when it has to come to you to ask for food. However, you do not want it to be fat and unhealthy.
Step 1: Solution
The KS-Cat-Feed-Counter is meant to inform you about how many times your pets ate already so you stay in control of your pet's diet.
It is made to show you up to four feeding times a day. You can of course change the soft- and hardware to increase the counter to five or more feeding times.
Step 2: Hardware
Arduino Pro Mini (for low power consumption)
Upload Module for Arduino Pro Mini (This module from Aliexpress only works on Linux -> See download instructions in code)
4 Resistors 10kOhms
Housing for the electronic and battery
9V block battery with connector
Small material like electronic board and wires
(All costs about 15 USD in Aliexpress.com)
Step 3: Library and Sketch
LIBRARY: LowPowerLibrary (https://github.com/rocketscream/Low-Power)
Time finally showed with the Sketch "2018-08-KS-Cat-Feed-Counter.ino" you have to change the 9V-Block-Battery all 6 months. So I connected the Counter to an external power source (no need to save power anymore). If you do this you can use the sketch "2019-10-KS-Cat-Feed-Counter-NoLowPower.ino".
Step 4: Features
This gadget counts up to 4 feeding times. It has 4 LED's and each active LED represents a feeding time. After 4 feeding times, it restarts at 1. Since it works on battery, it is programmed for low power consumption. (no timers)
You have one button to check on how many times your pet has been fed. The LED's lighten up according to the feeding times. In addition, you have one button to decrease the amount of feeding times each time you press it. (For corrections e.g. you open the lid but do not feed the pet – for food refill)
It has one magnetic switch that detects if the food box lid is open or closed. (I tried it with the tilt switches but these where not trustworthy)
After a configurable time “minOpeningTime” of open feed box lid – it is assumed that you did just feed your pet – and the feeding times counter increases (in case your feeding times counter is at 4 it is set back to 1).
When you open the lid, the LED's lighten up according to the feeding times.
When you close the lid, the LED's lighten up according to the feeding times (except you close again before the “minOpeningTime” exceeds).
After decreasing the feeding times by the decrease button, the LED's lighten up according to the new feeding times.
Step 5: Configurable Parameters
minOpeningTime: when the lid is open for more than this time then the counter will be increased.
lightenUpLEDs: when you press the button to check on how many times your pet has been fed, or when you open or close the lid or when you decrease the feeding times counter the LED's will light up for this time.
Step 6: Wiring
Step 7: Additional Information
The Arduino needs in normal mode about 50mA. With the "LowPowerLibrary", this is reduced in this sketch to less than 0.2mA. Therefore, instead of a daily battery change you can do this just once per year. As the "LowPowerLibrary" is active, there are no timers and I could not use the command millis. (just delay on “minOpeningTime”)
The upload Module for the Arduino Pro worked always good on the Linux operating system – but only sometimes on a Windows operating system. Remember to give write rights to the port on Linux before uploading. (see comments in code)