35
Sensors Just the basic facts

Sensors · 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,

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Sensors · 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,

Sensors

Just the basic facts

Page 2: Sensors · 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,

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?

Page 3: Sensors · 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,

THE CONTROL LOOP

OBTAIN INPUT

DECIDE WHAT TO DOTAKE ACTION

REPEAT

Page 4: Sensors · 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,

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

Page 5: Sensors · 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,

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

Page 6: Sensors · 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,

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

Page 7: Sensors · 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,

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.

Page 8: Sensors · 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,

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

Page 9: Sensors · 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,

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

Page 10: Sensors · 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,

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

Page 11: Sensors · 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,

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.

Page 12: Sensors · 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,

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

Page 13: Sensors · 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,

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

Page 14: Sensors · 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,

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.

Page 15: Sensors · 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,

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.

Page 16: Sensors · 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,

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.

Page 17: Sensors · 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,

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.

Page 18: Sensors · 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,

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

Page 19: Sensors · 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,

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.

Page 20: Sensors · 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,

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.

Page 21: Sensors · 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,

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.

Page 22: Sensors · 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,

Another Magnetic-Based Encoder

AM Redline Encoder

For mounting on the end of 775

motors not already provided with

Encoders.

Page 23: Sensors · 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,

Micro-Electro-Mechanical Systems (MEMS)

–technology of very small mechanical devices

driven by electricity

MEMS Defined

Page 24: Sensors · 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,

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.

Page 25: Sensors · 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,

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.

Page 26: Sensors · 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,

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!

Page 27: Sensors · 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,

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

Page 28: Sensors · 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,

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

Page 29: Sensors · 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,

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).

Page 30: Sensors · 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,

PNEUMATIC SENSORS:

Nason Pressure Switch

(required)

REV Robotics REV-11-1107

Analog Pressure Sensor

Page 31: Sensors · 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,

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

Page 32: Sensors · 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,

ANALOG INTERFACING

Page 33: Sensors · 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,

DIGITAL INTERFACING

Page 34: Sensors · 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,

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.

Page 35: Sensors · 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,

Special Thanks to:

• The Baltimore Area Alliance

• AndyMark

• Cross The Road Electronics