1. Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
    Dismiss Notice

how to avoid effect of ambient light on photo diode

Discussion in 'Robotics & Mechatronics' started by k_ishan, May 19, 2011.

  1. k_ishan

    k_ishan New Member

    Joined:
    Dec 23, 2010
    Messages:
    30
    Likes:
    0
    hi friends, I am using LED - photo diode pair for line tracing........
    but due ambient light from the sources like tube lights ,halogen lights,sunlight...etc output of diode is getting saturated to the supplied voltage.

    So, can u please suggest something to avoid this saturation of diode due to ambient light?????
     
  2. ericgibbs

    ericgibbs Well-Known Member Most Helpful Member

    Joined:
    Jan 4, 2007
    Messages:
    21,240
    Likes:
    645
    Location:
    Ex Yorks' Hants UK
    hi,
    Whats the spectral response range of the emitter and detector, is it IR.?
     
  3. dougy83

    dougy83 Well-Known Member

    Joined:
    May 18, 2008
    Messages:
    2,677
    Likes:
    215
    Location:
    Brisbane, Australia
    To stop saturation, increase the load (decrease the load resistor) on the photodiode.

    If you want the photodiode to work over a large range of lighting levels, you can use a string of (silicon) diodes as the load - this will give a logarithmic response to the photocurrent rather than linear.

    Another method is to modulate the emitter & use an AC amplifier on the photodiode output - the ambient signal is consequently removed.
     
  4. dave

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    -
    Likes:
    0


     
  5. upand_at_them

    upand_at_them Member

    Joined:
    Apr 23, 2005
    Messages:
    609
    Likes:
    8
    Location:
    Pennsylvania, U.S.

    A couple things you can do:

    1. Turn the LED on. Record the value. Turn the LED off. Record the value. Subtract and use the difference.
    2. Shield it. I've competed in outdoor line following contests and almost everyone uses a shield around the sensor array to block ambient light (Sun).
     
    • Thanks Thanks x 1
  6. k_ishan

    k_ishan New Member

    Joined:
    Dec 23, 2010
    Messages:
    30
    Likes:
    0
    no its in visible range.........i am using red led......
     
  7. k_ishan

    k_ishan New Member

    Joined:
    Dec 23, 2010
    Messages:
    30
    Likes:
    0
    hey i got the first point of using series of diodes..........
    Can u please elaborate the second point.................i am not getting what is "modulate the emitter"?
     
  8. dougy83

    dougy83 Well-Known Member

    Joined:
    May 18, 2008
    Messages:
    2,677
    Likes:
    215
    Location:
    Brisbane, Australia
    Turn it on and off quickly, e.g. >20kHz
     
  9. k_ishan

    k_ishan New Member

    Joined:
    Dec 23, 2010
    Messages:
    30
    Likes:
    0
    actually...i have applied square wave of 1khz to led...... so a wave which is somewhat like a square wave appears across the photo diode.......
    and when ambient light falls on the photo diode this wave gets DC shifted .......and I thought that i can get this square wave by some AC coupling or clamping.....................
    but the problem is that the DC Shift is too high that the square wave gets totally clipped............
     
  10. dougy83

    dougy83 Well-Known Member

    Joined:
    May 18, 2008
    Messages:
    2,677
    Likes:
    215
    Location:
    Brisbane, Australia
    Try changing (reducing) your load resistance
     
  11. k_ishan

    k_ishan New Member

    Joined:
    Dec 23, 2010
    Messages:
    30
    Likes:
    0
    i have tried changing the load resistance
    but then also diode is getting saturated........
     
  12. dougy83

    dougy83 Well-Known Member

    Joined:
    May 18, 2008
    Messages:
    2,677
    Likes:
    215
    Location:
    Brisbane, Australia
    Reducing the resistance will stop the diode 'saturating' as it can't pass sufficient current.

    Can you post a picture of what you are seeing?

    What is the part number of the photodiode?
     
  13. k_ishan

    k_ishan New Member

    Joined:
    Dec 23, 2010
    Messages:
    30
    Likes:
    0
    i have attached the image of my circuit ...............
    in normal conditions it gives proper output as expected ...........
    but when i take this circuit near the lamp output gets DC shifted and the output square wave is totally clipped ...................

    so i want to reduce this DC shift and want to get the square wave
     

    Attached Files:

  14. dougy83

    dougy83 Well-Known Member

    Joined:
    May 18, 2008
    Messages:
    2,677
    Likes:
    215
    Location:
    Brisbane, Australia
    You forgot to draw the power supply; I'm assuming it's 5V. The 33K resistor is a little on the large side. Try 4k7 or 1k (this will reduce the output swing however). what values have you tried already?
     
  15. k_ishan

    k_ishan New Member

    Joined:
    Dec 23, 2010
    Messages:
    30
    Likes:
    0
    the photo diode i am using is like a LDR (light dependent resistor) .
    Its resistance decreases with the increase in light following on it.
    so when i take the circuit near the lamp, resistance gets nearly zero so output voltage which is across 33k resistor becomes 5v.
    so i think there is no need to change the value of resistance.........
     

    Attached Files:

  16. dougy83

    dougy83 Well-Known Member

    Joined:
    May 18, 2008
    Messages:
    2,677
    Likes:
    215
    Location:
    Brisbane, Australia
    Right......
     
  17. jaycarlo29

    jaycarlo29 New Member

    Joined:
    Sep 10, 2012
    Messages:
    1
    Likes:
    0
    Hi,

    I have the same situation. When I place the PD directly to the sunlight the PD seems to be saturated. But when It's not directly facing the sun my circuit can operate perfectly.
    Any solution how to avoid this scenario?
     

Share This Page