Society of Robots - Robot Forum

Electronics => Electronics => Topic started by: osnap on February 05, 2007, 06:37:37 PM

Title: light sensors
Post by: osnap on February 05, 2007, 06:37:37 PM
Hi,

I have two Fairchild QRB1134 light sensors.  I'm wondering, can these be used in avoiding objects or made to work as photorove robots?

Thanks
Any help is appreciated!
Title: Re: light sensors
Post by: Admin on February 06, 2007, 01:57:36 PM
QRB113 datasheet for reference
http://www.junun.org/MarkIII/datasheets/QRB113x.pdf

that sensor is a reflective IR sensor - meaning it is designed to detect objects right in front of it, and sometimes the IR reflectivity of an object.

unfortunately for you the range is really really short:
  .5" maximum range
  .14" most sensitive range

the picture will give you a good idea of how short the range is

however, that sensor would be great for an encoder or white line detector
Title: Re: light sensors
Post by: trigger on February 06, 2007, 02:29:39 PM
unfortunately for you the range is really really short:
  .5" maximum range
  .14" most sensitive range

Maybe it could also be used instead of a bump switch as a collision detector. But I think it would be very sensitive to the color of the material it came in contact with. I used a similar sensor in college and it was very sensitive to changes in texture, hue, etc.
Title: Re: light sensors
Post by: Hal9000 on February 06, 2007, 03:00:22 PM
I like these sensors a lot because they are a neat package and can be mounted pretty easily.

I'm sure you can get some with longer ranges.
Title: Re: light sensors
Post by: annoyin_kid on February 06, 2007, 05:15:44 PM
i made a similar robot. it uses an ldr and a high intensity white led for the sensor. i had the ldr under the led and the led at a slight angle so that the light will bounce off the wall and directly into the ldr. unfortunately the robot could only detect whiteish objects and couldnt detect my couch (dark brown) and a plank of wood. also the object had to be extremely close (maybe around 0.3cm-1cm / 0.15in-0.4in) and if the led and ldr got too close to the wall it would bend and not detect the light. i made the robot so that it slowed down if it thought the wall was getting close but it didnt slow down enough most of the time. also it only worked at night as there is too much ambient light.

i suggest that you use an ir rangefinder as it is much easier with it, it detects objects from far away and it works 24/7 (i think).
Title: Re: light sensors
Post by: osnap on February 06, 2007, 07:39:31 PM
Hi,

Okay - thanks.  Could it be used as a photovore though?
Also, could I just have the motors go, and when the sensor sees something with 5" just have it turn?
Title: Re: light sensors
Post by: Admin on February 06, 2007, 08:05:15 PM
Quote
Could it be used as a photovore though?
Yea a photovore will work . . . but remember, its an IR sensor, meaning it will only chase infrared light . . .
You can ignore the emitter part of this sensor, as it has poor range . . .
Title: Re: light sensors
Post by: osnap on February 06, 2007, 08:26:37 PM
Ok thanks
so is it possible then to just have the motors go, and when the sensor sees something with the 5" you mentioned just have it turn?
Title: Re: light sensors
Post by: Admin on February 06, 2007, 09:23:35 PM
its not 5", its .5" . . . but this value wont really mean anything if you arent using the emitter.

so the value you will get from the sensor will be analog, and you compare the analog values of both sensors. to get this analog value, hook up your sensor to a circuit like this:
http://www.societyofrobots.com/schematics_infraredemitdet.shtml
(again, you can leave out the emitter part)
and plug the output into the ADC of your microcontroller

the algorithm to control your motors:
if the left sensor gets more light than the right (aka a higher analog value), turn left, etc.

there are many other ways you can do this comparison (the same way as with a photoresistor):
http://www.societyofrobots.com/programming_photoresistor.shtml

hope that cleared up a lot of confusion . . .
Title: Re: light sensors
Post by: osnap on February 06, 2007, 11:09:33 PM
Thanks!
one question though - instead of that circuit, i'm using the board that came with this kit:
http://www.seattlerobotics.org/WorkshopRobot/level1/index.php

the sensors too came with it
but from what you say they only detect infared light then?
Title: Re: light sensors
Post by: Admin on February 07, 2007, 08:36:28 AM
Quote
but from what you say they only detect infared light then?
yeap, IR only. as I said, these sensors are typically used for line following and encoders, not for photovores.

but dont really worry, most lights emit light in the infrared spectrum, too. anything really hot, such as a stove or a lightbulb, emits huge amounts of infrared light.

think of infrared as a color you cant see but your robot can, not something that isnt light at all.
Title: Re: light sensors
Post by: osnap on February 07, 2007, 06:30:42 PM
ah okay...  so they can be used to work with a photovore then?
thanks
also... what's an encoder?
Title: Re: light sensors
Post by: Admin on February 07, 2007, 06:44:34 PM
Quote
so they can be used to work with a photovore then?
yes! :P (its just sub-optimal)

An encoder is a sensor used to measure the rotation of something, usually a motor or wheel:
http://www.societyofrobots.com/sensors_encoder.shtml
The sensor you have would detect if it sees a black stripe or a clear stripe, and then count those stripes.
Title: Re: light sensors
Post by: osnap on February 07, 2007, 06:57:19 PM
ah okay, thanks very much -that clears everything up :)

BTW, cool site you have