The REV Potentiometer (REV-31-1155) converts the angular position of a shaft into an analog voltage signal. A potentiometer acts as an adjustable resistor, fluctuating resistance as the shaft is turned. As the wiper (the knob) moves up and down along the coils of the resistor and the resistance and voltage output change proportionally at each new position.

The Potentiometer has a 270° limit to rotation. The sensor detects how much rotational motion has occurred in a mechanism. A specific limit is set in code to ensure rotation stops at a certain point. This is helpful when building simple arm joints because if properly applied it can prevent a mechanism from damaging itself or other parts of the robot.
It is important to install the Potentiometer so that it will not be forced beyond its 270° range of motion.
Parameter
Value and Units
Sensor Type
Analog
Signal Port Mapping
n
Output Shaft
Female 5mm Hex
Mounting Holes
REV Motion Pattern(6x M3 tapped)
Range of Motion
270°
Taper
Linear (B)*
*The linear taper of this potentiometer means that the resistance changes linearly with the angle of the shaft. However, the linearity can be significantly affected by connected circuitry. Please see the Application Examples for more information.
Parameter
Min
Typ
Max
Units
Total Resistance
-
10
The Potentiometer only sends signal to the hub through the n port, which means during configuration the potentiometer will need to be assigned to port 0 or port 2. This limitation means that two potentiometers can not be hosted on the same physical port using the sensor splitter cable.
-




Potentiometers are most commonly used to measure the angle of an arm type joint. There are two different ways to utilize a potentiometer when using it in conjunction with an arm. One way to use the potentiometer is to directly place it on the shaft being used to pivot the arm. However, placing the potentiometer on an adjacent shaft that connects to the pivot-point shaft, via gears or chain, allows for more design flexibility.
Applying the concept of gear ratios (or sprocket ratios) to the potentiometer; it is possible to manipulate the accuracy/range of motion relationship. When the range of motion increases, through changes in gear ratio, accuracy decreases, and vice versa.
This Potentiometer has a 5mm female hex socket input and can be used with any 5mm hex axle, like the ones in the REV Building System. There are six M3 tapped holes around the input shaft on a 16mm circle which will mount to any of the REV Robotics Motion Brackets.
The REV Potentiometer has a linear* relationship between the output voltage and the angle of its shaft.
Assuming a 3.3V input voltage, the degrees per volt can be graphed and calculated as follows:
Therefore, given a measured output voltage V in volts, you can easily calculate the corresponding angle θ in degrees:
Even though the Potentiometer is a linear taper potentiometer, the analog circuitry on the Control/Expansion Hubs can change the linearity so that the above equations are not as accurate. Therefore, it is recommended to move your robot mechanisms to specific positions of interest and record the Potentiometer voltage at those positions to use in your code.
Calculating the output voltage for a specific angle θ between 0 and 270° is still possible, but the equation is no longer linear:
Configure the Potentiometer as "Analog Input" as shown in the image below.
In this example, the Potentiometer is configured on port 0. It is touched on briefly in thethat the Potentiometer only sends a signal to the Control Hub through the n communication channel. Because of this limitation, the Potentiometer will only work when configured port 0 and port 2.
This program has a variable called CurrentVoltage that is used to store the current voltage. CurrentVoltage is updated using the AnalogInput block every time that the program loops. When CurrentVoltage less than the midpoint of 1.65 volts, the motor stops. When the voltage is higher than the midpoint, the motor moves. The potentiometer voltage is also displayed via telemetry.
package org.firstinspires.ftc.teamcode;
import com.qualcomm.robotcore.eventloop.opmode.LinearOpMode;
import com.qualcomm.robotcore.hardware.AnalogInput;
import com.qualcomm.robotcore.eventloop.opmode.TeleOp;
import com.qualcomm.robotcore.hardware.DcMotor;
@TeleOp
public class PotentiometerTest extends LinearOpMode {
// Define variables for our potentiometer and motor
AnalogInput potentiometer;
DcMotor test_motor;
// Define variable for the current voltage
double currentVoltage;
@Override
public void runOpMode() {
// Get the potentiometer and motor from hardwareMap
potentiometer = hardwareMap.get(AnalogInput.class, "potentiometer");
test_motor = hardwareMap.get(DcMotor.class, "test_motor");
// Loop while the Op Mode is running
waitForStart();
while (opModeIsActive()) {
// Update currentVoltage from the potentiometer
currentVoltage = potentiometer.getVoltage();
// Turn the motor on or off based on the potentiometer’s position
if (currentVoltage < 1.65) {
test_motor.setPower(0);
} else {
test_motor.setPower(0.3);
}
// Show the potentiometer’s voltage in telemetry
telemetry.addData("Potentiometer voltage", currentVoltage);
telemetry.update();
}
}
}

