close-circle
Close
0%
0%

Lock Box

This box can only be opened after correctly answering the questions that it was programmed with.

Similar projects worth following
close
These boxes were created initially for my wedding to entertain guests, but also later used as part of a scavenger hunt. It has a simple interface and was designed to be inexpensive (total BOM cost was $25.40) since I needed to make 12 of them. Questions are provided on question cards as either multiple choice or numbers, and the answers can be selected via the keypad interface using a small 16x2 character LCD display.

My wife and I wanted to create a fun activity for guests to do at our wedding that involved some sort of interaction with other people at their tables. I came up with the idea of having a lockbox that required answering trivia questions in order to open it. I think the result turned out pretty well :)

Here is the wedding footage:

Here is a demo of me using the Lock Box:

  • 1 × Vaultz Pencil Box
  • 1 × Towerpro SG90 9g Micro Mini Servo
  • 1 × 1602 16x2 Character LCD Display
  • 1 × For RBBB: RBBB PCB RBBB = Really Bare Bones Board
  • 1 × For RBBB: Atmega MCU

View all 21 components

  • Putting It All Together

    Nathan Peterson10/21/2015 at 07:29 0 comments

    Soldering 12 boxes was a lot more work than I anticipated. 5 of my friends were helping, and it still took us quite a while. Here is the aftermath of one of our soldering sessions:

    Here are the finished 12 boxes (my wife did a great job decorating them with her vinyl cutting machine):

    A friend taking inventory and setting them up the night before the wedding:

    My wife made these cool question cards:

    Here is the centerpiece for one of the tables at the wedding:

    The two tall vases are filled with oil and colored water. They essentially turn into DIY lava lamps when you drop alka-seltzer tablets in them, so one of the prizes in the box was alka-seltzer tablets. The other prize was a token to redeem a Hawaiian Lei for one of the dances later, which resulted in us receiving all of the Leis:

    Here is the Lock Box Wedding footage:

    Here is a demo of the lockbox:

  • The Interface

    Nathan Peterson10/21/2015 at 06:15 0 comments

    I first tried to create a touch interface, but as it turns out, that is only easy if your project is connected to ground, but since this project uses batteries, it does not have a ground, and thus it is much more complicated. Advanced circuitry would be required, which would not only increase the complexity of the design, but also the cost. The cheapest buttons I could find are those PCB tactile buttons (7 cents). I drilled some holes in the face of the box, pushed them in, and soldered them.

    My wife added some stickers using her vinyl cutting machine. I tried super gluing these buttons in place at one point, but that was a really bad idea because the glue ended up seeping into the buttons and causing them to stop working. That was actually a disaster. I had to stay up late the night before my wedding and replace all of the tact buttons because I had just glued them the night before the wedding. (I swear I will never glue a tact button again!) Anyway so these are just held into place via friction, and that actually worked just fine. No glue necessary.

    Here are the LCD displays that I got for $2.10 a piece:

    I drilled 4 screw holes and mounted the display inside the box. My wife created this nice moustache sticker to make it look classy:

  • The Microcontroller

    Nathan Peterson10/21/2015 at 03:46 0 comments

    I looked around to try to find the cheapest option for an Arduino microcontroller. I found one called RBBB (Really Bare Bones Board). I figured out that if I bought the PCBs and components separately, I would end up spending $7.24 per lock box.

    I omitted some unnecessary parts of RBBB to save cost, flashed the bootloader myself, and wired it directly to the back of the LCD module like so. Also, it's hard to see in the photo, but I had to add small piece of protoboard to help with some of the wiring, and also to add a trimmer to adjust the LCD backlight.

  • The Locking Mechanism

    Nathan Peterson10/21/2015 at 03:10 0 comments

    The most important part of the lockbox is, of course, the locking mechanism. I thought of using a solenoid like this one, but they are too expensive for the number of boxes that I needed to make.

    I tried googling for some ideas for a locking mechanism, and came across a reverse geocaching box which was invented by Mikal Hart (whom I didn't know at the time, but I later became friends with coincidentally for unrelated reasons). He used a hobby servo. I found some cheap servos on alibaba for $2.45 each.

    These are the worst Chinese knockoff servos ever. Strangely they don't actually function like normal servos. They are either at 0 degrees, or 180 degrees. No in-between. That's all I needed anyway, and they were super cheap, so I'm not complaining.

    I ended up going with this cool see-through pencil box by vaultz because:

    A) It looks nice.

    B) I like the idea of being able to see whats going on inside while trying to open it.

    C) It has a spring based latch mechanism that can be moved to the inside of the box and controlled by the servo (one of my friend's ideas).

    This box was actually the most expensive item on the BOM clocking in at $9.99!

    Here is a picture of the locking mechanism. The latch was removed and placed on the inside of the box. The servo was superglued on the inside of the box. An electrical wire was used to connect the horn of the servo to the latch to pull it open. When servo rotates back 180 degrees, the spring inside the latch pulls the latch closed.


View all 4 project logs

Enjoy this project?

Share

Discussions

pearce.herchenrader wrote 10/27/2015 at 19:43 point

Can you explain how the answer and correct_answer tables work in your code? I don't quite understand the logic behind how you set it up.

  Are you sure? yes | no

Nathan Peterson wrote 10/27/2015 at 22:25 point

There were 10 tables total at the wedding. Each table had different questions, but I included all of the answers to the questions for all of the tables in each lock box so that I could use the same code in all of them. The only difference between the different lock boxes was that the global variable "table" was read from EEPROM, which is non-volatile memory. That way I could set the table number on the fly on any given box by holding down a secret button combination during poweron (see line 148 and also update_table()), and it would save that information even when powered off.

The number of questions varied between 9 and 11 depending on the table. So the 2d arrays are 10x11 (10 tables x 11 questions max). The answer array contains the answers that the user chooses, which may or may not be correct. The answer_correct array contains the correct answers. When both arrays contain the same data, the box will unlock (see check_results()).

The isLetter array specifies if the answer should be displayed as a letter (multiple choice) or number. The maximum array specifies the highest value of the answer. When selecting the answer, it will wrap around back to zero (or "A" if letter) after going past the max value.

  Are you sure? yes | no

crazzygorilla wrote 10/22/2015 at 18:34 point

i love this idea! is there any way you could shear your code for the microcontroller?

  Are you sure? yes | no

davedarko wrote 10/20/2015 at 08:17 point

I like the LCD case!

  Are you sure? yes | no

davedarko wrote 10/21/2015 at 07:20 point

correction, nice sticker, thought it was an aluminium case!

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates