User:1sfoerster/enes100/fall2013/p1Combo

Problem Statement (Finish description)

 * Start organizing arduino code to follow this algorithm.


 * Build frame so it can open and shut, so the combination lock can be removed and inserted.


 * Attach pieces so they can withstand open and close attempts continuously for hours.


 * Repeat previous success of Combolock teams that opened and closed the lock through the solenoid from a dollar bill changer and the power pig tail attached to an arduino.

Conceive
Market/Customer Needs To help someone open their lock, if they forget their combination.

Initial target goals To make an automatic combo lock pick. To have the hinge fold the lock pick to a resting position so that a new lock can be put in.

Project cost and schedule We all ready have all of the parts needed.

Design

 * Two Previous Iterations Found
 * Fall 2012 Team 1
 * Fall 2012 Team 2
 * Tutorial of Combo Lock Pick Method Found
 * Wikihow steps for cracking a Masterlock Combo Lock.
 * Hackaday step by step guide for Masterlock.

First Body Design
The first thing that we did was screwed two blocks off wood to the door hinge. However this became problematic because the hinge did not extend to a full 90 degrees angle. To solve this we cut the wood at a angle to get the hinge to extend to 90 degrees. The next problem was extending the wood back because the platform of the hinge was getting in the way. To fix this we cut out a block off wood where this hinge was hitting. After doing this the hinge could extend in and out with out a problem.  File:Front view of combo lock pick.png|The lock and puller have been mounted on the back piece of wood. File:Side of project.png|The lock and puller have been mounted on the back piece of wood. File:Extended view.png|The hinge allows the lock pick to be folded into a working and non-working position. 

First Gear Structure
The next thing we did was make gear structure that will link up the the gear on the motor, and be attached to the rubber stopper. All of these pieces must spin together to work. So they all have to connected to each other.  File:Gears close up.png|Gears made to link with the one attached to the motor. File:Back of gears.png|A bolt runs through the gears that is attached to the rubber holder. File:Gears finished.png|The gears after the washer is put in.  The project needed to be raised up to prevent the hinge from making it off balance. Next we drilled a hole into the bottom board and glued a plasic holder in. We are using this to try and hold up the gear structure.  File:Hole drilled into bottom block of wood.png|This hole is drilled to put the plastic in that will be holding up the gears. File:Plastic is glued into place.png|The holder is glued into the hole. File:Height added to the lock pick.png|Blocks of wood are screwed into the bottom top add stability to the project. Also the hinge can now be put back without moving the whole project. 
 * The middle gear is used to link to the gear on the motor.
 * The washer is what will be put into the plastic holder.
 * The plastic holder will hold up the gears.

Body Re-Designed
We used bigger boards to stabilize the project. A grove was cut into the bottom board, this is used to rest the hinge in. Next, we added a thin piece of wood under where the hinge is screwed in. This is to push the hinge forward because it is not at a 90 degree angle when it is fully extended.  File:Side view of wood under the hinge.JPG|The wood pushes the hinge up to extend the hinge further to try and get it to a 90 degree angle. File:Bottom view of wood under the hinge.JPG|The wood pushes the hinge up to extend the hinge further to try and get it to a 90 degree angle. File:Both boards attached to hinge.JPG|Both boards attached to hinge. File:Board with lock.JPG|The board with the lock is attached to the upright board. The upright board isn't all the way to 90 degrees but the nuts on the back of the lock board push it out to a 90 degree angle.  We screwed in boards to the bottom of the plywood. This is to hold up the project. This is needed because the hinge makes the whole project off balance. The wood added makes the project very stable. But the next problem is when the locked is being pulled up. This is a problem because the board that is upright could fall over. To solve this we screwed in two smaller blocks the the back of the plywood. When upright these should hold the lock board up. Then when the board with the lock on it wants to be pulled back the smaller blocks can be twisted to the side, allowing the board to be pulled back. However when these blocks where screwed in they could rotate, but the blocks are too tall, therefor they are getting in the way of the lock board being pulled back. To solve this problem is cut the tops off the blocks off, letting there be more room for the lock board to be pulled back.  File:Wood boards are added underneath.JPG|Wood boards are added underneath to hold up the project, and to keep it balanced. File:Underneath View.JPG|Underneath view of the project with new boards added to stabilize. File:Turn-able Wood Blocks.JPG|Turn-able blocks are added to prevent the project from falling back when the lock is being pulled up. File:Blocks turned to the side.JPG|Blocks turned to the side to allow the lock board to but pulled back, but the blocks are too big so the board can not be reclined. File:Side view of the turn-able blocks.JPG|Side view of the turn-able blocks. File:Upright cut blocks.JPG|The turn able blocks are cut to allow the lock board to recline. Right now they are upright to hold the board up. File:Sideways cut blocks.JPG|The turn able blocks are cut to allow the lock board to recline. File:Lock board reclined.JPG|Lock board reclined. 

