Difference between revisions of "FTC Moving 202008"

From wikidb
Jump to: navigation, search
(Created page with "= Encoder Notes = === Documentation and tutorials === * [https://stemrobotics.cs.pdx.edu/node/4746 Lesson: Exercise: Using Encoders] on PDX STEM * [https://docs.revrobotics....")
 
(Documentation and tutorials)
 
(One intermediate revision by the same user not shown)
Line 8: Line 8:
 
* [https://docs.google.com/document/d/1YqXxqQ4coYpGpb9xww9eVwUjlsdRepenzvxSz-adRe0/edit Motor Encoder Guide]
 
* [https://docs.google.com/document/d/1YqXxqQ4coYpGpb9xww9eVwUjlsdRepenzvxSz-adRe0/edit Motor Encoder Guide]
 
* [https://docs.google.com/document/d/1IE43YYgpEtVRxSQI2kH9LJlhO_Oo8IouXE-kpCAAVa0/edit Control Hub and Expansion Hub Firmware Update Guide]
 
* [https://docs.google.com/document/d/1IE43YYgpEtVRxSQI2kH9LJlhO_Oo8IouXE-kpCAAVa0/edit Control Hub and Expansion Hub Firmware Update Guide]
 +
* [https://ftctechnh.github.io/ftc_app/doc/javadoc/com/qualcomm/robotcore/hardware/DcMotorEx.html DcMotorEx]
  
 
=== issues with pidf ===
 
=== issues with pidf ===
Line 53: Line 54:
 
* getVelocity in ticks per second
 
* getVelocity in ticks per second
 
* f is the tolerance
 
* f is the tolerance
 +
 +
== Moving the Distance ==
 +
 +
*[[FTC_State]] also ramp up motors
 +
 +
* [https://www.revrobotics.com/rev-41-1300/  Core Hex Motor]
 +
** Output Shaft: 5mm Female Hex
 +
** Weight: 7 oz
 +
** Free Speed: 125 RPM
 +
** Stall Torque: 3.2 N-m
 +
** Stall Current: 4.4 A
 +
** Gear Ratio: 72:1
 +
** Encoder Counts per Revolution
 +
*** At the motor - 4 counts/revolution
 +
*** At the output - 288 counts/revolution
 +
 +
* [https://www.revrobotics.com/rev-41-1354/ 90mm Traction Wheel]
 +
 +
  90 mm * 3.1416 = 282.7 mm / rotation = / 25.4 mm 11.13 inches / rotation
 +
  288 couts / rotation  divided  11.13  inches / rotation  =  25.76 counts / inch
 +
  max is 125 rev / minute  divide 60 seconds / minute = 2.08 rev /second
 +
  2.08 rev / sec time 288 counts/  rev = 600 counts / sec  = max speed

Latest revision as of 13:02, 10 August 2020

Encoder Notes

Documentation and tutorials

issues with pidf

Issue reported and solved

Firmware https://www.revrobotics.com/software/#exphubpreviousfirmware

api

PID


pid api

PIDCoefficients DcMotorEx

Code snipets

 DcMotorEx motorExLeft;
 motorExLeft = (DcMotorEx)hardwareMap.get(DcMotor.class, "left_drive”);
 PIDCoefficients pidOrig = motorExLeft.getPIDCoefficients(DcMotor.RunMode.RUN_USING_ENCODER);
 pidOrig.
 PIDCoefficients pidNew = new PIDCoefficients(NEW_P, NEW_I, NEW_D);
 motorExLeft.setPIDCoefficients(DcMotor.RunMode.RUN_USING_ENCODER, pidNew);
  • getVelocity in ticks per second
  • f is the tolerance

Moving the Distance

  • Core Hex Motor
    • Output Shaft: 5mm Female Hex
    • Weight: 7 oz
    • Free Speed: 125 RPM
    • Stall Torque: 3.2 N-m
    • Stall Current: 4.4 A
    • Gear Ratio: 72:1
    • Encoder Counts per Revolution
      • At the motor - 4 counts/revolution
      • At the output - 288 counts/revolution
 90 mm * 3.1416 = 282.7 mm / rotation = / 25.4 mm 11.13 inches / rotation
 288 couts / rotation   divided  11.13  inches / rotation   =  25.76 counts / inch
 max is 125 rev / minute   divide 60 seconds / minute = 2.08 rev /second
 2.08 rev / sec time 288 counts/  rev = 600 counts / sec   = max speed