Build a cat litter box fan with Arduino

 by jpayne6
Featured
IMG_0485.JPG
A hideaway cat litter box is a great way to make your apartment look like a residence for adults instead of crazy cat ladies. A hidden litter box in a cabinet, under a sink, or built in to some other furniture does a lot for appearances, but what about the smell? Here's how you can exploit the power of baking soda and embedded computers to keep your apartment fresh-smelling without disturbing your cat during his or her "quiet time."

What you'll need:
An Arduino-compatible embedded microcontroller (I used the Kameduino and Chibiduino from Brown Dog Gadgets: http://www.browndoggadgets.com/store/arduinocompatible/) and the Arduino IDE from http://arduino.cc/en/Main/Software
A 6-12 volt wall wart, or a 9 volt battery
A DC case fan, 80mm or so, 5-12 volts
A TIP120 "Darlington" NPN transistor (available at your local components drawer)
Three resistors - 220 ohm and two 1000 ohm
A "matched set" of an IR emitter and IR phototransistor (I got mine from Sparkfun: http://www.sparkfun.com/products/241)
A box of baking soda, ideally the "fridge and freezer" kind with the ventilation panels on the side
Some "poster tack" sticky mounting putty
Some rubber bands

You'll need a soldering iron and some solder. A solderless breadboard is a great tool for prototyping circuits without making permanent connections. Let's get started.
 
Remove these adsRemove these ads by Signing Up

Step 1: Prototype the Circuit

IMG_0460.JPG
IMG_0462.JPG
IMG_0463.JPG
The theory of operation is simple - when your cat enters his or her litter box hideaway, he'll trip a simple breakbeam sensor and a timer will start, giving your cat enough time to do his "business." After the timer counts down three minutes, a fan will start and run for another three minutes, pushing air through the ventilated sides of the baking soda box and trapping les mal odeurs.

It helps to breadboard the circuit, first. A Fritzing mockup of the circuit is provided.  If you bought your IR emitter and phototransistor from Sparkfun, then it may not be obvious which is which; try plugging them into 5 volt DC power (from your Arduino, perhaps) in series with the 1k resistor and viewing them through a digital camera (such as your cell phone.) While IR is invisible to the unaided human eye, digital cameras can see it quite handily particularly if they are poorly filtered (as most are.) The IR LED is the one that lights up with a purple color. The phototransistor will not light up at all. Remember that an LED works only in one direction; with the anode connected to power and the cathode to ground. Typically, the long lead is the anode.

In this setup, three pins of the Arduino are used. Pin 3 provides power to the LED. Pin 2, as an input, detectes the presence or absence of the IR beam. Pin 5 supplies current to the "base" of the TIP120, which allows current to flow from the "collector" to the "emitter" and activating the fan's motor. Resistors in series with the LED and TIP120 prevent too much current from flowing through the delicate microprocessor. The resistor and the phototransistor form a voltage divider which will input to the Arduino in the presence of IR light.
eXtremeSomething says: Jul 9, 2012. 5:15 AM
5 stars for originality,
jessyratfink says: Jun 11, 2012. 9:41 AM
Haha, awesome! Does your cat open the cabinet to get in or do you keep it open for him?
jpayne6 (author) in reply to jessyratfinkJun 11, 2012. 10:35 AM
There's a little prop to hold the cabinet door open - an unsharpened pencil cemented into place with epoxy putty. The rubber eraser end keeps it from banging and gouging the wood.
jessyratfink in reply to jpayne6Jun 11, 2012. 11:11 AM
Ah! Very smart. I was wondering about the banging. My cats like to go in the kitchen cabinets and it is always a very loud affair. :P
JoshuaZimmerman says: Jun 10, 2012. 8:14 PM
What a lucky kitty!
Pro

Get More Out of Instructables

Already have an Account?

close

PDF Downloads
As a Pro member, you will gain access to download any Instructable in the PDF format. You also have the ability to customize your PDF download.

Upgrade to Pro today!