• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

Homemade Circuit Projects

Get free circuit help 24/7

  • 1000+ Circuits
  • Privacy Policy
  • About Us
  • Contact
  • Disclaimer
  • Videos – Circuit Test Results
You are here: Home / Infrared (IR) / How to Connect an IR Photodiode Sensor in a Circuit

How to Connect an IR Photodiode Sensor in a Circuit

Last Updated on May 18, 2020 by Swagatam 22 Comments

In this post we learn how to correctly connect an IR photodiode in circuits such as a proximity sensor circuit. The explanation is presented in the form a discussion between one of the dedicated readers of this blog NVD, and me.

Here's the discussion which explains how to connect a photodiode in an electronic circuit.

Verifying IR Photodiode Connection in a Circuit

Question: Can you please tell me whether following circuit work or not. I think output of ic is 5v. I want the output to be connected to a 12v relay instead of buzzer..can you tell what alterations should i make in the circuit..

How to Connect an IR Photodiode Sensor in a Circuit
photodiode IR image with polarity anode cathode

Analyzing the Circuit

Answer:

(+) is the Anode, and (-) is the Cathode of the Photodiode. In other words the pin associated with the wider plate inside the photodiode will be be the Cathode, and the pin associated with the thinner plate inside the photodiode will be the Anode

  • if it's set correctly then it should work..However the diagram above has many mistakes and will never work. The IR photodiode configuration with the opamp will need some modifications.
  • For configuring a relay, you can use a BC547/relay stage at the output of the opamp, the base resistor cold be 10K
  • For a details information regarding the relay driver stage you can refer to the following article: https://homemade-circuits.com/2012/01/how-to-make-relay-driver-stage-in.html

Question:

ok is there any positive and negative terminal for IR receiver and transmitter like led. I'm new to to this, that's why asking

Polarity for IR Photodiodes in Transmitters

  • just like any other diode, IR photo-diodes also have polarity and must be connected accordingly.

Question:

In the circuit, photodiode is connected forward bias. is it wrong? Please check sir.

Circuit Diagram

photodiode is connected forward bias

IR Photo Polarity for Receiver

  • The transmitter IR photodiode polarity is correct...receiver polarity is wrong, needs to be inverted for the receiver as shown below.
transmitter IR photodiode polarity is correct

Question:

sir, firstly i forgot to connect IC pin 3 to receiver resistor then i have given a supply of 12V therefore Led lights up only. After that I connected pin 3 to resistor and given 9V. Now led lights when i turn the variable resister to one side. LED doesn't light up when obstacle is brought in front.

Can an IR Photodiode get Burnt

I connected everything properly still it doesn't work, is there a chance of IC or photodiode getting burnt when i connect to a 12V supply. Do you have any circuit diagram for IR proximity sensor.

Please help me sir.

Answer

  • The photodiode will never burn as long as its connected in series with a resistor.

So why is the Receiver Photodiode not Responding

Answer:

In the diagram above the photodiode connected with the opamp will never be able to trigger the opamp in response to a received infrared signal, Why??

The Right way to Connect a Photodiode with an Opamp

The voltage generated by the receiver photodiode in response to the signals from  the transmitter photodiode will be hardly in millivolts, may be just a couple of millivolts.

Although opamps may be sensitive to detect even to a couple of millivolts, the 10K resistor across pin#3 and ground will instantly nullify the tiny millivolt signal making it impossible for the opamp to detect it.

Therefore we can assume that it is the 10K resistor that is responsible for not allowing the opamp to detect the photodiodes output signal.

The following diagram shows how to connect a photodiode correctly with an opamp such that it effectively responds to the signals from any IR photodiode transmitter source:

connecting a photodiode correctly with an opamp

In the above diagram we can see that the earlier 10k resistor at the non-inverting pin of the opamp is replaced with a low value capacitor, and now this allows the opamp to respond to the signals generated from the Rx, Tx photodiodes.

In fact the opamp would still respond without the capacitor, however it is never advisable to keep the inputs of an opamp floating while it is powered, therefore the grounded capacitor makes sure that the concerned input of the opamp never stays floating and prone to stray signals.

You may think that the capacitor could be replaced with a high value resistor, in the order of many Meg Ohms, sorry that might not help either, that would again prohibit the opamp from sensing the signals from the photodiode, and ultimately the low value capacitor results in being the right choice.

Connecting Photodiode for Activating a Relay

The above shown opamp based photodiode detector can be further upgraded to trigger a relay stage by integrating a relay driver stage as shown in the following diagram:

simple IR proximity sensor circuit with relay activation

Feedback from Mr. Norman Kelley (one of the avid readers of this blog):

Hi, Swagatam,

I have been looking for a circuit to alert me when someone enters my courtyard and front deck.

