Introduction: Don't Touch the Package

Picture of Don't Touch the Package


If you touch the package, it will scream and run away--changing its course when it strikes an obstacle.

When you lift the gift tag, light strikes a photocell and operation commences.  Motors and a sound module are controlled by an Arduino (and Arduino Motor Shield).

Major components required are:

Motorized toy--Kid Galazy Morphibians Rover Remote Control Car; Amazon.com
Arduino Uno
Arduino Motor Shield
Recording Module--Radio Shack 276-1323
Photocell--Jameco 120299
Relay--Jameco 139977
DPDT switch
1K resistor
10K resistor
2n2222a transistor
1n4004 diode
(7) AA batteries
9 V battery
Battery holders
tape, screws, mounting hardware, wire, wire wrap wire, heat shrink tubing, solder
cardboard, wrapping paper
support structure (I printed mine with a 3d printer--it could be made from plywood)  http://www.thingiverse.com/thing:38370
 

Step 1:

Picture of

In concept, this is fairly simple.  Lift the tag and light strikes a photocell--triggering the action.  The sound module plays a prerecorded "Eeek" and the package backs up, turns and takes off.  The Arduino/Motor Shield monitors current going to the motors.  When the package strikes an object, one or both motors struggle to operate and draw an increased amount of current.  The increase in current lets the Arduino know it is time to play the "Eeek," then back up, turn and take off.  This continues until the master toggle switch is turned off.

Add "+" from the recording module to the top of the relay/1n4004 diode.

Step 2:

Picture of

Remove the passenger compartment of the car.

Step 3:

Picture of

Separate the bottom of the car from the top by removing the screws in the base.

Step 4:

Picture of

Cut the wires to the receiver module and save the module for a future project.

Step 5:

Picture of

Drill holes in the battery compartment and bring the motor wires through those holes.

Step 6:

Picture of

Solder extension wires to the motor wires.  I use heat shrinkable tubing to secure the connection.

Step 7:

Picture of

Take the printed "screaming base" (see Thingiverse -- or make one from plywood) and route the wires through the center.

Step 8:

Picture of

Secure the base to the wheel platform with screws.

Step 9:

Picture of

On the back side of the Arduino Motor shield is an area labeled "Vin Connect."  Cut the trace between the two "squares" with a knife.  This keeps the motor power and computer power separated.

Tape or screw the Arduio/Motor Shield to the base.  Fasten the motor wires to the Arduino Motor Shield.

Step 10:

Picture of

Add batteries and battery holders--I fastened them with Velcro tape.

Step 11:

Picture of

Record the "Eeek" on the sound module.  Remove the "play" button and solder two small wires (I use wire wrap wire) on the traces that are under the "play" button.  Using a breadboard, set up the relay, recording module and transistor.

Step 12:

Picture of

Using Velcro tape, add the sound module and associated circuitry to the car.

Step 13:

Picture of

Fasten the "package support" (side piece) to the base.

Step 14:

Picture of

Add the other side piece.

Step 15:

Picture of

Glue the "scream support" to the side pieces.

Step 16:

Picture of

Add the other support piece.

Step 17:

Picture of

Take a "U" shaped piece of cardboard--the exact width of the structure--and bend it into place.  The front and back should clear the ground by about 1/2 inch each.

Step 18:

Picture of

Punch a hole--this is the future location for the photocell.

Step 19:

Picture of

Cut and glue side pieces of cardboard to the box.  This will take quite a bit of shock, so it needs to be secure.

Step 20:

Picture of

Tape the sides for further strength.

Step 21:

Picture of

Wrap the package.  The gift tag must be the type that opens up (to expose the photocell).

Step 22:

Picture of

Solder the photocell, resistor, lead assembly together.

Step 23:

Picture of

Install the dpdt (double pole, double throw) switch in the path of the two power supplies.  I use two power supplies because the dips and spikes on the motor circuitry tends to cause problems if used for the Arduino.

Step 24:

Picture of

Punch a hole and install the switch.  This is the "on-off" switch for the device.

Step 25:

Picture of

Run the wires from the gift tag through the hole to the inside of the box. 

Step 26:

Picture of

Insert the wires from the photocell into the Arduino assembly.

Step 27:

Picture of

Install the software below. 

analogRead(2) values determine the trigger point for the photocell.
analogRead(0) and analogRead(1) values determine the current which will cause the Arduino to think the package has hit an obstacle.  If you run on carpet, the values may need to be higher.  If you run the motors faster, the value may need to be higher.

Note that the "startup current" on motors is greater than the "run" current--that's why there is a delay on forward before checking the current values.



