User:Medelen8/ENES100/Shaker Table Auto Implement

Goals for implementation performance, cost and quality

 * For the automatic shaker table to simulate an earthquake.
 * For the automatic shaker table to be controlled using a frequency knob(potentiometer).
 * Being able to use a power source (battery, outlet)
 * Can be repeatedly used.
 * To have little payment and maintenance cost.
 * Kid and user friendly.
 * To be safe.
 * Portable and lightweight
 * Testing structures of many small building models
 * Costing between $40-50

Our overall goal for the shaker table was to provide people with a lightweight portable machine that could test small scale building models for businesses to see if certain structures could withstand an earthquake or possibly used for children in wood shop class as a game to test if one person's kn-etc structure is better than the other. The quality of the overall machine should be strong and sturdy since a wooden frame and pvc piping are serving as the frame for the moving platform. Plus, it should run smoothly with the electrical wiring doing all the work for the operator.



Implementation Plan (task allocation and work flow)

 * Week 1: Building the automatic shaker table.
 * Week 2: Running a different motor.
 * Week 3: Adding gear to the motor and getting a power source.
 * Week 4: Adding the electrical components to the shaker table and testing.

Considerations for human user/operators

 * Shaker table should be kept in a cool, dry place. Exposure to liquid or moisture may damage the wood.
 * When testing bigger models of buildings, kids, spectators and possible operators should stand a foot back from anything falling on their head and getting hurt.
 * Don't have the frequency knob turned up all the way at the start of testing something, this could potentially damage the electrical wiring inside the machine

The manufacturing and/or purchasing of parts

 * 1 Plywood board 20 by 24" 1/2 width.
 * 1 Plywood board 16 by 20" 1/2 width.
 * 8 Nuts 1/4".
 * 4 PVC pipes 20 by 16".
 * 4 Dowel rods 1/2" thick.
 * 4 Rubber bands.
 * 8 Metal constraint 1" width.
 * 12 Styrofoam.
 * 8 Suction cups.
 * 16 Wood screws.
 * Velcro.
 * Armature (paint stick)
 * Two 2 in right triangles

All the materials listed above are all the pieces needed to build our automatic shaker table. The table above might seem very small for a potentially big project but our group planned it so that we didn't want to have a lot of extra weight added to our project. By showing that, we made a list of materials that we need so that we have a sturdy frame but also lightweight and cost very little to make. The majority of the parts at the top of the list are parts that are needed to buy in order to make our machine. The plywood, 1x3 board, screws, pvc pipe, dowel rods and eye bolts are all the materials to build the frame and the box (housing) for the electrical components. And the electrical components are all the materials at the bottom of the list along with some extra wires not listed.



Electrical components

 * Arduino
 * Stepper Motor.
 * Arduino Shield.
 * Wires.
 * 4 in gear

Other materials include;
 * Paint.
 * Paint brush.

For the electrical components to our project, all one needs is the materials listed above along with potential decor options included with in our project. Most of the electrical wiring is done with the help of the arduino. We put a code within the arduino so it could have the ability to spin a motor in one direction at it's maximum speed. On top of the arduino rests the arduino shield, with this we can supply the arduino with more power than the arduino itself can give. Having all this work means that we can attach the 4 in gear onto the end of the motor to allow it to get the maximum amount of speed and torque. All the materials working with each other will be located in the box to one of the sides on the frame of the automatic shaker table. The motor is mounted 2 1/2 inches above the wood in a housing custom made for the stepper motor. Reasoning behind the elevation is so that the gear won't rub against the box on the inside causing some problems when the machine is turned on.

The assembly of parts into larger constructs
The plywood board first got spray painted a sky blue and white to make it look attractive. After the board got dried, a 1/4" hole four inches apart from one another apart was drilled around the four corners of the board edge and nuts were put into them. They served to hold the rubber bands which created flexibility of the board. Struts for the dowel rod was made by using wood screws that have a little amount of threading at the bottom of it. These were screwed into the PVC pipe leaving an extra 2 inches of the screw with a smooth surface like a nail. Suction cups were needed to hold down the frame of the shaker table. Styrofoam rings were made to fit around each dowel rod. This helped reduce the noise the board and dowel rods made when rubbing against each other and also, to keep the dowel rods from sliding out of the struts.

Tolerances, variability, key characteristics
The specifications of the automatic shaker table would be the arduino and the frame.

