Everything for Electronics
Posted in: Nuts and Volts ( )

Arduino-Powered Jack-in-the-Box Toy

DESIGN GOALS
For this project, my goal was to develop a protected Jack-in-the-Box. In other words, I wanted a toy where you have to enter a special code or the box will not open.

Break-In Detection
1. Use a limit switch under the lid to detect if the lid is being opened without a code being entered
2. If the lid is opened like this, the box will sound an alarm using the built-in speaker, and the Jack will not come up

Code Requirement
1. Use three momentary push-buttons to accept a 6 digit code
2. When this code is entered correctly, the box will play a happy tune on the speaker, and the jack will popup
3. To close the box after opening it, press all three buttons simultaneously. The box will then start checking for new inputs, and the alarm will be re-enabled
4. When this code is entered incorrectly, the box will make a sad noise, and the jack will not come up

Construction
1. The box is designed in Alibre, then laser cut
2. An ordinary door hinge is used as the hinge for the box
3. A servo motor and attached arm are used to both open the box and to pop the Jack up
4. An internal speaker plays alarm sounds and tones when entering codes
5. A limit switch under the lid detect when the lid is opened or closed
6. A handle was created using staples – it is necessary to use as extra weight on the limit switch
7. The hinge, speaker, and switch are screwed directly into the laser cut acrylic using bolts and heat-molded threading that are designed to be melted right into holes in the acrylic

Software
1. The software is specifically designed to make it easy to change settings
2. It is even possible to change the passcode and the length of the passcode by only changing two constants
3. The software uses the pitches and servo libraries to control the servo and speaker respectively

HARDWARE USED
1. Socket Cap Screws: http://www.mcmaster.com/#91292a014/=6i7q7a
2. Threaded Heat Inserts: http://www.mcmaster.com/#94180a321/=6i7q7d
3. No-Mortise Fastinge Door Hinge: Available at most Hardware Stores
4. Limit Switch: http://www.radioshack.com/product/index.jsp?productId=2049718
5. Servo Motor: http://www.jameco.com
6. Speaker: http://www.jameco.com

[Source] JeremyBlum.com VIA Hack-a-Day

Comments