SECRET KNOCK BOX Kit Assembly Tutorial · We love to reuse extra servo cables as they’re great...

10
SECRET KNOCK BOX Kit Assembly Tutorial Version 2.0. July 2018 https://fabforgefive.com/secret-knock For Important Stuff The SECRET KNOCK BOX is a keepsake box that only opens when its owner taps their custom secret knock. The knock can be reprogrammed at any time. The box is powered by 3 AAA batteries, and uses an Arduino Pro Mini, a piezo pickup (knock detector), a sub micro servo (latch release), and custom 3D printed and laser-cut parts. To open the box Demonstrated in this video. Slide the power switch to the right. Listen for two buzzes. Now tap your secret knock on or near the circle on the bottom. If your knock is wrong, the book will buzz. If correct, the book will spring open. To set a new secret knock Open the book with the old knock. With the power on, push and hold the inside button. Tap your new knock. The box LED will blink the knock back to you, then save your new knock to memory for the next time you use the box. The Arduino will save your new knock into its EEPROM memory, where it will stay unless you change it again. The Arduino code (sketch) contains code from Secret-Knock Gumball Machine written by Steve Hoefer, used with permission. Steve’s Gumball Machine was the first Arduino project that my kids and I built, and was the gateway to many exciting family projects over the years. Thanks Steve for the inspiration! Parts List Laser-cut Box, 1/8” plywood (see file download link below) 3D Printed Base, Latch, Guard, and Keeper (see file download links below) Vibrating Mini Motor Disc 10mm diameter Digikey Part # 1597-1245-ND Arduino Pro Mini 328 - 3.3V/8MHz (many sources – Sparkfun, Adafruit, Arduino store) Piezo Disc Element 27mm diameter with wires (many sources – eBay, Banggood, Amazon) Micro Servo SG90 9g (many sources – Amazon, eBay, Tower Hobbies)

Transcript of SECRET KNOCK BOX Kit Assembly Tutorial · We love to reuse extra servo cables as they’re great...

Page 1: SECRET KNOCK BOX Kit Assembly Tutorial · We love to reuse extra servo cables as they’re great sources of wire. ... Vibrating Disk should buzz twice, then the Servo ... If these

SECRET KNOCK BOX Kit Assembly Tutorial

Version 2.0. July 2018

https://fabforgefive.com/secret-knock

For Important Stuff The SECRET KNOCK BOX is a keepsake box that only opens when its owner taps their custom secret

knock. The knock can be reprogrammed at any time. The box is powered by 3 AAA batteries, and uses

an Arduino Pro Mini, a piezo pickup (knock detector), a sub micro servo (latch release), and custom 3D

printed and laser-cut parts.

To open the box Demonstrated in this video. Slide the power switch to the right. Listen for two buzzes. Now tap your secret knock on or near the circle on the bottom. If your knock is wrong, the book will buzz. If correct, the book will spring open.

To set a new secret knock Open the book with the old knock. With the power on, push and hold the inside button. Tap your new knock. The box LED will blink the knock back to you, then save your new knock to memory for the next time you use the box. The Arduino will save your new knock into its EEPROM memory, where it will stay unless you change it again. The Arduino code (sketch) contains code from Secret-Knock Gumball Machine written by Steve Hoefer,

used with permission. Steve’s Gumball Machine was the first Arduino project that my kids and I built,

and was the gateway to many exciting family projects over the years. Thanks Steve for the inspiration!

Parts List Laser-cut Box, 1/8” plywood (see file download link below)

3D Printed Base, Latch, Guard, and Keeper (see file download links below)

Vibrating Mini Motor Disc 10mm diameter Digikey Part # 1597-1245-ND

Arduino Pro Mini 328 - 3.3V/8MHz (many sources – Sparkfun, Adafruit, Arduino store)

Piezo Disc Element 27mm diameter with wires (many sources – eBay, Banggood, Amazon)

Micro Servo SG90 9g (many sources – Amazon, eBay, Tower Hobbies)

Page 2: SECRET KNOCK BOX Kit Assembly Tutorial · We love to reuse extra servo cables as they’re great sources of wire. ... Vibrating Disk should buzz twice, then the Servo ... If these

Tactile Button Switch (6mm) Adafruit Part # 367

AAAx3 battery holder w/9v snaps Parts Express Part # 140-776

SPDT sub-mini Slide Switch 3 amp Adafruit Part # 805

Four pieces, 5” Stranded Wire, 26AWG. Color variety is helpful but not necessary Adafruit Part # 2006

OR pull apart the three wires from the extra servo cable in the kit, and use them with the

included black wire. We love to reuse extra servo cables as they’re great sources of wire.

Screw - #2-56 x 3/4 Pan Head McMaster-Carr Part # 90272A084

Screw - #2-56 x 1/4" Flat Head (6) McMaster-Carr Part # 90273a055

