Introduction
Hi! This will be my ninth blog for this challenge. This is going to be the last blog where I will be making something, after this blog all that's left is to assemble everything into a single package and code it. The only thing left to make for the prototype is the key locking mechanism and adding a couple of reinforcements to make it all a bit more sturdy. I will also be adding the servo which will be choosing the correct key for us depending on the RFID tag that it reads.
Servo
I will begin with mounting the mini servo that came with the kit. I love these things, they are extremely easy to use but provide an enormous amount of possibilities for all kinds of projects. The servo needs to be mounted in the back so it can shift the tray with the magnet around while no key is picked.
Mounting the servo
As pure luck would have it, I had exactly the amount of space I needed to mount the servo onto the back plate underneath the screw that holds the springs. To do this all I needed to do is make a hole in the back plate, which I did using a drill and filing it down later on, so the servo can fit comfortably. After that, all it needed was some hot glue to secure into place. Here are the pictures of the hole I cut out for it and how the servo fits.
On the second picture the it looks like the servo arm is too far from the back plate, but it actually turned out to be the perfect distance since the magnet I salvaged from the telescopic magnet with the thing that surrounds is around that high. Next thing I needed to do is extend the servo arm and mount the magnet to it, so the magnets would be one next to the other. By having a bit of a longer arm, as I will in this case, the height difference between the different points of the trajectory of the magnet will be reduced.
Extending the arm
One thing is clear and that is that the arm I have for the servo is too short to reach the magnet on top, also it only needs to go one way and not two way. I didn't have any other longer arms for this servo size so I decided to make this one into a longer arm.
{gallery} Arm extension |
---|
First cut: I started by cutting off a piece, this gives us the extra material we need as well as removed the part which would just get into way on the other side. |
Reinforcment: I was planning on using hot glue as I did for the rest of the project, but it was apparent that it wouldn't be strong enough. To strengthen it up a bit I folded a piece of solid wire and glued it along the entire length which made everything super robust. |
Extended arm: Here is how it turned out after the first layer, all that's left is to mount the magnet to the end of it |
Magnet: I put another layer of hot glue over the old ones and added the magnet. After this I glued the servo into place and it was timing for some tests! |
Testing the servo
I connected the servo to the Arduino using one of the pwm pins, and played around with the different angles to see what works. This mini servo, as well as most standard servos (not counting continuous rotation servos), can go from 0 to 180 degrees. To set it up I set the angle to 90 and then mounted the arm to be centered, by doing this I made sure I didn't have to think about angle limitations and I knew the center point. After a bit of testing I found the angles that worked for me are in the range of 60 to 115 degrees. Here is a short video of the servo shifting the tray around!
Key locking mechanism
Now comes the time to utilize the awkward looking hook from 2 blogs ago. The hook will be used to lock the key in the extended position so we can use the key without having to battle the spring tension while turning turning the key around. The way I plan on solving this issue is by adding a top plate to the key holder part on top of which I 3 tubes, the same tubes I used for the rest of the build. The tubes will be cut and placed in such a way that they align with the hook for every key and cut so that when we extrude the key we can shift the tray a bit to the side and the hook will grab the side of the tube, locking the key. After that when we want to put the key back in, all we need to do is push forward a bit and a bit to the side and the tray will be released. I went with bigger tubes so that there is a lot of flexibility to using the system. Of course the smaller tubes would give us a feeling of a more precise mechanism, but since the tubes over tubes system also has some play in it, the whole thing will function better with bigger tubes.
Build
{gallery} Key locking mechanism |
---|
Top plate: This is the top plate mounted, the marks on the top plate are where the hook end is when the key is extracted, the idea is mounting the tube end slightly under it. |
Bottom plate: I haven't gone with full length for the bottom plate, I want to see during the assembly where everything will go so I left the rest of it open for now. |
Top tubes 1: Here are the top tubes mounted to align with the keys underneath |
Top tubes 2: I expected for the tubes to be longer, but this provides me additional space which I can use for LED-s or something like that. |
And with that the whole key storing, picking and locking mechanism is complete, all that's left to do is test out the locking.
Test
In the video we can also see the fail safe mechanism, in case the battery goes flat or the device doesn't work because of some other reason, we can still pick other keys even though the servo is set on key 1.
Summary
And with this blog I end the functioning hardware build of this project. The last thing that is left to do to get to the first prototype is assemble and code everything. Hopefully it won't be that big of a problem since I had all of the components of the project working on their own. It will of course need a little bit of work and testing to make sure everything functions as it should. For now I wrap up the hardware build and am starting the assembly process, I will begin with a breadboard and when I get everything working I will mount all of the electronics to the mechanism. Thank you for reading the blog, hope you liked it!
Milos