IR sensor??

Discussion in 'The Projects Forum' started by A_Mousa, May 18, 2010.

  1. A_Mousa

    Thread Starter New Member

    Mar 14, 2010
    8
    0
    Hi all,
    i want to use IR sensor to measure distances of obstacles
    like this sensor
    http://www.acroname.com/robotics/parts/R144-GP2Y0A02YK.html

    firstly, i want to know is there IR sensors that have digital output??

    and if i want to use IR sensor which has analog output what is the inter -facing circuit that i must use , and am i required to use ADC in this case?
     
  2. retched

    AAC Fanatic!

    Dec 5, 2009
    5,201
    312
    Im going to give you the benefit of the doubt and guess you have vision problems, If you have problems reading, tell me and Ill make my text HUGE like yours.

    On to your other problem:

    5th one down, on the linked page has standard TTL digital output.
    http://www.futurlec.com/PIR_Sensors.shtml

    The others on the top of the page, and the one you linked to, use an analog output that you will need an Analog to Digital Converter to get the output to a digital signal for use in digital circuits.

    If you are using a microcontroller, see if it has a built in ADC.
     
  3. jpanhalt

    AAC Fanatic!

    Jan 18, 2008
    5,699
    907
    Retched, I think the OP wants to measure distance, not use PIR for security.

    In answer to the question, that group of sensors uses triangulation and gives analog output. They have been used for several projects discussed on the forum. Just be sure your obstacle reflects IR light.

    I have not seen one that gives digital output directly, but have not done an exhaustive search on that aspect.

    John
     
  4. retched

    AAC Fanatic!

    Dec 5, 2009
    5,201
    312
    Jeez.. With the font that big, and I missed that.

    I guess I am the one who need glasses. ;)
     
  5. A_Mousa

    Thread Starter New Member

    Mar 14, 2010
    8
    0
    thanks for both of u
    @retched : :D:D

    but in case of analog output :
    will i take the output then connect it directly to ADC then to micro-controller (i will use pic 16f877a) or i need signal conditioning and other interfacing between them??
     
  6. retched

    AAC Fanatic!

    Dec 5, 2009
    5,201
    312
    no.. You may consider a buffer, but I see no reason for that.

    You can hook the output to the ADC inputs on the 16f877a.

    The 16f877a has built in 10bit ADC. So thats all you need is the 16f877a and the sensor.

    If you need more than 10bit resolution, you would need an external ADC.

    Then it would be sensor out, to ADC in, then
    ADC out to 16f877a in.
     
  7. A_Mousa

    Thread Starter New Member

    Mar 14, 2010
    8
    0
    but the problem is that IR sensor have a non-linear relation between the distance and voltage so if i connect it directly to ADC it will give wrong results
    , so what shall i do to solve this?
     
  8. retched

    AAC Fanatic!

    Dec 5, 2009
    5,201
    312
    In your code, you set up a lookup table.

    You set it so 10="7 inches" 11="7.1 inches" 12="7.2 inches" and so on.
     
    A_Mousa likes this.
  9. A_Mousa

    Thread Starter New Member

    Mar 14, 2010
    8
    0
    o.k , thanks for your help.
     
  10. jpanhalt

    AAC Fanatic!

    Jan 18, 2008
    5,699
    907
    A_Mousa likes this.
  11. A_Mousa

    Thread Starter New Member

    Mar 14, 2010
    8
    0
    o.k , i will check them
     
Loading...