Thrifty Nova
  • Software Resources
    • Getting Started
    • Configure Controller Settings
      • Factory Default
      • Motor Type - Minion Setting
      • Inverting the Motor
      • Brake Mode
      • Maximum Output
      • Ramp Up/Ramp Down
      • Current Limiting
      • Soft Limits
      • Hard Limits
      • Setting Encoder Position
      • Follower Mode
    • Configure Onboard PID
    • Configure CAN Frequency
    • IO Signal Management
    • Set Output
    • Logging
    • Get Feedback
    • Unit Conversions
    • Subsystem Examples
      • Simple Elevator Example
      • Swerve Module Example
      • Simple Arm Example
  • Electrical Resources
    • Wiring the Thrifty Nova
    • LED Color Codes
    • Brushless Hall Sensor Connector
    • USB Communications
    • 10 Pin Data Connector
      • Intro to Sensors
      • Sensor Hat
      • Motor Runner Board
    • Hard Reset
  • Mechanical
    • Mounting Options
  • Software Releases
    • Software Releases
  • Thrifty Config
    • Thrifty Config Demo Video
Powered by GitBook
On this page
  • Configuring Encoder Type for Feedback
  • API Details
  • Encoder Feedback Method Examples
  • Position Feedback
  • Velocity Feedback
  • Current Feedback
  • Stator Current Feedback
  • Supply Current Feedback

Was this helpful?

Export as PDF
  1. Software Resources

Get Feedback

The Thrifty Nova provides various types of feedback including encoder feedback, and current feedback.

Configuring Encoder Type for Feedback

For encoder feedback to report correctly the user must specify which encoder is being utilized. This can be set using the useEncoderType method.

One encoder type is the encoder inside the BLDC motor attached to the controller.

motor.useEncoderType(EncoderType.INTERNAL);

The encoder type can also be set to an external quadrature encoder.

motor.useEncoderType(EncoderType.QUAD);

In addition, the encoder type can also be set to an external absolute encoder, but currently only for position control and feedback.

motor.useEncoderType(EncoderType.ABS);

The following encoder functionality is work in progress:

  • Direct CAN encoder to motor controller

API Details

Set the encoder type to use for feedback control.

useEncoderType(EncoderType encoderType)

Parameters:

  • encoderType The encoder type to use.

Encoder Feedback Method Examples

You can access encoder feedback for both position and velocity measurements.

Position Feedback

Below is the method for retrieving the position feedback measurement from the encoder. This is returned as a double representing encoder units.

double position = motor.getPosition(); // measure position from the encoder

Velocity Feedback

Below is the method for retrieving the velocity feedback measurement from the encoder. This is returned as a double representing encoder units per second.

double velocity = motor.getVelocity(); // measure velocity from the encoder

Current Feedback

The Thrifty Nova also provides current feedback on both stator and supply side current. The difference is as follows:

  • Stator: Uses the total current draw of phase a, b, and c.

  • Supply: Uses the stator current draw plus the current draw of the controller itself.

Stator Current Feedback

Below is the method for retrieving the stator current feedback measurement from the motor. This is returned as an integer representing amps.

int statorCurrent = motor.getStatorCurrent(); // measure stator current from the Nova

Supply Current Feedback

Below is the method for retrieving the supply current feedback measurement from the motor. This is returned as an integer representing amps.

int supplyCurrent = motor.getSupplyCurrent(); // measure supply current from the Nova
PreviousLoggingNextUnit Conversions

Last updated 6 months ago

Was this helpful?