User Guide for the e NABLE Hand Test Rig

Similar documents
Community College of Allegheny County Unit 4 Page #1. Timers and PWM Motor Control

FC3920K and FC5539K Automatic Foam Cutting CNC Machines

MILL ONE. Assembly Manual. Manual Illustrated by Gontarz Design Studio

Code Product Qty 1 Top Vertex 3 2 Hot End Housing 1 3 Bottom Vertex 3 4 Print Platform Lock 3 5 End Stop Holder 3 6 Filament Feeder Motor Bracket 1 7

CONTENTS PRECAUTIONS BEFORE STARTING OPERATION PREPARATION FOR OPERATION CAUTIONS ON USE OPERATION

Roborodentia Robot: Tektronix. Sean Yap Advisor: John Seng California Polytechnic State University, San Luis Obispo June 8th, 2016

Quill Stop V2 Installation Guide 11/16/2014

Parts List. Robotic Arm segments ¼ inch screws Cable XBEE module or Wifi module

ABM International, Inc.

Sten-Bot Robot Kit Stensat Group LLC, Copyright 2013

LEG CURL IP-S1315 INSTALLATION INSTRUCTIONS

SERVICE PARTS LIST PAGE 1 OF 6 BASE ASSEMBLY SPECIFY CATALOG NO. AND SERIAL NO. WHEN ORDERING PARTS 12" SLIDING COMPOUND MITER SAW

Assembly and installation help

Mill One V2 Assembly Manual

Super Sky Surfer 2000 Assembly Instructions

SHERLINE Lathe Digital Readout

TECHNICAL INFORMATION

FASTENERS, MEASUREMENTS AND CONVERSIONS

M4 Foot Operated Underpinner Instruction Manual

Band-Master ATS Nano Pneumatic Banding Tool Operating Instructions

John Duffyʼs Manual Mill Gadget. Build Instructions

RYOBI 10 IN (254 MM) TABLE SAW MODEL NO. BT REPAIR SHEET

SHERLINE Mill Digital Readout

Deck Mount Installation with Bench

Hawko Zhaga Systems Installation Instructions

Customer Notice: Congratulations again on your SawStop purchase, and thank you! -SawStop Tualatin, OR

Progeny Integrated Mobile Unit Unpacking/Assembly Guide

Building a vertical wobbler

Yes 20 Charging Wall Cabinet for Tablets

model tsa-sa48 Sliding Crosscut Table installation guide

RYOBI 10 in. TABLE SAW - MODEL NO. BT3000

Kossel Rev B Build Guide V1.0

OPERATIONS MANUAL. Port-O-Slitter

RYOBI 10 in. (254 mm) TABLE SAW MODEL NO. BT3100 REPAIR SHEET

BABY WOLF LOOM. Assembly Instructions for Knocked-Down Looms

Parts Catalog. S-Series Slicer Smart Manual SG13. Model:

SPINKS BIN SCALES INSTRUCTIONS/OPERATIONS MANUAL FOR SCALE MODELS: ,000 lb ,000 lb ,268 kg ,500 kg.

Community College of Allegheny County Unit 7 Page #1. Analog to Digital

SERVICE PARTS LIST PAGE 1 OF 6 BASE ASSEMBLY SPECIFY CATALOG NO. AND SERIAL NO. WHEN ORDERING PARTS 12" DUAL BEVEL COMPOUND MITER SAW B27B

Installing the 3 Indexer: PRS Standard Tools

Coding with Arduino to operate the prosthetic arm

18600 Angular Momentum

IIHS Side Impact Outrigger

Giraud Tool Company, Inc.

Motorized or Crank Operated Fortress Zipper Track Shade with Housing and Side Track Installation Instructions

Easy Engineering Guide

Obtained from Omarshauntedtrail.com

SHERLINE/WETTROTH 2-or 3-AXIS Lathe Digital Readout P/N 8200 (Metric P/N 8260)

Nancy s Knit Knacks LLC 4 Yard Option Upgrade Kit Assembly Instructions and User Manual

535-Manual. Main Components. Pipe and Bolt Threading Machine. Printed in U.S.A. Ridge Tool Company/Elyria, Ohio, U.S.A.

