My neighbor had a little problem with his cat. It want's to go out and back inside too frequently. Usually he opens just his kitchen window and let's the cat in/out. Usually the cat stays only short periods outside and want's soon to come back inside. And then again out and back in. Okay, he could just let the window open, but here in Finland it can be easily -30 C (-22 F) in winter, so this is not a good solution.
We decided to build a microcontroller to the window to open and close the window automatically. Arduino controls a strong servo motor, which moves the window. It has three proximity sensors to sense where the is cat is.
Step 1: Parts list
1 pc suitable power adaptor to juice the Arduino (input voltage 7-12V dc)
1 pc Arduino microcontroller (or equivalent *duino)
1 pc strong servo motor to move the window. I used Towerpro MG995 Metal Servo with Gears (10kg Torque).
3 pc Pololu 1134 carrier board with Sharp GP2Y0D810Z0F Digital distance sensor 10 cm
1 pc "Third hand" to hold the sensors
1 pc cat (operator)
small window hinge
some metal parts to fix the servo to the window frame, screws, etc
Solder & soldering iron
Computer & usb cable to program the Arduino
Step 2: Mechanics
We made adjustable arm from copper rod. Don't fix the servo arm with screw until you have first driven the servo to zero (closed) position with the control program. The good thing in this is that the mechanics are easily adjustable.
We chose Towerpro servo with metal gears to get long life for the installation. It does move the window easily enough but it can not slice the cat (nor anything else). The closing speed is set to very slow.
There are dfx files of the servo bracket and actuator arm included.
Step 3: Sensor placement
Step 4: Control center
Step 5: The program
The program is pretty well documented. We added delays for detection, because the window opened itself occasionally.
The program defaults that the window is closed at the beginning. If not, it closes it first. Please check that the servo movements are okay before fixing the servo arm!
Step 6: Connections
Sensors are connected to following Arduino pins:
Pin 2 - Inside looking sensor
Pin 4 - Sensor located in the window opening
Pin 6 - Sensor looking outside
Pin 10 - Servo motors control wire
Pin 13 - Led that is on when the window is on move.
We have thought also to include temperature sensors both inside and outside. This would be a convenient way to get intelligent ventilation in summer... ...possibilities are limitless!