Cat Flap In-Out Monitor

Hi all,

I’m starting a project to create an in / out monitor for a cat flap. I’m looking at using either a magnetic reed or hall effect switch or possibly even a microswitch to toggle between in and out, and to show the ‘in’ ‘out’ status on an LCD display, with a button to override or reset the counter. Finally, powered by batteries (Alkaline, Lipo or NiCad) in order to keep the whole thing self contained and easy to install.

I need some advice on which board to use, to accommodate the various parts of the project outlined above, and I’ve been considering the following:

Pico, PiZero, or one of the Adafruit boards (not sure which) since I want to code the project in Python or MicroPython.

Any advice would be absolutely fantastic.

Kind regards
Dom

1 Like

Hi Dom,

the Pi-Zero is out of the game, it just eats your batteries and the extra computing power is not necessary. Any other board will do fine, they are all powerful enough for the purpose.

I am not sure if mechanical parts like microswitches are reliable enough, this really depends on your cat flap. With switches, you could create very low-power solutions using deep-sleep though, so this is definitely something to try.
As an alternaive, consider using two PIR sensors, one inside, one outside (maybe in addition to the switches). You will still need some logic to detect false events, e.g. the cat only going have way through the flap and then deciding to go back…

Regarding the LCD: if running on batteries, I would go for a simple e-paper display. Everything else will again eat up your batteries.

Hi,

Thank you so much for the suggestions, there are a few things I really did not consider, and I do like the idea of a proximity detector as opposed to a mechanical switch.
You have been really really helpful and thank you again, as I have some parts to source.

Dom

Just feel free to ask again. This is an interesting project with a lot of challenges. I would start with making it work. Afterwards you can think about optimizing, e.g. for battery use.

One other option that came to my mind was to skip the LCD and just send the state to some server. But this depends if you have something suitable. But again, this is something for later.

Yes, I agree. I’ll most likely breadboard it to start with so that I can write some code to detect either the switch / pir sensor change on a pin, and to output the result on a screen. I do already have a 2x16 lcd matrix display, so I’ll start with that, but aim to swap it out to the e-ink display as you suggested to save power. Its another good suggestion to use a server but I think for now I will go with a display. Thank you for the offer of further assistance, I’ll try to keep you posted with progress if you are interested.

1 Like

Update. Rummaging through my plethora of bits and bobs, I have the choice between a Pico W and an Arduino uno pro mini. I’ve gone with the Pico W to start with since it already has a micro usb port and the uno pro mini needs a ftdi cable which I have, but there are no pins on the board either.
As for the motion detection, this needs a little more consideration as just to complicate things we have 2 cats, so i need a way of detecting which direction the flap is moving to determine if its a cat entering or leaving. I’ve been looking at this IR Break Beam Sensor - 3mm LEDs | The Pi Hut sensor but it doesn’t solve the issue of direction detection. Maybe a hall effect sensor could be used here.

That is why I suggested two motion sensors: one on the inside, one on the outside. The timing of the events will tell you the direction. And if you only get one event, the cat probably decided to stay where she was after all. But this setup implies that you are monitoring the cats, not the flap.

Yes, I see that and certainly needs to be taken into a account. Some electronic bits have now arrived, so I can begin to experiment with a magnet and hall effect sensor and ir break beam sensor, so I will no doubt find more limitations and challenges which need to be overcome. Its going to be fun finding them out either way.