When you flip a switch, the coffin lid opens and a smiling red eyed ghost arises. The ghost flings some candy, pushes the switch back and returns to rest. Then, the coffin lid closes.

Step 1:

Major parts include:

4.5 rpm motor  #155821 Jameco.com
1.8 rpm motor  #176050 Jameco.com
Two shaft couplers  #162270 Jameco.com
Servo motor #358635 Jameco.com
Arduino microcontroller  #2121105 Jameco.com
Four limit switches  #275-0016 Radio Shack
One Toggle Switch  #275-652 Radio Shack
Three diodes  1N4004
Two Red LED's
Five White LED's

Wood, wire, screws
3 feet aluminum trim channel for 1/4" plywood (or something else stiff for the ghost spine)

If you choose to build without the "candy flinging arm," you can eliminate the microcontroller and servo motor (everything to the left and above the red line on the schematic).

Step 2:

Using 1" x 2" wood, assemble the base.  Top and bottom pieces are 18" long.  The widest spot is 24" wide. Use a piece of 1/4 inch wood rod and glue to attach the joint between the upper and lower pieces.

Step 3:

Add 11 1/2 inch upright pieces (using wood screws and glue) to form the shell of the box.

Step 4:

Install a cross board to support the motor, 7 1/2 inches from the end.

Step 5:

Mount the motor on the cross board.

Step 6:

Drill two 3/32 inch holes in the coupling shaft and create threads for 4-40 screws with a tap.

Note that I used a yardstick for the ghost spine. This worked for a while, until (during testing) the yardstick failed to contact a limit switch and the torque from the motor split the yardstick into pieces. I suggest using some sort of aluminum channel or angle for the upright piece (I used trim channel).

Attach the shaft coupler to the spine.

Step 7:

Cut a 12 inch long section from a yardstick. Attach a piece of aluminum angle in the center and drill the angle to bolt to the "spine" of the ghost. At the end of this arm, using double sided tape, attach a servo motor.

Step 8:

Attach this arm to the spine. (Remember, I started with a wood spine and wound up with an aluminum one--I strongly recommend aluminum).

Step 9:

Solder the LED's together (as shown in the schematic), then insert them in a 6" diameter foam ball. Push the end of a yardstick into the ball as a "neck." Glue (white glue) the stick to the foam ball. I used the wood neck even when I changed to an aluminum spine--wasn't sure how to glue aluminum to foam.

Step 10:

Take an 18 inch by 6 1/2 inch (sloping at the sides) piece of 1/4 inch plywood and mount the DPDT switch in the center close to the edge.

Step 11:

25 inches from the bottom, place another cross board.  On this board, mount one of the limit switches (in the center).

Step 12:

Mount a "switch pusher" to the spine at the right place to operate the toggle switch.

Step 13:

Create another assembly using a 21" long piece of yard stick and the 4.5 rpm motor.  This will be the lid lifter.

Step 14:

Because the yardstick is perpendicular to the base (and the motor support board is not--it is mounted to the angled side boards), the lower limit switch for the lid lifter can be mounted to the motor support board.

When working with the limit switches, I had to slightly enlarge the switch's mounting holes with a drill bit as I could not locate screws with a small enough diameter to work.

Step 15:

Mount the upper limit switch at a point that prevents the yardstick from standing straight up.

Step 16:

Cut two pieces of wood about two inches long and mount the roller type limit switch to one side.  Run a rubber band through the roller ball and over to a screw on the second piece of wood.  By adjusting the tension and position of the rubber band (by means of screw placement and switch mounting), you can control when the switch (S3, close delay) activates.

This is an important switch in that it prevents the lid from closing until the ghost is almost at rest--but allows the lid motor to operate before the lower ghost switch disables all power.

Step 17:

Wire things together and run a test.

When power is applied (by flipping the DPDT switch), the ghost motor is energized and the ghost begins to rise.  Power flows through D2, the lid motor and S1 causing the lid arm to rise quickly.  When the lid arm reaches the upper position, S1 opens and stops power flow through the lid motor.  The ghost motor continues moving the ghost upward (the LED's on the ghost head are forward biased and on).  When the ghost spine contacts the DPDT switch and throws it, power is reversed and the ghost motor starts to lower the ghost.  The LED's are back biased and turn off.  Although power could get through D1, the lid motor and S2, it can't get through the still open contact of S3 (close delay switch).  When the ghost spine is mostly reclined, power passes through D1, the lid motor, S2 and S3 and the lid is lowered.  S2 opens when the lid lever has reached its lower limit.  Shortly after that, S4 opens and power to the ghost motor is removed.

Step 18:

Take a 7 inch long piece of 1/4" wood rod and wire it to the servo motor horn.

Step 19:

Drill a hole and attach a small plastic cup piece or container to the end of the arm.

Step 20: Code

Mount the Arduino and wire it as indicated on the schematic.

Code for the Arduino is:

#include <Servo.h>
Servo myservo;int valm=0;
void setup (){myservo.attach(5);
}void loop ()
valm=analogRead(0);if (valm>800) {
myservo.write(85);delay (1000);
myservo.write(80);delay (1000);
myservo.write(75);delay (1000);
myservo.write(70);delay (1000);
myservo.write(65);delay (1000);
myservo.write(60);delay (1000);
myservo.write(55);delay (1000);
myservo.write(50);delay (1000);
myservo.write(45);delay (1000);
myservo.write(40);delay (1000);
myservo.write(35);delay (1000);
myservo.write(30);delay (1000);
myservo.write(25);delay (1500);
myservo.write(20);delay (1500);
myservo.write(15);delay (1500);
myservo.write(10);delay (1500);
myservo.write(5);delay (1500);
myservo.write(0);delay (1500);

myservo.write(90);delay (30000);
}else {
  delay (1000);}

The arm should work as shown in the movie.

Step 21:

Build a coffin "skin" of cardboard and paint it black.

The cardboard "lid" to the coffin is attached with clear packaging tape.  This makes a simple low friction hinge.

Step 22:

Take about a yard of flimsy white cloth and drape it over the structure, trying to stay out of the way of wires and switches.

Load the candy "hand," flip the switch and watch it go.
AHHH HAHAHAHAH. the videos the best!
i love this cos everyone is waiting for the ghost to reach its furthest travel before throwing the sweets but it does it before , so the surprise element , and i love your whole demeanor before , quality
Is this setup like the Useless Machine? It is pretty sweet! It's creepy because it goes so slow. I feel like, at any moment, the ghost will just fly at me.
It is like a large Useless Machine--but it throws candy, so that makes it useful?
I don't think any Useless Machine is really useless. Yours definitely isn't! When anything involves candy, there is no possibility for uselessness.

About This Instructable




Bio: I am an author and a maker. Current projects include Santa's Shop and Little Friend (ultracapacitor powered robot) on hackaday.io. I'm working ... More »
More by MikeTheMaker:Robot Servo With Idle Horn Servo Bracket Cabinet Light 
Add instructable to: