Intro: Lockable Gift Box
A lockable gift box where you can exchange gifts. The box locks with solenoids. A separate card communicates with the box over RF and has an LCD which displays who the gift is to and who it is from, and has buttons to enter secret and public codes. Enter your secret code to unlock the box and put an item inside, then enter the one digit public code of who the gift is for. Now, only who the gift is for is able to unlock the box.
Step 1: The Circuits
- 2 breadboards
- 2 Arduino Unos
- 2 nrf24l01 with backpack
- lcd screen with 4 pin spi backpack (plug into 5V and ground, the SCL and SDA pins to the corresponding pins on the arduino)
- 5 pushbuttons
- 7 resistors of reasonable values (hundreds of ohms)
- 2 transistors
- 2 solenoids
- 2 diodes
Step 2: The Code
button_client.ino - code for the card with buttons and lcd
- In this file, I created a finite state machine for sending the unlock signal to the nrf chip, checking if the code is correct, and displaying on the lcd.
- I also store the private and public codes in this file for my roommates, so feel free to change the codes and names.
led_server.ino - code for unlocking the box
- In this file, the code waits for the card code to send the signal to unlock the box, which retracts the solenoids and unlocks the box.
Step 3: Making the Box & Card
- Make 2 holes in in the lid and sides of your box that align
- Secure the two solenoids in the holes of the box.
- Make another hole near the bottom of the side of the box in order to fit the power cable
- Place circuit inside and hookup solenoids and power supply
- Place cardboard over circuit to protect circuit from items placed inside.
- Secure other circuit, lcd, and buttons to the card cardboard and hookup to power supply.
- I added a clipboard with paper to the card in order to write new messages.
- Decorate your box!