34
Sensors - 1 Intro to Sensors

Sensors - 1 Intro to Sensors. Sensors - 2 Physical Principles of Sensing Generation of electrical signals in response to nonelectrical influences Electric

Embed Size (px)

Citation preview

Sensors - 1

Intro to Sensors

Sensors - 2

Physical Principles of SensingGeneration of electrical signals in response to nonelectrical influences

• Electric Charges, Fields and Potentials• Magnetism• Induction• Resistance• Piezoelectric Effect• Pyroelectric Effect• Hall Effect• Seebeck and Peltier Effects• Mechanical Measurements• Sound Waves• Optical Properties of Material

Sensors - 3

Physical Principles of SensingGeneration of electrical signals in response to nonelectrical influences

• Electric Charges, Fields and Potentials– Coulomb’s Law

• Capacitance

• Magnetism– Faraday Law

• Induction– Varying magnetic field produces a current

• Resistance– Electrical resistance

• Piezoelectric Effect– Generate an electric charge due to stress

• Pyroelectric Effect– Generate an electric charge due to heat

• Hall Effect– Interaction between moving electric carriers and an external magnetic field

• Seebeck and Peltier Effects– The basis for a thermocouple

• Mechanical Measurements– Kinematics, Dynamics, Time

• Sound Waves• Optical Properties of Material

qC

V

1 22

1

4

q qF

r

q F v B

Sensors - 4

Resistive Sensors

• Potentiometers– Symbol:

• Strain Gauges (Piezoresistive Effect)• Resistive Temperature Detectors

– Metals (Linear, positive temperature coefficient)– Symbol:

• Thermistors– Semiconductors (non-linear, negative temp coef)– Symbol:

+tº

-tº

Sensors - 5

Resistive Sensors

• Light-Dependent Resistors– Symbol:

Cadmium Sulfide Photoresistor

How would you:1.increase reaction time?2.increase sensitivity?

Sensors - 6

Packaging

Sensors - 7

Signal Conditioning for Resistive Sensors

• Voltage Divider

• Differential Amplifiers

• Instrumentation Amplifiers

+ v–

R1

R2v2

Sensors - 8

Capacitive Sensors

SENSORS AND SIGNAL CONDITIONING, 2nd Edition, by Ramon Pallas-Areny and John Webster.

Sensors - 9

Electromagnetic Sensors

• Sensors based on Faraday’s Law

• Hall Effect Sensors

q F v B

Electronic Compass

Magnetic Field Sensor Board Uses a 3A Hall-effect sensor

Sensors - 10

Piezo Gyro

Piezoelectric Sensors

• Appearance of electric polarization in a material that strains under stress, and vice versa.

• No DC component (a constant stress initially generates a charge that slowly dissipates)

Accelerometer

Sensors - 11

Pyroelectric Sensors

• Change in temperature causes a change in electric charge

• Fast (thin with high sensitivity)

• Incident radiation must be modulated due to parasitic charges that may neutralize the surface charge induced

Sensors - 12

Distance Sensors

• IR Distance Sensor

• Sonar

IR Distance Sensor

Hagisonic StarGazer Robot Localization System

Sensors - 13

Actual Differential Photocell Sensor Schematic

Differential Sensor+5V

Rphoto1

Rphoto2

Vsensor

47K

Sensors - 14

Statistical Considerations• How many times do you need to sample a

sensor?

– Mean ()

• What is the error?– Variance (2)– Standard Deviation ()

• Problem: definition of requires us to know the distribution’s mean, , not the approximation

i

ixNx

1

22 )(1

iixN

x

Sensors - 15

Statistical Considerations

• Thought:– Expect

• Consider Degrees of Freedom and redefine:

22 x

22 )(1

1xx

N iix

Sensors - 16

Cd Sensor Homework

0

255

-90 90Angle

Analog ReadoutHandyboard

Sensors - 17

0

255

-90 90

Light to the Right

Light to the Left

AmbiguousRegion

AmbiguousRegion

OK!

How to Follow a Light Source

1. Determine the Unique Cd Sensor Parameters (Homework)2. Rotate until light is located (How do you know the light has been found?)

Sensors - 18

What would you select for:•Upper limit•Lower limit

Sensors - 19

What would you select for:•Upper limit•Lower limit

Sensors - 20

CdS Structure

Sensors - 21

The Search Behavior

Exploring the use of PID Controllers

Sensors - 22

0

1023

-90 90

Light to the Right

Light to the Left

AmbiguousRegion

AmbiguousRegion

OK!

CdS Homework / Lab

Homework : Determine the thresholds for each region

Lab: Program the robot to follow the light!

Sensors - 23

0

1023

-90 90

Light to the Right

Light to the Left

Search Analog Readout Limits

Upper Limit

Lower Limit

Sensors - 24

0

1023

-90 90

Light to the Right

Light to the Left

Search Reduced Limits → Reduced Oscillations?

Upper Limit

Lower Limit

Sensors - 25

0

1023

-90 90

Light to the Right

Light to the Left

Search The Limit

Setpoint Limit

Sensors - 26

A Short Introduction to Modern Control Theory

Control Plantu(t) e(t) d(t) y(t)

Sensors - 27

1023

Light to the Right

Light to the Left

Search LabUsing a PD Controller

Setpoint LimitMake the speed of the turns proportional

to the distance from the setpoint

power = reading - setpoint

0

When is power negative?When is it positive?

How would you implement this in your Search code?

Sensors - 28

Implementing Proportional Feedback Control“Follow” Motor Command

power = reading – setpoint

• If power > 0, Turn ?• If power < 0, Turn ?

{ motor( left_motor, );

motor( right_motor, );

}

Sensors - 29

Proportional FeedbackHow to increase the speed of the correction?

power = pgain*(reading – setpoint)

Sensors - 30

Proportional FeedbackHow to increase the speed of the correction?

power = pgain*(reading – setpoint)

Problem:Instability – can begin oscillating with ever increasing amplitude

Sensors - 31

Modification: Add Differential Controls

PD Controllers use both proportional and differential controls. Think of differential control as a velocity term. If you need to change direction and your velocity is large, you do not need as large of a correction compared to when the speed was low.

Sensors - 32

Modification: Add Differential Controls

power = pgain*(reading – setpoint) - dgain*velocity

where velocity = (reading – old_reading)

PD Controllers use both proportional and differential controls. Think of differential control as a velocity term. If you need to change direction and your velocity is large, you do not need as large of a correction compared to when the speed was low.

Sensors - 33

Summary of PID Controller Characteristics

Controller Benefits Drawbacks

P Simple

Cheap

Steady state error

Large overshoot & settling time

Poor transient response

Prone to instability (large gains)

I Eliminates steady-state error Poor damping

Large overshoot & settling time

Poor transient response

Reduces stability

D Increases damping

Reduces overshoot

Reduces settling time

Improved transients

Improves stability

Steady-state error

Cannot be used alone

Sensors - 34

Lab Report

Be sure to contrast and compare how the robot performs using:

– Thresholds (e.g., no controller)– Proportional Controller – Proportional-Differential Controller

PS Bring a Bright light with a Wide beam(12V flashlight if available!)