Analog vs Digital Digital on/off voltage Analog variable voltage.

18
SENSORS!

Transcript of Analog vs Digital Digital on/off voltage Analog variable voltage.

SENSORS!

Analog vs Digital

Digital on/off voltage

• Analog variable voltage

• Environment

• Robot

What do we want to know?

Position

Velocity

Color

Position

Velocity

Topography

Temperature

Size/shape

Acceleration

Orientation

Sensors

Sonar Accelerometer Gyroscope Encoder Camera Potentiometer Compass Laser

Potentiometers Variable resistance Voltage divider Linear or rotary

Accelerometer and Gyroscope Measure deflection of micro-mass

Variation in output voltageV α a and V α ω

Resolution

V/g counts/V => counts/g

V/°/s counts/V => counts/°

Analog to Digital Computers sample analog signals

• Voltage of sample corresponds to digital number

Using Accel/Gyro Info

Sampling Period = ΔT

Angular Velocity x Time => Angle Change

Acceleration x Time => Velocity Change

Velocity x Time => Position Change

Sonar sound navigation and ranging

Point SourceEmitter and receiverCalculate distance

Reflected SignalCalculate distance to an

object

Sonar Shortfalls

Object interference

Radial Distance

How can we overcome it?

- Rotating sensors- Multiple sensors

Sonar with Multiple Sensors Sensor Interference Solutions:

- Different frequency sensors- Double-Pulse Coding

Controlling Sonar

Sonar board configuration Give command/pulse signal Start counter Receive response – stop counter Calculate distance

Mapping with Sonar

Distance represents a 3D surface ○ 2D if you make good assumptions

Digital representation (map)Shaded cells MAY contain an object

Rotary Encoders

Diode light passes through slits in disk Photocell gives high voltage

Encoders with Direction

2 Channels with slight offsetA or B will be read first

Absolute Encoder Standard Binary Encoding

Contact 1 Contact 2 Contact 3 Angle

1 off off off 0° to 45°

2 off off on 45° to 90°

3 off on off 90° to 135°

4 off on on 135° to 180°

5 on off off 180° to 225°

6 on off on 225° to 270°

7 on on off 270° to 315°

8 on on on 315° to 360°

Compass

Direction relative to defined direction Analog output

Bringing it Together

Many sensors interfacing with microcontroller