This manual will aid in the assembly of the FireBall V90 and FireBall X90. The assembly of both machines will be identical, unless specified.

MODEL 36 Di-Acro Hand Shear

535A. Main Components. Pipe and Bolt Threading Machine. Printed in U.S.A. Ridge Tool Company/Elyria, Ohio, U.S.A.

Tools: Sharpie, Square, Vise, Hack saw, Ruler, Punch, Hammer, File. 2. Cut the stock Place stock in vise and cut with hack saw

Yes 20 Charging Wall Cabinet for Tablets

OWNER S MANUAL. Safety. Please read this owner s manual before use and keep it at hand for reference. Warranty

MEC Auto-Mate Assembly Manual. For MEC 9000G/GN and 8567 Grabber Series

ELECTRIC RACER BASIC BUILD

Tin Lizzie 18 Assembly Instructions

Printrbot Simple (Model 1403) Rev F Printrboard

TOOLS REQUIRED Metal Wood Wood and Metal Screws. #16 Drill #12-24 Tap. 1/8 Drill

Elimination of Elevator Bounce

Obtained from Omarshauntedtrail.com

HANDLING AND ASSEMBLY INSTRUCTIONS FOR TRUE FOCUS 3.0M, 3.8M AND 4.2M ANTENNAS WITH POLAR MOUNT

Legacy Woodworking Machinery a division of Phantom Engineering. The Legacy CNC. Assembly Manual

Sliding Crosscut Table installation guide

IN 578. Tools Required. Torque Specification: 10mm Socket 7/16 Socket 1/2 Socket 1/2 Wrench 7/16 Wrench 1/8 Allen Wrench.

UAL SHOP DRIVE PULLEY

RPS. XR Front Drive Updates CORPORATION

Model No: TC10. Parts Information: Tyre Changer - Automatic

Pneumatic Clamp Carrier. Installation & Operation Manual

Mount to the Wall INSTALLATION MANUAL

How To Measure Your Finished Opening

S6 User s Manual USER S MANUAL ver. 1.0

TABLE OF CONTENTS REQUIRED TOOLS

Formulate Designer Series 10 Backwall - Kit 09

B Connectors. Automation. Structural Framing System Connectors & Fasteners

SHERLINE/WETTROTH Mill Digital Readout P/N 8100 (Metric P/N 8160)

TRAKFAST REPAIR MANUAL DANGER TOOL DISASSEMBLY ALWAYS TAKE THE FOLLOWING PRECAUTIONS BEFORE ANY SERVICE OR ROUTING MAINTENANCE IS PERFORMED:

Standard Operating Procedure

SAFETY INSTRUCTIONS. Wear protective clothing, including safety glasses and steel toe boots.

Model 209 Fireback Replacement

Formulate Designer Series 20 Backwall - Kit 07

Senior Swing. Caution

Assembly Guide for Printrbot - Simple Maker s Edition 1405

Hydraulic Clamp Carrier. Installation & Operation Manual

SPIDA SAW OPERATIONS MANUAL

Battle Crab. Build Instructions. ALPHA Version

INSTALLATION INSTRUCTIONS

Wiring Techniques for Wiring a Lamp

Vinyl Cutter Instruction Manual

Parts Catalog. S-Series Slicer Manual Frozen Option S13. Model:

SETUP INSTRUCTIONS If you would like to tell us about your experience with your setup instructions please us at

Removing the Z-Axis lead screw

This instruction manual is an in-depth look and explanation of how to assemble and install the Murphy Bed properly and efficiently.

Ready To Go SimpleSpec tm. Installation Manual. For more information, please visit 3-form.com or call

w w w. h d o n l i n e s h o p. d e AUTOMATIC COMPRESSION RELEASE TOOL GENERAL INSTALLATION -J04654 REV Kit Number Models

TITAN2-EDGE Public Access Computer Station Dual Track

Pneumatic Clamp Carrier. Installation & Operation Manual

AM8 Printer A metal frame for your Anet A8 By Pheneeny v1.0 April 20, 2017

Transcription:

