|
Re: Getting Started with Sensors
Encoders, multi-turn potentiometers, and photo-reflective sensors can all be useful in FRC. If you have any Talon SRX motor controllers, I would recommend experimenting with using encoders for speed control and potentiometers for position control.
If you are looking for applications that don't use Talons, there are still plenty of options. Photo reflective sensors can be used for line following, which is sometimes relevant in FRC. There are plenty examples of this online. A simple application of potentiometers is to enforce travel limits, similar to limit switches, except they can be adjusted in software.
You can also look into bang-bang speed control with encoders, which is useful for wheel-type shooters, for example. For that system, you would have a target speed, v, and an allowable variation, d, expressed as a percentage of v. If the wheel is spinning slower than v*(1-d), the motor is set to 100%. If the wheel speed exceeds v*(1+d), the motor is set to 0%.
For more complex situations, the motor output can be set to one of a number of discrete values according to how large the error is. This can allow for simple position control of mechanisms with potentiometers. With ultrasonic range finders, a similar system can also be used to automate the process of positioning the robot in proximity to a wall or obstacle with some precision (remember to account for the possibility of other robots or game pieces getting in the way).
Once you have familiarized yourself with basic sensor applications, you could even implement PID control on the RoboRIO directly. This is not necessarily the best idea, but it is definitely possible.
__________________
|