IR receiver help requested

Discussion in 'The Projects Forum' started by fisher191, Jan 9, 2013.

  1. fisher191

    Thread Starter New Member

    Jan 9, 2013
    2
    0
    Hello,

    I am having trouble with an IR receiver circuit design and wonder if anyone can help.

    I want to be able to toggle the input to a PC serial port when an IR beam is broken. I have tried simpler circuits that only go to near 0V but these have been unreliable for me. I am trying with this circuit to get the + and - voltage range specified for RS232.

    I have made a IR transmitter that outputs a modulated 38kHz to match the equirements of the receiver chip I am using - a TSOP32338 http://radio-hobby.org/uploads/datasheets/tsop/TSOP321-TSOP323.pdf

    I have built a receiver circuit as attached but cannot get it to work. I separated it at the dotted line and each half works. I have removed the diode and smoothing capacitor and it works (with a 6k8 resistor where the diode was) but the output cycles at the modulation frequency.

    I thought that the forward voltage drop of the diode I was using, a 1N4148, might be the problem and replaced it with a schottky BAT85 but still no go.

    I would very much appreciate any thoughts.

    Thank you,
    Greg
     
  2. wayneh

    Expert

    Sep 9, 2010
    12,103
    3,038
    I think your smoothing capacitor might be too large. I haven't done the math, but the detector can only sink a max of 5mA, and that would take a little while to discharge that cap.

    You could try moving it to the output of the first transistor, or try a smaller value.
     
  3. BillB3857

    Senior Member

    Feb 28, 2009
    2,400
    348
    With the diode between the detector and the base of the first transistor, even if the detector goes completely to 0V, the diode drop will keep between 0.6 and 0.7V on the base of the transistor. Try replacing the diode with a 1K resistor. Then the base will go closer to ground turning off the transistor.
     
    ErnieM likes this.
  4. THE_RB

    AAC Fanatic!

    Feb 11, 2008
    5,435
    1,305
    Replace the cap with a 1nF cap, remove the diode (as people have said) and you might also need to adjust the 10k resistor value, and/or add another resistor between base and emitter of the NPN.
     
  5. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,386
    1,605
    Bingo! That nails it. Try that.
     
  6. THE_RB

    AAC Fanatic!

    Feb 11, 2008
    5,435
    1,305
    No! Replacing the diode with a 1k resistor will cause a complete failure! :eek:

    The 3pin IR sensor will pull down to about 0.2v, then the have an 11:1 voltage divider caused by the two resistors, giving a total of about 1v Vbe, not enough to turn the transistor off.

    See post #4, he needs to remove the diode, and (maybe) put a resistor between base and emitter (2k2 would be fine).
     
  7. tubeguy

    Well-Known Member

    Nov 3, 2012
    1,157
    197
    Using the original circuit, add another diode between the 10k-4.7uf junction and the transistor base with cathode to base. Add a 10k pull down at base to gnd.
     
  8. fisher191

    Thread Starter New Member

    Jan 9, 2013
    2
    0
    Thank you very much for the replies - they have helped me to figure out what was going on. The main problem was that I miscalculated the load on the IR sensor.

    I have modified the circuit as attached and it is now working as I hoped.

    The key changes are adding a 1.2K resistor in series with the schottky diode and adjusting the voltage divider.

    For those that suggested I remove the diode, I believe it is required. The IR transmitter sends a modulated pluse (per the datasheet) to improve interference rejection. The TSOP32338 removes the carrier but outputs a square wave. When no IR signal is received, the output is high (+5V). When it sees the signal it outputs the square wave. The diode bleeds down the capacitor and the voltage divider prevents it recharging from the 100k resistor. Using a schottky diode allows the capacitor to discharge below the threshold required to turn off the transistor.

    If the diode was replaced with a resistor the capacitor would partially recharge duing the on time of the square wave.

    At least, that is what I think is going on. If anyone can see any potential problems or has any thoughts to improve the design I would be very pleased to hear about them.
     
  9. BillB3857

    Senior Member

    Feb 28, 2009
    2,400
    348
    Thanks for clearing it up for all of us. Good job!
     
Loading...