Presentation is loading. Please wait.

Presentation is loading. Please wait.

MICROMOUSE LECTURE #2 SENSORS, MINI PROJECT #2 11/6/2014.

Similar presentations


Presentation on theme: "MICROMOUSE LECTURE #2 SENSORS, MINI PROJECT #2 11/6/2014."— Presentation transcript:

1 MICROMOUSE LECTURE #2 SENSORS, MINI PROJECT #2 11/6/2014

2 WHAT IS A SENSOR? Converts outside parameters to voltage signals Converts outside parameters to voltage signals

3 SENSORS IN A MICROMOUSE EncodersGryoscopeInfrared

4 GRYOSCOPE Outputs angular velocity Outputs angular velocity Mouse turns Gryo outputs angular velocity Code integrates angular velocity Determine what mouse should do

5 HOW TO CHOOSE A GRYO Range Range Need at least +/ degrees/second Need at least +/ degrees/second Can be analog or digital Can be analog or digital Only need to measure 1 axis Only need to measure 1 axis

6 INFRARED SENSORS Infrared LEDs emit light in wavelengths from 870nm to 950nm Infrared LEDs emit light in wavelengths from 870nm to 950nm Receivers (phototransistors) sensitive to IR light Receivers (phototransistors) sensitive to IR light Emitter emits light Light bounces off wall Receiver measures reflected light Determine wall presence

7 HOW TO CHOOSE AN IR RECEIVER/EMITTER

8 LED EMITTER Make sure to choose a narrow emission angle Make sure to choose a narrow emission angle Maximize power efficiency Maximize power efficiency Maximize signal amplitude Maximize signal amplitude Power Density Power Density Measures solid angle Measures solid angle Often measured in mW/sr (miliwatt/steradians) Often measured in mW/sr (miliwatt/steradians) 

9 LED RECEIVER Make sure to match the receiver with emitter wavelength Make sure to match the receiver with emitter wavelength Make sure to choose small angles=high directivity Make sure to choose small angles=high directivity Reduces interference Reduces interference Emitter/receiver pairs generally sold together Emitter/receiver pairs generally sold together Note that max sensitivity at 940nm Note high directivity

10 CALIBRATION Mostly trial and error Mostly trial and error Vary distances and measure voltage with MCU Vary distances and measure voltage with MCU IR calibration is non-linear IR calibration is non-linear

11 THE SENSORS YOU WILL BE USING IR Emitter: an IR Light Emitting Diode IR Emitter: an IR Light Emitting Diode IR Receiver: An NPN phototransistor IR Receiver: An NPN phototransistor Amplifies current going into the Base and sends it out the Emitter Amplifies current going into the Base and sends it out the Emitter An overly-simplified analogy: think of it as a dimmer switch An overly-simplified analogy: think of it as a dimmer switch

12 IR SENSOR SCHEMATIC

13 Emitter: you can drive the LED directly from the MCU Emitter: you can drive the LED directly from the MCU Make sure you use a series resistor so you don’t burn out the LED! Make sure you use a series resistor so you don’t burn out the LED! Orientation matters! Anode goes to power, cathode goes towards ground Orientation matters! Anode goes to power, cathode goes towards ground Receiver: need to use a pull down resistor at the Emitter Receiver: need to use a pull down resistor at the Emitter BJTs work with current, but MCU reads voltage. BJTs work with current, but MCU reads voltage. Resister allows current to pass and have a readable voltage Resister allows current to pass and have a readable voltage

14 AMBIENT LIGHT Ambient light will definitely confuse your mouse Ambient light will definitely confuse your mouse Might seem like there is a wall when there isn’t Might seem like there is a wall when there isn’t How to deal with softer ambient light: How to deal with softer ambient light: Turn IR emitter off and read from receiver Turn IR emitter off and read from receiver Turn IR emitter on and read from receiver Turn IR emitter on and read from receiver Subtract the first reading from the second Subtract the first reading from the second Won’t work if light is too bright and saturates receiver Won’t work if light is too bright and saturates receiver

15 IR SENSORS SAMPLE PROGRAM

16 JEREMY HAUGEN GUEST LECTURE ON SENSORS


Download ppt "MICROMOUSE LECTURE #2 SENSORS, MINI PROJECT #2 11/6/2014."

Similar presentations


Ads by Google