Sensor Integration
Sensors turn a "dumb" mechanism into one that knows where it is, whether it has a game piece, and when to stop moving. The software team programs what the sensors do, but the mechanical team decides where they go, how they're mounted, and whether they'll survive a full competition. If you design a mechanism without thinking about sensors, the software team will break into the lab and tape a beam break to the side of your intake at 2 AM.
Common sensor types and what they're for
Beam break (IR)
Whether something is blocking a light beam between an emitter and receiver
Game piece detection: "is there a ball/note/fuel cell in the intake or indexer right now?"
Photoelectric proximity (Banner sensor)
Whether something is within a set distance in front of it
Game piece detection at close range. One-sided (doesn't need a receiver across from it like beam break).
Limit switch
Physical contact with an object
Hard stop detection: "has the elevator hit the bottom?" "Is the arm fully retracted?"
Hall effect sensor
Presence of a magnet
Contactless limit switch. Glue a magnet to a moving part, mount the sensor on the frame, and detect when the part reaches a specific position.
Through bore encoder
Shaft rotation (absolute position)
Arm angle, elevator position, intake deployment angle. Mounted on a shaft to track where the mechanism is.
CANcoder
Shaft rotation (absolute position)
Same as through bore encoder but communicates over CAN bus. Used on our swerve module steering.
Color sensor
Color of a nearby surface
Game piece identification when there are multiple game piece types with different colors.
Time of flight (ToF)
Distance to a surface
Precise distance measurement. Can detect game piece presence and position within a mechanism.
What the mech team needs to do
Sensor integration is a collaboration between mech and electrical/software. The mech team's responsibilities are:
Every sensor needs a physical mounting location designed into the mechanism from the start. This means:
Add sensor mounts to your CAD model. A 3D printed bracket, a tab on a plate, a pocket in a structure. If it's not in CAD, it won't be in the right place on the real robot.
Position the sensor where it actually needs to be. For a beam break, that means the emitter on one side of the game piece path and the receiver directly across from it. For a limit switch, that means in the path of the moving part at exactly the position where you want it to trigger.
Check clearance. Make sure the sensor won't get hit by moving parts, won't be in the path of game pieces that haven't been captured yet, and won't be blocked by structure.
Sensors are fragile compared to the rest of the robot. A limit switch that gets smashed by an arm at full speed won't work anymore.
Use recessed mounting so the sensor body is tucked behind structure rather than sticking out where it can get hit.
Print protective housings for beam breaks and small sensors. A simple 3D printed shell around the sensor adds significant protection at almost no weight.
Mount cameras and vision sensors in impact-resistant material. TPU camera mounts (like 6328 used in 2024) absorb hits instead of shattering.
Every sensor has a wire that needs to get back to the electronics board. The mech team needs to:
Leave space for the wire run in the mechanism design. If the sensor is on a moving part (like an intake arm), the wire needs a path that doesn't get pinched or pulled as the mechanism moves through its range of motion.
Add cable guides or clips along the wire path so wires stay put and don't snag on moving parts.
Use strain relief at the sensor end so the wire doesn't break at the solder joint from repeated flexing.
Add enough slack for moving mechanisms. A wire that's taut at one end of travel will break when the mechanism moves to the other end.
Where sensors go on common mechanisms
Intake
Game piece acquired
Beam break or photoelectric
Across the game piece path, just inside the frame perimeter (after the game piece clears the bumper)
Indexer / feeder
Game piece in position
Beam break
At the position where the game piece needs to be before the next action (feeding to shooter, handoff to scoring mech)
Elevator
Top and bottom limits
Limit switch or hall effect
At the top and bottom of travel. Mount on the frame, triggered by the carriage.
Elevator
Continuous position
Through bore encoder or CANcoder
On the shaft that drives the elevator, or on a spool
Arm pivot
Angle
Through bore encoder or CANcoder
On the pivot shaft
Arm pivot
Hard stop positions
Limit switch or hall effect
At the stowed and fully extended positions
Shooter
Flywheel speed
Motor encoder (built into Kraken/NEO)
No additional sensor needed since our motors have built-in encoders. Software reads RPM directly.
Swerve steering
Module angle
CANcoder
Already part of the swerve module. Mech team just needs to install the encoder magnet.
Always have a backup plan for game piece detection. If your beam break fails at competition, can the driver see whether the intake has a game piece? Can the software team fall back to motor current sensing (detecting the current spike when a game piece loads)? A good design doesn't fail entirely when one sensor breaks.
Designing beam break mounts
Beam breaks are the most common sensor you'll need to design mounting for, so here's what to keep in mind:
The emitter and receiver must be directly across from each other with a clear line of sight. Any structure, roller, or bolt in the beam path will cause false triggers.
Mount them in 3D printed housings that align the emitter and receiver precisely. A loose beam break that shifts by a few millimeters can miss the game piece entirely.
Recess the sensor into the housing so the lens doesn't get covered in dust, carpet fuzz, or game piece residue during a match.
Position the beam so it crosses the narrowest part of the game piece path. If the path is 12" wide and the beam only crosses the center 2", a game piece can slide past on the edge without being detected.
Designing limit switch mounts
Mount the switch body to a fixed part of the frame. The moving part (carriage, arm, linkage) actuates the switch arm by pressing against it.
Don't rely on the switch arm to absorb the full impact of the mechanism. Use a mechanical hard stop to actually stop the mechanism, and position the limit switch so it triggers just before the mechanism reaches the hard stop. This way the switch detects the position and the hard stop absorbs the force.
Use normally closed (NC) wiring when the sensor is for safety. If the wire breaks or comes unplugged, a normally closed circuit reads as "triggered," which is the safe state (mechanism stops). A normally open circuit would read as "not triggered" if the wire breaks, which means the mechanism keeps going.
Last updated
Was this helpful?