EBOT Workshop #1

61 slides
4.93 MB
496 views

Similar Presentations

Presentation Transcript

1

SensorsBrad Miller Associate Director, WPI Robotics Resource Center

2

Why Use Sensors?Robot Internal State Banner sensors Limit switches Potentiometers on arms Accelerometers for tilt angle Gyros for direction Encoders for speed Robot position (usually) field relative Rangefinders (ultrasonic or infrared) Encoders for distance

3

This Stuff is Easy!People seem to think autonomous operations is only for advanced teams Hard to program Hard to connect sensors Hard to understand It’s NOT HARD – the FLL 7th graders can do it, their robots are all autonomous You just need the right tools!

4

Wiring SensorsConnects to robot via 3 pin PWM connector PWM shells, connectors and crimp tool are available from Jameco and DigiKey Same for digital and analog I/O All FRC connectors should be female Vex connectors are male

5

What makes a machine a robot?

6

What is sensing?Sensing is converting a quantity that you want to measure into a useable signal (usually electronic). Perception is the interpretation or under- standing of these signals.Example: Sensing: Sound waves -> vibrating eardrums -> signals to brain Perception: Understanding that I am talking to you about sensors.

7

One Use of SensorsControl your motors so they go at the speed and distance you ask them to How do we know how fast the motor is really going? How do we know how far the robot really went? How do we know when the angle of the arm is what we asked it to be?

8

Controlling the RobotOpen loop control has no feedback Set the speed and “hope” that the motors go the requested speed and/or distance. Closed loop control (with feedback) Use sensors to measure what’s going on then do something about it! Apply correction to the input Desired speed is higher – Increase motor power Desired speed is lower – Decrease motor power

9

Simple feedback – On-OffOn-Off (“Bang-Bang”) controller Thermostats have a set (desired) temperature House too cold – turn on furnace House too warm – turn off furnace Very of “jerky” response Hysteresis helps (dead band)

10

Proportional ControlThe speed of the robot (in this case) is proportional to the error signal R(t) = Kp * (Ddes(t) – Dact(t)) The difference between the desired value and the actual value is called the error function The constant Kp sets the response time Higher Kp (controller gain) means faster response, but too high and oscillations and overshoot Lower Kp and the system is slow and mushy

11

Proportional Control

12

PotentiometersDirectly provides an angle of a piece of the robot You should always use potentiometers on anything that rotates or slides Limit switches can provide stops, but not position Examples Robot arm joint position Lift (elevator) position

13

PotentiometersVariable resistor used to indicate position of something Single turn (about 270 degrees) or multi-turn for elevators Always use linear pots – not logarithmic volume controls Connect to the power, ground, and signal

14

Potentiometer Examples

15

EncodersA sensor of mechanical motion that translates motion such as speed, direction or shaft angle into an electrical signal Types of encoder outputs Standard Quadrature Other outputs: Grey Code, Binary

16

EncodersUsually optical and measure changes in rotating disk Standard encoders have one output and can’t sense direction Quadrature encoders have multiple outputs for direction

17

Encoder Examples

18

CharacteristicsResolution – Cycles/revolution Typically 32, 64, 128, or greater Trade resolution for processing requirements Types of outputs Absolute: binary and gray code Incremental: single channel (tachometer), quadrature Optionally provide index output Maximum rotational speed

19

Measuring Distance

20

Methods of MeasurementMechanical touch sensors Simple to build but you need to be in contact The bumper sensor is a good example Light sensors Infrared sensors measure reflected light amplitude, angle, time of flight (TOF), or contrast Sonar Bounce sound off target and time

21

Mechanical SensorsJust switches: Commercial switches like limit switches and bump sensors Can be as simple as whiskers Generally only tell you a single distance Connect to a digital input on robot controller – we’re either in contact (1) or not in contact (0)

22

Limit SwitchesCan detect a fixed position Useful for knowing which position a mechanism is in Pneumatic pistons with the reed switches Measuring the position Polling – can easily miss the transition Interrupts – better, but maybe more complex Interrupt watchers (easyC and WPILib) Banner sensors are optical version of limit switch

23

Sonar SensorUsing the sensor Start the sensor to begin, and stop it when finished Read the range whenever it’s needed

24

How WPILib Computes DistanceSpeed of sound (in air): about 343 m/s or 1125 ft/s Distance to object is 1/2 the round trip time EasyC does the work for us – but does not give distance directly – that’s our job Two connections, interrupt port and digital outputOutput portInterrupt port

25

Sharp IR RangefindersVery inexpensive Easy to use Very cool!

26

TriangulationIR emitting diode is located at the focal point (F0), producing parallel rays of output

Browse More Presentations

Last Updated: 8th March 2018

Recommended PPTs