Shop OBEX P1 Docs P2 Docs Learn Events
Need help picking a photodiode/op-amp combination — Parallax Forums

Need help picking a photodiode/op-amp combination

The TSL13T light-to-voltage sensor used in one of my circuit designs is no longer manufactured. Finding a suitable integrated substitute has not been productive. So I've decided to try to replicate the chip's photodiode/op-amp circuit with separate devices. But I'm totally at sea here, having never worked with discrete photodiodes. The requirements for the photodiode are:

1. High sensitivity throughout the visible spectrum.

2. Miniature SMD package.

For the op-amp:

1. Operation from a single 5V supply.

2. Rail-to-rail output is desirable.

3. Low noise.

Anybody done anything like this before? If so, any parts/circuit recommendations?

Thanks,
-Phil

Comments

  • jmgjmg Posts: 15,173
    Hmm, it's best to avoid the high sensitivity analog nodes around photodiodes, if you can.

    Is this for ambient light type sense ?

    What about i2c sensors, or Current out models (just add a load resistor ) ?

    LTR-303ALS-01 is i2c, quite low cost, and PNJ4K01F, NOA1213CUTAG, APDS-9008-020, BH1680FVC-TR are current output modules.
    or
    SFH 5701 is an eye-modeled, diode only.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2019-01-21 23:25
    I2C is out, unfortunately. I don't have a spare pin on the micro, and I'd have to change firmware that I wrote way too long ago. But the current output chips do sound promising, so I will investigate.

    Thanks for the tip!

    -Phil
  • Beau SchwabeBeau Schwabe Posts: 6,566
    edited 2019-01-22 01:27
    Phil,

    I was toying for awhile with these in a project ... BH1680FVCCT-ND
    They are tiny, but I think manageable with a good magnifier in a SOT-553 package, however I would prefer a SOT23-5

    Edit: Here is another one that might be easier to work with ... 516-1718-1-ND
  • Beau/Phil/jmg,
    Using the knowledge gained during your searches, can you recommend a user-friendly light sensor which can be used to detect a modulated red laser line signal? (as commonly used in line laser levels used in construction industry).
    I will look at the light sensor parts you have mentioned above.
    Many thanks in advance . . .
  • I've just used clear green LEDs connected to an analog input in photovoltaic mode with the cathode to ground. Works a treat as the LED will generate a voltage proportional to the daylight. You can even connect it directly into the base of an NPN if you just want a switched output. I just tried a green LED outside and it read 1.3V with the sun behind the cloud and about 500mV inside near an LED light but only about 80mV otherwise.
  • For opamps the AD8656 will give very low noise and wide dynamic range as its precision with CMOS inputs so
    can handle very low dark currents. 5V fully rail-to-rail. Not cheap though.

    You haven't stipulated any bandwidth or dynamic range requirements.

    There are three basic photodiode circuits, photovoltaic into non-inverting stage (logarithmic, wide dynamic range, high tempco, slow),
    zero biased into transconductance amp (linear, low tempco, slow),
    reverse biased into transconductance amp (linear, low tempco, fast). Reverse bias reduces diode capacitance by a large factor compared to the other modes. Some photodiodes are optimized for this mode (typically with a PIN
    structure), and won't work well without reverse bias.
  • I was toying for awhile with these in a project ... BH1680FVCCT-ND
    That's the best candidate so far. The PNJ4K01F is EOL, and the others have poor blue response. Package size is not an issue: in fact, the smaller, the better. (It will be PnP'd in China.)

    -Phil
  • It looks from its data sheet that your TSL13 puts out 4 volts at an illumination of ~168 µW/cm^2. At 555nm, that would be equivalent to about 1150 lux in illuminance units. (The TSL13 was tested at 640nm, not too much higher on the response curve.) The BH1680FVC Beau suggested would seem to be good match on either its middle or low sensitivity range. Its data doesn't state response times to compare with the 1µs~10µs rise/fall of the TSL13.

    The TSL13 does respond way down into the infrared, peaking at 780nm. On the blue end it is only down to 40% of peak responsivity at 400nm. The "ambient light sensors" peak at around 550nm, cut out the long wavelengths, and are down to about 10% at 400nm.

    Definitely more expensive to do it with discretes. You'd be looking for a blue enhanced photodiode. An op-amp I like for near DC/low bandwidth measurements is the LTC2054 or LTC2055, in a split T configuration for high gain without having to deal with the high Ω resistor values. That op-amp is similar to the one Mark T mentioned, 1pA bias current, 0.5µV offset, but only 500kHz bandwidth instead of 28MHz. The $ and the board area do pile on!
  • I'll probably go with the BH1680FVC suggested by jmg and Beau. As Tracy points out, it looks to be the best match for the TSL13T. (IR response and rise/fall times are not a consideration in my app.) The only downside I see is its lower saturation output voltage. So I might have to modify my code a bit to scale.

    Thanks all for your input! This turned out to be easier than I thought it might. (I just hope Rohm doesn't EOL their chip anytime soon.)

    -Phil
  • It looks like the lower saturation voltage won't be a problem after all. In the current firmware, I'm using Vdd as the micro's ADC voltage reference. But I can change that to the internal 1.1V reference voltage. Between the BH1680FVC's internal gain settings and the value of the load resistor, I should be able to get a good match with the TSL13T's response.

    Unfortunately, this entails sending a new hex file to China. Simple as that may seem, I always expect issues when something -- however small -- changes.

    -Phil
  • Tracy AllenTracy Allen Posts: 6,664
    edited 2019-01-23 00:44
    Phil,

    FWIW, with one more pin plus pita firmware changes, you could connect a photodiode, a feedback resistor, and maybe the integration capacitors into sigma-delta configuration. Look Ma, no op-amp.
  • Tracy,

    Unfortunately, I don't have one more pin. Nevertheless, if I were just doing this for fun, I would still figure out a way to try your suggestion. :) It definitely has merit!

    -Phil
  • Why a feedback resistor? Just use the diode's current to charge a capacitor which you discharge once it reads HIGH,
    a current->frequency conversion with one pin?

    So reverse-biased diode from Vdd to cap to ground. Like this but photo diode instead of resistor https://circuitlab.com/circuit/6hxusd/simple-sawtooth-oscillator-01/
  • Tracy AllenTracy Allen Posts: 6,664
    edited 2019-01-24 20:31
    Or this...
    https://forums.parallax.com/discussion/comment/574644/#Comment_574644
    It can even work using only the intrinsic capacitance of the photodiode and pin, but of course is more stable with a good film capacitor. Quite sensitive to noise and component drift though.

  • Or this...
    https://forums.parallax.com/discussion/comment/574644/#Comment_574644
    It can even work using only the intrinsic capacitance of the photodiode and pin, but of course is more stable with a good film capacitor of course. Quite sensitive to noise and component drift.

    Tracy,
    Thanks, that scheme of using a green led and Prop pin as light meter may be way-back, but it is still relevant.
    Unfortunately, the SPIN code links are broken. Is there any other place where they may be accessed?
  • Tracy AllenTracy Allen Posts: 6,664
    edited 2019-01-24 20:34
    Okay for the heads' up. I went in and re-uploaded those files. Should be okay now.
  • Here's my latest attempt to use the BH1680FVC. They are really tiny! I laid out my first PCB using the mfr's pad recommendations. After all these years, I should've known better! There was no pad exposed beyond the confines of the package, and I could not get good solder connections to save my life. So I redid the PCB by extending the pads and made the corner pads wider, with positive results:

    very_tiny_chip.jpg

    Note that the two passives are 0603s, and the other IC (ATTiny13A) is an SOIC8, to get an idea of the scale.

    Anyway, with a load resistor, it outputs a voltage proportional to the light level. So far, so good.

    -Phil
    711 x 395 - 70K
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2019-02-23 21:03
    Some further observations regarding the BH1680FVC:

    1. Its blue response (compared with red and green) is significantly higher than that of the TSL13T.

    2. Its dark response is also significantly higher, by at least a factor of five.

    3. Its response to a light-level step is much slower than that of the TSL13T, requiring a longer "soak" time before ADC sampling after the light level changes.

    4. To approximate the response of the TSL13T, I've set the sensitivity inputs to "medium" and the load resistor to 2.2K. But I'm having to compromise a bit to keep the blue response in check. I've also set the ADC reference to 1.1V instead of Vdd, since the BH1680FVC saturates well below 5V with any load, however light.

    -Phil
  • This is an unbelievable turn of events.

    I had three PCBs fabbed but had only populated one. I decided that, before I send the working unit to my customer for review, I better populate another one for myself. That's where things went terribly awry.

    When I tested the new one, the response was significantly lower than that of the first one. To make things even worse, the output from the sensor oscillated at a high frequency when it was between certain bounds. Since the ATTiny13's ADC is pretty fast, I was getting readings all over the place.

    I thought maybe I had screwed up the soldering somehow, so I replaced the sensor with another. Same issue. Okay, I'll just populate the third board from scratch and try that. Same issue. Dang! Two out of three bad ones.

    This led me to the theory that maybe there was something "wrong" with the first board, since it was the odd one out -- even though it worked perfectly. Using a loupe, I discovered that the sensor's ground pin was not soldered to its pad. It was receiving a parasitic ground return through one of the gain selector pins! After soldering the pin to ground, it behaved like the others, oscillations and all.

    So I replaced the load resistor with one of a higher value and piggy-backed a 0.1uF cap on it. That both put the signal close to where I wanted it and eliminated the oscillations.

    But now I need to do another rev of the board with dedicated pads for the cap. The oscillations still bother me a bit, even though I was able to quench them, since the datasheet gave no clue that such an anomaly could occur.

    -Phil
  • tonyp12tonyp12 Posts: 1,951
    edited 2019-03-06 18:00
    Maybe this new one?
    https://www.mouser.com/datasheet/2/216/APS3227SP1C-P22-1313967.pdf

    A transistor type will be a little slower but may not need a op-amp.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2019-03-06 19:10
    Thanks, Tony. However its output is non-linear with illumination, so I won't be able to use it. Anyway, the BH1680FVC seems to be working well with capacitive filtering, so I'm plowing ahead with it. Just need to do another run of proto PCBs.

    -Phil

    P.S. To be fair to the phototransistor, though, the non-linearity may be a consequence of the emitter voltage changing with current, when using the test circuit in the datasheet. Coupling the emitter to a common-base PNP amplifier might fix that, since the emitter voltage would remain constant. However, this requires additional parts to provide a low-impedance base voltage between Vdd and ground.
Sign In or Register to comment.