Saturday, October 26, 2019

Speed Calculation and NEMA 17 motor Notes

Objective: Pick a specified speed and then back track to see if this speed correlates to the appropriate distance (x) during a specified period of time

Step 1: Define Speed in RPM (convert to steps/second if necessary

  • RPM was chosen because Arduino's stepper library interprets speed in RPM
  • Max frequency 

Step 2: Determine the time it'll take for the motor to travel to the appropriate distance using the specified speed

Step 3:  Test your predictions and see if during x time at y speed, motor is able to travel z steps (Values can be calculated depending on what values you chose for your speed and number of steps to travel)
  • To test this: set up the tensile tester like this: (insert picture here)
  • Change the code to meet your specified speed and time (See code here:) 
    • Aspects highlighted in red are the lines of code you change
    • Note: Want speeds to be high because tried it with low speed, it doesn't move much
    • Frequency of load cell should be at least 100 Hz (1/s)
  • Place tester on a ruler and zero it (set the mounting block at 0)
  • Set up a timer using your phone or any other form of a timer 
  • Run code and start timer
  • Stop timer when code is completed and observe time/distance traveled
    • Note: With time, remember to account for delay time b/c code will stop at the line of code for whatever time you specify
  • Check if results make sense in relation to specified distance and time and if it correlates to the correct/set RPM

Step 4: Once the optimal speed/frequency for the motor is found input it into the code which combines its functionality with the load cell and verify it works the way it should when connected to the motor.

NEMA 17 Motor Notes:
Definition of Torque:
  • r x F (r=distance, F=force)
  • moment of force or turning effect; rotational equivalent of linear Force
  • tendency of F to cause or change rotational motion of body
  • Twist or turning force of object
  • Units of Force= N*m
Holding Torque: amount of torque needed to move motor one full step when windings are energized but rotor is stationary

Windings: wire placed within coils, energized coils are compressed?????

Detent Torque: torque at maximum load that's applied to shaft of motor which is unexcited without causing continuous rotation

Radial Force= load acting perpendicular to longitudinal axis
Axial Force=load acting parallel to longitudinal axis

Moment of Inertia Definitions:
  • I= L/W 
    • L= angular momentum
    • W=angular velocity
NEMA 17 specifications can be found in this link:

Torque and Speed Relationships:
High speeds= lower torque
Smaller Distances with higher speed should be okay. 
For more info look at this link: https://www.motioncontroltips.com/torque-equation/





Progress Report for 10/30/19

Goals to accomplish for the week of 10/23/19-10/29/19:

  • Modify motor and load cell code
  • Verify code works and travels the appropriate distance and speed
  • Configure code with MATLAB??

Progress for the week of 10/23/19-10/29/19:
  • Copy of modified code can be found here under the appropriate date: 
    • https://docs.google.com/document/d/13rn23kiAMY7ovi3cRF-_pt-kocN8uBqWrs1T-pzl6as/edit?usp=sharing
  • Code is functional, travels the appropriate distance, however it's really slow. It took 20 minutes for the motor to travel 1000 steps which is equal to 1 cm.
  • Found that the issue is what the set sampling frequency (LM) and need to test different speeds under the motor's set speed function
    • Need to test if at x speed, it travels at this number of steps/distance
  • Motor Speed Calculations can be seen here:
    • https://docs.google.com/spreadsheets/d/1vlH1zqeTVPzaDHHW-sWdeF39lFdBxtBKXnJqBRSrW5c/edit?usp=sharing
  • Planning to test out these speeds/frequencies for the motor using only the motor code to see if it can achieve the appropriate distance in relation to this calculation at these specified speeds
    • These tests are also used to determine what speed frequency would be the best to set the motor frequency (fm) in relation to load cell frequency (fs) so that it travels at an efficient rate
    • Intend to perform this test on 10/28/2019

Wednesday, October 23, 2019

Lab Notes for 10/23/19

Goals that should have been accomplished for the week of 10/9/19-10/22/19:
  • Have an operational code combining the load cell code and motor code using Arduino IDE
  • Code is supposed to alternate between load cell and motor frequencies on Arduino IDE's serial port
  • Things that were actually accomplished:
  • Code was operational
    • However, ran into issues with the motor
      • Motor did not run
  • Troubleshooted the system
    • The circuit was not the issue because tested the Load Cell and Motor codes independently and they functioned fine
    • Manipulated the code a bit by checking to see if the conditional statement where the remainder of the counter divided by the sampling rate was the issue was the issue and it wa
      Discussion:
      "Psuedocode" Example:
      Goal of the code: 
      The purpose of the code is to have the load cell and motor function together and send signals to Arduino IDE's serial port at certain frequencies. Load cell frequencies should be sent more frequently than the motor frequencies. Code should serve as an on/off switch to initate the motor. For example, when this "switch" is on the motor should move one step while sending both motor and load cell signals to the serial port. When the "switch" is off, the motor will not move, but load cell signals will still be sent. This on/off value will change depending on what sampling frequency you choose for the load cell/motor cell. 

      A list of important variable for this code can be seen through this link:

      Important Functions:
      IF 
      "counter is <= to the number of motor steps"
      then:
      increase the increment of the counter
      move on to next condition

      IF
      "the remainder of the counter divided by LM is equal to 0"
      then:
      move the motor by 1 step
      Send Load cell signals and motor signals to serial port
      increment the step counter

      ELSE
      send load cell signals only to the serial port

      END CODE

      LM Calculations:

      Goals for the next week:
      • Modify the code and verify it works!
      • Configure code with MATLAB???


      Progress for 11/20/19

      Goals for 11/20/19: Set HX711 pins to digitalread configuration, to collect the raw data and try to see if that fixes the issue of slow p...