My sneaky cat can open all doors of the apartment, even the fridge door. No meat is safe any more. To prevent that I built a cat repeller using an Atmel ATmega328P Arduino Nano 3.0 board: * a HC-SR501 PIR motion detector first checks if the cat is nearby (or any other movement happened) * then an E18-D80NK IR range detector verifies if the cat is in front of the fridge (it's pawn is present at the corner of the fridge's door) * if this is the case 24-25 kHz PWM signals will generate an ultrasound using a piezoelectric diaphragm, encouraging the cat to leave the premisses * if it still opens the fridge, a switch is released, and a human audible alarm will sound until it is closed The firmware is available on [[https://git.cuvoodoo.info/fridge-cat-repeller/|git]], with connection information. The device is placed in front of the fridge and is battery powered using 3xAAA batteries and a 5V boots regulator. This last only around two days before the batteries need to be recharged. Why does a 24-25 kHz sound annoy the cat? There is no psych-acoustic secret behind it. It's just a loud ultra-sound (> 20 kHz) in a range the cat can hear, but not humans can't. Else it would annoy us too. | {{cat_repeller:motion.jpg?300}} | {{cat_repeller:range.jpg?200}} | {{cat_repeller:piezo.jpg?300}} | | PIR motion detector | IR range sensor | piezoelectric element | | {{cat_repeller:setup.jpg?500}} | {{cat_repeller:installation.jpg?300}} | | all elements connected | final installation |