User Guide for the e NABLE Hand Test Rig by Shannon Barry, Samantha Mason, Tia Parks, Charles Rumfola, and David Schwartz Table of Contents Notes 2 Materials Needed 2 Option #1: Preparing the 80/20 3 Option #2: Ordered Components 4 Assemble 80/20 Frame Bottom Frame 4 Top Frame 6 Additional Components Purchased Connectors 7 Built Components 7 Mounting the Motor 9 Mounting the Strain Gage 10 Securing the Horizontal 80/20 Sliding Bar 11 Mounting the Clamp 12 Electronic Instructions/Code 14 Strain Gage Assembly/Calibration 16 Final Assembly 17 Tests 17 References 21 Software Code 22 Strain Gauge Calibration Code 25 1

Notes Option 1: Make/cut connection parts of the assembly Option 2: Buy all the connection parts of the assembly Materials Needed a. Option 1 (Total expected cost: $264.42) b. Option 2 (Total expected cost: $312.18) c. Required Tools i. Allen Key ii. ¼ 20 tap and tap handle (use oil to help with the threading) iii. Table Saw iv. Mill (optional) 2

1. Option #1: Preparing the 80/20 (Cut from two 10ft lengths) a. Required Lengths of 80/20: i. Two 2ft lengths ii. Two 1.5ft lengths iii. Four 1ft lengths iv. One 6in length v. One 4in length Figure 1: Pieces of 80/20 Cut to Size b. Cutting process: The lengths can be cut using a bandsaw or a table saw, whichever is more readily available. i. Using a circular saw Note: 80/20 is aluminum extrusion and relatively easy to cut but the pieces can also be bought in pre cut lengths from McMaster Carr ( See Option #2 ) Figure 2: 10 foot long piece of 80/20 being cut 3

c. Tapping the 80/20 i. After the pieces are cut the hole in the middle of the 80/20 needs to be threaded for connectors, shown in Figure 4. Using a ¼ 20 tap, shown in Figure 3, the pieces can be threaded by hand, shown in Figure 5. 1. Remember to add oil when threading! Figure 3: Example Tap and Handle Figure 4: 80/20 Profile Figure 5: Tapping of the 80/20 was done by hand 2. Option #2: Ordered Components a. Buy pre cut lengths of 80/20 on McMaster Carr. Required lengths listed in Step 1a. b. Buy Aluminum Connectors shown in Figure 12, McMaster Carr PN47065T832. 3. Assemble 80/20 Frame a. Bottom Frame 4

i. Lay the two 2ft lengths so they are parallel and then take two 1ft lengths at either end so it looks like a rectangle. ii. To attach one of the 1ft lengths to the two 2ft lengths. Take two 2 way connectors and slide it into place and thread the bolts through the holes of the connector into the 80/20. To see the connection holes and the how the tabs slide into the 80/20, see Figure 6. At the end of this step, the assembly should be the same as Figure 7. Figure 6: 2 way Connectors Figure 7: Completion of Assembly Step 2 iii. Attach the three way connectors to the other end of the rectangle. There will be a vertical piece added later, shown in Figure 8. 5

iv. Figure 8: 3 way Connector In the rectangle, place a 1ft length inside so that it is parallel to the other 1ft lengths, shown in Figure 9. This middle piece will slide. Figure 9: Completion of Assembly Step 4 b. Top Frame i. Lay two 1.5ft lengths so that they are parallel. Then lay one 1ft length so that it is perpendicular and attach the pieces using a two way connector. The piece should resemble a U. ii. Place a 1ft length between the 1.5ft lengths. This piece will slide but there will be two brackets that will be used to support the 80/20 since this section is vertical, shown in Figure 10. 6

