Presentation is loading. Please wait.

Presentation is loading. Please wait.

F.I.R.S.T Robotics Sensors 101 Michael Reffler Mentor FRC Team 1089 Hightstown, NJ January 5 th 2008 Montgomery High School Skillman,

Similar presentations


Presentation on theme: "F.I.R.S.T Robotics Sensors 101 Michael Reffler Mentor FRC Team 1089 Hightstown, NJ January 5 th 2008 Montgomery High School Skillman,"— Presentation transcript:

1 F.I.R.S.T Robotics Sensors 101 Michael Reffler Mentor FRC Team 1089 Hightstown, NJ January 5 th 2008 Montgomery High School Skillman, NJ

2 Agenda Sensors 101 General Points General Points CMUCam-2 CMUCam-2 Yaw Rate/Gyro Yaw Rate/Gyro Accelerometer Accelerometer Gear Tooth Gear Tooth Encoders Encoders Potentiometers Potentiometers Sonic Range Finder Sonic Range Finder Other Sensors Other Sensors Sensor Navigation Sensor Navigation Information Resources Information Resources Vendors and Suppliers Vendors and Suppliers Questions ? Questions ?

3 General Points Sensors 101 Balance your drivetrain mechanically Balance your drivetrain mechanically Programming Techniques Programming Techniques –State Machines –Function Driven –Multiple fallback implementations for when sensors or appendages break Pay close attention to LIMITS when designing for sensors Pay close attention to LIMITS when designing for sensors Use RF shielded cabling/wiring Use RF shielded cabling/wiring Physical protection/project boxes Physical protection/project boxes

4 CMUCam2 Sensors 101 What can you do with the camera? What can you do with the camera? –Track colors, e.g., illuminated target –Locate the scoring goal –Orient the robot or a turret to the goal Heading & angle or distance Heading & angle or distance –Drive to the goal

5 CMUCam2 Sensors 101 CMUCam2 Camera CMUCam2 Camera –Labview / Focusing and Calibrating –CMUCam2 GUI / Focusing and Calibrating –RC default camera code-Kevin Watson

6 CMUCam2 Labview Interface Camera Focus Camera Focus Load Sample Configuration Load Sample Configuration Track Colors / View Results Track Colors / View Results

7 CMUCam2 Kevin Watson Camera Code Just does the camera tracking Just does the camera tracking Load initial calibration data Load initial calibration data Tracking.h Settings Tracking.h Settings –PAN/TILT servo pwm assignment –Reversing servo direction Camera/tracking menus through Hyperterminal Camera/tracking menus through Hyperterminal Camera settings stored permanently on the RC Camera settings stored permanently on the RC Use Get_Tracking_State() Use Get_Tracking_State() Use Pan/Tilt angles for direction and distance Use Pan/Tilt angles for direction and distance

8 CMUCam2 Finding Range to the Light range = Height_of_Light – Height_of_Camera / tan(tilt_angle_radians)

9 Yaw Rate Gyro Sensors 101 Yaw Rate Gyro (ADXRS150) Yaw Rate Gyro (ADXRS150) –Measures angular rate (150 o /sec) along the Z axis. –Supply voltage 5V. –Output – analog. Alternative Yaw Rate Gyro (ADXRS300) Alternative Yaw Rate Gyro (ADXRS300) –Measures angular rate (300 o /sec) along the Z axis

10 Yaw Rate Gyro Sensors 101 What can you do with the gyro sensor ? What can you do with the gyro sensor ? –Application: Stability control, guidance. –Rotate robot left or right while the gyro reading is less than X o. –If robot rotates too fast (the rate of change of the gyro sensor) then reduce motor speed (good in any mode).

11 Dual Axis Accelerometer Sensors 101 Dual Axis Accelerometer (ADXL 311) Dual Axis Accelerometer (ADXL 311) –Measures dynamic and static acceleration on both X and Y axis. –Supply voltage 5 V. –Output – analog. Bandwidth 3KHZ. –Sampling frequency > 6 KHZ.

12 Dual Axis Accelerometer Sensors 101 What can you do with the accelerometer? What can you do with the accelerometer? –Application: tilt or motion sensor. –Am I standing straight? Measure pitch and roll in degrees. Measure pitch and roll in degrees. Pitch = asin(Ax/1g); Roll asin(Ay/1g). Pitch = asin(Ax/1g); Roll asin(Ay/1g). –Orient an arm. –Collision detection.

13 Gear Tooth Sensors 101 Gear Tooth Sensors (2) Gear Tooth Sensors (2) –AT642LSH Peak Detecting Gear Tooth Sensor. –Generates a pulse when a gear tooth is detected. –Speed of the gear: pulse rate. –Cannot easily determine direction of the gear –Digital Output. –Supply voltage: 12 V.

14 Gear Tooth Sensors 101 What can you do with the gear tooth sensors? What can you do with the gear tooth sensors? –Control the speed of the wheel. –Adjust for relative speed difference between wheels. –AUTONOMOUS MODE: Move d feet distance. Move d feet distance. Circumference of the wheel. Circumference of the wheel. 2 * PI * R / Gear Teeth = Inches per Pulse. 2 * PI * R / Gear Teeth = Inches per Pulse.

