So I decided to create a Halloween themed prank where a pencil cup mysteriously moves by itself or even flies off of a table next to an unsuspecting co-worker. Muwuahahahahaha!
The brawn of this proejct is pretty simple. You have a 90 degree angle bracket, which you mount to the underside of the table or workbench. Then you have the gearmotor spinning a 3" channel with VERY strong 1' magnets on either side of the channel. In this project I use eight magnets, but you can adjust these depending on the thickness of the table you're going through.
Then on the bottom of your pencil cup you have some more magnets to increase the affect. What I've found that works pretty well is to have one group of magnets the south side facing out, and then the other side having the the north side of the magnets facing out. What that does is if you set the pencil cup on the table just beyond the magnets, once the motor/channel assembly spins it will pull the cup with the magnets on the bottom. Then as the motor/channel/magnet assembly spins around it pushes the pencil cup and winds up throwing it off the table.
The brains of the operation are mounted to the underside of the table and housed within a channel bracket. We have a motion sensor which is connected to an Arduino Uno and we're watching for when somebody comes within about three feet of the sensor. Once they come within three feet it will start a timer and after a few seconds it will spin the motor which will throw the pencil cup. The motor is driven by this really simple circuit which is comprised mostly of a transistor which also has a diode and resistor in there. This is a great way to drive a motor when you only need to drive a single motor in a single direction. The battery is also housed within the channel bracket.
Let's just say, this project in action did not disappoint!
(ServoCity.com Parts Only)