Beyond yes/no switches, two analog quantities are extremely useful: distance and electrical current.
Distance sensors
FRC teams most often use time-of-flight (ToF) laser sensors, which fire an invisible Class 1 laser and time the reflection to measure absolute distance fairly independently of target color or reflectance.
- The REV 2m Distance Sensor (part REV-31-1505) is based on the ST VL53L0X ToF module. It reports distance over I2C (address 0x52) with a measurement range of roughly 5 cm to 200 cm (2 m) at millimeter resolution. It ships with a 4-pin JST-PH cable.
- The Playing With Fusion Time-of-Flight sensor (SEN-36005) is built on the newer ST VL53L1X and communicates over the CAN bus (1 Mbit). It supports up to 254 configurable CAN IDs so you can chain several on one bus, and ranges about 1.4 m in short mode and up to ~4 m in long mode depending on lighting.
Uses include detecting how far a robot is from a wall before scoring, sensing a game piece inside a mechanism, or measuring elevator height as a sanity check against the encoder.
Key limitation: ToF sensors have a measurement cone and a maximum sample rate that drops with ambient light, so they are best for short, well-defined gaps, not long open-field ranging.
Current sensing
Every channel on the REV Power Distribution Hub (PDH) and the older CTRE Power Distribution Panel (PDP) measures the current flowing through it, reported over CAN via WPILib's PowerDistribution class. Modern smart motor controllers (Talon FX, Spark MAX/Flex) also report their motor output current over CAN.
Why current is a sensor:
- Stall / contact detection: When an intake grabs a game piece or an arm hits a hard stop, current spikes. You can detect a successful intake by watching for a current threshold instead of adding a beam break.
- Brownout protection: Watching total current helps you stay under the limits that cause the roboRIO to brown out and reset.
- Mechanism health: Abnormally high steady-state current can warn of a jam or binding.
PowerDistribution pdh = new PowerDistribution(1, ModuleType.kRev);
double intakeAmps = pdh.getCurrent(5); // channel 5
if (intakeAmps > 30.0) { /* probably have a game piece */ }
Current-based detection is cheap (no extra hardware) but noisy, so filter it (a moving average or WPILib LinearFilter) and require the threshold to persist for several loops before acting.
Key takeaways
- Time-of-flight sensors give absolute distance: the REV 2m sensor (VL53L0X, I2C, ~2 m) and the Playing With Fusion SEN-36005 (VL53L1X, CAN, ~1.4 m short / ~4 m long).
- The REV PDH and CTRE PDP report per-channel current over CAN; smart motor controllers report motor current.
- Motor current spikes can detect intakes, stalls, and jams without extra sensors — but filter it before acting.
Keep going
Take the quiz · +10 XP with an accountMore in Sensing Fundamentals: Digital, Analog, and CAN Inputs
Sources & corrections
This lesson is AI-assisted: drafted from primary sources, then reviewed and edited by hand. Errors still get through. When one is reported we fix it and write down what changed — publicly, in the corrections log.
Sources and further reading
- REV 2m Distance Sensor (REV-31-1505)revrobotics.com
- Playing With Fusion: CAN ToF sensor (SEN-36005)playingwithfusion.com
- WPILib: Power Distribution moduledocs.wpilib.org
Read next
Articles on this, for competition day
The lesson covers how it works. These cover what to do when it breaks.
- 17 min read
FRC Sensors Explained: Encoders, Gyros, Beam Breaks, and Limit Switches
A practical FRC guide to encoders (quadrature, absolute, CANcoder, through-bore), gyros (NavX2, Pigeon 2.0), limit switches, beam breaks, and current sensing.
Read - 20 min read
REV Robotics for FRC: NEO Motors, Spark MAX/Flex, PDH & MAXSwerve
A practical guide to the REV Robotics FRC ecosystem: NEO, NEO Vortex and NEO 550 motors, Spark MAX and Spark Flex controllers, the PDH, and MAXSwerve.
Read - 19 min read
FRC PDH: The Power Distribution Hub Explained (Channels, Fuses & Wiring)
A complete guide to the REV PDH (Power Distribution Hub): all 24 channels, breaker and fuse sizing, clean wiring, the switchable channel, CAN telemetry, and PDH vs PDP.
Read
Lesson quiz
RequiredAll 3 right completes the lesson. Miss one and only that question comes back — anything you already answered correctly stays banked.
0 of 3 answered
01.The REV 2m Distance Sensor (VL53L0X) is a time-of-flight laser rangefinder. How does it report its distance reading to the roboRIO?
02.The Playing With Fusion Time-of-Flight sensor (SEN-36005, VL53L1X) differs from the REV 2m sensor in how it connects. Which interface does it use?
03.How can a team measure the current drawn by an individual motor channel on a REV PDH or CTRE PDP?
Answer every question to submit.
All 51 lessons in Programming, Controls & Sensors
- Not started:Mini-Project: A Closed-Loop Elevator with Motion Magic
- Not started:Mini-Project: A Velocity-Controlled Shooter on REVLib
- Not started:Mini-Project: A Teleop Swerve Drive Subsystem
- Not started:Mini-Project: An Autonomous Routine with PathPlanner
- Not started:Mini-Project: Vision-Aligned Scoring with Limelight
- Not started:State-Space Control and Kalman Filtering
- Not started:Log Replay Architecture with AdvantageKit
- Not started:Advanced Pose Estimation: Multi-Tag Fusion and Standard Deviations
- Not started:Robot Coordination, Alerts, and Operator Feedback
- Not started:Case Study: Hardening Software Before an Event