Automatic Cat Litter Box
An Automatic Self-Cleaning Litter Box. I utilize a motion sensor that is attached to the base of the litter box that once motion is detected the litter box will wait 5 minutes, and then rotate the Pod (top) of the litter box with a stepper motor. It then rotates to the original position.
Supplies
- Arduino Uno Microcontroller
- 1 - HC-SR501 PIR sensor
- 1 Stepper Motor 2A - 12V
- 1 - A4988 Stepper Motor Drive
- 9v battery with connecter for Arduino
- Materials to make frame
- Materials to make circular gear for motor
Create the Frame
I created the frame that the main litter pod rests on out of scrap plywood that I already had. I made a box (13x6x8 in). The top of the box had a cut-out of 10 inches so that the litter pod could rest into. This would also allow for the motor to rest against the litter pod.
Pod
For the actual litter pod I used scrap cement posting that I had already. The diameter was 12 inches and I cut a length of 10 inches. I then took extra cardboard and created a cap for one end, and a lip of 3 inches on the other. This would ensure no litter would fall out while rotating.
Filter
I then used a laser cutter to cut a piece of laminate wood of dimensions 12x8.5 inches. I also cut 1/4 in holes throughout half of the laminate so when inserted, the pod would rotate and clean litter would be separated from the dirty litter.
Make Circuit
**Image from Arduino Forums**
Along with this image I wired the PIR sensor to pin 13
Insert Electronics
I took the circuit I had produced and inserted them into the frame. I mounted the PIR sensor through a hole I had drilled in the top of the frame. The motor was placed with a the gear towards the end of the frame to rotate the back of the litter pod. The Arduino and cables along with the 9V battery were rested inside the pod so if adjustments need to be made I could easily remove and make them.
Code
I then wrote the code for the entire system. This is a very simple program that when motion is sensed, a timer of 5 minutes starts (to ensure the cat is not in the litter pod) then the motor rotates clockwise to rotate the pod. Once it reaches 800 steps, it will stop for 5 seconds then rotate 800 more steps in the opposite direction. Then the code loops. This will ultimately rotate the pod 1/2 of a full rotation, then back to the resting state.
**Code is Attached**