LED as IR Photodiode

Discussion in 'General Electronics Chat' started by tom66, Aug 28, 2011.

  1. tom66

    Thread Starter Senior Member

    May 9, 2009
    2,613
    213
    I am attempting to create a wireless audio transmitter. This works by converting audio to PWM at 80kHz, and then broadcasting it using some powerful IR LEDs I have. A receiver uses another IR LED, in the photovoltaic configuration, to receive the infrared pulses. A basic schematic of what I have is attached. [At the moment the ground and power rails are connected; in the real version they will be separately powered.]

    This sends audio pseudo-digitally. It is a useful comparison to an analog transmitter. With this device, as soon as the signal is weak it will the audio will be lost or severely distorted. Whereas an analog receiver would slowly drop volume and/or pick up more noise. It uses an AGC circuit. This circuit is a peak detector which develops a voltage reference. The voltage is buffered, then halved, and this is used as the threshold to compare the incoming signal against. This helps the circuit work even when the input amplitude is low.

    I am having two problems:
    - My Darlington driver transistor (not the main transistor) gets VERY hot, enough to make the transistor fail after about 15 minutes of use. It boils water within minutes. Surprisingly, the TIP31 is only slightly warm. Why is my transistor so hot?

    - The signal I am receiving is coming out as a sine wave, when it should be a square wave with varying duty cycle. I suspect I'm hitting a bandwidth limit of the IR LED in photovoltaic mode, and may need to operate it reverse biased (in photodiode mode.) How can I do this with my AGC circuit?

    Any advice would be appreciated!
     
  2. upand_at_them

    Active Member

    May 15, 2010
    246
    29
    Of course Q1 gets hot, there's no load resistor (at the collector). The electrons are basically going from collector to emitter...and then into Q2. Straight shot with no resistance.

    As for the sine wave...I may be wrong, but why would it be anything other than a sine wave? Electromagnetic emission (light, radio) only travels in sine waves. You'd need a zero-crossing detector to convert it to square waves.
     
  3. tom66

    Thread Starter Senior Member

    May 9, 2009
    2,613
    213
    Ah... I see now. So how do you suggest I improve my driver circuit? Just add that resistor?

    Although photons travel as sine waves that is in the 100's of THz range. The waves I am seeing are around 80kHz, for my PWM. I think I am seeing it because the IR LED is not changing quick enough. That's what I think, but I don't know how to solve the problem.
     
  4. Hi-Z

    Member

    Jul 31, 2011
    157
    17
    I've had a quick look at your circuit diagram, and see some problem areas:

    Firstly, as has been identified by upand_at_them, poor little Q1 is driving a near-short. You could fix this by adding a resistor between its emitter and the junction of R4/Q2 - and you don't need R3. As for resistor values, I feel sure R4 would be better with a lower value, as it has to pull Q2 out of saturation. But are you sure you need a TIP31a for the LED driver? What LED current are you aiming for?

    Which brings me to my next question: are you sure you're operating the LEDs from a 5V supply (and not something like 15V)? Unless the LEDs have a really low Vf, they're going to have great difficulty turning on using a 5V supply - and you wouldn't get much by way of current. Do you need 3 LEDs?

    So the first thing to look at is the LED Vf, and the target LED current. Can you supply some details here?
     
  5. Hi-Z

    Member

    Jul 31, 2011
    157
    17
    Hi again,

    Since we seem to be at opposite ends of the day, I'll make some assumptions and suggestions:

    I've noticed that infra-red LEDs can have a Vf as low as 600mV (which is very low for an LED), so I'll assume your circuitry is designed for an operating LED current of about 25mA.

    If this is the case, you shouldn't be using the TIP31a - I would make Q1 the LED driver, so put the LEDs and R1 in Q1's collector circuit. I'd get rid of R3, R4 and Q2, and I'd ground Q1's emitter. I'd also make R2 about 1.5k.

    You should then check the waveform appearing at R1 - it ought to be a nice representation of your PWM signal.

    If you still find problems at the receiving end, then you may be right about the LEDs sluggishness in photovoltaic mode - but that would need further consideration.
     
  6. tom66

    Thread Starter Senior Member

    May 9, 2009
    2,613
    213
    Hi,

    The peak LED current is close to 100mA but the LEDs are only on about half the time (50% duty). Each LED drops about 1.2V. I will give it a go with just the BC635 and see how well it drives them.

    I am getting an okay waveform at R1. Initially it was a bit slow to rise; this was cured with the base-to-emitter resistors I added. Now it seems okay.

    Thanks for your help
     
  7. Hi-Z

    Member

    Jul 31, 2011
    157
    17
    Yes, you need a fairly low value base-emitter resistor to get the TIP31a out of saturation quickly, so that's why it helped the slow risetime at R1.

    However, if the Vf of each LED is 1.2V, then the maximum voltage appearing across R1 will be only about 1.2V (5V minus 3*1.2V minus 0.2V across Q2). That means 10mA, not 100mA, so you'll be down on IR power by a factor of 10.

    I would hesitate to recommend reducing R1 by a factor of 10, because the LED current would be very dependent upon the combined Vf and the 5V supply voltage. Basically, you shouldn't really have a combined Vf of more than about half the supply voltage, particularly if you're running the LEDs near their maximum current. Couldn't you reduce the number of LEDs down to 2 (and change R1 to something like 27 ohms)?

    Anyway, assuming you have a good waveform at R1, we need to turn attention to the receiver. Are we happy that the LED is sensitive to the IR wavelength being put out by the transmitter LEDs? What is the waveform like at LED4? Is it a square wave which gets down to 0V, or does it float somewhere above ground? Is the peak detector working properly (make sure it's not oscillating, for example)?
     
  8. tom66

    Thread Starter Senior Member

    May 9, 2009
    2,613
    213
    I'm happy that the detector is working okay, because at low frequencies it handles the signals well. The IR LEDs I am using are the same for the transmitter and receiver.

    I need to check the LED power. I was measuring power consumption of 92mA with them all on, that includes the logic power. Maybe I got the resistor code confused. Maybe the Vf is closer to 0.6V, as you say.
     
  9. iONic

    AAC Fanatic!

    Nov 16, 2007
    1,420
    68
    Tom66,

    I'd suggest, that if you do not know the specifications of the IR LED's I wouldn't go anywhere near pumping 92mA through them, even at 50% duty cycle. You'll damage those little bugger in no time.
    I have read that the typical IR LED Vf is about 1.7V, but as others have mentioned they can be less than half that.
     
  10. bertus

    Administrator

    Apr 5, 2008
    15,645
    2,344
    Hello,

    To reduce the heat of Q1, place a resistor of about 470 Ohms between the emittor of Q1 and the base of Q2.
    This will provide enough current to drive Q1 into saturation.

    Bertus
     
  11. Hi-Z

    Member

    Jul 31, 2011
    157
    17
    The LED current should be easy to deduce: just measure the voltage across R1 when the LEDs are on. Do adhere to the LED's spec when it comes to setting the current (if you don't have the spec, then be a bit conservative - are you sure they're really "powerful IR LEDs"?). Anyway, the BC635 ought to be able to handle whatever you throw at it without need for the cumbersome TIP31a.

    (By the way, just for future reference, a true Darlington pair would have both collectors connected together, and this would have prevented Q1 from overheating. BUT, a Darlington pair isn't suitable in a saturated swtch application (which this is), so it wouldn't have been appropriate anyway.)

    When you say the receiver handles low frequencies OK, what exactly do you mean? What are the rise/fall times, what are the dark and lit voltages? Do note that the wavelength response may differ between emission and reception (I think it does when you use an LED as a photodiode, for example).

    It may be that you'd be better off without the peak detector, and just make use of ac coupling instead.
     
  12. tom66

    Thread Starter Senior Member

    May 9, 2009
    2,613
    213
    I'm considering buying a few IR photodiodes - do you think those would work better than IR LEDs for the receiving element?

    I'd really like to keep the peak detector in because it does improve the range. This is a model I am building for a classroom demonstration of the difference between analog and digital. I'm trying to show that at low amplitudes and long distances the background noise starts causing problems so the sound gets distorted.

    I don't recall the rise/fall times exactly but I think they were of the order of 10 microseconds.
     
  13. Hi-Z

    Member

    Jul 31, 2011
    157
    17
    Well, I think with risetimes of 10us you're not going to get even close to receiving PWM at 80kHz, so I'd give up the idea of LEDs as photovoltaic devices.

    Regarding photodiodes, assuming you can get one at the correct wavelength, you have the problem of converting fast-moving tiny changes in current (and in the presence of noise/interference) into a decent digital signal. The solution involves the use of a transimpedance amplifier, which minimises the effect of diode capacitance by having a low input impedance. But this can be tricky stuff, even at modest frequencies.

    In order to be able to design a sensible circuit, it'll be necessary to establish some requirements. I think the best thing to do would be for you to obtain some suitable photodiodes and experiment with them - try to measure some dc parameters while you apply IR from the LEDs in the presence of ambient light. Then we can think about suitable circuitry.

    Meanwhile, this might be useful:

    http://www.youtube.com/watch?v=WKWaPi5QsjI
     
  14. tom66

    Thread Starter Senior Member

    May 9, 2009
    2,613
    213
    A photodiode can be used in the photovoltaic configuration too; and an LED can be used in the photodiode configuration too. The photodiode configuration is much faster.

    Another option is a phototransistor (a photodiode with internal gain.) Many of these are designed to receive 38kHz IR, so I don't think it's too much of a stretch to get a phototransistor receiving 80kHz.

    Here's a matched pair: http://www.rapidonline.com/Electron...405/?sid=c5e9f345-8457-4f8d-9578-908c37530857
     
    Last edited: Sep 1, 2011
  15. Hi-Z

    Member

    Jul 31, 2011
    157
    17
    Yes, you may well be right there. I would guess that a suitable IR phototransistor would be easily obtainable, and we could come up with a suitable transimpedance amplifier. If I were you, I'd get hold of one and have a play with it, in various ambient situations, and at various distances from your transmitter. It would be very interesting to see it with a fairly low value collector load resistor (in order to give it a reasonable chance with your 80kHz PWM). (I hope you've got a reasonably decent 'scope.)
     
  16. tom66

    Thread Starter Senior Member

    May 9, 2009
    2,613
    213
    I'll let you know how it goes when I talk to my electronics tutor.

    There's also the possibility of implementing frequency modulation with this, but I would have to go with 100kHz to get decent audio quality. PPM modulation could be used to send stereo audio over a single IR link. So many ideas...

    I will look at the photodiode transimpedance amplifier. Maybe I'll need to use more than an LM324 because of the low leakage currents required.

    Yes I have a 100 MHz quad channel digital oscilloscope I got for cheap :).
     
    Last edited: Sep 1, 2011
  17. Hi-Z

    Member

    Jul 31, 2011
    157
    17
    I've just noticed your link (I really must be more diligent when I read posts!) and the matched pair look very attractive (i.e. cheap and available). The main problem will be the phototransistor's rise/fall times of 7us. This would, on the face of it, rule it out; however, the test circuit from which this figure was obtained hasn't been defined. In reality, this may well have been with a relatively high value collector load resistor, so we might be OK, given that we're going to be clever and use a transimpedance amplifier.

    (The rise/fall time is probably governed by the effect of the collector-base capacitance - i.e. Miller capacitance, and this can be negated by ensuring the collector voltage stays constant by loading it with a low impedance.)
     
  18. Hi-Z

    Member

    Jul 31, 2011
    157
    17
    Actually, we may be able to get away with just using a cascode configuration for the phototransistor. Refer to the first diagram here:

    http://www.ieee.li/pdf/essay/cascode_amplifiers.pdf

    Q1 would be the phototransistor, Q2 a general-purpose small-signal npn transistor. You would ground Q1's emitter, and Q2's base would be connected to, say, +2.5V (using a potential divider), and decoupled with a capacitor (to ground).

    You end up with the phototransistor driving a low impedance (Q2's emitter), which is what we want. You would experiment with Q2's collector load resistor, so that you end up with a decent signal. You would want to prevent Q2 from saturating, so you could put a couple of small Si diodes (in series) across the collector load to prevent this.

    If there's a high phototransistor current due to ambient lighting, we may need to take appropriate steps...
     
  19. tom66

    Thread Starter Senior Member

    May 9, 2009
    2,613
    213
    Well, the photo transistor has an IR shield. I assume this would eliminate the problem with ambient light. That being said, my IR diodes are transparent, and they aren't sensitive to a CFL or other fluorescent light...
     
  20. tom66

    Thread Starter Senior Member

    May 9, 2009
    2,613
    213
    Okay, I improved the driver circuit - ditched the TIP31. Now the BC635 is cool to the touch. Risetime is 65 ns :). Fall time is about the same at 71 ns. That's more than fast enough.

    I made a mistake in the operating frequency it is actually 255 kHz!! However I think I can slow down my oscillator and get it oscillating at 80-90kHz. I've not touched my breadboard for a few days, it's possible something is loose like the timing capacitor.

    At 255kHz, the IR LEDs don't stand a chance in photovoltaic mode, so I'm going to switch them to the configuration in the video. Do you think I can use an LM324 as a transimpedance amplifier, or will it have too high input current?
     
Loading...