Phone Coffer
Change from: Alissahuang
I'm addicted to my phone, which I can not focus on my homework. Every day when I go home, I play with my phone first, then about 10 p.m. I started my homework, which is too late. So every day I went to bed at 2 a.m., causing me exhausted. Which I decide to make a phone coffer, when every day I went home I need to put my phone into the coffer, and until I finish my homework, I can go ask my mom for the password, and take my phone out. My mom will sometimes change the password to prevent me from taking my phone out before I finish my homework. I add LEDs to the original design because without the LEDs, my mom will not know if I hand in my phone or not, which she needs to first enter the password, open the coffer and check is my phone inside or not, which is too annoying. So I add the LEDs which my mom can see from the color of the LED knowing if I did turn in my phone or not. And this can also help me to focus more on my homework and go to bed early.
Prepare the Materials
- Arduino Leonardo (Arduino)
- Arduino Breadboard (Amazon)
- Matrix Keypad 4x4 (Amazon)
- Micro Arduino Servo Motor SG90 (Amazon)
- LCD Display Screen Blue 16x2 (Amazon)
- Male to Male Breadboard Jump Wires (Amazon)
- Male to Female Breadboard Jump Wires (Amazon)
- USB Cable for Arduino Leonardo (Amazon)
- Charger
- Switch Push Button for Arduino (Amazon)
- LED - two different colors (Amazon)
- 100-ohm Resistor Kits (SpikenzieLabs)
- 1K-ohm Resistor Kits (Amazon)
- Paper Tape
- Hot Glue Gun
- Box Cutter
- Empty Box
- Corrugated Board
- Screw + Screwdriver
- Poster Paper for Decoration
Code
Download Keypad Library for Arduino
After downloading "Keypad Library for Arduino", go back to your Arduino code page, click "sketch" -> "Include Library" -> "Add .ZIP Library..." -> select "Keypad Library for Arduino" you just download, then the will turn into orange/red color, which means you are doing correctly.
You can first verify the code, to check if there is any wrong with your code.
If there is no problem, you can set up your own password for the lock.
The Circuit
- Plug in all the wires into the Arduino Breadboard following the circuit picture on top.
- Remember to plug the 5V on the Arduino Leonardo into the positive part of the breadboard, and the GND on the Arduino Leonardo into the negative part of the breadboard.
- LCD must be connected with the right order, otherwise, it won't work, from the top of the LCD, the first hole is for the negative part of the breadboard, the second hole is for the positive part of the breadboard, the third hole is for the SDA on the Arduino Leonardo, and the fourth hole which is the last hole is for the SCL on the Arduino Leonardo.
- A-pin 1 is for the push button, it must connect with the 1K-ohm resistor to work. A-pin 2 and 3 are for the LEDs, it must connect with the 100-ohm resistor to work.
- D-pin 4 is for the servo, it must be the white wire on the servo to connect the D-pin, neither red nor black wire will work, because red wire on the servo is for the positive part of the breadboard, and the black wire on the servo is for the negative part of the breadboard.
- D-pin 3,5,6,7 is for the right four holes of the keypad, and D-pin 8,9,10,11 is for the left four holes of the keypad, orders are important, or else it won't work.
Assemble the Components
- Planning!!!! Very Important, or else your circuit might not fit in the box.
- Making holes for LEDs, LCD and keypad to come out, because they need to be on the exterior of the coffer. (If you worry that the LCD will fall off, you can use the screw to make it tight on the box.)\
- Also, make holes on the side of the box, for you to put in your phone and for the USB cable to connect the Arduino Leonardo and the charger.
- Cut a door on the box for you to take out your phone, and remember to make a knob so that you can easily open the door. (You can use the screw to make a knob.)
- Stick the Arduino Leonardo, breadboard, and other circuits on to the box. Make sure that the wires are long enough, don't pull the wires too hard, it might cause poor contact either with the breadboard or the Arduino Leonardo.
- Stick the wires together tightly using paper tape, otherwise, it might fall apart.
- Start making the track for the phone to fall, remember to make a hole on nearly the bottom of the track for the push button, so when the phone falls on to the track, and it falls to the end, it will push the button and stay on the button, and the LED will change the color from green to red, until you take the phone out, the LED will change back to green. (If you worry that your phone might go off track, you can use a block of wood to guide your phone on to the right track that you want.)
- Make sure that your servo is stick near to the door, then you can start making your own latch that your servo can stuck tightly with the latch, which when you enter the wrong password you can not open the door.
- After finish doing all those steps, you can start to play your product and see if it works, if you succeed, you can then start decorating your phone coffer!
How to Operate
- Put your phone into the coffer.
- LED turns from green to red, showing there is a phone inside the coffer.
- If you want to take out the phone, you need to enter the correct password, if you enter the wrong password, the LCD will appears "Ha! It's Locked", then you need to try again, if you get the correct password, the LCD will appear "~~~Correct!~~", then the servo will turn from 180 degrees to 90 degrees, which you can then open the door of the coffer.
- Take out your phone!!!
- Close the door as fast as possible, or else when the times up, the servo will turn back to 180 degrees which you can not close the door, then you need to enter the password again to close the door.
- When your phone is taken out, and the door is closed, the LED will turn back to green, which means there is no phone now in the coffer.