int valm=0;
int valm1=0;
int trigger=0;
int triggerlock=0;
const int pwmA=3;
const int pwmB=11;
const int brakeA=9;
const int brakeB=8;
const int dirA=12;
const int dirB=13;
const int relay=7;

void setup() {


pinMode(relay, OUTPUT);


digitalWrite(relay, HIGH);

delay(500);//leave relay on .5 second--makes "eek" sound
digitalWrite(relay, LOW);
}

void loop() {
 
  trigger=analogRead(2);
  if(trigger<900 or triggerlock>0) {//light shining on sensor now or previously
   
    triggerlock=10;//don't check light again
  
   
    pinMode(dirA, OUTPUT);
pinMode(brakeA, OUTPUT);

pinMode(dirB, OUTPUT);
pinMode(brakeB, OUTPUT);

digitalWrite(dirA, HIGH);//forward A
digitalWrite(brakeA, LOW);//release brake A
analogWrite(pwmA, 150);//set speed A

digitalWrite(dirB, HIGH);//forward B motor
digitalWrite(brakeB, LOW);
analogWrite(pwmB, 150);//set speed B



valm=analogRead(0);
valm1=analogRead(1);
if(valm>520 or valm1>520) {
 
digitalWrite(relay, HIGH);//turn on "eek" sound
delay(100);
digitalWrite(relay, LOW);
digitalWrite(brakeA, HIGH);//stop motor A
digitalWrite(brakeB, HIGH);//stop Motor B

digitalWrite(dirA, LOW);//reverse A
digitalWrite(brakeA, LOW);//release brake A
analogWrite(pwmA, 150);//set speed A

digitalWrite(dirB, LOW);//reverse B
digitalWrite(brakeB, LOW);
analogWrite(pwmB, 150);//set speed B

delay(300);

digitalWrite(brakeA, HIGH);//stop one wheel

delay(400);
digitalWrite(brakeB, HIGH);//stop other wheel



//start both wheels forward
digitalWrite(dirA, HIGH);//forward A
digitalWrite(brakeA, LOW);//release brake A
analogWrite(pwmA, 150);//set speed A

digitalWrite(dirB, HIGH);//forward B
digitalWrite(brakeB, LOW);
analogWrite(pwmB, 150);//set speed B

delay(700);//get past startup current

}}}

Step 28:

Picture of

Make sure that all wires are connected and all batteries installed--and the switch is off.  Carefully pull the cardboard cover over the shell.

Set the package in place and turn the switch "on."  You should hear one "Eeek."  The package should remain still.  When someone lifts the gift tag, the package will take off; scream every time it hits an object, and continue running until caught and switched off.

Comments

OH SNAP! (author)2012-12-25

i dont think you have to cut the trace between the 2 power supplies-my motorshield came with a jumper, thought maybe i have a newer version. great job though! wish i had seen this before xmas!

MikeTheMaker (author)OH SNAP!2012-12-26

True--you don't have to cut the trace; the motor supply can be used to power the processor. When I tried it that way, the motor noise (and dips in the supply voltage) resulted in erratic operation. Maybe it could be filtered with a capacitor . . . .

jjmcgaffey (author)2012-12-21

LOL Penolopy Bulnick - me too, my immediate thought was to record a cat yowl (from me, not a cat!) instead of the Eeek.

agis68 (author)2012-12-20

well once i've done something similar but more scary. Were the era of suspicius mails with white dust and (or) bomb packages....so i wrapped a clock and i connected the starting switch wire with a touch switch on the wrapping paper.....you have to see all these scerified faces

MikeTheMaker (author)agis682012-12-20

Fun! Sad that we have to be so careful these days . .

agis68 (author)MikeTheMaker2012-12-21

yeap...shame!!!! ;(

Tomdf (author)2012-12-19

Ha, Mrigbsy you have the wackiest ideas. Love it!

MikeTheMaker (author)Tomdf2012-12-20

I'd like to say I'm thinking "outside the box," but this is inside . . .

sherrycayheyhey (author)2012-12-18

This is great!

AussieAnglerGal (author)2012-12-18

hahaha that would be very very funny to watch!

Penolopy Bulnick (author)2012-12-18

This is awesome and so hilarious! I just picture a crazy cat stuck in a box!

About This Instructable

20,853views

88favorites

License:

Bio: I am an author and a maker. My current project is Santa's Shop. I'm working on a science fiction type book--more later. @EngineerRigsby
More by MikeTheMaker:Santa's Shop 2017, the TrainSnowflake Gear WreathHappy Gear Table
Add instructable to: