Hi everybody! Team 100 (specifically @yesiconcur) is working with REV Vortex motors for closed-loop positional control using duty cycle encoders, which works great! (Thanks REV!)

We’d like the ability to adjust the sensor range, since we’re using “unusual” encoders. There is mention of this ability in some REVLib comments in SparkPIDController:

* <p>If there is a limited range on the feedback sensor that should be observed by the
* PIDController, it can be set by calling SetFeedbackSensorRange() on the sensor object.

But this method does not actually exist.

I think @noahandrews left himself a TODO about it:

 // TODO(Noah): Figure out what's going on with setFeedbackSensorRange()

Is there any guidance from REV folk about this feature?

Oh also, just want to confirm, the Spark MAX does not support duty cycle encoders for this purpose, only analog, right?

1 Like

Spark Max also works with duty cycle sensors. What sensor are you trying to interface with it?

The AMS AS5048. it works great on the Spark Flex. Its duty cycle output is not quite linear, thus my interest in setFeedbackSensorRange.

I think i’ve been confused about the Spark Max because different docs describe the data port pins differently: the data port doc just calls pin 6 “multifunction,” the absolute encoder doc calls it “absolute/pwm,” and the “alternate encoder” doc calls it “alternate encoder a.”

We’ll try it out.

1 Like