Upload
others
View
1
Download
0
Embed Size (px)
Citation preview
Sensors
Just the basic facts
A SENSOR can be any part of a robot which provides information on the condition
of the robot, the operators intent, or the environment of the robot.
Why we have them: Neither the operators nor the software can make
reasonable choices about what to do with the controls unless they have
information about the robot’s condition and environment.
Consider – You’re expected to get your driving license. If you’re given a car with
blacked-out windows, no speedometer, no odometer, no gearshift indicator, no
indicators, no GPS, and no maps. Not even a compass. Do you think you can
pass your driving test?
THE CONTROL LOOP
OBTAIN INPUT
DECIDE WHAT TO DOTAKE ACTION
REPEAT
TYPES OF SENSORS
Those which sense the environment of the robot
Those which sense the position and motion of the
robot’s parts
Those which sense the internal state of robot
systems
Environmental Sensors
–Range or Proximity
•Navigation, Obstacle Avoidance, Distance
–Vision
•Identify, Locate Objects, including game pieces
and targets
–Compass
•Robot Orientation, Absolute Heading
–Break-Beam
•Object Detection
–Contact
•Proximity, Virtual Bumper, Collision
Position and Movement Sensors
–Rotary Encoders
•Drive wheel direction/position, Arm position
–Gyroscope
•Turn Rate, Relative Heading, Balance
–Inclinometer
•Tilt, Relative Angle
–Accelerometer
•Impact, Distance, Tilt
–Inertial Measurement Unit (IMU)
•Combine Gyros and Accelerometers for Navigation
–Contact
•Internal mechanism location or states
Internal Systems Sensors
–Battery Voltage
•Know when to seek a charger
-- Pneumatic Pressure
• Nason Pressure Switch (required)
• Rev Robotics Analog Pressure Sensor
–Failure Detection
•Know when to attempt fault correction
–Not often used in FIRST Robotics
•Time scale of matches is short.
Distinctions among types
• Active
–Transmit signal into environment
–Sense return signal
–Example: Sonar, Break-Beam Sensor
• Passive
–Sense signal already available from environment
–Example: Contact Switch, Compass, Camera
Further Distinctions
• Absolute Reading
–Zero position has physical meaning
–Example: Absolute Encoder, Compass,
Accelerometer
• Relative Reading
–Zero position is just an arbitrary starting
value
–Example: Shaft Encoder, Gyro Heading
Some Common Sensors
- LIMIT SWITCHES
- MAGNETIC REED SWITCHES
- INFRARED SENSORS – REFLECTED
- INFRARED SENSORS - OPPOSED
- ENCODERS – ABSOLUTE AND RELATIVE
- GYROSCOPES
- ACCELEROMETERS
- MAGNETIC PROXIMITY SENSORS
- HALL EFFECT SWITCHES
LIMIT SWITCHES
* Usually Single Pole Double Throw (SPDT)
Switches.
* Can detect the proximity of any object
which touches the lever with enough force
to trip the switch.
* Can be fragile. Typically require hardware
stops or other measures to prevent
damage. A LIMIT SWITCH IS NOT A
HARDWARE STOP!
*Digital Output
*Require ‘debouncing’ or signal processing.
*SLOW.
*Connect via DIO Port.
MAGNETIC REED
SWITCHES
* Single Pole (SPST) Switches
* Commonly used to detect proximity of
STRONGLY magnetic objects.
* Example – the piston sensor in
pneumatics.
*Digital Output
*Require ‘debouncing’ or signal processing.
*Can be fragile.
*Noncontact design means that mechanical
stops may not be an issue.
*Sensitivity can be an issue.
*Slow
*Connect via DIO port
HALL EFFECT SENSORS
(Still Magnetic)
• Require magnetic source to
work.
• Quick
• Some have LEDs showing state
• Require DC power
• Connect to DIO port
• RUGGED SOLID STATE
MAGNETIC PROXIMITY SENSORS
Magnetic proximity detector in Team
2630’s Robot from 2013
Hall Effect Sensor
*Magnetic field affects current flow in a
conductor.
*Active magnetic proximity sensors can
detect ferrous metals.
*Hall Effect sensors work best when
detecting magnets.
*Noncontact, usually robust technology.
*Digital outputs, may require signal
processing.
*Applications include position
measurement, checking relationship of
parts on a robot (e.g. an arm), and
counting rotations of a shaft.
INFRARED SENSORS - REFLECTED
• These are the type we used to
sense frisbees in the hopper.
• Noncontact
• Robust
• Digital output. Analog output
types exist.
• Short range (1-5 inches).
• Careful consideration of other
sources of infrared light is a
necessity.
INFRARED SENSORS - OPPOSED
• Noncontact but requires close
tolerances
• Requires software debouncing or
signal processing.
• Careful consideration of other
sources of infrared light is a
necessity.
• Example: Adafruit Model 2168
Beam Break Sensor.
ENCODERS – ABSOLUTE
Photo-transmissive
Multiturn Potentiometer
• Output has a direct relationship
to the position of the shaft.
• Analog Output (Photo-
Transmissive may be digital).
• Some potentiometers have
multiple turns. Single turn
potentiometers have only 270
degrees of rotation.
• Care must be taken that the shaft
is not rotated beyond the limits of
the encoder/potentiometer or
catastrophic damage may result.
• These have been used to good
effect in many of our robots.
POTENTIOMETER USES:
ROTARY MOTION
Can be mounted on the end of any
reasonable size shaft to measure
position, usually of an arm or other
assembly.
Can also detect the motion of a chain,
If a small sprocket is mounted on the
Potentiometer shaft.
Photos by Carl McAlduff
LINEAR MOTION
Potentiometers exist which are
designed to detect linear motion
including slide potentiometers
and plunger potentiometers.
These require careful design as they
are not strong enough to resist forces
other than in the direction they are
unintended to measure.
Another variation is the spool
Potentiometer, a combination of a
multiturn potentiometer with a
spool, a string, and a return spring.
These work but can be finicky.
ENCODERS - RELATIVE
US Digital E4P
• Output is a stream of pulses,
which are caused by the
rotation of the shaft causing
the disc to pass between the
LED and the photosensor.
• Frequently used to count
shaft speed or shaft rotation
as an aid to navigation in
autonomous mode.
• Usually requires two digital
inputs because encoders with
quadrature output have two
output streams.
• Analysis of the relationship of
the pulses can determine
direction of rotation.
• Analysis of number of pulses
determines speed.
MAGNETIC ENCODERS
Example: CTRE SRX Magnetic
Encoder, am-3445.
• Encoder detects the
movement of a magnet
mounted on the end of a
shaft.
• CTRE claims that this can be
both a relative and an
absolute encoder – I agree
provided the encoder is
properly supervised, possibly
with a subprocessor.
• Requires a machine shop
capable of nontrivial precision
in order to mount the magnet.
Another Magnetic-Based Encoder
AM Redline Encoder
For mounting on the end of 775
motors not already provided with
Encoders.
Micro-Electro-Mechanical Systems (MEMS)
–technology of very small mechanical devices
driven by electricity
MEMS Defined
GYROSCOPES
• MEMS gyroscopes use a micro-
miniature vibrating structure (tuning
fork or twisting wheel).
• Rate Gyroscopes sense motion in one
or more axes (roll, pitch, yaw).
• Motion in about an axis causes a
displacement effect which can be
measured.
• Useful for guidance, keeping a robot
on course or aligned with a target.
• Useful for maintaining stability by
changing motor control if the robot
drifts off intended course.
• Clever use of this technology (and an
articulate explanation!) by a student
won Team 2537 a Rockwell control
systems award in 2010.
ACCELEROMETERS
*MEMS Accelerometers sense in one or
more Axes (X,Y,Z).
*Most use a micro-miniature mass on a
movable beam. Beam displacement can
be sensed and provide an analog output.
*Fast response.
*Affected by gravity.
*Useful in balancing robot
*Useful in measuring incline or
orientation
*Collision detection.
MIXED MEMS sensors
On occasion several sensors may be
combined on a single PCB.
Examples:
6DF from Andymark:
3 axis Accelerometer
Gyro
Gadgeteer Pigeon IMU:
3 axis Magnetometer,
Accelerometer
Gyro
HINT: Robo-Rio contains a 3 axis
accelerometer!
DISTANCE SENSORS
Ultrasonics
• HC-SR-04 – Cheap but wide
angle of view. Slow.
• Maxbotics – $35 but effective
• Both require careful mounting
• Limited by speed of sound
Lasers - LIDAR
• Expensive ($150)
• Requires clear field
• Very fast and narrow angle of
view
NONCONTACT ENCODERS
These are a variation on an IR
proximity sensor – they detect
light-dark transitions on a shaft
or panel.
Digital I/O
Require careful characterization
Receiver
Transmitter
INERTIAL NAVIGATION UNITS
The NavX is the most
commonly used due to its
being designed for the
RoboRio and being carried
by Andymark.
Requires careful software
integration.
Expensive ($99).
PNEUMATIC SENSORS:
Nason Pressure Switch
(required)
REV Robotics REV-11-1107
Analog Pressure Sensor
INTERFACE TYPES:
ANALOG – Signal can have any value over a range of voltages.
DIGITAL – Signal can have specific discrete values in a range of voltages.
Computers process signals that are Digital.
Analog Signals must be converted to digital, using an A/D Converter.
Sensors with digital interfaces may have an A/D Converter built in.
“All the World’s an Analog Stage and Digital Circuits play only bit parts!”
--- Anonymous
ANALOG INTERFACING
DIGITAL INTERFACING
Interfacing Solutions: Supervisory Processors
Fully exploring this topic is an entire other class.
There are literally dozens of small processors which can ease the processing
burden on your Robo-Rio.
Special Thanks to:
• The Baltimore Area Alliance
• AndyMark
• Cross The Road Electronics