User:Jdittman8063/ENES-100/project 2

Continuation of project 1 on Combo Lock Pick.

Stepper motor reference page: https://en.wikiversity.org/wiki/Arduino/Junk_pile_steeper_motor_survey

Team Page: https://en.wikiversity.org/wiki/User:1sfoerster/enes100/fall2013/p2Combo

Week 1
The following information is from the Instructables tutorial on how to use the motor shield with an Arduino.

The motor shield can use an external power supply up to 12V and 2A per channel. The Arduino pins for controlling the motor are Analog 0 & 1 and Digital 3, 8, 9, 11, 12 & 13.

The first step in controlling the motor is to set the motor direction to HIGH or LOW, based on the polarity of the power supply. Second, the brake for the motor must be set to LOW for it to disengage. The third step is to move the motor by entering a speed command.

The wiring pairs have already been determined for the stepper motor. One coil is controlled by the red and black wires, the other by the green and white wires. The brown wire is a ground for the motor.

Week 2
Moved to below.

Week 3
First /Test/ of new code showed that everything is working correctly except that when the motor attempts to step forward it makes a very minor forward movement followed immediately by moving backward to its original position. When forced to repeat the same forward step numerous times, the motor does occasionally rotate forward by the proper number of step, but then returns to its erratic behavior. An altered code structure will be tried, as well as a short test using a series of forward steps followed by a series of backward steps to see if either helps in identifying the issue. If they do not then the wiring of the stepper motor to the motor shield will be re-examined.

Here is the motor attempting to step forward and getting stuck in the process. https://commons.wikimedia.org/wiki/File:Stepper_Motor_Not_Stepping.ogv

Changing the code did not result in any change to the motor's behavior. Next step was to try different wiring combinations, which also did not have any noticeable impact. The external power source will be attached as the next most likely cause of the motor's improper function is a lack of adequate power. By connecting the power source to the motor shield and removing the bridge piece, the motor will be getting power from the wall outlet rather than the computer through a usb cord.

Increasing the amount of power being used by the motor should also provide additional torque to help turn the gear when cycling through lock combinations.

Week 4
First /Successful Test/ using the motor. For the /second test/ I included function of the solenoid and attempted to run all current parts of the project together. For this code section, digital pin 6 was chosen for function of the solenoid as that pin is not in use for running the stepper motor.

Found that the motor does not properly mesh with the gears to the lock, need to address this issue for the lock to turn as intended. Solenoid produces a significant vibration which causes the upper structure to flex slightly.

The project as it is currently assembled is shown below from both a top and side view. When I was testing the project I was activating the solenoid for too long at once and the PVC pipe section came loose from the rest of the structure. The problems with the tooth shape and size can be seen in the videos below.  File:Top_view_of_lock_picker.jpg File:Side_view_of_lock_picker.jpg File:Lock_holder_unglued.jpg File:Project_test1.ogv File:Motor_test2.ogv 