Tuesday, November 12, 2019

Progress Report for 11/13/19

Goals for 11/7/19-11/13/19:
  • Tested out more speeds to see which was the fastest at defined frequencies
  • Perform tests to observe different relationships between high or low MHigher M

  • Verify that it works and that it meets the appropriate time and defined parameters
  • Figure out/troubleshoot what is going on with the Arduino/Matlab interface, specifically the COM9 erro
Codes used for the week can be found under this link under the appropriate date (11/6/19):
Progress for the week of 11/7/19-11/12/19:
I started this week off by really trying to understand the sampling frequency rate (relationship between motor steps and load cell samples).
To observe how changing this value will affect the tester’s performance. To do this, I did several things:
  • I chose one appropriate speed(S) for the motor (how far should the motor go/how many seconds eg. 4cm/30s).
  • For this step, I chose S to be 5 cm/ 30 seconds
  • Choose what distance I wanted the motor to travel (D)
    • 1 cm 
    • 1 cm correlates to 1000 steps (steps)
  • Find values for TM   and Tlc 
    • TM   is dependent on the chosen speed(S) and the calculated step rate(A)
    • In this case, since I left it consistent A= 166.6667 steps/s 
    • ™   is then equal to the inverse of the speed rate value multiplied by a 1000
    • As for Tlc, I just had to choose what frequency I wanted load cell signals to be sent to the serial port(Flc)
      • Since, I wanted to see the different relationships of having a large or small M, I chose varying frequencies for Flc
        • These varying frequencies range from 10-100 with increments of 10 Hz
    • The values I used and the results I received from these tests can be seen under this link:
  • After I performed the proper calculations, I performed my tests with these values and tried to verify if it worked appropriately. 
    • Does the program perform/execute the code during the predicted time duration?
    • Does the motor meet the appropriate distance specified by the correct number of steps?
  • To verify this:
    • I first changed the necessary parameters
      • TM
      • Tlc
      • Distance/number of steps
      • Flc
    • Add a timer to Arduino’s serial port to observe how long it took
      • In my progress report code the line that correlates to this action is: Serial.print(millis()). 
    • Place a ruler under the testing system to see if the motor travels the appropriate distance
      • This is the test setup:
  Figure 1: Tensile Tester test setup to verify that the motor moves the system to the appropriate distance.
In this image, a ruler was placed under the tester to serve as a verification method
  • Results of my tests show that: 
    • For each test performed, I found that my Arduino timer was consistent.
      • Code was accomplished within 96000 ms (1 min and 36 seconds) regardless of what frequency I chose for Tlc, it was always the same!
      • I found that to be interesting because this measured time duration did not match my predicted time duration of 6 seconds.
        • It was off by 60% which was very alarming to me
    • With this information I started troubleshooting my code because I believed that my interpretation of what needed
    • to be done and my calculations were correct, so there was something definitely off. 
  • Code Troubleshooting:
    • I first started reorganizing my code to see if things needed to be defined earlier or later or if things needed to be removed, etc.
    • After that, I started looking at my previous codes that I designed for the motor (insert delay stepper code here) to see what am I doing differently
    • that might be throwing off the code.
    • The main differences between my previous and current code is that the use of a for loop within the void setup in place of the void loop.
    • While in my current code, I’m using the void loop and several conditional statements to serve as an on/off switch to signals
    • Knowing the differences between these codes, I tried taking out the motor and load cell functionality
    • outside of the void loop and just in the void setup
      • I found that it functions the same and that there is no complete difference in terms of performance of the motor
    • After this, I tried commenting out different sections of my code to see if anything will change. 
      • I commented out the Load Cell functionality code and I found that this line of code was slowing down the performance of the motor!!!
        • Serial.println(scale.get_units(1,1)) 
    • So, now my line of action is to find a way to work around this issue and see what will be best.




No comments:

Post a Comment

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...