Electronics Photodiode IR amplifier

Discussion in 'Modding' started by veryevil, 14 Apr 2007.

  1. veryevil

    veryevil Minimodder

    Joined:
    14 Aug 2005
    Posts:
    1,228
    Likes Received:
    34
    Hi, Im in the process of messing around with Infrared and ive got an IR photo-diode but im not entirely sure how to amplify it so it can be used on a PIC circuit.

    I came up with this Where D2 is the Photo-diode
    [​IMG]

    The op-amp should act as a comparator at 0v and switch when the voltage through the photo-diode reaches above 50mv to 5V

    However no matter what i do the led is always on even if i ground both inputs or reverse the inverting and no inverting inputs.

    The Photo-diode sits at 0.01v untill it gets any IR.

    Thanks Steven
     
  2. cpemma

    cpemma Ecky thump

    Joined:
    27 Nov 2001
    Posts:
    12,328
    Likes Received:
    55
    Not with a 741, if that's what you're using. The working range is about 1.5V from either supply rail, say 1.5V to 3.5V on a 5V single-rail supply.

    Another thing needed is a resistor R5 to ground from the diode cathode to create a potential divider; as-is the diode & R4 just act as a pull-up resistor on the non-inverting input, it's always at 5V.

    Aim for 2.5V with R1=R2 on the inverting input and pick R5 to suit (or use a trimpot).

    You'll still only get 3.5V at the op-amp output, so if you need nearer 5V you'll need to add a transistor switch and use an opamp with an output-low near 0V (eg LM358) so the switch can turn off. Better still, use a true comparator such as LM393, then you just need a pull-up resistor on the PIC input.
     
  3. veryevil

    veryevil Minimodder

    Joined:
    14 Aug 2005
    Posts:
    1,228
    Likes Received:
    34
    Oh ok thanks. Just out of interest is there a better / easier way to do it say with Transistors?

    Thanks
     
  4. ConKbot of Doom

    ConKbot of Doom What's a Dremel?

    Joined:
    2 Jul 2003
    Posts:
    2,160
    Likes Received:
    6
    Are you using a photodiode or a phototransistor? They are 2 different things, a phototransistor has a high gain, but you need to supply power to it, a photodiode is actually a current source when light strikes it.

    If you are indeed using a photodiode, the kind of circuit that is commonly used is called a 'photodiode transimpedance amplifier' The schematic you posted looks more like something that would be used for a phototransistor. Though I would think you would need some sort of bias/pulldown resistor on the non-inverting input to keep leakage current from keeping it all the time.


    Oh, and if you wanna use transistors...
    [​IMG]
    schematic for a 741 opamp... :lol:


    If you are using a phototransistor or a LDR you could make it part of a voltage divider, and either hook it to a comparator, or you could use a zener diode of whatever voltage you deem appropriate and a darlington transistor together as a switch.
     
    Last edited: 14 Apr 2007
  5. veryevil

    veryevil Minimodder

    Joined:
    14 Aug 2005
    Posts:
    1,228
    Likes Received:
    34
    Oh this is most irritating. Im looking for a simple way to send very basic pulses of varying time length for different commands over IR to be controlled by a PIC.

    Im looking for the simplest was of doing this. Any ideas?
     
  6. cpemma

    cpemma Ecky thump

    Joined:
    27 Nov 2001
    Posts:
    12,328
    Likes Received:
    55
    But you could simplify that a bit. ;)

    The problem with a simple transistor switch is you don't get a sharp switching point, and it's less easy to set that point to suit a certain light level.

    The comparator circuit is pretty simple:

    [​IMG]

    As shown, the output goes low when the light intensity is over a set level.
     
  7. ConKbot of Doom

    ConKbot of Doom What's a Dremel?

    Joined:
    2 Jul 2003
    Posts:
    2,160
    Likes Received:
    6
    what kind of speed are you talking about? a phototransistor is fairly quick and should be fine for most IR communications. Photodiodes are typically for fiber communication, so you are talking mhz-ghz range.

    A phototransistor, resistor/pot or two and a schmit-trigger buffer/inverter, or a comparitor, or the zener-darlington arrangement I metioned earlier would work fine for that.
     
  8. veryevil

    veryevil Minimodder

    Joined:
    14 Aug 2005
    Posts:
    1,228
    Likes Received:
    34
    Well this is to be used with pics so nothing above 4Mhz but its gonna be slower than that.
     
  9. SteveyG

    SteveyG Electromodder

    Joined:
    23 Nov 2002
    Posts:
    3,049
    Likes Received:
    8
    Photodiodes can be used in both photovoltaic and photoconductive modes. Photovoltaic mode offers the highest sensitivity, which is when you'd use ConKbot's transimpedance amplifier. Photoconductive more offers the highest speed and bandwidth, but works on the fact that a photodiode will conduct in the reverse direction with application of light, which seems to be what you're trying to achieve with your first circuit but with lots of flaws ;) (just set up your amp with a negative feedback resistor and your photodiode connected to the - input and biased at 10 or more volts. The diode should also be the other way round).

    You can easily use a phototransistor at IR transmission speeds that you'll be using on your PIC.
     
  10. cpemma

    cpemma Ecky thump

    Joined:
    27 Nov 2001
    Posts:
    12,328
    Likes Received:
    55
    Above comparator circuit amended for photodiode; a bit of info here.
     

Share This Page