Delivery people leave things on the front deck and do not ring the door bell, so I don't know my packages are on the deck. Also, at night, I would like to know if someone enters my courtyard.

I designed a circuit with a PIR and a wireless TX/RX to play a message inside my house. Everything works but there are many false triggers and it drives my wife nuts.

I am assuming that the RF signals are triggering the PIR. I tried separating them a few inches and it helped, but not enough. So, I decided to look at IR to detect the person opening the gate to the courtyard and then wirelessly transmitting that trigger. I wanted to do an IR beam, but it requires more components that I don't have at this time.

So, I decided a proximity IR would work if I placed the sensor at the gate and put a reflector on the gate that would reflect the IR when the gate was opened.

I saw your above circuit "How to connect an IR Photodiode Sensor".

I bread boarded the circuit and it works fine. The only problem is it uses 50ma in standby mode and 70ma when active.

Remote mounting with battery power supply seems to be out of the question unless there is a way to reduce the power requirements or I will have to run low voltage out to the unit.

Any suggestions or comments? Thanks for your help!
Norman Kelley

My Response:

Hi Norman,

The high consumption could be simply due to the incorrect LED resistor values, try using 1K for transmitter LED and also for the indicator LED, the total consumption should come down to around 6mA




Previous: Interfacing SD Card Module for Data Logging
Next: Timer Based Cell Phone Charger Circuit

About Swagatam

I am an electronic engineer (dipIETE ), hobbyist, inventor, schematic/PCB designer, manufacturer. I am also the founder of the website: https://www.homemade-circuits.com/, where I love sharing my innovative circuit ideas and tutorials.
If you have any circuit related query, you may interact through comments, I'll be most happy to help!

You'll also like:

  • 1.  2 Simple Infrared (IR) Remote Control Circuits
  • 2.  Lamp Outage Detector Circuit for Car Turn Signal
  • 3.  Cellphone Detector Circuit
  • 4.  3 Simple Battery Voltage Monitor Circuits
  • 5.  Contactless Sensors – Infrared, Temperarture/Humidity, Capacitive, Light
  • 6.  IC 555 Based Simple Digital Stopwatch Circuit

Please Subscribe (Only if you are Genuinely Interested in our Newsletters)


 

Reader Interactions

Comments

    Your Comments are too Valuable! But please see that they are related to the above article, and are not off-topic! Cancel reply

    Your email address will not be published. Required fields are marked *

  1. Search Related Posts for Commenting

  2. AJTIKUMAR VK says

    sir
    If use IR receiver and transmitter , the Op amp out will be positive ?
    how to set up for a negative switching ? I am using LM393 for switching

    Reply
    • Swagatam says

      Ajitkumar, yes the opamp output will become positive when the IR is active on the sensor.
      To invert the situation, just swap the input pins of the op amp, meaning connect the preset with pin3 and the photodiode with pin2

      Reply
  3. Inderjeet Singh says

    Hello Sir
    Can you please tell this ir sensor circuit is working in sunlight / outdoor.
    actually i want to make auto sanitizer machine with 1 sec out and then closed.
    can i make it without micro controller, if yes then give me circuit diagram or if no then also share circuit diagram with microcontroller.

    Reply
    • Swagatam says

      Hello Indrajeet, you can try the last circuit from the following article;

      https://www.homemade-circuits.com/automatic-hand-sanitizer-circuit/

      Reply
      • Inderjeet Singh says

        Thanks for reply, but TCRT 5000 is creating problem in sunlight

        Reply
        • Swagatam says

          Then you should cover it from sunlight, cover it in way that it only detects the hand when it comes near the sensor

          Reply
  4. chris says

    The circuit labeled “the right way” shows a “Digital output” but when I built the circuit the output is clearly analog. The circuit below adds a transistor used as a switch to drive the relay, and this transistor appears necessary to make the circuit digital.

    Reply
    • Swagatam says

      When an op amp is wired as a compartaor the output will be always digital, because the output can be either high or low in such situations. Slight analogue behavior may occur at the transition but eventually it will a quick high or low….please check with an LED to see the response correctly, if the LED illuminates/dims slowly for the entire course of action then your op amp may be faulty. The base LED of the transistor will actually prove whether the response is digital or not.

      Reply
  5. sedigh hosein says

    hi dear sir thank you so much for your guidance,in the practical work related to photo diod,you directed me to this link,but i want to calculate a pulse with an approximate speed 10 KHz,but the presence of a capacitor in this circuit does not lead to my goal,photo diod is a great suggestion,but it does not have a speed circuit ,i want to make an optocopler with 10cm insulation and high speed,i mean ,i want to count a number of things through an emission pulse to an integrated circuit for example atmega or arm ,so in that case i need to be able to count it as soon as i feel the voltage ,thank you very much,

    Reply
    • Swagatam says

      Hi Sedigh, you can try replacing the capacitor with any resistor between 1k and 1M, and see how it responds. In my experiment the photodiode did not work correctly with a resistor, I am not sure why, but you can try it and check the results.
      More info is given here:

      https://www.homemade-circuits.com/photodiode-phototransistor-working-and-application-circuits/

      Reply
  6. chris says

    Does the addition of the capacitor in the fourth figure “the right way . . . ” affect the response time of the op-amp to a signal from the photodiode?

    Reply
    • Swagatam says

      Possibly yes, the effect may be in microseconds

      Reply
      • chris says

        thanks for the very prompt reply. I suspected as much and I tried to use an online calculator and came up with a similar answer. Microseconds I can live with, milliseconds no so much.

        Reply
        • Swagatam says

          No problem, appreciate your feedback!

          Reply
  7. wending says

    Is it possible to substitute the battery with a 5v VCC? If so, what will the required resistor needed to be?

    Regards,
    Wending

    Reply
    • Swag says

      yes it is possible, no parts will need to be changed for this…

      Reply
  8. Raj says

    sir
    can you please tell me whether this circuit works or not
    https://drive.google.com/open?id=0B-dWJVKXq45-SVEtdGF5MlRRaE0

    Reply
    • Swagatam says

      Raj, It might work if the BC557 is a Darlington transistor, and also it is incorrectly presented as an NPN…correction is required.

      Reply
  9. Swagatam says

    use 10K

    Reply
  10. Swagatam says

    yes, you can replace the buzzer with a relay driver stage as explained below

    https://homemade-circuits.com/2012/01/how-to-make-relay-driver-stage-in.html

    Reply
  11. Sasa Hadia says

    Fantastic works

    Reply
    • Swagatam says

      thank you

      Reply


  12. COMMENT BOX IS MOVED AT THE TOP