Screw - #2-56 x 3/8" Flat Head McMaster-Carr Part # 90273A065

Paper Clip - Large (1 ¾” – 2” long, Office Depot and many other sources)

Safety Pin - Extra Large (1 ½” – 2” long, Office Depot and many other sources)

Brass Sheet – 0.010” thick (many sources – K&S, eBay, Amazon), cut into two strips:

Small Brass Strip – 25mm x 3mm

Large Brass Strip – 30mm x 4mm

470K ohm resister, 1/4 watt (many sources – eBay, Amazon, Adafruit)

Complete kit (including 3D printed parts, Laser Cut box, and all parts listed above) can be purchased at

https://fabforgefive.com/store

Schematic

Page 3: SECRET KNOCK BOX Kit Assembly Tutorial · We love to reuse extra servo cables as they’re great sources of wire. ... Vibrating Disk should buzz twice, then the Servo ... If these

Downloadable Files • 3D Printed Parts and Laser Cut Parts https://www.thingiverse.com/thing:3020491

o Laser-cut Box Assembly SVG file

o 3D Printed Base STL file

o 3D Printed Latch STL file

o 3D Printed Guard STL file

o 3D Printed Keeper STL file

• Arduino sketch ino file (the Arduino code) via GitHub Secret_Knock_Treasure_Book_V2.ino

Build Instructions 1. Load the Secret Knock Box sketch onto the Arduino Pro Mini, using the Arduino IDE (see this tutorial for

help). NOTE: If you purchased a kit from Fab Forge Five, this has already been done for you.

2. Slide the Arduino Pro Mini into the Base. Note

the orientation of the Pro Mini pushbutton – it

goes on the bottom.

3. Slide the Large Brass Strip into the Base, then

bend over in the back as shown. This will be the

electrical ground connection.

4. Bend the Small Brass Strip to fit the Base as

shown and set in place. This will be the +4.5V

connection.

5. Clip off one pin of the Slide Switch, then insert

the switch in the Base slot as shown.

Page 4: SECRET KNOCK BOX Kit Assembly Tutorial · We love to reuse extra servo cables as they’re great sources of wire. ... Vibrating Disk should buzz twice, then the Servo ... If these

6. Bend over one Slide Switch pin and solder to

Small Brass Strip. Bend the other pin the

opposite direction and solder to a red wire.

This is the main power wire for the Arduino.

Solder the other end of the red wire to the RAW

pin of the Arduino. This is the raw power input

pin.

7. Cut a 2cm piece of black or brown wire, and

solder between the Large Brass Strip and the

GND pin of the Arduino.

8. Snap the AAAx3 Battery Holder into the Base,

and secure with two #2-56 x 1/4" Flat Head

screws.

9. Cut the Micro Servo cable to a length of 11cm.

Feed the cable through the hole in the Base,

then slide the Servo into Base as shown.

10. Solder the brown (or black) servo wire to the

Large Brass Strip. Solder the orange (or yellow)

servo wire to pin 11 of the Arduino. Solder the

red servo wire to the RAW pin of the Arduino.

Page 5: SECRET KNOCK BOX Kit Assembly Tutorial · We love to reuse extra servo cables as they’re great sources of wire. ... Vibrating Disk should buzz twice, then the Servo ... If these

11. Insert the Vibrating Mini Motor Disc into the

base. Solder the dark wire to the Large Brass

Strip, and the red wire to pin 12 of the Arduino.

12. Clip off two diagonally-opposite pins of the

Tactile Button Switch. Solder a 3cm wire to one

pin and an 8cm wire to the other pin. Insert the

wires into the two holes in the Base, then gently

press the Switch into the Base while pulling the

wires from behind.

13. Solder the short Button Switch wire to the Large

Brass Strip. Route and solder the long Button

Switch wire to pin 10 of the Arduino. This is the

program new knock button.

14. Solder the 470k ohm resistor across the red and

dark wire connectors on the Piezo Disc Element.

If this is difficult, you can place the resistor

anywhere it fits, if it’s connected across these

two signals.

Page 6: SECRET KNOCK BOX Kit Assembly Tutorial · We love to reuse extra servo cables as they’re great sources of wire. ... Vibrating Disk should buzz twice, then the Servo ... If these

15. Solder the ground (dark) wire from the Piezo

Disc to the Large Brass Strip. Route and solder

the red wire to pin A0 of the Arduino. This is the

knock input signal. Fold the Piezo Disc into its

space on the Base. It fits loose to allow it to

“hear” a knock.

16. Bend and trim the Safety Pin into the shape as

shown. Insert one end into the small hole in the

Base, then slide the Latch onto the other end

(the Latch has a small hole as well). Fasten the

Latch to the Base with the #2-56 x 3/4 Pan Head

screw. The screw goes through the middle of

the Safety Pin ring. Tighten the screw enough to