Figure 10: Completion of Assembly Step 2 Figure 11: Two halves of the 80/20 Assembly, before connection 4. Additional Components a. Purchased Connectors i. End Feed Fasteners, McMaster Carr 47065T142. Need 5 packages of 4. ii. Aluminum Brackets for Single Profile Extrusions, McMaster Carr 47065T236. Need 2. b. Built Components i. Six additional connectors can be made from ⅛ thick aluminum. These connectors can also be purchased from McMaster Carr PN47065T832 ( See Option #2 ). Figure 12: Aluminum Connector Design ii. Clamp Bracket 7

iii. Figure 13: Clamp Bracket Design Motor Plate Figure 14: Motor Plate Design iv. Motor arm. 3D printed,.stl attached at the end of this document. This piece can also be made out of aluminum. 8

Figure 15: Motor Arm Design v. Strain Gage Holder. 3D printed,.stl can be downloaded here. 1. May need to be altered based on glue and wire positioning. vi. Strain Gage Dowel. Cut a 1.5 wooden rod in half. Add a #10 hole to attach to the strain gage, see Figure 21. vii. Motor Screws. #8 32 rod needs to be cut into 3.5in lengths. 5. Mounting the Motor a. Mounting the Motor Plate i. Using the motor screws and nylock nuts attach the motor to the motor plate, as shown in Figure 16. ii. Slide the motor plate into the middle/sliding piece of the bottom frame (Figure 9). Figure 16 shows the finished mounting of the motor/motor plate on the assembly frame. Figure 16: Motor Plate Attachment 9

b. Mounting the Motor Arm i. Put the center hole of the mounting hub on the motor shaft and use a set screw to tighten it to the motor shaft, shown in Figure 17. Figure 17: Universal Mounting Hub ii. Then attach the Motor Arm to the Universal Mounting Hub using #4 40 screws, shown in Figure 18. iii. Figure 18: Motor Arm Attachment Put a ⅜ threaded rod through one of the ⅜ holes in whichever is most appropriate for your individual test. Add a nut to the end to secure the shaft, also shown in Figure 18. 6. Mounting the Strain Gage a. Attaching the Movable Vertical Bar i. The movable bar is supported vertically by two brackets, McMaster Carr PN47065T236. These brackets use end feed fasteners to allow the bar to slide, McMaster Carr PN47065T142. 10

Figure 19: Support Brackets ii. For added support put two aluminum connectors on the back part of the bar, as shown in Figure 20. Figure 20: Back Bar Connectors b. Attach the 3D printed Strain Gage Holder i. Using an end feed connector, McMaster Carr PN47065T142, on the back of the piece and by sliding the head of a #10 32 screw through the 80/20. The #10 32 screw goes through the Strain Gage and the Strain Gage Holder. Tighten the #10 32 screw, the Strain Gage base cannot move during a test. Shown in Figure 21. 11

Figure 21: Strain Gage Holder ii. Attach the wooden dowel to the top part of the Strain Gage. The final Strain Gage Mounting should look like Figure 22. Figure 22: Strain Gage Mounting 7. Securing the Horizontal 80/20 Sliding Bar i. Take two of the Aluminum Connectors made in the previous section and lay the connectors on the ends of the 1ft lengths and use the End Feed Fasteners, McMaster Carr 47065T142, in the holes, shown in Figure 23. 12

Figure 23: Aluminum Connectors, Part 1 8. Mounting the Clamp a. Drill holes into clamp i. Use the top left holes in Figure 13 as a reference for drilling the holes, since the pieces have to match up. The holes should be 1/4 in diameter. b. Clamp Bracket Assembly i. Take the 6in length of 80/20 and stand it vertically between the horizontal/motor bar and the top part of the assembly/strain Gage bar. ii. Add connectors to both sides of the base of the 6in bar to make sure it stands, as shown in Figure 24. Figure 24: Clamp Mounting Connectors iii. Using the Clamp Bracket in Figure 13, attach two feed end fasteners, McMaster Carr 47065T142, to the vertical holes and slide them into the 6in bar of 80/20. 13

iv. Add two feed end fasteners, McMaster Carr 47065T142, to the two horizontal holes of the Clamp Bracket in Figure 13. Slide the 4in piece of 80/20 through those fasteners. v. Attach the clamp to the remaining holes. The final Clamp Bracket assembly is shown in Figure 25. Figure 25: Clamp Bracket Assembly c. Add cushioning and brackets to clamp jaw i. Using a hot glue gun, attach the angle brackets to each end of the clamp and the foam on top of the angle brackets as shown in Figure 26. Figure 26: Brackets and Foam 14

9. Electronic Instructions/Code a. Connect Arduino and shields together i. First step is to acquire the Arduino board and the two shields, be sure to solder the pins onto the motor shield if needed. ii. There is a small black part that comes with the motor shield, do not lose that! That is the jumper needed to gain power from the Arduino. iii. Simply stack the Arduino and shields in the following order; Arduino Uno (Bottom), Motor shield, and Strain Gauge shield (Top) b. Ports used by strain gauge and how to connect i. Attach wires of strain gage to wires that have connectors on the ends. ii. Attaching the strain gauge to the strain gauge shield should be simple. Attach to the strain port on the RobotShop shield. 15

c. Ports used by motor i. VIN jumper must be connected. ii. The Stepper ports are M1 and M2. d. Software needed to run tests (with download links) i. The software runs on a loop where the motor moves forward by stepjump every loop until the motor has cumulatively moved up to maxangle. For every motor movement, the strain gauge calculates the force being exerted on it. If the force detected is greater than the maxforce value assigned, the experiment will immediately stop. When the maxangle or maxforce are reached, the motor runs in reverse to its original position. ii. Arduino code download: Grip Strength Test Code 1. Also available in Software Code section 2. Adjustable Parameters: a. stepjump Number of steps be to taken for every movement. The larger the number, the quicker the experiment will be. Therefore, the least it should be is 1. b. maxangle Desired final angle measurement. This should be less than 90 because either the testing rig or the e NABLE Hand/Arm may break if it is actuated too far. c. maxforce Maximum force allowed so that the testing rig or the e NABLE Hand/Arm will not break it that force is attained. 16

3. The strain gauge must also be calibrated, requiring the editing of: ReadingA_Strain2, LoadA_Strain2, ReadingB_Strain2, LoadB_Strain2, and zero. iii. PLX DAQ https://www.parallax.com/downloads/plx daq 1. Download this free add on for Microsoft Excel 2. Check port settings easily in Arduino when plugged into USB 3. Baud should be set to 9600, as per the code e. Power requirements i. The external power supply is connected to the Arduino Uno board. This external power supply is required to run the motor and motor shield which requires more than 7 Volts. ii. The USB b cord was connected to the Arduino Uno board. f. Button 3 Prong i. Left +3.3V 1. Note: May need to be GND based on orientation ii. Middle Port 9 iii. Right GND 1. Note: May need to be +3.3V based on orientation 10. Strain Gage Assembly/Calibration a. Orientation of strain gauge must be in the formation that it will be used. This can be done by attaching a scale to the strain gauge and pulling it away at a designated force. The strain gauge will output integer values for Reading_Strain2 which should be saved as equivalent to the load applied. After saving off two reading and strain pairs, they should be put into the code ReadingA_Strain2 with LoadA_Strain2 and ReadingB_Strain2 with LoadB_Strain2. Through interpolation, this should allow for appropriate readings. b. In the Grip Strength Test Code, the zero value is an extra precaution to fix the readings so that it actually outputs 0 lbs when there is no force being exerted. c. The code is in the Strain Gauge Calibration Code section or downloaded here. 17

11. Final Assembly a. Ideal location of each component is based on hand dimensions. b. Motor position i. Center of motor should be lined up with pivot point of gauntlet. ii. Left right position can be changed by loosening the bolts on the motor plate and sliding it left or right, then tightening the bolts again. iii. Forward back position can be changed by loosening bolts connected to the motor bar but on the frame, then tightening the bolts again. c. Strain gage position i. Should be barely touching digits of prosthetic hand. ii. Vertically adjusted by loosening bolts on the angles. iii. Horizontally adjusted by loosening bolts on the aluminum plates. d. Clamp position i. Move so that the center of the digits line up to the black line on the dowel. ii. Vertically move via bolts connected to Clamp Bracket. iii. Horizontally move by loosening bolts attached to frame. 18

12. Tests These tests are to verify that all of the parameters are met so that all devices are calibrated to the same accuracy, within error. a. Entire Apparatus Test Date completed: Performed by: Requirement # Importance Metric Unit Target Value Subsystem S1 9 Cost $ 200 Entire Apparatus S2 6 Weight of tester lbs 50 Entire Apparatus S8 7 Equipment: Base/Pivot Point Clamp Arduino Power Supply Motor Motor Shield Strain Gauge Strain Gauge Shield Wooden Dowel Cost and Weight Test Repeatability using gauge R&R % 10% due to measurement error Entire Apparatus Equipment Cost Base/Pivot Point Clamp Arduino Power Supply Motor Motor Shield Strain Gauge Strain Gauge Shield Wooden Dowel Total Weight: Total Cost: 19

Gauge R&R: Measures the amount of variation in the measurement system arising from the measurement device and the people taking the measurements 1.) Three team member will set up the system and run it using 5 different hands (for a collection of 15 data points) 2.) Collect the data for each trial on each team member 3.) Plug into minitab or another statistical software 4.) Determine the variability between users and equipment Variation due to measurement error: b. Motor Test Date completed: Performed by: Requirement # Importance Metric Unit Target Value Subsystem S3 5 Duration of Test min 5 Motor S5 8 Torque oz/in 250 Motor S7 8 Equipment Base/Pivot Point Arduino Motor Motor Shield Power Supply/Computer Angle Measurement Accuracy +/ 2 Motor Duration Test Start test and time how long it takes until the fingers of the hand reach 45 degrees. Test # Duration #1 #2 #3 #4 Average: 20

