A giftbox where you can type select the initials of who it is to and who it is from using a potentiometer dial.
Step 1: Hookup and Code
I connected everything according to the picture.
- Potentiometer Dial
- LCD screen with SPI backpack
- External Battery
In the code I followed a finite state machine setup where once an action occurs, like the button being pressed a certain amount of times, the code goes to another section and waits there until the correct sequence occurs.
Step 2: 3D Printing
My base contained was two fold. The outer large container is for the gift to be place, and the smaller inner container is for the circuit to hide in. I 3D printed a special lid to house the screen and electronics along with adding a little bit of decoration. I attached the lid to the smaller inner container with hot glue, and burned holes so that the solenoid locking mechanism could slide and fit through.
Step 3: Soldering to a PerfBoard
If you want your design to be more durable and less likely to have wires fall out, I recommend soldering to a perfboard. Make sure you double check before soldering the connections and plan out the locations of things as shorts and unconnected bits can and will happen, especially when you're in a time crunch.
Step 4: Working Sequence
My design was working before soldering to the perfboard. Above are pictures of the sequence of the lcd screen.
- Hit button to unlock and place item
- replace lid and use potentiometer and button to select the initials of who the gift is to.
- Do the same above but for the initials of who it is from.
- Select a pass code to tell the receiver, clear it from screen, and wait until correct passcode is entered.