Gear Structured Re-Designed
 File:Bearing to hold up gears.png|Bearing that will be used to hold up with the metal stand, while the middle can still spin File:Gears interlocked.png|Gears interlocked File:New Gear structure.png|Gears all put together File:Gear that will hook up to Motor gear.png|Gear that will hook up to Motor gear File:Bearing on Gear.png|Bearing on Gear File:Screw Through Gear.png|Screw Through Gear   File:Metal Holder.png|Metal holder that will hold up gears File:Metal Stand.png|Metal that will hold up gears File:Gears Held Up.png|Gears held up against lock   File:Bearing inside board.JPG|Bearing inside board. This can be used to hold up the gears, but keep them turning. File:Side view of bearing in a board.JPG|Side view of bearing in a board. File:Gear that fits in bearing.JPG|Gear that fits in bearing. File:Side view of gear in bearing.JPG|Gear in bearing. File:Back of gear in bearing.JPG|Gear in bearing. File:Bearing board screwed in.JPG|Bearing board screwed in. File:Side view of bearing board screwed in.JPG|Side view of bearing board screwed in File:Bolt that is runs through all of the gears.JPG|Bolt that is runs through all of the gears. File:Screw head is filed down.JPG|The head of the screw is filed down so that the rubber piece can properly hold the lock. The head of the screw was getting inn the way. File:Gears all put together.JPG|Gears are all put together but when they are tuned the bolts loosen up. File:Gears all put together.JPG|I might add washer to try and prevent the nuts from loosening. File:Washers on gears.JPG|Washers are added to try and keep the nuts from spinning and therefor loosening or tightening the gears. File:Gears with washers.JPG|Gears assembled and linked to lock. 
 * The back gear connects the the gear on the motor.
 * The washer is used so that the gears connect to it, so the inside of the bearing moves while the outside is glued in place.
 * The middle gear is used to connect to the bearing.
 * A bolt is running through the middle to hold everything together.
 * A metal hook is bent to hold the bearing in it.
 * We decided to use a board with a bearing in it because this is more stable then gluing a bearing onto a metal hook.
 * The board was cut and screwed into place.
 * A gear that is the same size as the hole in the bearing is put in it. The other gears fits around the fist gear and a bolt runs through the rubber stopper and all of the gears.
 * Washers are placed on both sides of the bearing, and on both ends off the gears,where the nuts are. A problem with this design is that when the gears are turned the nuts loosen and tighten. This is why the washers are added. They are supposed to prevent this. Another problem is that the screw head inside the rubber is too big. This is a problem because the rubber can not grip the lock anymore. To solve this the bolt head is filed down.

Final Working Gear Design
The final design for the project consists of a large, stable base section, raised off the ground to allow the mounting of a two-position hinge. This hinge is used to direct and control movement of an upright section, upon which are mounted the solenoid, lock, and a PVC that holds the lock in place. The motor and shaft assembly are mounted in a fixed location in front of where the lock will be in an upright position, allowing the lock and rubber stopper to engage via pressure. Behind the upright section, two small wooden blocks on pivots can be swung upwards to hold the assembly in place or downwards to allow the assembly to recline. Reclining the assembly removes the lock from in front of the motor assembly and into a position where it can be removed and replaced. The Arduino and wiring for the motor and solenoid will be located off to the side, at this point unmounted so as not to interfere with the operation or or further alteration of any other parts.

Videos of Gears Spinning
Here is a video to show the improvement we've made after brainstorming for days:
 * Before Video: http://www.youtube.com/watch?v=TGGgvnxqCQo&feature=youtu.be

Arduino Code and Wiring
Reading code written by last years' teams provided a starting point for writing our own code for using the Arduino and motor shield with the provided stepper motor. The first attempt at writing code for the project built off of the old teams' work, altering the step size and timing to match with the stepper motor provided.

We attempted a Quick Test of the code by attempting to run a shortened version of it. By attempting to loop through 16 possible combinations, it was found that the code and motor shield wiring based on previous teams' efforts had multiple errors.

The Wiring Diagram for the motor shield was also helpful in determining how to properly wire the motor to the motor shield.

At this time we located a Tutorial on how to use the motor shield properly. The wiring for the motor was also called into question and a simple test showed that it was indeed wired improperly. This led to stepping back to start with the code and wiring of the motor, Arduino, and motor shield. At this time we are working on writing new code to operate the stepper motor to follow the implied algorithm for cracking the lock.

of the LED turning on to show a matched pair of wires from the motor.

Next Steps
To push the project forward:

Arduino

 * Build off of the code provided by the motor shield tutorial found here. http://www.instructables.com/id/Arduino-Motor-Shield-Tutorial/
 * Verify proper power source for the motor and solenoid, to eliminate need to draw power from a computer.
 * Explore options for mounting and housing the Arduino and motor shield in a way which protects them from drops, dings, etc.

Body

 * Make a smaller, sturdier, compact body so that the lock pick can be moved around easier

Gears

 * Create a better way to connect the gears to the rubber piece that holds the lock. This will allow the project to be run over and over again with out wearing down.
 * Possibly use the maker-bot to make a gear that also can hold the lock.