Torque Test 1) Attach a bar to the end of the stepper. 2) Add weights to the end of the bar. 3) See chart below. Weight (lbs) Pass/Fail Time Between Steps (s) Weight of Bar: Length of Bar: Angle Measurement Accuracy Test 1) Mount protractor to base with 0 degrees being our neutral position. 2) Input number of steps and measure angle using the protractor. 3) See chart below. Number of Steps Angle Measured (Protractor) Theoretical Angle (Stepper) Error ( 土 ) Average: 21

c. Strain Gauge Test Date completed: Performed by: Requirement # Importance Metric Unit Target Value Subsystem S4 9 Max Force of Sensor lbs 50 Load Cell S6 8 Force Measurement Accuracy oz +/ 1 Load Cell Equipment Power Supply/Computer Arduino Strain Gauge Shield Strain Gauge Wooden Dowel Max Force Test and Force Measurement Accuracy Test: 1) Attach load cell to one of the dowel halves and hang the assembly horizontally. 2) Hangs weights off the load cell. 3) See chart below. Weight (lbs) Pass/Fail Error ( 土 ) Average: Max Weight Needed for Test: References https://en.wikipedia.org/wiki/tap_and_die (picture) 22

Software Code // Grip Strength Test Code // Stepper Motor #include <Wire.h> #include <Adafruit_MotorShield.h> #include "utility/adafruit_pwmservodriver.h" // Create the motor shield object with the default I2C address Adafruit_MotorShield AFMS = Adafruit_MotorShield(); // to motor port #1 (M1 and M2), 200 steps in this motor Adafruit_StepperMotor *mymotor = AFMS.getStepper(200, 1); float currentstep = 0; // Current step number float anglejump = 5.4; // Angle that it should increment up by. Should be done at multiples of 1.8 // Because the motor has 200 steps for 360 degrees, therefore 360/200 = 1.8 degrees per step float stepjump = (anglejump/1.8); // Number of steps to be taken at once float maxangle = 75.6; // Desired final angle measurement float numberofsteps = (maxangle/1.8); // 1.8 degress per step float currentangle; // Angle that the motor is currently at compared to the starting position float maxforce = 8.0; // Maximum force allowed so that the hand or apparatus will not break // Strain2 // Order from left to right while looking at "Strain2": Red Green White Black float ReadingA_Strain2 = 368.00; // Values from Strain_Gauge_Calibration_04 26 16 float LoadA_Strain2 = 7.7; // (lbs) float ReadingB_Strain2 = 340.00; float LoadB_Strain2 = 0.0; // (lbs) float zero = 2.20; // zero reading char* forces[]={"no.", "Yes. Testing is stopping now. Save the Excel file."; // text to output based on the force measured compared to the maxforce // If maxforce is never reached, then "No." will always show up. Therefore, the file/data must be saved when maxangle is attained. int index; // index of forces[] to determine which text to output float reverse; // number of steps to output, either currentstep or numberofsteps int time_step = 1000; // Reading every 1 second. // Initially set as 2500, 2.5 seconds long time = 0; float newreading_strain2; // analog in 1 for Strain 2 float load_strain2; 23

