3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

How to make a runaway cookie box

How to make a runaway cookie box
Eat too many cookies? These are some guidelines for how you can add a few security features to an ordinary box of cookies - or at least have a fun toy.

The runaway cookie box will roll away when objects approach it and sound an alarm when it is picked up.

What you need for the craft side of things:
-empty cookie box
-wheels (4)
-Legos (axles, gears, basic)
-hot glue
-electrical tape
-popsicle sticks, colorful straws, googly eyes, or whatever you want to give your box some character

What you need for the computing side of things:
-Arduino
-hacked servo
-tilt sensor
-distance sensor
-speaker
-resistors (2x100K&, 1x100&) 
-breadboard
-wire
-wire strippers
-soldering iron
-solder

[This project was done for Olin College's Computing & Craft class, taught by Dr. Amon Millner.]
 
Remove these adsRemove these ads by Signing Up
 

Step 1The Circuitry

The Circuitry
During this step, you'll set up all the circuitry required for the project.

First, connect the Arduino's 5V power and ground pins to the bus strips of the breadboard.

Second, connect the tilt sensor to the breadboard. Connect the wires on one side to the power strip and the wires on the other side to a 100K& resistor going to ground as well as to digital ins on the Arduino (in this case I used 3 and 4).

Third, connect the three distance sensor wires: red to power, black to ground, and yellow to an analog in on the Arduino (in this case, I used A0).

Fourth, connect one of the speaker's wires to ground and the other to a 100& resistor connected to a PWM digital in on the Arduino (in this case, I used 5).

Last, connect one of the hacked servo's wires to ground and the other to another digital in (in this case I used 9).
« Previous StepDownload PDFView All StepsNext Step »
3 comments
Mar 2, 2011. 11:31 AMamonmillner says:
Nice work Schmegano! I was wondering where my girl scout cookies went.

I like how you've introduced one way to make this project and offered suggestions for possible directions others might take. I'd like to offer another possible direction - make your own tilt sensor.

You crafted your tilt sensor using the colorful straws, a balled up piece of foil, and paper clips (poking two paperclips through each end of the straw so that when the straw is tilted, the foil ball inside lands between the paperclips and completes the switch). Others could try different ways of making a tilt sensor - such as hanging a magnet near a reed switch and making the string swing the magnet away from the switch when tilted.


Mar 1, 2011. 8:52 PMkelseymh says:
Great project, and a nice writeup, too!

In the last step, you can make the YouTube URL an active hyperlink by using the "Link" icon in the editor (it's the globe with a little chain).

Also, you should be able to embed the video directly in the step, provided you click the little "Use old embed codes" box and don't check the "enhanced security" box on the YouTube page.

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
0
Followers
1
Author:schmegano