leave a 4mm space between the Latch and the

Base. The Latch should pivot freely on the

screw.

Page 7: SECRET KNOCK BOX Kit Assembly Tutorial · We love to reuse extra servo cables as they’re great sources of wire. ... Vibrating Disk should buzz twice, then the Servo ... If these

17. Insert 3 AAA batteries into the holder and turn

on the unit by sliding the Slide Switch to the

right. The Arduino LED should light up, the

Vibrating Disk should buzz twice, then the Servo

will position itself at the zero (box locked)

position. If these things don’t happen, check

your wiring carefully. Still not working? Check

the Troubleshooting section before going on to

the next step.

18. Turn off the power, then attach the Servo Horn

to the Servo as shown. In the photo, the Latch

is removed for clarity. Be sure to orient the

Horn as shown in the photo. This insures that

it’s in the right place to work properly without

binding the Servo. Use the Servo Horn screw to

mount the horn to the Servo.

19. You can now test the entire assembly before

you mount it into the Box. Power it on and tap

a knock on the Piezo Disc with your fingernail.

The default knock is “tap…tap tap” as shown in

the demo video. That knock should cause the

Servo to rotate against the Latch, pushing it

enough to release the Box lid. The Servo then

returns to it’s locked position to wait for

another knock.

20. Insert the entire assembly into the Box, and

fasten with a #2-56 x 1/4" Flat Head screw.

Page 8: SECRET KNOCK BOX Kit Assembly Tutorial · We love to reuse extra servo cables as they’re great sources of wire. ... Vibrating Disk should buzz twice, then the Servo ... If these

21. Place the Guard as shown and fasten from the

bottom of the box with the #2-56 x 3/8" Flat

Head screw. The screw goes through the Base

lug into the Guard. The Guard makes sure the

Servo Horn can rotate, and not get jammed by

the important stuff you put in the Box.

22. Fasten the Spline to the Box using two #2-56 x

1/4" Flat Head screws.

23. Bend the Large Paper Clip as shown and fasten

it to the Box with the Keeper. Use a #2-56 x

1/4" Flat Head screw. The Paper Clip acts as the

clasp for the Latch to grab onto. Adjust it as

needed by sliding it in the Keeper, until it

catches properly on the Latch when the Box is

closed.

Page 9: SECRET KNOCK BOX Kit Assembly Tutorial · We love to reuse extra servo cables as they’re great sources of wire. ... Vibrating Disk should buzz twice, then the Servo ... If these

24. Congratulations! Your Secret Knock Box is done. Follow the instructions below if you wish to program your own

custom knock. When you tap your knock, you can tap loudly almost anywhere on the Box. But tapping in the

circle on the end of the Box works best, since that’s where the Piezo Disc is.

To open the box Demonstrated in this video. Slide the power switch to the right. Listen for two buzzes. Now tap your secret knock on or near the circle on the bottom. The default knock is “tap…tap tap”. If your knock is wrong, the book will buzz. If correct, the book will spring open (the laser cut living hinge is nice and springy).

To set a new secret knock Open the book with the old knock. With the power on, push and hold the inside button. Tap your new knock. The box LED will blink the knock back to you, then save your new knock for the next time you use the box. The Arduino saves the knock into its EEPROM memory, where it will stay unless you change it again.

If you forget your knock, or if the batteries are dead Push a straightened paper clip into the secret hole in the side of the box and push gently. The latch will release.

Troubleshooting

I installed fresh batteries and turned on the Box. But nothing happens.

When the power is on, the power LED on the Arduino should be lit. If it’s not, the buttons on the battery holder

may not be contacting the brass strips. Remove the battery holder and bend the strips slightly. Replace the

holder and try again.

The Arduino power LED is lit, but the box doesn’t buzz. Or the Servo doesn’t move.

Check the wiring from the Vibrating Disk and the Servo. Are the wires firmly soldered to the Arduino?

The box isn’t responding to my knocks.

When you tap the box, the indicator LED on the Arduino should blink. You can see this LED through the small

hole to the left of the power switch. If this LED doesn’t blink when you tap the end of the box, check the

connections on the Piezo Disc (including the 470K ohm resistor). Without the resistor, the piezo signal is very

unpredictable. Also check to see that the Piezo Disc is nice and loose in it’s hole in the Base. This seems to help.

Page 10: SECRET KNOCK BOX Kit Assembly Tutorial · We love to reuse extra servo cables as they’re great sources of wire. ... Vibrating Disk should buzz twice, then the Servo ... If these

The Servo rotates when I tap my secret knock, but the box doesn’t unlatch.

Adjust the Catch that you fashioned with the paper clip. Try sliding it closer to the outside of the box.

The box won’t stay closed.

Adjust the Catch that you fashioned with the paper clip. Try sliding it closer to the inside of the box.

Still stumped? Email us at [email protected]

https://fabforgefive.com/