In this post we learn how to design your own simple yet useful proximity detector circuits using a single opamp LM351 and a couple of infrared diodes. Two concepts are explained here, the first one using an ordinary opamp, while the second one using IC LM567 which works with a phase locked loop principle ensuring very accurate response for the detection.
A sensor is a device that detects and measures any physical parameter of our environment and converts it into electric signals.
There is a long list of sensors that are available in market today. Some of them are humidity sensor, flex sensor, touch sensor, fingerprint sensor, pressure sensor and many more.
We come across a lot of sensors in our day-to-day life. 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 motion detector circuit which incorporates the IC LM567 for ensuring reliable, and foolproof operations. The circuit also works as a obstacle or a proximity detector circuit.
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: