Blog Home

This DIY pet door helps keep a dog out of the cat’s litter box

Arduino TeamApril 19th, 2024

Science Buddies had a problem: their tiny little pug loves eating their cat’s poop. Because the pug is smaller than the cat, they couldn’t simply put the litter box behind a tiny cat door. So they came up with a more sophisticated solution: a motorized door triggered by a magnetic collar.

Riley the pug’s responses to poop access prevention are awfully pugnacious, but she is also pretty skittish. Science Buddies surmised that a cardboard door would be enough to stop her. But that would also stop Trouble the cat, so the door needed to remain open for Trouble and only close when Riley tried to enter the area with the litter box. After experimenting with a few different solutions, Science Buddies landed on servo-actuated cardboard doors that close in the presence of a strong magnetic field.

That magnetic field comes from a permanent magnet dangling from Riley’s collar. An Arduino UNO Rev3 board detects that magnet using several Reed switches arranged along the bottom edge of the door frame. When the magnet causes the Reed switches to close, the Arduino knows that Riley is trying to get to the cat poop. In then closes two cardboard doors using small hobby servo motors.

It took some tinkering to position the Reed switches in a way that they’d trigger consistently, but Science Buddies found a reliable setup in the end. Now whenever Riley attempts to get to the litter box, the cardboard doors slam in her adorable pug snoot and she abandons her quest.

Boards:Uno
Categories:Arduino