The characteristics about the frame were to be made to fit everything on it. The frame's job is to support the manual shaker table attached to it and house all the electrical components safely. By completing these jobs is where the frame gives it its characteristics. Two 1x3 in boards with a length of 3 feet will be the very bottom of the machine. Allowing the automatic shaker table to be slightly elevated but also giving it the ability to screw the manual shaker table to the two long boards, leaving an extra foot of space. With the extra foot of space, three boards perpendicular to the two long boards will be fastened down on top of the remaining foot of space; this is where the box is going to be built for the electrical wiring to be inside. The entire frame should look like a box with the two long wooden boards sticking about 2 feet out from the box and that is why this is a key characteristic.

The shape of the frame is built for multiple purposes:
 * Support for the entire table.
 * Allow the other components to rest on top.
 * Protect the electrical wiring.
 * Make the number of materials used lesser.
 * Easy build.

The other key characteristic about the automatic shaker table is the piece making the entire table automatic, the arduino. The arduino is the biggest role in making the table move on its own besides the gearing causing it to move. Without an arduino the whole project wouldn't be self-functioning, someone would have to move the board manually in order for it to work. This is the reason why this is a key characteristic in our project. The arduino allows us, in this case, to have a code to spin a motor in one direction so we don't have to do it ourselves. Once the code is on the arduino, its is programmed to only spin in one direction until someone changes the code itself. By utilizing this device we can make our table run on its own and have no need for a person to waste energy moving a table.

The break down of high level components into module designs (including algorithms and data structures)
There were no high level components in our project.

Algorithms (data structures, control flow, data flow)
There were no algorithms implemented within our project for the automatic shaker table.

The programming language
We used Arduino for the programming language because Arduino is very simple yet powerful enough to control the motor in many different aspects that were necessary for this project.

The low-level design (coding)
First, we obtained a code that has been made to work with an arduino library. Libraries are a file that contains critical information within the actual code. This library must be downloaded, then uploaded into arduino using the "upload library" feature on the arduino software. It can be downloaded HERE


 * 1) include 

AF_Stepper motor(48, 2);