15 Quadrature Encoders Sensors 101 Encoders are commonly used as feedback devices for motor controllers. Encoders are commonly used as feedback devices for motor controllers. –An encoder is a sensor that uses light to sense the speed and direction of a rotary shaft. –Encoders produce quadrature outputs which indicate the speed and direction of the shaft. –Inherently free from contact wear and the digital outputs are bounce less. –Provide greater accuracy and precision. –Digital Output (2) (A & B). –Supply Voltage 5 V.

16 Quadrature Encoders Sensors 101 What can you do with encoders? What can you do with encoders? – –Everything you can do with a gear tooth sensor. – –PLUS : Direction indication (you can now tell which direction your going even if you are being pushed in an opposite direction). Greater Precision/Accuracy Higher Speeds – –AUTONOMOUS MODE: Move d feet distance. Circumference of the wheel.. 2 * PI * R / CountsPer = Inches per Pulse.

17 Potentiometers Sensors 101 Measures the rotation angle in terms of electrical degrees. Measures the rotation angle in terms of electrical degrees. – 0 o to 300 o -340 o depending on the pot. – Use Linear Taper NOT Audio Taper. – Wire Wound, Conductive Plastic. – Limited number of revolutions. Unlimited versions are available, but rare. Unlimited versions are available, but rare. Sliders are available instead of rotational. Sliders are available instead of rotational. – 100K ohm for the OI. – 10K, 5K, 1K ohm for the RC. – Analog Output. – Supply Voltage 5V.

18 Potentiometers Sensors 101 What can you do with potentiometers? What can you do with potentiometers? – Measure the angle of an elbow on an arm Move the arm up or down until X o is reached Move the arm up or down until X o is reached – Measure the turn of a turret Turn left or right until X o is reached Turn left or right until X o is reached –Raise or lower a telescoping arm Move up or down until X o is reached Move up or down until X o is reached

19 Sonar/Sonic Rangers Sensors 101 Emit a sound and measure the time of flight distance. Emit a sound and measure the time of flight distance. Ranges: 6 inches – 20 feet, with a field of view of approximately 30 o. Ranges: 6 inches – 20 feet, with a field of view of approximately 30 o. Other versions available with smaller/narrower beam widths. Other versions available with smaller/narrower beam widths. Analog Output ~9.8mv inch Analog Output ~9.8mv inch Supply Voltage V Supply Voltage V

20 Sonar/Sonic Rangers Sensors 101 What can I do with a sonic range finder? What can I do with a sonic range finder? –Measure the distance to an object. –Listen for approaching objects. Another robot is approaching so move away. Another robot is approaching so move away.

21 Touch/Bumper Sensors Sensors 101 If pressure is applied to it, an electrical signal is generated. If pressure is applied to it, an electrical signal is generated. What can you do with it? What can you do with it? –I already bumped into something. I better get back, stop, or move around it.

22 Infrared Sensors Sensors 101 Emit modulated infrared (IR) energy and measure amount of (IR) returned. Emit modulated infrared (IR) energy and measure amount of (IR) returned. Range: inches to several feet. Range: inches to several feet. Led IR sensors have ranges of 3-5 inches. Led IR sensors have ranges of 3-5 inches. Problems: Most venues use halogen/tungsten lighting. 90% of the energy emitted is infrared radiation. Problems: Most venues use halogen/tungsten lighting. 90% of the energy emitted is infrared radiation.

23 Light Sensors Sensors 101 Red LED emits light and a phototransistor measures the incoming light. Red LED emits light and a phototransistor measures the incoming light. What can you do with a light sensor? What can you do with a light sensor? –Recognize objects of certain colors. –Follow a line. Problems: Ambient light and battery level affect sensor readings. Problems: Ambient light and battery level affect sensor readings.

24 Autonomous Navigation Sensors 101 Find the light. Find the light. –CMUCam2 Get_Tracking_State(). –Get direction left or right degrees (pan angle). –Get distance to the light (tilt angle and a lookup table). Turn towards the light. Turn towards the light. –Use the gyro to turn to the matching pan angle. Drive towards the light. Drive towards the light. –Encoders / Gear tooth (Counts per inch). –Gyro keep driving straight (+/- a few degrees). Fine tune. Fine tune. –Sonic Ranger creep in until inches away. Raise the arm. Raise the arm. –Potentiometer measure the upward angle.

25 Information Resources Sensors 101 ChiefDelphi – White Papers ChiefDelphi – White Papers –Working the Angles Sample Gyro code Sample Gyro code –Quadrature Encoders Sample Encoder code Sample Encoder code Kevin Watson FAQs and Sample Code Kevin Watson FAQs and Sample Code –http://www.kevin.org/frc/camera/ –http://www.kevin.org/frc/gyro/ –http://www.kevin.org/frc/encoder/

26 Vendors and Suppliers Sensors 101 Digi-Key Electronics Digi-Key Electronics –http://www.digikey.com/ Newark in One Newark in One –http://www.newark.com/ Mouser Electronics Mouser Electronics –http://www.mouser.com/ Jameco Electronics Jameco Electronics –http://www.jameco.com/ Sparkfun Sparkfun –http://www.sparkfun.com/ USDigital USDigital –http://www.usdigital.com/

27 Questions ? Answers? Sensors 101 ???


Download ppt "F.I.R.S.T Robotics Sensors 101 Michael Reffler Mentor FRC Team 1089 Hightstown, NJ January 5 th 2008 Montgomery High School Skillman,"

Similar presentations


Ads by Google