An IR proximity sensor is a device which detects the presence of an object or a human when it is within a predetermined range from the sensor, through reflected infrared beams.
Three useful proximity sensor concepts are explained here, the first concept is based on an ordinary opamp LM358, the second one using IC LM567 which functions with a phase locked loop principle ensuring very accurate response for the detection. The third circuit works using the ubiquitous IC 555. Let's learn each one with a step by step explanation.
There is a long list of sensors that are available in market today.
One such sensor is proximity sensor.
In this post , we are about to unravel how a proximity sensor works and what provide the necessary knowledge to make this project at home. As the name suggests, the unit detects whether an object is near or far from it. They can be designed in different ways.
But, the most common method is the one based on INFRARED rays and OPAMP. Some common uses of this device can be seen in cell phones, automatic flush systems , automatic taps, hand dryers and never-falling robots.
1. IR led: Every led emits some form of electromagnetic radiation when powered up. From our household experience, we have known leds that emit visible light.
But, there are also some special leds that emit infra red rays. Just as there can be visible led of different colours , IR led also emit rays of different wavelengths. Infra Red rays can be of varying wavelengths and can take up any value belonging to their waveband.
So , it is very important that the IR photodiode used must be able to detect the particular wavelength of INFRA RED given out by the IR led.
2. IR PHOTODIODE: It is a special type of diode which is connected in reverse bias for IR rays detection. In the absence of IR radiation , it has a very high resistance and practically zero current passes through it.
But when the IR rays fall on to it ,its resistance decreases and a current proportional to the intensity of the radiation is allowed to pass through it.
This property of photodiode is used to generate an electric signal in proximity sensor on incidence of IR rays.
3. Op-amp (IC LM358): Op-amp or operational amplifier is a multi-purpose ic and is highly revered in the electronics world.
In this project op-amp is used as a comparator. LM358 IC has two op-amps which means we can make two proximity detectors using just one IC. The reason to use op-amp in the circuit is to convert analog signal into digital signal.
4. Preset: Preset is basically a resistor having three terminals.
The function of a preset is to divide the total voltage available in a way that the user can access a fraction of it. We just have to set the middle terminal to an appropriate position.
The preset sets the threshold voltage above which the output voltage should be generated. It can be manually set to resistance of any value by rotating its head using a suitable screwdriver.
5. Red led : I have used a red led for my project but in general led of any colour can be used. It acts as a visual signal to show that the obstacle has come close enough.
6. Resistors: Two 220 ohms and one 10k ohm.
7. Power supply: 5 v to 6v.
How it work
The principle lying behind the working of a proximity sensor is fairly simple. A typical concept has two leds parallel to each other – IR emitting led and a photodiode.
They act as a transmitter-receiver pair. When an obstacle comes in front of emitter rays, they are reflected back and intercepted by the receiver.
As per the properties of the photodiode ,the intercepted IR rays decrease the resistance of the photodiode and the resultant electric signal is generated. This signal in practice is the voltage across the 10k resistor which is directly fed to non-inverting end of op-amp.
The function of the op-amp is to compare the two inputs given to it.
The signal from the photodiode is given to the non-inverting pin (pin 3) and the threshold voltage from potentiometer is given to the inverting pin (pin 2).If the voltage at the non-inverting pin is greater than the voltage at the inverting pin the op-amp output is high otherwise the output is low.
All in all, op-amp converts analog signal into digital signal in this circuit.
The sensor output can be used in two forms: ANALOG and DIGITAL.
Digital output is in the form of either high or low. Digital output signal of a proximity sensor can be used to stop the motion of an obstacle-avoiding robot. As soon as, the obstacle comes close enough, signal can be directly fed to the input pins of motor driver to stop the motors.
Analog output is a continuous range of values from zero to some finite value. Such signal cannot be directly given to motor drivers and other switching devices. First they need to be processed by the microcontrollers and converted into digital form through ADC and some coding. This output form requires an additional microcontroller but eliminates the use of op-amp.
Full Circuit Digaram
UPDATE from Admin
The above circuit design could be also built using an ordinary single opamp IC 741, as shown below:
Accurate Proximity Detector Circuit
The following post explains an accurate infrared (IR) based proximity detector circuit which incorporates the IC LM567 for ensuring reliable, and foolproof operations. The circuit also works as a obstacle.
The Circuit Concept
I found this design on the net while searching for an accurate and reliable yet cheap proximity sensor circuit.
The circuit may be understood with the help of the following description:
Referring to the below shown infrared (IR) motion detector circuit, we see the design consisting of two main stages, one involving the IC LM567 while the other with the IC555.
Basically the IC LM567 becomes the heart of the circuit which solely performs the functions of the generating/transmitting the IR frequency and also detecting the same.
Moreover the IC has an internal phase locked loop circuitry which makes it highly reliable with frequency detecting circuit applications.
It means once it reads and latches to a given frequency, its detection feature gets locked to that frequency and therefore any other stray disturbance no matter how strong it may be doesn't influence or rattle its functioning.
An internal oscillator frequency determined by R3, C2 feeds the IR diode D274 via a current controlled stage consisting T1, R2. This frequency decides the center frequency of the chip.
With the above conditions the IC gets set and centered at the above frequency generating a constant high at its output pin#8.
Input pin#3 of the IC waits to receive a frequency which may be exactly equal to the above "centered" frequency of the IC.
The IR receiver or the sensor connected across pin#3 of the IC is positioned exactly for this purpose.
As soon the IR beam from the LD274 finds an obstacle, its beam gets reflected and falls on the appropriately positioned detector diode BP104.
The IR frequency from the LD274 now passes to the input pin#3 of the IC, since this frequency will be exactly same to the set center frequency of the IC, the IC recognizes this and instantly switches its output from high to LOW.
The above low trigger at pin#2 of the IC 555 which is configured as a monostable in turn switches its output high, causing the connected alarm to blow.
The above condition persists for so long as the interruption from of the IR sensor/ detector stays and allows the beams to get reflected. With the inclusion of R9 and C5, the output of IC555 exhibits a certain delay off condition for the connected buzzer even after the motion or the obstacle moves away.
For adjusting the delay-off effect, R9 and C5 may be tweaked as per preference.
The above explained circuit may also be used as a proximity detector circuit and obstacle detector circuit.
The following test circuit shows how to verify the results from a basic LM567 IR based design. The schematic can be seen below:
As you can see, only the LM567 stage is incorporated in the design while the IC 555 stage has been eliminated in order to keep the fundamental testing procedures simpler.
Here the red LED at pin#8 of the IC lights up and remains illuminated as long as the IR LEDs are held parallel to each other within a distance of 1 foot.
If you try replacing the Tx infrared red transmitter LED with some other external source having a different frequency, the LM567 is stop detecting the signals and the red LED will stop glowing.
The photo diodes are not crucial, you can use any similar or standard photo diodes for the transmitter and receiver LEDs.
Video clip for the above test set up:
3) Proximity Detector Using IC 555 Circuit
In this third design we discus a simple IC 555 based proximity detector circuit which can be used for detecting human trespassing from a distance.
An infrared proximity detector can be considered as one of the most valuable and widely used circuits in electronic automation application range.
We can typically see it being used in automatic water dispensers, automatic hand dryer units and some specific variants may be witnessed in the automatic doors of department stores.
Working principle of the proposed proximity detector circuit using IC 555
In the design a generation of rapid bursts of peak voltage pulses from the IC LM555 is implemented at a relatively lower frequency rate, which is transmitted via the infrared LED as jets of IR beams.
These transmitted pulses are focused toward the area which is required to be monitored, and is reflected back when a subject or intruder is detected over a phototransistor diode positioned strategically for receiving these reflected signals..
Once this happens the received signals go through processing in order to enable an attached relay mechanism and subsequently an alarm device to get activated.
To test the above implementation an object may be introduced across the zone of the IR beams and the response may be checked by monitoring the relay operation, such as by moving hand in the focused area, within a distance of about 1 meter.
When the reflected signals hit the phototransistor, it develops a potential difference across the 1M pot (adjustable) and triggers the associated Darlington stage, which in turn activate the right hand side 555 stage configured as a monostable circuit.
The relay gets activated in response to this and stays ON depending on the monostable predetermined time delay set by the 1M and the 10uF capacitor.
Parts List fro the proposed IC 555 based IR proximity detector circuit.
2-- IC LM 555
2-- IC sockets 8 pin
1-- relay 12 V 5 pin
1-- Infrared Phototransistor General Purpose
1-- Infrared Diode General Purpose
2-- capacitors. 10 uF / 50 V
1-- 1N4148 diode
1-- red led 5mm
1-- 68 H
1-- 470 R H All 1/2 W
1-- 10k 1/4 w resistor to be connected in between 1M preset center lead and the BC547 pair
IC 555 Pinouts