void setup { Serial.begin(9600);          // set up Serial library at 9600 bps Serial.println("Stepper test!");

motor.setSpeed(100); // Control the RPM

motor.step(10, FORWARD, DOUBLE); // Moves the motor in clockwise direction, using 2 coils (calls for higher torque) motor.release; delay(1000); }

void loop { motor.step(10, FORWARD, DOUBLE); // infinitely repeats itself }

as you can see in the first line of the code, "#include " means that the AFMotor.h file must be uploaded into the arduino for the program to work.

explaination of the code:

AF_stepper motor(48,2) indicates that the motor we are using has a total of 48 steps. (360/7.5 degree = 48 steps) the number 2 means that we are using the M3 and M4 ports on the motor shield.

Inside the void setup, the serial.prinln("stepper test!") commands the serial monitor to display that phrase while running the code. the moror.setSpeed command controls the speed of the motor (we figured out that the appropriate speed for our application is about (150) which is 15 rpm.

motor.step is the most important part that tells the motor WHICH and HOW to spin. the first number is the number of steps, next the motor can be set to spin forwards or backwards (for our application, it didn't matter which way it spun), and the last part is telling the motor which coil to spin. There are 4 possible choices, SINGLE, DOUBLE, INTERLEAVE and MICRO)

SINGLE: only uses 1 of the coils inside the motor

DOUBLE: uses both coils (most torque)

INTERLEAVE: uses each coil, one at a time alternating. (puts least stress on the coils)

MICRO: very small steps

Since torque was the most important factor in our application, we went with the DOUBLE step.

Lastly, delay gives pause going from void setup into void loop, we did this in effort to test the motor before it runs. If there is a malfunction or the ON switch is turned on by accident, it can be quickly turned off before damaging the table further.

Inside the loop is the same motor.step function described in the void setup.

The previous code was modified into this code.

The integration of software with sensor, actuators and mechanical hardware
A stepper motor was used in the integration of software. The motor was paired with an Arduino which controlled the speed, torque, and it's power.

specifications of the motor:

Name:Mitsumi M42SP-5

Power: 12 ohms, 24 volts

steps: 7.5 degree steps

wires: 4 wires (orange/yellow, brown/black)



further details can be found HERE

The arduino is paired with a stepper motor shield which can be found HERE, then the stepper motor is wired into the M3 and M4 port of the shield. As the picture shows, the orange and yellow wires go into the M4 port and the black and brown wires go into the M3 port. This order is VERY important. If any of these wires are not in the order shown, the motor WILL NOT spin in one direction. This is mainly because one has to get the wires that belong to one coil so, they can be paired up.

The arduino is also powered by an AC/DC adapter because it is not recommended to use a 9v battery. The adapter is used for maximum torque that our shaker table requires. In order to have more torque there has to be less speed of the motor and to have less torque the motor has to have a high speed. So, the main thing to try to achieve is to get the motor to spin as slow as possible. With the combination of the code, and the shown parts assembled in correct order, the motor should be turning like this

The arduino remembers the last program that was uploaded into it's board, so there is no need to plug in the USB after the initial uploading of the code.

The next step was to figure out a way to control the motor speed with a potentiometer. The concept of this is to control the amount of voltage that the motor is recieving from the battery. When the potentiometer was installed as part of the wiring setup, we realized that the potentiometer could not control as much power as we had hoped. At the lowest position, the motor stopped spinning completely and only vibrated gently in place. At the highest position, the motor stopped spinning completely and vibrated violently in place. In all the other middle positions, the motor spun and did not change speeds. Through this test, we learned that while poteniometers are used to control the resistance, it cannot be applicable with our shaker table because it can only control very little amounts of power.

Test and analysis procedures
Some testing took place within our project; one of our first testing was done with the arduino and the motor. When we first started working on the electrical components, we first needed a code that can tell an arduino to spin a motor in one direction. After a long period of time, we found a code that worked  and stuck to that as our final code that is needed so the table can be automatic instead of manual. Using the same code, next step was to find a big enough gear to do a full range of motion of the board, we calculated the gear should be around the size of a 4 inches in diameter for our project. This would be our second testing, seeing if the motor has enough torque to spin this huge 4 in gear. We attached the gear to the top of the motor be jamming the top of the motor into the whole where an axle should be fed through, with it secured on top we turned it on and the gear started to spin just as planned. Now going of that, we now took what we have and did our last kind of testing to see if the gear could have enough torque to move the entire board. We mounted the armature to the moving platform using a rig with two triangle blocks and a long screw going through the two. Once everything was secured we than tested to see if the motor could move the gear to move the whole entire board. This testing was a failure and has forced us to use a bigger motor to supply more torque and speed to be able to move the platform with ease.



The verification of performance to system requirements
The system requirements of the automatic shaker table should be able to move the platform parallel back and forth between 1-2 inches to test different small scale building models and how strong their structures are. When testing the performance of the automatic shaker table we were not able to perform a complete rotation of the gear causing the board to move back and forth. The motor didn't have enough power to withstand the weight it was trying to push.

The validation of performance to customer needs
The automatic shaker table could have many different functions, but the main market value of the product could be as a toy for children. It could be sold as a game that has a timer on it for the kids to build the strongest structure that they can think of and the shaker table would run through different frequencies to see if the structure falls over.

Sourcing, partnering, and supply chains
We acquired our supplies from Home Depot. There were no other stores, in which, we acquired items to use in the design of our automatic shaker table. Some other items were already provided in the lab.

Possible implementation process improvements
Make sure that all of the key components for the project (mostly the electrical portions) are figured out very early on in the stage. The main issue that we faced was trying to decide which motor to use, and ,eventually, making it compatible with the Arduino. By the time we found a motor and was able to make it compatible with the Arduino, it was too late. So, the very first thing that should be done is make sure that the technical portion of the shaker table is working properly. because without that the main aim of the project cannot be achieved.

The best source of power to use is a lead acid battery or a NiMH battery pack. You should read more information on. Also, make sure the motor spins as slow as possible in order to achieve more torque. Do NOT try and use the same size motor as we did. Find a larger motor that will have more speed and torque!

Next Steps
Next steps in the progression of the automatic shaker table is:
 * Find and use a different motor that brings forth more speed and torque.
 * Improve on details and minor changes to improve the overall look.
 * Add electrical wiring to the table in order for the device to self operate.
 * Make a survey to see how much people would pay for this device.
 * Test many different shapes and sized buildings for structure results.

In order for the electrical wiring to be attached to the table all the wiring needs to be housed inside, securely, a wooden box hanging onto one of the sides of the automatic shaker table. The entire shaker table is completed. The only thing left to do is to find and configure a more powerful motor, so the platform will actually move back and forth at different speeds. .