STEPHAN GEISSER

Applied Scientist | Mechanical Engineer | AI & ML Specialist

Back to Projects

CatDoor

Raspberry Pi Automation Machine Learning Computer Vision RFID IoT

Project Overview

The CatDoor project is an innovative alternative to traditional cat flaps, designed for situations where installing a conventional cat door is impractical or expensive due to large windows or other architectural constraints. Instead of creating a new opening in a door or wall, this system automatically opens an existing door when the household cat approaches, providing a seamless entry and exit solution.

The system incorporates advanced technologies including RFID identification to ensure only authorized cats gain entry, and machine learning-powered computer vision to monitor the doorway for safety during operation. A web-based user interface allows for remote control and behavioral analysis of the cat's movements.

Technology Stack

Raspberry Pi
RFID
Computer Vision
Machine Learning
Stepper Motors
Web Development
Rapid Prototyping

Project Goals

  • Create an automated door opening system for a household cat
  • Develop a secure system that only admits authorized pets
  • Ensure safe operation to prevent injury to the cat during closing
  • Implement remote monitoring and control capabilities
  • Design a system that can be retrofitted to existing doors without major modifications

Implementation Process

The CatDoor system was implemented through a combination of hardware and software components working in harmony:

  • Door Mechanism: A stepping motor was attached to the door handle mechanism, allowing for precise control of the door's movement. The motor is powerful enough to operate the door, but gentle enough not to cause major damage if something does get jammed.
  • Control System: Two Raspberry Pi units form the brain of the operation - a Raspberry Pi 5 handles the primary processing, including computer vision tasks, while a Raspberry Pi Zero 2W manages the RFID reading and secondary functions.
  • Identification System: An RFID reader detects the cat's implanted microchip when in proximity, providing secure authentication that prevents neighbor cats or other animals from triggering the door.
  • Safety Monitoring: A camera positioned to observe the doorway feeds real-time video to a machine learning model trained to detect cats. This ensures the door never closes if the cat is in the doorway, preventing potential injury.
  • Limit Switches: Physical limit switches were installed to define the maximum open and closed positions, providing a hardware safety mechanism independent of the software controls.
  • User Interface: A web-based control panel was developed to allow remote monitoring and operation of the door. The interface also presents analytics on the cat's entry and exit patterns over time.

Technical Challenges

Several challenges were addressed during the development of this project:

  • Reliable Cat Detection: Developing a machine learning model that can accurately recognise cats under different lighting conditions and in different positions was already difficult. But making it highly accurate and run in real time was even more challenging.
  • RFID Reading Range: Balancing the need for early detection with the limitation of RFID reading distances required careful positioning and testing of the reader components.
  • Cat Training: Perhaps the most unpredictable challenge was teaching the cat to use the system consistently, which required patience and positive reinforcement techniques.

Future Improvements

Several potential enhancements are being considered for future iterations:

  • Integration with smart home systems via MQTT protocol
  • Weather-aware operation that adjusts door opening times based on outdoor conditions
  • Enhanced behavior analytics with predictive capabilities
  • Mobile app development for more convenient remote control
  • Miniaturization of components for a more streamlined installation