IR sensor

Discussion in 'General Electronics Chat' started by electron_prince, Feb 14, 2013.

  1. electron_prince

    Thread Starter Member

    Sep 19, 2012
    93
    3
    I am making IR sensors for my robot. We call it "line follower robot" in my country. It's quite a simple robot. I am Just starting with robotics and electronic design. A had designed an IR sensor, but that sensors are a complete fail because they don't work in outdoor areas because of sunlight. what else can be used for detecting black color?
     
  2. MrChips

    Moderator

    Oct 2, 2009
    12,415
    3,354
    To avoid ambient light, try using IR emitters and detectors. I'm not sure if this would help. A simple test would tell.
     
  3. electron_prince

    Thread Starter Member

    Sep 19, 2012
    93
    3
    yes that's what i am using. they say that ozone layer filters IR radiations but perhaps it doesn't filter it completely.
     
  4. MrChips

    Moderator

    Oct 2, 2009
    12,415
    3,354
    Next step would be to put some black tubing (like heat shrink tubing) around the detectors so that it only sees the light reflected off the black/white tape.

    Next, is to see the difference in signal between the black/white tape. I don't know which is going to absorb/reflect the IR. You have to experiment.

    Do you have control on what the line is made of?
     
  5. tshuck

    Well-Known Member

    Oct 18, 2012
    3,531
    675
    For the most part, IR will not be impeded by black plastics, so the tubing may be a moot point.

    There are lots of sources of IR outside. If you want to minimize their effect on your sensors, try modulating them. There are some devices that will detect whether or not a 38kHz IR signal is present. So, if you were to modulate your IR emitters with a 38kHz signal, you would limit the noise from the environment to the narrow bandwidth of the receiver, making your emitter visible...

    ...this does, however, turn your signal to a digital representation...
     
  6. thatoneguy

    AAC Fanatic!

    Feb 19, 2009
    6,357
    718
    My son and I had success with IR LED, wall of plastic, IR phototranistor, with one more 2N2222 transitor boosting the change in the phototransistor.

    It works great for both finding lines and detecting if the bot is about to go off the edge. It gives a linear voltage output. You can add comparators after that point so the result is a digital signal, but the uC usually has plenty of time to read 3-4 or them without impeding the program (Use ReadIR as a short delay, to replace any delay(xx) statements).
     
    electron_prince likes this.
  7. tshuck

    Well-Known Member

    Oct 18, 2012
    3,531
    675
    ..thatoneguy just reminded me. My first line following robot used transistors to amplify the input until it became digital and was calibrated with potentiometers, following that same idea, you could use a potentiometer to adjust for ambient IR noise.
     
  8. thatoneguy

    AAC Fanatic!

    Feb 19, 2009
    6,357
    718
    Auto-Adjust is simpler to implement and has less hardware, if you have enough ADC ports.

    Get IR Reading, Enable LED, Get IR Reading - Difference is signal.
    repeat for all of them, and the line it is following sticks out rather well. The other bonus of this is it can follow white lines on black, or black lines on white, or cracks in concrete.
     
    electron_prince likes this.
  9. THE_RB

    AAC Fanatic!

    Feb 11, 2008
    5,435
    1,305
    I've seen lots of photos of linefollowers using standard LEDs (white, blue or red) and any light sensor like CdS sensors or photodiodes. Mechanical construction (light shielding) is important.
     
  10. tshuck

    Well-Known Member

    Oct 18, 2012
    3,531
    675
    True. I just hadn't found out about how to use a PIC's ADC at that point:p

    Though, you sacrifice processing speed using the ADC, it shouldn't be a problem unless attempting break-neck speeds...
     
Loading...