Shop OBEX P1 Docs P2 Docs Learn Events
RGB Photodiode connection (photovoltaic mode) to ADC — Parallax Forums

RGB Photodiode connection (photovoltaic mode) to ADC

courtenscourtens Posts: 101
edited 2013-05-29 09:24 in Accessories
I need to measure the RGB value of some light hitting a senor.

I plan on using (Si) RGB sensors, 3 pre-filtered photodiodes for that. My speed requirement is 33 mS; so, slow.

As a light source I plan on using a RGB LED, an LED that has the 3 colors individually adjustable. This way, I can calibrate my light source based on my sensor's output.



Now, for my question:
Do I need to use an op amp if connecting to an ADC?
And if not, (I suppose I would need to test this) would I use a voltage divider to stay within the range of the ADC chip Vcc?

Comments

  • courtenscourtens Posts: 101
    edited 2013-05-06 12:52
    I just found this post and it sounds like an op-amp is required.
  • Tracy AllenTracy Allen Posts: 6,664
    edited 2013-05-08 09:11
    Your pdf circuit has each photodiode in parallel with a 10nF capacitor connected directly to an ADC input channel. The ADC will measure a voltage that will be roughly proportional to the logarithm of the light intensity and will never exceed the allowable input voltage of the ADC. That voltage will be highly dependent on temperature and any leakage currents, and will be slow to respond.

    Yes, you will be much better off using an op-amp to amplify the current from the photodiodes to a level suitable for your ADC. That will give a nice linear output proportional to light intensity in each channel. Note on your schematic that the output of the different color sensors at wavelength is specified as a current, not a voltage, so look to build a simple transconductance amplifier. The thread you linked has suggested circuits. The gain factor will be in unit of megaohms = volts per microamp.

    A possible alternative to an op-amp would be an RCTIME or sigma-delta circuit, which can accept a current directly.
  • courtenscourtens Posts: 101
    edited 2013-05-09 19:59
    Your pdf circuit has each photodiode in parallel with a 10nF capacitor connected directly to an ADC input channel. The ADC will measure a voltage that will be roughly proportional to the logarithm of the light intensity and will never exceed the allowable input voltage of the ADC. That voltage will be highly dependent on temperature and any leakage currents, and will be slow to respond.

    Yes, you will be much better off using an op-amp to amplify the current from the photodiodes to a level suitable for your ADC. That will give a nice linear output proportional to light intensity in each channel. Note on your schematic that the output of the different color sensors at wavelength is specified as a current, not a voltage, so look to build a simple transconductance amplifier. The thread you linked has suggested circuits. The gain factor will be in unit of megaohms = volts per microamp.

    A possible alternative to an op-amp would be an RCTIME or sigma-delta circuit, which can accept a current directly.

    Hello Tracy, thank you for taking the time to look into my problem.

    Sorry for not being specific with the Forward Voltage: Vf=0.5~1.3, and the If=10mA This is a link to the photo diode

    Also, this is an updated PDF: (RGB_reader_2.pdf) ... I am just not sure if the MC33204VD is a good choise as op-amp .... I still have some reading and testing to do.
  • Tracy AllenTracy Allen Posts: 6,664
    edited 2013-05-10 09:38
    The circuit is text-book, should be a good start. If it tends to oscillate you can increase the feedback capacitor a bit, and/or insert a resistor ~1k between the op-amp output and the ADC input.

    A couple of things to watch out for with the MC33204 op-amp. Its input bias current is spec'd as 80 to 200 nA at 25°C. Compare that to the photodiode outputs of 46nA to 92nA at 100 lux. That will create an offset. Given the op-amp input structure, you won't start seeing an output signal until the light level is greater than about 100 lux. That is about the level of a soft reading lamp.

    When choosing an op-amp for low light levels, I look for one that claims an input bias current down in the pA range, and that usually means an FET or mosfet input. The input bias voltage doesn't matter too much in that single stage amplifier circuit, until you get to super low light levels.

    Another factor is the output voltage swing. The MC33204 is able to swing down to within 50mV of the lower rail. Compare that to the output of the blue sensor, 0.046µA at 100 lux. With an amplifier gain of 1MΩ, figure back to an input current of 50mV/1MΩ = 50 nA. So, the 50mV output minimum in and of itself corresponds to a minimum detectable blue light level of about 100 lux. In general you want an amplifier that can swing down to 0.000 volts, and that most often means that you have to supply a negative voltage to the Vss pin on the op-amp. It doesn't have to be a full +/- power supply. Even a -100mV supply will do. I've taken to using the LM7705 to generate that negative bias. It is DC-DC converter meant specifically for that purpose.


    Comparing light levels in lux for RGB is a little tricky. The photodiode data sheet uses white fluorescent light for the comparisons. The data sheet also gives the individual responses in physical units of A/W: 0.21/0.18/0.09.
  • courtenscourtens Posts: 101
    edited 2013-05-28 11:17
    Hello Tracy, thank you so much for taking the time to share your valuable professional knowledge! You gave me a lot to study and read. And, I am still digesting it all. I am new to electronics, and at times like these, it can be a bit overwhelming looking through all of the op amp IC's offered online. So, your helping me with this is greatly appreciated.



    Using your proposed LM7705 chip to generate negative bias seems the way to go. However, I do have a converted PC power supply as my main power source. It can provide a -5.0VDC; but I do not want to tap into that, if I don't need to. Or given this info, do you think using the PC power supply to provide a negative bias would be a better choice?


    I do not have a particular op amp on hand, but would need to order one. I went ahead, as you suggested, trying to find an op amp with Input Bias around 1pA. Doing so I noticed that Mouser.com's website indicates the Input Bias Current with “(Max) = 1 pA.” Is this correct?


    Is there a particular op amp you would recommend for the job? I found the following three of interest, and lean towards the last one of the bunch. It also mentions in the PDF the use of the negative bias generator LM7705.


    MCP6004
    4pA - 20pA (max)
    +/- 2mV
    http://www.mouser.com/ds/2/268/21733e-41017.pdf


    TLC274BC
    0.7pA - 60pA (max)
    340uV – 2mV
    (w/ 5Vdd)
    http://www.ti.com/lit/ds/slos092d/slos092d.pdf


    LMP7704
    +/- 200fA +/- 50pA (max)
    +/-220 uV max
    (w/ 5Vdd)
    http://www.mouser.com/ds/2/282/snosai9g-61506.pdf
  • Tracy AllenTracy Allen Posts: 6,664
    edited 2013-05-29 09:24
    Any of those op-amps will work. I don't think you have requirement for high speed, so that eases the choice of op-amp a lot. I'd suggest that you jump right in and not get fancy to start with! An op-amp input current of 1nA or less would be a good start. That corresponds to 1 or 2 lux of light from a flourescent on your sensor. The important thing is how much that current drifts and its low frequency noise level.

    Do start out with a negative supply of some sort. The lab supply would be fine, or even a AA cell as a -1.5V source. That way you can be sure that the op-amp output can get all the way to groun. You can monitor it with a voltmeter too, to see if it is going negative at all. Always put a resistor between the op-amp output and the ADC, so that if the op-amp output happens to swing down to -5V by some accident, it won't fry the ADC. That is not a problem with the LM7705, because -0.235V is not enough even to forward bias the ADC's substrate diodes.

    There are circuit tricks that can create a virtual ground a little bit above Vss, but that is getting more fancy.
Sign In or Register to comment.