The Thrifty Nova provides various types of feedback including encoder feedback, and current 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.
The encoder type can also be set to an external quadrature encoder.
In addition, the encoder type can also be set to an external absolute encoder, but currently only for position control and feedback.
The following encoder functionality is work in progress:
Direct CAN encoder to motor controller
Set the encoder type to use for feedback control.
Parameters:
encoderType The encoder type to use.
You can access encoder feedback for both position and velocity measurements.
Below is the method for retrieving the position feedback measurement from the encoder. This is returned as a double representing encoder units.
Below is the method for retrieving the velocity feedback measurement from the encoder. This is returned as a double representing encoder units per second.
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.
Below is the method for retrieving the stator current feedback measurement from the motor. This is returned as an integer representing amps.
Below is the method for retrieving the supply current feedback measurement from the motor. This is returned as an integer representing amps.