Presentation on theme: "F.I.R.S.T Robotics Sensors 101"— Presentation transcript:
1F.I.R.S.T Robotics Sensors 101 January 5th 2008 Montgomery High School Skillman, NJMichael RefflerMentor FRC Team 1089Hightstown, NJ
2Agenda Sensors 101 General Points CMUCam-2 Yaw Rate/Gyro Accelerometer Gear ToothEncodersPotentiometersSonic Range FinderOther SensorsSensor NavigationInformation ResourcesVendors and SuppliersQuestions ?
3General Points Sensors 101 Balance your drivetrain mechanicallyProgramming TechniquesState MachinesFunction DrivenMultiple fallback implementations for when sensors or appendages breakPay close attention to LIMITS when designing for sensorsUse RF shielded cabling/wiringPhysical protection/project boxes
4CMUCam2 Sensors 101 What can you do with the camera? Track colors, e.g., illuminated targetLocate the scoring goalOrient the robot or a turret to the goalHeading & angle or distanceDrive to the goal
5CMUCam2 Sensors 101 CMUCam2 Camera Labview / Focusing and Calibrating CMUCam2 GUI / Focusing and CalibratingRC default camera code-Kevin Watson
7CMUCam2 Kevin Watson Camera Code Just does the camera trackingLoad initial calibration dataTracking.h SettingsPAN/TILT servo pwm assignmentReversing servo directionCamera/tracking menus through HyperterminalCamera settings stored permanently on the RCUse Get_Tracking_State()Use Pan/Tilt angles for direction and distance
8CMUCam2 Finding Range to the Light range = Height_of_Light – Height_of_Camera / tan(tilt_angle_radians)
9Yaw Rate Gyro Sensors 101 Yaw Rate Gyro (ADXRS150) Measures angular rate (150o/sec) along the Z axis.Supply voltage 5V.Output – analog.Alternative Yaw Rate Gyro (ADXRS300)Measures angular rate (300o/sec) along the Z axis
10Yaw Rate Gyro Sensors 101 What can you do with the gyro sensor ? Application: Stability control, guidance.Rotate robot left or right while the gyro reading is less than Xo.If robot rotates too fast (the rate of change of the gyro sensor) then reduce motor speed (good in any mode).
11Dual Axis Accelerometer Sensors 101 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.
12Dual Axis Accelerometer Sensors 101 What can you do with the accelerometer?Application: tilt or motion sensor.Am I standing straight?Measure pitch and roll in degrees.Pitch = asin(Ax/1g); Roll asin(Ay/1g).Orient an arm.Collision detection.
13Gear Tooth Sensors 101 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 gearDigital Output.Supply voltage: 12 V.
14Gear Tooth Sensors 101 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.Circumference of the wheel.2 * PI * R / Gear Teeth = Inches per Pulse.
15Quadrature Encoders Sensors 101 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.
16Quadrature Encoders Sensors 101 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/AccuracyHigher SpeedsAUTONOMOUS MODE:Move d feet distance.Circumference of the wheel.2 * PI * R / CountsPer = Inches per Pulse.
17Potentiometers Sensors 101 Measures the rotation angle in terms of electrical degrees.0o to 300o-340o depending on the pot.Use Linear Taper NOT Audio Taper.Wire Wound, Conductive Plastic.Limited number of revolutions.Unlimited versions are available, but rare.Sliders are available instead of rotational.100K ohm for the OI.10K, 5K, 1K ohm for the RC.Analog Output.Supply Voltage 5V.
18Potentiometers Sensors 101 What can you do with potentiometers?Measure the angle of an elbow on an armMove the arm up or down until Xo is reachedMeasure the turn of a turretTurn left or right until Xo is reachedRaise or lower a telescoping armMove up or down until Xo is reached
19Sonar/Sonic Rangers Sensors 101 Emit a sound and measure the time of flight distance.Ranges: 6 inches – 20 feet, with a field of view of approximately 30o.Other versions available with smaller/narrower beam widths.Analog Output ~9.8mv inchSupply Voltage V
20Sonar/Sonic Rangers Sensors 101 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.
21Touch/Bumper Sensors Sensors 101 If pressure is applied to it, an electrical signal is generated.What can you do with it?I already bumped into something. I better get back, stop, or move around it.
22Infrared Sensors Sensors 101 Emit modulated infrared (IR) energy and measure amount of (IR) returned.Range: inches to several feet.Led IR sensors have ranges of 3-5 inches.Problems: Most venues use halogen/tungsten lighting. 90% of the energy emitted is infrared radiation.
23Light Sensors Sensors 101Red LED emits light and a phototransistor measures the incoming light.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.
24Autonomous Navigation Sensors 101 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.Use the gyro to turn to the matching pan angle.Drive towards the light.Encoders / Gear tooth (Counts per inch).Gyro keep driving straight (+/- a few degrees).Fine tune.Sonic Ranger creep in until inches away.Raise the arm.Potentiometer measure the upward angle.
25Information Resources Sensors 101 ChiefDelphi – White PapersWorking the AnglesSample Gyro codeQuadrature EncodersSample Encoder codeKevin Watson FAQ’s and Sample Code
26Vendors and Suppliers Sensors 101 Digi-Key ElectronicsNewark in OneMouser ElectronicsJameco ElectronicsSparkfunUSDigital