// Start Button int buttonpin = 9; // the pin of the push button int var = 0; // Used so that the test will occur only once for every turn on // Used for start button to begin moving stepper and taking readings void setup() { Serial.begin(9600); // set up Serial library at 9600 bps // Stepper Motor AFMS.begin(); // create with the default frequency 1.6KHz mymotor >setspeed(10); // 10 rpm // PLX DAQ set up Serial.println("CLEARDATA"); // Clears up any data left from previous projects Serial.println("LABEL,Time,Current Step,Load Measured,Forces too high?"); // Write LABEL so Excel knows the next things will be the names of the columns Serial.println("RESETTIMER"); // Resets timer to 0 // Start Button pinmode(buttonpin, INPUT); // initialize the push button as input delay(1000); // 1 second delay to give user time to step away printing(); // prints the first value, the 0 point void loop() { if (digitalread(buttonpin) == LOW){ // When button is pressed, testing begins var = 1; // Starts the testing when var = 1 delay(2500); // 2.5 second delay for user to step away if (var == 1){ // Testing has begun if (currentstep < (numberofsteps)){ // Keeps going until all positions are tested and recorded mymotor >step(2*stepjump, FORWARD, INTERLEAVE); // stepjump steps foward, using single coil stepping newreading_strain2 = analogread(1); // analog in 1 for Strain 2 // Calculate load by interpolation load_strain2 = ((LoadB_Strain2 LoadA_Strain2)/(ReadingB_Strain2 ReadingA_Strain2)) * (newreading_strain2 ReadingA_Strain2) + LoadA_Strain2 + zero; delay(time_step); // delay to account for time_step 24

