Programming Applied Sensors in FIRST Robots Chris Elston – Team Download sample code:
Basic Components Robot Controller & Operator Interface Radio Modems Digital Sensors Analog Sensors Speed Controllers and Spikes Joysticks Motors & Pneumatics
Basic Components Reference material (where to find) 2004 – Best year to look for documentation on controller, programming examples 2005 – Best year to look for documentation on CMU camera – Not many new documents released
Basic Components Digital Sensors Analog Sensors CMU Camera
Digital Sensors
Joystick buttons Buttons Limit Switches Pressure Sensor Optical Sensor Reed Switches Thumb Wheel Switches Encoders
Digital Sensors Example programming questions How does a limit switch work? How does a thumbwheel work? Optical sensors work?
Digital Sensors The Limit Switch is a digital sensor. It can distinguish between two states: whether the limit switch is pressed or not pressed. When the Limit Switch is not pressed, the robot interprets this value as a 1 (one). When the Limit Switch is pressed the robot interprets the value as a 0 (zero).
Digital Sensors
Analog Sensors
Joystick Axis Potentiometers Rotational Rate Sensor (Yaw Rate Sensor) SMC Analog Pressure Sensor
Analog Sensors Analog Inputs are defined as inputs that can have any voltage value between 0 and 5 volts, not just ON or OFF. Joysticks, Potentiometers, and Gyro sensors are typically connected to Analog Inputs. Both the Robot Controller and the Operator Interface (FRC system only) have the capability to measure analog inputs.
Analog Sensors PWM Type Analog Inputs Operator Interface represented as a 0 to 254 = 0 to 5V linearly 10-Bit Analog Inputs Robot Controller represented as 0 to 1023 = 0 to 5V linearly
Analog Sensors Always use 100k Ω potentiometers.
Analog Sensors
IS30 SMC Analog Pressure Sensor 0 to 120 PSI = full scale 0 to 5 Volts 0 to Volts = 120 PSI = 1023 unit units per 1 PSI = resolution
CMU Camera
RS-232 Device with returned variables Vision Terms we need to understand Pixels FOV Blob Centriod
CMU Camera PIXELS
CMU Camera CMU Camera FOV (Field of View) What it can see 159 pixels by 238 pixels
CMU Camera CMU Camera BLOB
CMU Camera CMU Camera Centriod
Questions? If you have a thumb drive, come see me and I can copy all my reference PDF files and note for you. 350 MB required
RAFFLE TIME!