Ring Lockbox
This box will lock and unlock when the right key is plced on it. This will use several components that read the key and verify it, and will not open if it is the wrong key.
Engineer | School | Area of Interest | Grade |
---|---|---|---|
Ashmita A | Evergreen Valley Highschool | Computer Science | Incoming Sophmore |
Final Milestone
My final milestone is adding bluetooth verification as well as the key opening to my box. I decided to add a bluetooth module that works for ios type phones so I can unlock the box using my phone as well. I first adding the female to female jumper wires that connected to 5v, ground, and 2 digital pins. Those connected back to ground, VCC, TX which is a transmitter, and RX which is a reciever. As soon as I added the blueetooth module I ran into a multitude of problems. One, my phone decided to not connect to the bluetooth module and that took around a half-hour to fix the problem. At first the code worked when it was separate to my verification code, but as soon as I added it to my actual code, it stopped working as the baud rate I was using for my code was 115200 and the bluetooth wanted it at 9600. Even after changing the baud rate the bluetooth didn’t work and when I put the TX and RX wires the Arduino started smoking for a bit which resulted in a dead chip. Somehow the bluetooth module ended up making everything act crazy resulting in having to test every chip seperately. It took over two hours to get the whole thing working, but it was worth the struggle. I also added neopixels to my box as a fun addition. Even though it was easier I still ran into problems. The timer for the servo and the pixels were not the same, so the servo kept jittering. That was a very easy fix and got it fixed in an hour.
Second Milestone
My second milestone is putting the Arduino, PN532, and servo into the lid of the box. I also tried to get the lock mechanism to work, but no matter how hard I tried to make the servo move the lock, the servo could not do it. After realizing that my initial idea would not work, I had to rethink and I decided to use the servo as the main lock. I 3D-printed my own lock and coded the servo to work with the lock. To be able to put the Arduino, PN532, and the servo in the box independently I had to solder some wires to the battery and power switch. I connected the red power wires together, the data wires together, and all the negative black together. While soldering all the black ones I forgot to add a wire making it very loose after attaching them all together. After getting all the wires soldered properlytogether I started testing the Arduino to see if it worked without being connected to the computer. The final step was gluing the servo in to make it lock.
First Milestone
My first milestone was setting up the arduino, PN532, and servo to work with the code I set up. I wired it to connect them to all the components. To start coding I had to download the right software for the arduino. I started by downloading the libraries necessary for the Pn532 to communicate with the Arduino and read the key and card. I first used some example code to see if the PN532 worked and that was where I ran into problems. It took around 40 minutes to fix that problem and the Pn532 started reading the key and tag. When I tried to read the NFC ring, the Pn532 refused to read it. After a couple of tries it read the ring, but the ring had to be touching the board which wouldn’t be feasible when the board was in the box. So I decided to use the key with my project and started coding to verify the key. I also worked out how the servo worked as I needed to embed that in my code. At first the PN532 would read the key but kept saying that it was the wrong one. The problem was that there were unnecessary characters with the verification and I capitilized the actual characters. Once I got the verfication working, I moved the servo code into my verification code.
Starter Project
My starter project was the Useless Machine. I soldered the switch, resistors, screw terminal, LED, and snap switch onto the Pc board. I then added the motor, arm and battery and connected the wires to the PCB. The switch sends an electrical current through the coil of wires in the motor which then creates an electromagnetic field. That field will switch the current in the poles which causes the axel to spin. The switching of the current cause the motor to keep spinning. When I first connected the wires the motor didn’t work as I had put the motor wires in the wrong spot. Even after fixing that mistake the motor still wouldn’t spin. The problem was that the screw terminal was clipping on the insulation of the black wire of the battery and not on the wire itself. After fixing that the motor started working smoothly. Putting the base together took up a lot of time, as well as sore hands. The base was not coming together at all and I kept hurting myslf with the screwdriver. After twenty minutes of trying to self-thread the poles, I ended up asking my instructor to