// PLX DAQ printing currentstep = currentstep+stepjump; // Increment up currentstep by stepjump currentangle = (currentstep*1.8); // Updates currentangle if (load_strain2 >= maxforce){ // Safety measure when measured force is beyond acceptable values index = 1; // Prints "Yes. Testing is stopping now. Save the Excel file." endsequence(currentstep); // Reverses stepper to starting position printing(); else{ index = 0; // Prints "No." printing(); else{ var = 2; // Test never reached maxforce but did reach numberofsteps if (var == 2){ // Test is over endsequence(numberofsteps); // Reverses stepper to starting position void endsequence(float endsteps) { // Brings back to starting position //endsteps is an input designated by whether the test completed, thus it is numberofsteps // or is the forces were too high, thus it is currentstep mymotor >step(endsteps, BACKWARD, SINGLE); // Bring back to start position var = 0; // Will not restart testing until the button is pressed again currentstep = 0; // Re initializes start position void printing(){ if(millis() > time_step+time) { Serial.print("DATA,TIME,"); // prints time... this is standard for all PLX DAQ Serial.print(currentAngle); // prints currentstep Serial.print(","); Serial.print(load_Strain2); // prints strain 2 load Serial.print(","); Serial.println(forces[index]); // prints response to question if forces are too high, thus if it is above maxforce time = millis(); 25

Strain Gauge Calibration Code // Strain Gauge Calibration Code // SGS Calibration by linear interpolation for Strain 1 and Strain 2 // Apply two known loads to the Strain Gauge sensor and record the values obtained below // You can use Strain 1 or Strain 2 or the two Strains at the same time. float ReadingA_Strain2 = 368.00; float LoadA_Strain2 = 3.5; // (Kg,lbs..) float ReadingB_Strain2 = 340.00; float LoadB_Strain2 = 0.0; // (Kg,lbs..) int time_step = 250 ; // reading every 2.5s long time = 0; void setup() { Serial.begin(9600); // setup serial baudrate void loop() { float newreading_strain2 = analogread(1); // analog in 1 for Strain 2 // Calculate load by interpolation float load_strain2 = ((LoadB_Strain2 LoadA_Strain2)/(ReadingB_Strain2 ReadingA_Strain2)) * (newreading_strain2 ReadingA_Strain2) + LoadA_Strain2; // millis returns the number of milliseconds since the board started the current program if(millis() > time_step+time) { Serial.print("Reading_Strain2 : "); Serial.print(newReading_Strain2); // display strain 2 reading Serial.print(" Load_Strain2 : "); Serial.println(load_Strain2); // display strain 2 load Serial.println('\n'); time = millis(); 26