Difference between revisions of "Optoreflector"

From Mech
Jump to navigationJump to search
m
 
(31 intermediate revisions by 4 users not shown)
Line 1: Line 1:
__TOC__
[[Category:Sensors]]
[[Category:Sensors]]
===Overview===
==Introduction==
Optoreflector sensors contain a matched infrared transmitter (LED) and infrared receiver (usually a [[Photodiodes and Phototransistors|phototransistor]]) pair. These devices work by measuring the amount of light that is reflected into the receiver. Because the receiver also responds to ambient light, the device works best when well shielded from abient light, and when the distance between the sensor and the reflective surface is small (the graph below shows how distance affects the output value). IR reflectance sensors are often used to detect white and black surfaces. White surfaces generally reflect well, while black surfaces reflect poorly.
[[image:Optoreflector Diagram.jpg|right]]
Optoreflector sensors contain a matched infrared transmitter and infrared receiver pair. These devices work by measuring the amount of light that is reflected into the receiver. Because the receiver also responds to ambient light, the device works best when well shielded from abient light, and when the distance between the sensor and the reflective surface is small(less than 5mm). IR reflectance sensors are often used to detect white and black surfaces. White surfaces generally reflect well, while black surfaces reflect poorly.


[[image:optoreflector distance.png|center]]
The diagram on the right shows an example of a infrared reflectance sensor. ''For this particular example, the IR detector being used can be ordered from Mouser Electronics ( Part# 512-QSE113) and the IR emitter can be ordered form Digi-Key (Part# LN175PA-ND)''. The resistors being used in this example are chosen to match the electrical properties of the IR dectector and emitter. You might want to choose different resistors if you use different dectectors and emitters. Different resistor values affect the sensitivity of the infrared reflectance sensor.

==Application==
===Example Digital Circuit===
In the mechatronics lab, we have the QRB1114 ([[media:QRB1114.pdf|datasheet]]) from [http://www.fairchild.com Fairchild], shown below. It has four pins, with the first pair connected to the LED and the second pair connected to the phototransistor.

[[image:optoreflectors.png|center]]

The circuit below can be used to detect objects directly in front of the QRB1114. The potentiometer must be used to adjust for ambient lighting conditions. The output is an analog signal like the one at the top of the page - dependent on distance. The sensor works best when it is at least partially-shielded from ambient light.

{| align="center"
| [[image:qrb1114 circuit diagram.png|center]]
| [[image:qrb1114 circuit photo.jpg|center|300px]]
|}

There are two ways to process the output. 1) build extra circuitry using a [[Schmitt Trigger|schmitt trigger]] or [[555_Timer|555 timer]] to turn the output into a digital output. 2) Use an analog input and use a software threshold. The second way is easier and works well. Start with the program below to adjust your voltage thresholds (using the relay block) and light sensitivity (by adjusting the potentiometer).

[[image:qrb1114 xpc program.jpg|center]]

===Example Digital Circuit 2===
The circuit below uses hardware to process the signal and uses the PC/104 stack's digital input. Increasing the value of the resistor ''R1'' will increase the sensitivity, and vice versa. Beware that if you make the sensor too sensitive, ambient light will be able to trip the sensor.

[[Image:optoreflector_ex2_schematic.png]] [[Image:optoreflector_ex2_photo.jpg |300 px]]

The following XPC Target program will count the number of times the sensor is tripped, and print it to the [[Using_RS-232_and_Printing_to_LCD|Seetron BPI-216 LCD]]. To use it, plug the output of the ciruit above into channel 2 of the digital input on the break-out board. Pressing ''Bit 1'' on the break-out board will reset the count.

[[Image:optoreflector_ex2_photo2.jpg | 400 px]]

The Simulink model can be downloaded here:
[[media:optoreflector_ex2_XPC_program.zip|optoreflector_ex2_XPC_program.zip]]

===Example Analog Circuit===
To make an analog circuit, just take out the Schmitt trigger from Example Digital Circuit 2, and connect the input directly to the analog input on the break-out board. The ADC will output the closest integer voltage of the input between -10V and 10V. For this circuit, the voltage will fall between 0V and 5V.

[[Image:optoreflector_analog_schematic.png]]

[[Image:optoreflector_analog_photo.jpg|400 px]]

The Simulink model for the example above can be downloaded here:[[media:optoreflector_analog_XPC_program.zip|optoreflector_analog_XPC_program.zip]]

Latest revision as of 09:23, 11 August 2006

Introduction

Optoreflector sensors contain a matched infrared transmitter (LED) and infrared receiver (usually a phototransistor) pair. These devices work by measuring the amount of light that is reflected into the receiver. Because the receiver also responds to ambient light, the device works best when well shielded from abient light, and when the distance between the sensor and the reflective surface is small (the graph below shows how distance affects the output value). IR reflectance sensors are often used to detect white and black surfaces. White surfaces generally reflect well, while black surfaces reflect poorly.

Optoreflector distance.png

Application

Example Digital Circuit

In the mechatronics lab, we have the QRB1114 (datasheet) from Fairchild, shown below. It has four pins, with the first pair connected to the LED and the second pair connected to the phototransistor.

Optoreflectors.png

The circuit below can be used to detect objects directly in front of the QRB1114. The potentiometer must be used to adjust for ambient lighting conditions. The output is an analog signal like the one at the top of the page - dependent on distance. The sensor works best when it is at least partially-shielded from ambient light.

Qrb1114 circuit diagram.png
Qrb1114 circuit photo.jpg

There are two ways to process the output. 1) build extra circuitry using a schmitt trigger or 555 timer to turn the output into a digital output. 2) Use an analog input and use a software threshold. The second way is easier and works well. Start with the program below to adjust your voltage thresholds (using the relay block) and light sensitivity (by adjusting the potentiometer).

Qrb1114 xpc program.jpg

Example Digital Circuit 2

The circuit below uses hardware to process the signal and uses the PC/104 stack's digital input. Increasing the value of the resistor R1 will increase the sensitivity, and vice versa. Beware that if you make the sensor too sensitive, ambient light will be able to trip the sensor.

Optoreflector ex2 schematic.png Optoreflector ex2 photo.jpg

The following XPC Target program will count the number of times the sensor is tripped, and print it to the Seetron BPI-216 LCD. To use it, plug the output of the ciruit above into channel 2 of the digital input on the break-out board. Pressing Bit 1 on the break-out board will reset the count.

Optoreflector ex2 photo2.jpg

The Simulink model can be downloaded here: optoreflector_ex2_XPC_program.zip

Example Analog Circuit

To make an analog circuit, just take out the Schmitt trigger from Example Digital Circuit 2, and connect the input directly to the analog input on the break-out board. The ADC will output the closest integer voltage of the input between -10V and 10V. For this circuit, the voltage will fall between 0V and 5V.

Optoreflector analog schematic.png

Optoreflector analog photo.jpg

The Simulink model for the example above can be downloaded here:optoreflector_analog_XPC_program.zip