User:Skwon9642/ENES100/Project 2

Project Preference
Automatic shaker Table

Makerbot

Beat Bearing

Vision-based Object Tracking

Problem Statement
The problem is to implement the final design that has been created. If in the process, the final design is incomplete, the group needs to re-design.

Project Plan
Determine timescale and schedule of tasks:

Motor testing and code testing

Finishing touches on Manual Shaker Table (Replace K'nex dowels; flat platform; Suction Cups?)

Safety and instructions, for both the presenter and the users

Build frame for steadyness

Problem statement

Wiring

Soldering

Combine previous existing plans for Automatic Shaker Table with current physical designed Manual Shaker Table

Make it user-friendly, work well under duress, and consistently perform

Week 1 Narrative
In week 1 of this project, me and 2 other group members were responsible for researching ideas to move the shaker table with a motor.

I wasn't sure where to pick up from the previous group but after asking the previous group, I decided that the movement portion was not fully completed.

I started by researching different ways to control a motor, with or without an arduino. Most of the motors were 24 volts and relatively simple to wire up.

Option 1.

24 volt electrick scooter controller: The scooter controller would be an ideal choice because it can precisely control the rpm using a switch mechanism (accelerator). these controllers are easy to obtain and the average price anywhere from $10.00-$60.00. There should also be a good information on how to link the motor and the controller since thats what scooters are made to do.

Option 2

PWM (Pulse with modulation) motor speed control: with this setup, we can use our existing motor that is provided in class. It can power a 24V motor. it costs about $25.00 to buy. It controls the motor speed via VR10k (Variable Resistor 10k Ohms) shown in the diagram.



Week 2 Narrative
This week, I was told by Mr. Edelen that I should first try to work something out with the motors that we already have instead of buying new ones and using the PWM for controlling the motor.

I was given a type of stepper motor to work with. My task this week was to identify the motor and to see if I can get it to work. I was only able to figure out the identity of the motor and it's features, but I did not have the chance to see if the motor actually works.

The motor is a Mitsumi M42SP-5. It is a bipolar 4 wire motor that is DC 24 volt/12Ohms motor which has 7.5 degrees of steps. The wire colors are orange, yellow, brown and black. It is assumed that this motor was previously used in a printer. I found these details Here.

The main problem I had to solve was to figure out what color wires do what. I was not able to find any information regarding the wires. I plan to go into the lab on monday to see if I can figure this out. I can make out that the black wire is ground as is for many other common motors, but I still need to figure out the functions of the other 3 wires. I plan to figure this out by testing the resistance of each wire with a voltmeter.

3/31/14. I went into the lab and checked how the wires were. It seems like the brown & black wires are together and orange & yellow are paired together.

the black and brown gave me a reading of 13.4, and yellow and orange gave the same reading. This prooved that the motor is able to run good!

Week 3 Narrative
This week, my responsibility was to continue working on the motor.

week 2's work proved that the motor is in good shape, so the next thing I needed to do was to figure out the order in which the motor wires plug into the arduino+shield. I first tried to power the motor without the shield. Doing so only caused the motor to vibrate but not turn. It seemed like the motor needed a bigger power supply. I tried to switch the motor wirers around to all other possibilities but the outcome was the same.

Video of method 1

Some potential errors were:

1. wiring is incorrect

2. motor is broken

3. needs bigger power supply

4. coding is wrong

after brainstorming with the lab aid, I decided to use the shield to prevent damage to the arduino. Searching online, i obtained a code to go along with the particular shield I was using, but the code gave an error. It turns out that i needed a certain library file inside the computer for my code to work. I found the library and downloaded it into the computer.

The programming that I have obtained tells the motor to step back and forth in single, double, interweave and microstep. The microstep was what amazed me. While the motor is turning in 1 microstep, the steps are so small that you cannot tell by looking at the motor. It can only be felt by touching the motor gear. This meant that the motor can be controlled to a very precise degree. Link to Programming code Video of method 2

the next step is to make or find a code that allows the motor to turn continuously in 1 direction.

seems like this is the video that will give me a new direction on how to turn the motor continuously in 1 direction https://www.youtube.com/watch?v=oVDkNcVJBv4

Week 4 Narrative
Last week's task did not end too well for me because I could not figure out how or why the motor was not spinning in one direction continuously. At first, I thought there was an error in the programming, or perhaps and motor was defective. After brainstorming, the only other possible source of error was the wires.

I noted earlier in the week that the black/brown wires were one coil, and yellow/orange wires were another coil. However, the wires were ordered in this way: "black-yellow-orange-brown". The reason for this was that I read on a tutorial that the coils needed to be powered in an alternating order. I must have misunderstood the concept, and changed paired the wires wrong. Even if the coils needed to be powered alternately, I still had to wire the coils in the same port! so the correct order is: orange-yellow-black-brown. After making changes in the order, the motor spun in one direction!

here is the motor spinning beautifully. Motor Spinning



Now my next task was to optimize the code for our application. In our application of the motor, we needed maximum torque while being able to control the speed as well.

It seemed like the higher the speed, the less torque it gave out, so I had to find the middle point where there was enough torque AND speed for our shaker table. The motor.setSpeed function allows the user to input a value of RPM for the motor speed. I figured out that with the USB power chord, the maximum speed that the motor can spin in was about (150), which is 15 RPM. However, with this speed, there was not enough torque. I brought the speed down to (90) = 9 RPM, and there was still not enough torque, but not only that, it was very slow.

It seemed like I needed a bigger power source. I found a 11 Volt battery, and powered the arduino through that battery. The results were quite surprising. Not only can the motor spin much faster (up to 25 RPM), the torque at any given speed was exponentially increased. With this, the torque problem has been solved.



Next step was to figure out how to control the motor speed via potentiometer. After attaching the potentiometer to the motor and arduino, I found out that the range of control was not present. By that I mean that there was only significant changes in the "lowest" position and the "highest" position of the potentiometer knob. At the lowest setting, the motor stopped spinning and only vibrated gently, where as the highest position, the motor vibrated quite violently. Anywhere in the middle of those 2 positions, I couldnt not observe any visible changes in the speed of the motor.