Introduction: Motion Sensor Cat Toy (endless Fun... Literally)

The Motion Sensor Cat Toy uses parts from an old VHS player and other odds and ends to make a cat toy that never stops as long as your cat wants to play! It also starts moving as soon as your cat in near. Big fun for your cat and big fun for you!

Step 1: What You Need

$0.00 Recycle fake fur, wood, integrated circuit board, old tripod, old power brick ,
old leg weights
$0.00 Voltage meter, microcontroller chip, and microcontroller board (my brother's stuff)
$5.99 Motor, capacitor, and wires from an old VHS player bought at Goodwill
$0.00 Motion sensor which requires 3.3-5 volts
(in our electrical stuff box at home; these go for about $8)
$0.00 Solder and soldering iron with fine tip (Dad's; always us goggles)
______
$5.99

Step 2: What Each Part Does

" Motion sensor: Detects motion from 20 feet away. When motion is sensed, a single bit output (electrical current) is created. This goes to the microcontroller chip.

" Microcontroller chip: When 5 volt message comes from the motion sensor, the microcontroller says turn on the motor for 5 seconds. My brother helped me with the code and we used his board to put the code on the microcontroller chip.

" Capacitor: This is between power and ground to smooth power to the microcontroller. The capacitor should be as close to the chip as possible.

" ET Tiny 25 chip: The chip holds the code. The code is the brains operating the motion sensor and motor based on electrical impulse.

" Voltage meter: The meter is used to measure how much DC voltage all the parts (motion sensor, motor, and resistor) take. If the voltage isn't correct, things burn up.

" Power brick: The power brick plugs into the wall and sends electricity to the unit (+ and  charge).

" Solder: The solder is fusible metal which connects wires and keeps the current flowing. I used a soldering iron to melt the solder on the VHS board to remove the capacitor. I used solder to attach the wire needed to make the circuit. Always us goggles.

Step 3: Steps to Make This Invention (1 Through 11)

1. Draw the design.
2. Check the voltage of the motion sensor, the microcontroller, and the motor.
3. Solder the microcontroller and solder it in place. (Use goggles when soldering.)
4. Solder the motion sensor output pin to the microcontroller.
5. Solder the microcontroller to the motor.
6. Create pseudo code, write the C code, then load the code on the microcontroller.
7. Solder the power bricks + and - ends to bring electrical power to the motor, motion
sensor, and microcontroller.
8. Build the tripod and wood structure for the moving parts.
9. Mount the parts.
10. Add a box around the motion sensor so it doesn't sense everything in a 20 foot radius.
Or, place the unit in a spot where people don't pass it a lot.
11. Plug in and call... Here kitty, kitty kitty! When the cat goes under the motion sensor, the
kitty toy spins.

Step 4: Step 6 More Info on the Code

Here is the pseudo code and commented C code:

Microcontroller pseudo code

Delay 42 seconds in the beginning (7, 6 second delays)
Port 4 (motor) is the output
Port 3 is the input (motion sensor)
If the motion sensor = 5 V, spin the motor for 12 seconds
Then turn it off

The C code

#include <avr\io.h> // include input and output instructions
#define F_CPU 1000000UL // processor speed is 1 MHz
#include <util\delay.h> // include delay function

int main(void)
{

_delay_ms(6000); // delay 6 seconds
_delay_ms(6000); // delay 6 seconds
_delay_ms(6000); // delay 6 seconds
_delay_ms(6000); // delay 6 seconds
_delay_ms(6000); // delay 6 seconds
_delay_ms(6000); // delay 6 seconds
_delay_ms(6000); // delay 6 seconds

DDRB |= (1 << 4); // define PORTB 4 as an output, rest inputs

while(1)
{
if (PINB & 0x08) // if motion is sensed on PORTB3
{
PORTB |= (1<<4); // turn motor on
_delay_ms(6000); // delay 6 seconds
_delay_ms(6000); // delay 6 seconds
PORTB = 0x00; // turn motor off
}
}
}

Step 5: Step 8 More Info on the Structure

I used an old tripod for the base, but you could use anything that would hold the parts. I later added Mom's leg weights since our cats could pull over the tripod.

You just have to play around with this, so it is a good idea to keep the arms and height of the invention adjustable.

In the picture, the fur on a string is on one arm of the unit and the motion sensor is on the other.

When the cat goes by, the motion sensor starts moving the toy. While the cat plays, the motion sensor keeps sensing the cat to move the toy. When the cat leaves, the motion sensor stops moving the toy.

After I mounted the parts, I played around with a box around the motion sensor and moved the motion sensor arm around to see where it worked the best to allow the cat to keep the motion sensor working while the cat was still playing.

My motion sensor covers a pretty large radius but yours may be smaller.

Step 6: Moonlight Having Fun!

Here is a picture of one of my cats in action. It is lots of fun to watch them across the room playing with their new toy!
This would be a great toy for someone w
ho is elderly and likes to watch their cat play but can't get around so well.

Step 7: See the Cat Sin Action!

Click a link to see how much fun the cats have!

This link shows how the motion sensor slows and starts the play toy. This is the latest video with the tripod weighted.

This link shows both cats in the action!

Epilog Challenge

Participated in the
Epilog Challenge