A Raspi project to ensure consistent dinner times for my cat.
Check out the A.C.F.D. MARK-I in action!
This repository lists material, assembly instructions and software for the A.C.F.D. MARK-I (Automated Cat Feeding Device). The device is a one-shot feeder, that is to say it keeps a single portion of cat food under a plexiglas lid. The user sets a due time using 4 tactile buttons and a 4-Digit display. The lid opens when the programmed time is up.
The Automated Cat Feeding Device consists of four modules: (casing and glass not counted)
Note: Any raspberry with 20 GPIO pins and 5V output will serve for this purpose. Sadly this excludes the cheaper Raspi Pico.
- Time Display PCB
- 1x 12 Pin Common Cathode 7-Segment Display
- 7x 230Ω Resistor
- 1x Mini PCB
- Jumper Wires
- 4 Button Keypad
- 4x Tactile Push Buttons
- 1x 230Ω Resistor
- 1x Mini PCB
- Jumper Wires
- 2x Lego 1 x 2 Plate
- Lid Lifter
Use below pin layout to connect display, keypad and motor driver to the Raspberry.
Black dot marks pin 1
Above blueprint does not indicate outer walls. Add the required margin strength, depending on your available material. For reference, I used 6mm CDX plywood.
6mm CDX plates:
- Base plate:
16.3cm x 12.2cm - Left and right wall:
16.2cm x 5.0cm - Front and back wall, electronics bay separator:
11.0cm x 5.0cm - Motor bay separator: 10.5cm x 5.0cm
4mm plexiglass plates:
- Electronics bay lid:
12.2cm x 5.3cm - Motor bay lid:
10.4cm x 2.8cm - Cat food bay lid:
11cm x 9.3cm
Component location:
- Electronics bay:
- Raspberry-0
- ULN2003
- Display PCB
- Tactile PCB
- Motor Bay:
- 28byj Stepper Motor
- Cat Food Bay:
- Universal Mount Hub
- Hair Pin
- Front cover sheet as printable PDF
- Motor bay cover sheet as printable PDF
Before full assembly, use below scripts to test individual ACFD components and wiring:
- Display Test: Test Time Display PCB and wiring with a fast countdown 9999-0000.
python3 ./display-test.py
. - Keypad Test: Test Keypad PDB and wiring with on terminal display of pressed buttons.
python3 ./interruptclick.py
- Motor Test: Test ULN2003 and Motor wiring. Performs rotations needed for lid open and close.
python3 ./motor-test.py
To manually run the software, start it with:
python3 acfd.py
For automated start on Raspberry boot, add this line to your /etc/rc.local
:
python3 acfd.py &
(ampersand prevents blocking the boot sequence)
You can conveniently develop using the PyCharm IDE and the provided run scripts.
However, as your development machine likely has no GPIO pins, install the GPIO-def library instead, to remove IDE warnings: RPi-GPIO-def
- Use the run.sh script to copy the sources to your raspi
- Create a launcher script
localrun.sh
at top level in your homedir:
cd /home/schieder/Code/AutomatedCatFeedingDevice
python3 -m acfd.automated_cat_feeding_device
- Edit as root
/etc/rc.local
to calllocalrun.sh
, with '&', to prevent blocking on boot
/home/schieder/localrun.sh &
- Author: Maximilian Schiedermeier
- Github: m5c
- Webpage: https://www.cs.mcgill.ca/~mschie3
- License: MIT