H.Y.F.Y.L.C.! (Hunt your food you lazy cat!)
Obliczymy ostateczną cenę na podstawie wybranego pliku. Sprawdzisz ją i zaakceptujesz przed płatnością.
Zapisane na tym urządzeniu.
A prototype to exploit hunting instinct of our house cats to keep them healthier, happy and also feed them.
- Ocena
- 0 / 5
- Polubienia
- 5
- Pobrania
- 7
- Wydruki
- 0
- Wyświetlenia
- 234
- Oceny
- 0
Aktualizacja u źródła:
Informacje o modelu
- Źródło
- Printables
- Kategoria
- Pets
- Licencja
- Creative Commons — Attribution — Noncommercial
UPDATE: Gerber PCB files available! See circuit section for details.


--------
Shortly it's a feeding machine but instead of just fill a bowl why not throw one kibble at a time and have your pet friend have fun (and move)? I bet he will enjoy listening to the buzzing motors and waiting to catch the kibble that comes out at high speed.
This is my first attempt for a device of this kind and it's more like a proof of concept or prototype.
Mechanical, electronic and software parts are functional as I tested them.
Improvements are surely possibile maybe some other sensors should be added to manage clogging or sensing for excessive motor current demand, but first things first.
It should be a good starting point to test circuitry and firmware.
Project name
Hunt your food you lazy cat! Aka H.Y.F.Y.L.C!
Description
We can start from some basic assumptions:
- House cats tend to be overweight and that’s bad for their health and also a shame to their ancestors.
- Cats that live all their lives inside a house can be bored and guess what? It’s also bad for our pets.
- All cats sleep a lot to preserve energy but the struggle to hunt their food help feral cats to burn lots of calories.
- Hence the idea for H.Y.F.Y.L.C! A food dispenser (for cats but not just for them) that dispenses food one bite at a time so that the diner is forced to chase each snack.
Functions
- A motor drive a feeding wheel that load 1 (or 2) kibble at time to a launch chamber.
- A light barrier detect the food transit.
- A second motor charge a bat connected to a spring that hit the kibble.
Hardware and Software Used
Hardware:
- 3D-printed case hosting the loading wheel, the bat, supports for the electronic components, motors, the food silo and so on.
- 1 x Arduino nano board to manage buttons, the light barrier and the H-bridge motor driver.
- 2 x 30 RPM 12 Vdc motors.
- 1 x Dual H-bridge motor driver breakout board (2 x L9110)
- 1 x 5mm LED (yellow).
- 1 x photoresistor (approx 5x6 mm surface).
- 1 x 50x70 mm hand soldered electronic board with:
- 1 x 5.5 mm barrel connector for power supply (Vin approx. 15Vdc)
- 1 x power switch.
- 2 x linear voltage regulator (LM7805, LM7812)
- 2 x headers for the Arduino board.
- 2 x push buttons.
- Connectors for power supply, motor wiring and light barrier wiring.
- 2 x 330 Ω resistor
- 1 x green 5mm LED.
- 1 x 10 kΩ potentiometer.
- 2 x 0,1 uF ceramic capacitor
- 2 x 0,47 uF ceramic capacitor
- 1 x 470 uF electrolytic capacitor.
- 2 x ball bearings for rotating parts (Ø10 mm, Ø17 mm).
- 4 x M4 nuts.
- 4 x M4x25 bolts.
- 4 x M1x3 bolts (to secure the motors).
- A bunch of M2x5, M2x6 and similar screws.
- 6 x M3x6
- 1 x spring (you can get it form a pen).
Software:
- TinkerCAD have been used to draw all the printed parts.
- PrusaSlicer ver. 2.5.2 have been used to obtain the .gcode files.
- Arduino IDE have been used to firmware implementation.
- Fritzing have been used to draw the schematics.
- EasyEDA have been used to draw all the PCB files.
Wiring Diagram
![]() |
Electrical circuit description:
|
New PCBs files now available! I made a SMD and a THT version. THT .gerber, BOM and schematics files are now available. If you want the SMD .gerber files before my check just ask me. PCBs will be more flexible since there will be auxiliary connections such as I2C, some extra GPIO and analog inputs so you can make your own mods.
THT board is simpler to mount if you are not confident with SMD soldering. This board have auxiliary connections to +5V and +12V, power supplies, I2C pins and 4 GPIO. On I2C bus it is possible to mount 2 pull-up resistor and decoupling cap. On the 4 auxiliary GPIO you can connect a pull-up or pull-down resistor.
SMD board can handle either an LM317 (SOT223) chip or a LMxx (TO220) on the first power stage, so you can choose for variable or a fixed voltage regulator. The second stage is compatible with LM2940 (SOT223) or LM78xx (TO220). Similarly to the THT version there are auxiliary pins to I2C, 4 GPIO and 2 ANALOG inputs.
Since the Arduino nano 33 IOT is almost pin compatible with the nano you can develop WiFi o BT connections to the device. WARNING if you use the Arduino nano 33 IOT make sure to use a 3.3V voltage regulator!!!. +3.3 V should be enough to drive the motor board. Consider lower the led resistors value.
Code
A state-machine sketch has been implemented for the project. A MyTimer class is used to instantiate the objects that manage the timing of different elements such as motors, status LED and button de-bouncing.
You can find the code on GitHub repository URL: https://github.com/EGDO-maker/HYFYLC
Each states and a description of the activities they manage are listed below.
STATE 0: IDLE
- Waits for the buttons to be pressed.
- Button 1: Starts the main cycle.
- Buttons 1 and 2 pressed for more than 2 seconds: enter calibration state 4.
STATE 1: RUN
- Starts the food loading motors for the time defined by loadingTime.
- Reverses rotation at the end of each loading interval to avoid obstructions by calling state 2.
- Reads the button presses:
- Button 1: Stops loading and returns to state 0
- Button 2: Goes to state 2 to remove the obstructions.
- Reads the photo barrier and detect the food passage then stops the food loading motor then goes to state 3.
STATE 2: UNCLOG
- reverse the food loading motor in order to prevent loading wheel to get stuck and damage motor coils.
STATE 3: LAUNCH
- Activates the motor that load the bat spring for a time defined by springChargeTime.
- Waits 500 ms before returning to state 1.
STATE 4: CALIBRATION
- Reads the analog input connected to the photo barrier and activates the status LED in a fixed manner if the value read is close to the value defined by lightBaseline with a tolerance defined by baselineTolerance.
- Reads the button presses:
- Button 2: exits calibration and returns to state 0.
FUNCTIONS
Here the descriptions of the functions used on the sketch.
go(s): sets the global state variable to the value s. It also initializes the global variable first to run some code only time.
LedSet(A, B): manages the switching on of the status LED by evaluating the values A and B.
- If A and B are null, the LED is permanently switched off.
- If A and B are both equal to 1, the LED is continuously switched on.
- In other cases, A is set as the number of ms in which the LED is switched off and B is the ms in which the LED is switched on.
MotorCmd(n, A, B, T): manages the switching on of the motors.
- n: identifies the motor to act on, if 0 it is the motor for loading the spring and 1 for the motor for loading the food.
- A and B: if both 0 or one, they deactivate the motor. If they are different, they activate the motor in one direction or the other depending on which of the two values is 1.
- T: indicates the time in ms in which the motor remains active.
LightTest(): Runs only on setup to measure the signal strength of the photo barrier by averaging 100 readings.
Additional notes:
motors have some inertia after they are deactivated. Reversing the rotation during the stop phase resets the micro-controller so 500 ms delays have been inserted to avoid the reset.
In many parts of the code, serial prints have been inserted to help with debugging.
Printing Instructions
All the printings were performed with a PRUSA i3 MK3 as shown in the following table. All pieces are printed with PLA filament except for the bat used to kick the kibble which is in flexible TPU.
All pieces were printed as shown in the pictures below.
MAIN CHAMBER Filament: PLA Layer height: 0,3 mm Infill: 30% Supports: no Note: | ![]() |
Filament: PLA Layer height: 0,3 mm Infill: 30% Supports: no Note: the external shell have been printed upside down with respect final mounting and usage. | ![]() |
FOOD BOWL Filament: PLA Layer height: 0,3 mm Infill: 30% Supports: from build plate only Note: | ![]() |
Filament: PLA Layer height: 0,3 mm Infill: 30% Supports: no Note: | ![]() |
Filament: PLA Layer height: 0,3 mm Infill: 30% Supports: no Note: | ![]() |
MOTOR WHEEL Filament: PLA Layer height: 0,3 mm Infill: 30% Supports: no Note: | ![]() |
BAT MOTOR HOLDER Filament: PLA Layer height: 0,3 mm Infill: 30% Supports: no Note: | ![]() |
BAT MOTOR GEAR Filament: PLA Layer height: 0,3 mm Infill: 30% Supports: no Note: | ![]() |
BAT GEAR Filament: PLA Layer height: 0,3 mm Infill: 30% Supports: from build plate only Note: | ![]() |
SOFT BAT Filament: TPU Layer height: 0,3 mm Infill: 20% Supports: from build plate only Note: | ![]() |
FUNNEL Filament: PLA Note: | ![]() |
PIPELINE Filament: PLA Layer height: 0,3 mm Infill: 30% Supports: from build plate only Note: support are disabled inside the pipe. | ![]() |
BOARD LID Filament: PLA Layer height: 0,3 mm Infill: 30% Supports: no Note: | ![]() |
FOOD LID Filament: PLA Layer height: 0,3 mm Infill: 30% Supports: no Note: the food lid have been printed upside down with respect final mounting and usage. | ![]() |
Assembly Instructions
Assembly of mechanical and electric parts.
![]() | ![]() |
| |
![]() | ![]() |
| |
![]() | ![]() |
| |
![]() | ![]() |
| |
![]() | ![]() |
| |
![]() | ![]() |
| |
![]() | ![]() |
| |
![]() | ![]() |
| |
![]() | ![]() |
| |
![]() | ![]() |
| |
![]() | ![]() |
| |
![]() | ![]() |
| |
![]() | ![]() |
| |
![]() | ![]() |
| |
Demo and Usage Instructions
- Plug an external 15 Vdc power supply with a 5,5 mm barrel connector to the device. WARNING!!! Double check the polarity of the connector since there is no polarity safety device on the board!!!
- For the first power up the board cap should not be mounted since a calibration may be required.
- Power up the device and wait until the status LED blinking.
- Press buttons 1 and 2 and wait until the status LED is solid, then release the buttons.
- The status LED could starts blinking. In this case slowly rotate the potentiometer on the board (R2) with a screwdriver halting every few degrees until the LED remain steady on.
- Press button 2 to exit calibration.
- Reset the Arduino board.
- Fill the food bowl (non too much).
- Press button 1 a make sure your pet is in the vicinity.
Additional Notes or Tips
- For the electronic wiring I recommend using connectors to connect the control board to the sensors, control signals and power supplies.
- The level of the kibble in the food chamber should not exceed half the height of the loading wheel.
Photos and Videos
See assembly instructions for photos.










































