sensors and sensing electrical signal digital signal

Post on 23-Dec-2015

228 Views

Category:

Documents

3 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Sensors and sensing

electrical signaldigital signal

LEGO sensors

RCX sensors

NXT sensors

RJ12 connector

6 wire cable

2 wire cable

2x2 plate connector

stimuli

sensor control program

AD sensors

TemperatureSoundLight

I2C sensors

Ultrasonic

analog quantity,e.g. light

digital quantity,e.g. light %

interface

I2C

AD converter

Step 1

Step 2

RCX input port RCX touch sensor

V(off) = 5 V V(on) = 5 *500/(500+10000) V = 0.24 V

V(through R) = 5*R/(R+10000)Raw Value(R) = 1023 * R/(R+10000)

Raw Value(500) = 1023 * 500/(500+10000) = 49Raw Value(inf) = 1023 * inf/(inf+10000) = 1023

10 000 ohm

R ohm

5 V

0 V

Voltage divider

Passive sensors touch, temperature

Active sensors light, rotation

Passive sensors touch, temperature

Active sensors light, rotation

Raw Value(R) = 1023 * R/(R+10000) ohm

10 000 ohm

R ohm

5 V

0 V

Signal-to-symbol

stimuli

sensor control program interface

raw valueresistance

raw valuetemperature

raw valueon/off

raw valueclap

raw valueblack/white

time of flightdistance

(57,28)

(27,24)

Measured Distance =

23/cos(30) ~ 27 cm 23 cm

Ialt 57 grader2730

Embedded Java

The leJOS API classes provide access to thehardware. Especially the sensor ports and sensors:

TouchSensor

LightSensor

UltrasonicSensor

SensorPort

Interpret raw sensor value as pressed/released

Lesson 1, Line follower

Lesson 2, Tracker and Wall follower

AD sensors

TemperatureSoundLight

I2C sensors

UltrasonicCompassAccelerometerRFIDGPS

AD sensors

TemperatureSoundLight

I2C sensors

UltrasonicCompassAccelerometerRFIDGPS

Lesson 2, Tracker and Wall follower

top related