Infra Red Sensor - Online Article

Basic IR Transmitter / Receiver (Tx / Rx) pair

Infrared sensors work by sending out a beam of IR light, and then computing the distance / reflectivity to any nearby objects from characteristics of the returned (reflected) signal. A simple IR proximity sensor is essentially just an IR LED and IR photodiode. This simple sensor, though, would be prey to ambient light (i.e., your IR "receiver" would be responding to naturally present IR as well as reflected IR , and we would see later how we can cut that out).


Observe that the Tx LED is forward biased and Rx Photodiode is reverse biased. Now when the IR rays transmitted by Tx get reflected from the surface and fall on the Rx, the current in Rx is proportional to the intensity of IR rays.

For example, in line following case if white line reflects the IR rays, the intensity is higher, but if reflected by the black surroundings the intensity will be lower.

Now the current in Rx is proportional to this intensity and so will be the voltage (= current x resistance) across the 3000 ohms resistance which can be measured at output. So now you can differentiate between white (say voltage measured is 3.5 V) and black surface (voltage is 1 V). Similarly you can measure distance. Intensity from nearer surface would be greater than that received from a farther surface which will be from Inverse square law (intensity is inversely proportional to the square of the distance).

How to make use of output voltage

There are two things that could be done with this output voltage:

  • If you simply want to differentiate between two surfaces or distances you can use a comparator (like LM339). You got to set a threshold voltage (say 2.5 V), and compare your output voltage with it. This will give you TTL output. If output voltage is greater than your threshold you get logic 1 and if less you get logic zero.
  • Secondly a more effective way of making use of this output voltage is to do Analog to Digital Conversion (ADC). This will give you a number as a measure of intensity.

Modulated IR signal: Getting rid of the ambient light

Your IR "receiver" would be responding to naturally present IR as well as reflected IR. A better solution would be to modulate your transmitted IR (i.e., to send out IR signal at a certain frequency), and then have the receiver circuitry only respond to that frequency component of the received (i.e., to ignore the DC component of the received signal, and only trigger off the AC component).

Band Pass Filter

This can be done using a Band - pass filter. A band pass filter passes a range of frequencies while rejecting frequencies outside the upper and lower limits of the passband. The range of frequencies to be passed is called the passband and extends from a point below the center frequency to a point above the center frequency where the output voltage falls about 70% of the output voltage at the center frequency.

Now you need to just add a little bit more circuit to our earlier sensor circuit. Below given are circuits for High pass, Low pass and Band pass filters using Op - Amps.


The example below shows a single Op-Amp 20000 Hz band pass filter with a Q of 8 and a gain of 65.


Values of resistances for a different frequency or gain can be worked out from these expressions:

R1 = Q / (G*C*2*Pi*F) = 8/(65 * .00000001 * 6.28 * 20000) = 97.9 Ohms R2 = Q / ((2*Q^2)-G)*C*2*Pi*F) = 8/((128-65) * .00000001 * 6.28 * 20000) = 101 Ohms R3 = (2*Q) / (C*2*Pi*F) = 16 / (.00000001 * 6.28 * 20000) = 12.7 K Ohms

Peak Detector

The output that you get will be a 20K Hz wave. Next you add a peak detector circuit. The peak detector is a circuit that remembers the peak value of a signal. When a positive voltage is fed to the noninverting input the output voltage of the op-amp forward biases the diode and charges up the capacitor. This charging last until the inverting and noninverting inputs are at the same voltage, which is equal to the input voltage. When the noninverting input voltage exceeds the voltage at the inverting input, which is also the voltage across the capacitor, the capacitor will charge up to the new peak value. Consequently, the capacitor voltage will always be equal to the greatest positive voltage applied to the noninverting input.

Once charged, the time that the peak detector remembers this peak value is typically several minutes and depends on the impedance of the load that is connected to the circuit. Consequently, the capacitor will slowly discharge towards zero.


About the Author:

No further information.


Shweta Sharma on 2009-03-28 01:30:50 wrote,

@ Rajesh Kr Gupta,
intresting one..

RAJ KUMAR on 2009-11-07 17:10:47 wrote,


veersehwari koti on 2011-06-02 17:28:18 wrote,

plase send ppts all electronic ppts this program very useful to all students nice program which improves the knowledge of the person