Shop OBEX P1 Docs P2 Docs Learn Events
Comparing two Si photodiode sensors with an analog comparator — Parallax Forums

Comparing two Si photodiode sensors with an analog comparator

tonyp12tonyp12 Posts: 1,951
edited 2013-11-15 10:22 in General Discussion
I want to use one Red and one Blue sensor
http://www.mouser.com/ds/2/143/CLS15_22C_L213R_G_B_TR_datasheet-45815.pdf

And if red wins due to light coming in through orange tinted plastic, comparator will push or pull its output.

Slow response time is OK, Battery operated so it should use as little power as possible (maybe even polling 10x sec)

And one of these Comparators should be good start:
http://www.mouser.com/Semiconductors/Comparator-ICs/_/N-1eu2vZscv7?P=1z0y3wbZ1z0y1maZ1z0vychZ1z0vobyZ1z0vobhZ1z0vociZ1z0w4zgZ1z0voawZ1z0voaxZ1z0z7ptZ1z0x0qf&Ns=Pricing%7c0

Any recommendations on the circuit?

Comments

  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2013-11-14 12:34
    I would bypass the difficulties of amplifying tiny photodiode currents, and use one of these:

    You will have to provide an IR-blocking filter to get the desired spectral response. But at least it will interface directly to a comparator without additional amplification.

    -Phil
  • Duane C. JohnsonDuane C. Johnson Posts: 955
    edited 2013-11-14 12:51
    Hi tony;

    Try this:

    RedBlueSensor.png


    Back to back PV sensors are unbelievably sensitive to balanced light intensities.

    Duane J
    372 x 704 - 11K
  • tonyp12tonyp12 Posts: 1,951
    edited 2013-11-14 15:03
    Thanks Duane, that looks very simple and efficient I will make a pcb with all 3 options and report back.

    Why did I not go with Red & Green?
    I then remembered an old commercial for blu-blocker, so orange should block blue and retain red
    blu_blocker.jpeg
  • jmgjmg Posts: 15,173
    edited 2013-11-14 16:16
    For a quick test, the Pot is easy, but if you have spare pins on the Prop, you could save the pot with an ADC feedback set to auto zero the pin threshold ( adds a R+C ), you are then reduced to pin-threshold-matching errors. (no adj needed)
    Zero is when Red = Blue current, so may not be exact equal light levels.

    If you wanted more linear info, a high value feedback resistor could allow ADC on the light-change pin.
  • tonyp12tonyp12 Posts: 1,951
    edited 2013-11-14 16:24
    >For a quick test, the Pot is easy
    After a test with a pot I measure the settings and then use two fixed resistor values for production version.

    I think this could be used as line follower, just use thin red tape/paint line.
  • jmgjmg Posts: 15,173
    edited 2013-11-14 19:40
    tonyp12 wrote: »
    After a test with a pot I measure the settings and then use two fixed resistor values for production version.

    That does not track temperature, or process variations, but you could probably get away with it as the back-back diodes will clamp at +/- 400~550mV region for lowish currents
  • CuriousOneCuriousOne Posts: 931
    edited 2013-11-15 01:02
    There's dedicated chip from TI, called LOG101, especially made for such tasks.
  • tonyp12tonyp12 Posts: 1,951
    edited 2013-11-15 08:13
    >LOG101
    But at $10 each (1k units) is not an option
    http://www.mouser.com/ProductDetail/Texas-Instruments/LOG101AID/?qs=sGAEpiMZZMtB4tie5FrKYwbR70j%2f6jMJepY2NhN1b44%3d

    The pot will set the trigger point for the Schmitt trigger I assume,
    But how would I adjust so blue will win in normal florescent & daylight in case it does not?
  • Duane C. JohnsonDuane C. Johnson Posts: 955
    edited 2013-11-15 10:22
    Hi tony;
    tonyp12 wrote: »
    The pot will set the trigger point for the Schmitt trigger I assume,
    But how would I adjust so blue will win in normal florescent & daylight in case it does not?
    Essentially by offsetting the pot from the Schmitt trigger point.
    However, since it is a Schmitt trigger there will be hysteresis which effectively reduces the sensitivity to the balance point. I would suggest using a non Schmitt trigger CMOS logic gate or a Prop input pin.

    The two PV sensors, connected anti parallel, fight each other. Whichever current is greater wins and expresses its voltage.
    This balanced current would cause 0V. Even slightly out of balanced current cause voltage. The voltage change is very sensitive near 0V. As the voltage rises, either polarity, the winning current is shunted by the intrinsic diode structure of the PV sensor. This causes the voltage to increase logarithmically, either way.

    The PV sensors have different sensitivities to each light band so a means to adjust for this must be found.
    Since the shunt diodes do consume some current there would be some point where the sensitivities would be correct.

    Another method could use a second pot and high valued resistor on the other side of the sensor pair to inject current so the balance point would be at 0V. This would increase the sensitivity and not be as hindered by the logarithmic action of the diodes.

    Your Blue sensor appears to be about 1/2 the sensitivity of the Red one.

    Another method that could be use to adjust sensitivity is to use a mechanical shutter.
    I would use this method with the Op-Amp.

    BTW, I don't have this sensor myself.

    Duane J
Sign In or Register to comment.