Primary Sidebar

Electronic Projects Categories

  • 3-Phase Power (15)
  • 324 IC Circuits (19)
  • 4017 IC Circuits (51)
  • 4060 IC Circuits (25)
  • 555 IC Circuits (92)
  • 741 IC Circuits (18)
  • Amplifiers (49)
  • Arduino Engineering Projects (82)
  • Audio Projects (83)
  • Battery Chargers (75)
  • Car and Motorcycle (87)
  • Datasheets (44)
  • Decorative Lighting (Diwali, Christmas) (31)
  • DIY LED Projects (81)
  • Electronic Components (96)
  • Electronic Devices and Circuit Theory (34)
  • Electronics Tutorial (99)
  • Fish Aquarium (5)
  • Free Energy (34)
  • Games (2)
  • GSM Projects (9)
  • Health Related (17)
  • Heater Controllers (23)
  • Home Electrical Circuits (98)
  • Incubator Related (6)
  • Industrial Electronics (25)
  • Infrared (IR) (39)
  • Inverter Circuits (94)
  • Laser Projects (10)
  • LM317/LM338 (21)
  • LM3915 IC (24)
  • Meters and Testers (52)
  • Mini Projects (152)
  • Motor Controller (64)
  • MPPT (7)
  • Oscillator Circuits (12)
  • PIR (Passive Infrared) (8)
  • Power Electronics (32)
  • Power Supply Circuits (64)
  • Radio Circuits (9)
  • Remote Control (46)
  • Security and Alarm (55)
  • Sensors and Detectors (115)
  • SG3525 IC (4)
  • Simple Circuits (72)
  • SMPS (30)
  • Solar Controllers (60)
  • Timer and Delay Relay (51)
  • TL494 IC (5)
  • Transformerless Power Supply (8)
  • Transmitter Circuits (37)
  • Ultrasonic Projects (12)
  • Water Level Controller (45)

Follow Homemade Circuits

Facebook
Twitter
YouTube
Instagram
My Facebook-Page
Quora

Feeds

Post RSS
Comment RSS

Circuit Calculators

  • AWG to Millimeter Converter
  • Battery Back up Time Calculator
  • Capacitance Reactance Calculator
  • IC 555 Astable Calculator
  • IC 555 Monostable Calculator
  • Inductance Calculator
  • LC Resonance Calculator
  • LM317, LM338, LM396 Calculator
  • Ohm’s Law Calculator
  • Phase Angle Phase Shift Calculator
  • Power Factor (PF) Calculator
  • Reactance Calculator
  • Small Signal Transistor(BJT) and Diode Quick Datasheet
  • Transistor Astable Calculator
  • Transistor base Resistor Calculator
  • Voltage Divider Calculator
  • Wire Current Calculator
  • Zener Diode Calculator

© 2021 · Swagatam Innovations

We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.Ok