Smart feeding enclosure for cats with rfid micro-chip detection
April 13, 2025
Description
Description
The smart feeding enclosure for cats ensures that each of our cats has safe and exclusive access to their own food. This is especially useful in households with multiple cats, where some may have health or behavioral issues that require controlling who eats what. For example, in a home with a diabetic cat, a cat with food allergies, or a particularly greedy cat who steals food from the others.
In many countries, cats are identified by a veterinarian using an RFID microchip the size of a grain of rice, implanted under the skin of their neck.
This project uses Arduino to read the cats' microchips via an antenna and a sensor. When a cat approaches the feeding enclosure, the sensor detects whether it is the correct cat: if so, the door opens and the cat enters the enclosure to eat. If not, the door remains closed.
The advantage compared to existing microchip-reading bowls is that this system allows for multiple different bowls to be placed inside the enclosure (for example, a specific anti-gobble bowl, or both a wet food bowl and a dry food bowl). It also ensures that the cat is not disturbed while eating. Other cats can't cheat the system like they sometimes do with microchip-activated bowls.
Each cat has their own feeding enclosure, and multiple enclosures can be connected to a single Arduino.
The swing door hinges, latch mechanism, and antenna mount are 3D-printed in PLA.
The enclosure itself is made of plywood, but any wooden box will do, as long as it's large enough for the cat to stand up and turn around comfortably inside.
IMPORTANT
The frequency of microchips varies by country, as the standards are not the same everywhere. In Europe, it's 134.2 kHz, but elsewhere it can be 128 kHz or even 125 kHz. Make sure to check this before selecting an RFID reader module.
Functions
- Detects the presence of a cat.
- Reads the cat's microchip.
- Compares the microchip number with the one or more registered chips for that specific enclosure.
- Opens the enclosure door if it’s the correct cat, then closes it after a delay.
- Adds a cat to the list of authorized cats.
- Clears the list of authorized cats.
- Learning mode: the latch remains open at all times.
Hardware and Software Used
Currently, the Arduino controls only one feeding enclosure, but it is possible to control 2 or maybe 3 enclosures with a single Arduino by making small modifications to the code.
I used Arduino IDE to work on this part.
Materials :
- Arduino Uno R3
- "LCR-T4" component tester (used to tune antenna inductance)
+ for each enclosure:
- 0.2mm enamelled copper wire for the antenna
- SG90S servo motor
- Obstacle sensor Keyestudio IR Infrared Obstacle Avoidance Sensor Module
- 134.2K AGV RFID Long Range Animal Tag Embed Reader Module TTL ISO11784/85 FDX-B RFID module
- Custom PCB board
- Push button
- RGB LED
- 1 kOhm resistor
- 3x 220 Ohm resistor
- NPN transistor
- 9V battery
- wooden rod diameter 4mm (for the door)
- Plexiglass door
- Wooden box
- Spring for the latch (reused from a Bic 4-color pen)
- Nail for guiding the latch (please cut the pointy end !)
- Paperclip
Optional:
- 2x RJ45 ports
- RJ45 cable
Wiring Diagram
Code
I used a programming logic called FSM: Finite State Machine — a system with a limited number of defined states.
(This kind of FSM is not to be confused with the Flying Spaghetti Monster, which is more about noodles and divinity)
This kind of design is well-suited for embedded systems, meaning programmable objects that operate autonomously and reliably.
So I worked on the diagram representing the different states of my system and their transitions.
(Sorry — I’m French, so my diagram is in French!)
The next step in the code’s evolution will be to shift as much as possible toward object-oriented programming, using classes and instances. This will simplify the integration of multiple enclosures on a single Arduino, with each one maintaining its own independent state.
Printing Instructions
Everything is printed in PLA.
Layer height 0.2
antenne_support part needs supports.
Other parts could be printed without support if correctly oriented.
antenna_allonge is optional. It is for cats whose microchip has been implanted very far back, near the shoulder blades.
Parts with filenames starting with "loquet" should be printed in an orientation that optimizes layer direction to reduce friction.
3D files naming :
antenne_[finename] = Copper wire antenna support
fermoir_[finename] = Manual latch for the door, allowing a human to change the bowls
loquet_[finename] = Servo-actuated latch
porte_[finename] = Hinges for the door, which is cut from plexiglass
Assembly Instructions
Assemble 3D parts with the same name prefix.
When assembling, be sure to avoid leaving any sharp or cutting elements inside the box. Use screws of a reasonable size so they don't protrude too much inside, and cover the tips with a generous amount of hot glue (hot glue gun) to protect the ends.
Use a wooden stick to assemble the door hinges.
Cut a plexiglass sheet slightly smaller than the door opening size.
If your cat is an evil genius and manages to slip its claws into the small door opening to try to force it open, you can print the antenna_allonge part and place it before the antenna support. This should stop them from carrying out their evil plans, and they won’t be able to access your other cat’s feeding enclosure.
The connection between the servo motor and the latch is made using a metal paperclip, bent to the correct size. Do some tests.
The latch is held open by a spring (you can find one in a used 4-color Bic pen!) and is guided by a nail. File or cut off the sharp end of the nail.
Prepare small boxes to hide the electronics and prevent the cat from reaching inside with its paws or whiskers. In my case, I prepped everything with laser cutting to save time, but 3D printed enclosures are also a great option.
Hide the wires and any electronic parts behind enclosures or ducts so the cat can’t reach them.
For the antenna fabrication, the process is as follows:
Use the LCR-T4 to measure the inductance (in mH) of the antenna supplied with the RFID reader module, matching the frequency of your cats' microchip (this depends on your country; it's 134.2 kHz in Europe).
Then, take the copper wire and wind it very neatly around the antenna support. I made 40 turns, then stripped the two ends of the antenna wire and tested the inductance with the LCR-T4. By reducing one turn, the inductance decreases. Keep undoing turns until you reach the correct inductance.
Protect your antenna with electronic tape before adding antenne_cache part.
Weld you antenna to RFID reader module according to its documentation.
For now, my Arduino is connected to the rest via a breadboard, it's still a very prototype-looking setup.
Eventually the idea is to use a PCB board with soldered wires, and integrate everything into a single housing shared by multiple feeding stations.
The blue thingy is the USB power bank. Eventually, I’d like to replace both the USB power and the 9V battery with a mains power supply. However, this requires adding a filter to the section that powers the RFID reader. A very clean power source is essential to improve the reading distance.
Don't force your cats to use this new system.
It’s important to get them used to it gradually. Use only positive reinforcement, no punishment.
Training your cats MUST span over several WEEKS.
It’s essential to take your time and not rush your cats.
I recommend starting by building a wooden enclosure before diving into the electronics, so the cat can already get used to the object and eat inside while you work on the 3D printing and electronics parts.
Leave the box in the cat's environment for a few days. Gradually move its food bowl closer to the box.
Temporarily secure the door in the open position (using gaffer tape or power tape, for example) so the cat gets used to exploring what's inside.
Gradually place its food inside the box. Use positive reinforcement to train the cats to eat in their own individual boxes.
Set the system to learning mode at the start so that the latch remains open.
When the cat is accustomed to entering the box to eat, you can remove the tape that was holding the door open, and the cat must now learn to open the door with its nose. Slowly, gently, assist them, praise them, and never force them.
Once the cats are comfortable opening the doors, it’s time to remove the learning mode and switch the system to its full function, so each cat can access only its own box and not the others’.
Beta-testers
Special thanks to my beta-testers