Username:    Password: Remember me

Infra-Red Proximity Sensor (II)
Using 40Khz IR receiver IC
By Ibrahim Kamal
Last update: 4/4/08

Overview
This article deals with a more advanced IR proximity sensing scheme, as compared to the one proposed in the previous article. It is also more expensive but provides more accurate results even in sunny outdoor environment.

This sensor is practically not affected by ambient light, and it can provide detections ranges that exceed 1 meter. However, The main idea remains the same where Infra-Red light is emitted on an object, which reflects the light back, then the reflected Infra-Red light is sensed with a special IR sensor. The whole difference is in the way IR is sent and received.


1. The Principle of operation
As I said, the main idea behind obstacle detection using IR is to send Infra-Red (IR) light in a
certain direction, and if an object is present no too far from the sensor, IR will be reflected back and detected by the sensor. But as you may already know, one of the biggest problems that can cause the malfunctioning of an IR proximity sensor, is the ambient light and surrounding sources of IR like the sun and halogen lamps that can cause false triggering of the sensor.

The ingenious solution that was developed to avoid this problem, is to send pulses of IR light at a certain frequency instead of a constant beam, and build a receiver that would only detect IR pulses of the same exact frequency, cutting of all pulses of higher or lower frequency. The kind of device capable of filtering signals this way is called a bandpass filter. There are a lot of types of bandpass filters, a whole branch of electricity is dedicated to this subject. Instead of building a band pass filter, we used a very common IR receiver Module as the one shown in figure 1.A, that incorporates a receiver, an amplifier and a very reliable filter that rejects all the signals that are a couple of kilohertz far from the original central frequency, all in one single integrated circuit, just as big as a 5V regulator. The central frequency is fixed by the constructor usually at 40 khz.

In order to achieve the best possible results, it's important to understand how this IR receiver detect the 40 Khz IR pulses among all other sources of light. This will help you to take some important factors in consideration

Figure 1.A

while designing similar sensors using the same IR receiver.

Figure 1.B shows in simplified way the composition of the IR receiver and the way it filters all the source of light except the the 40Khz IR signal. It all starts by generating the 40 Khz pulses of electricity that are fed to an IR LED, emitting 40Khz pulses of Infra Red light. A weaker signal but with the same frequency is reflected from an eventual obstacle to the IR receiver, it passes through the IR-PASS filter, which will eliminate other sources of light which are not IR (visible light).

At this point the photo diode hiding behind


Figure 1.B
the IR-PASS filter still detects a lot of noise due to other sources of IR light like the sun for example, so the signals received by the diode are fed to another stage composed of an active filter to select the 40Khz IR signals among all others, amplify it and demodulate it, providing a clean logic output (5 or 0 volts).


2. The electronic Circuit
The electronic circuit for this proximity sensor is shown in figure 2.A, as you can see it is composed of two main parts, the sender and the receiver. The sender part is composed of the four NAND gates, the 2N2222A transistor and the IR LEDs. The first two gates are a NAND gates oscillator, they generate the 40 Khz square wave required to send valid signals that are compatible with the receiver IC. The second two gates are configured as one single AND gate, used to enable or disable the sender part. The potentiometer R1 adjust the current injected into the LED thus it controls the strength of the emitted IR beam and thus it controls the range of the proximity sensor. The potentiometer R2 is used to precisely adjust the frequency of the signal that drives the IR LED.

The Receiver is pretty simple, because is basically relies on the U2 the IR receiver is discussed above. The low pass RC filter composed of R6 and C2 is very important to eliminate the noise especially that the emitter and the receiver share the same power supply. Noting that the output of U2 (the IR receiver) is active low, it is clear that the LED D2 will glow when an object is detected by the sensor.


figure 2.A



3. Components positioning
Like in most home made proximity sensors, the sender LEDs and the receiver are placed on different sides of the PCB in such a way that the PCB optically isolates the receiver from the
direct IR emissions of the LEDs. Note that if the IR receiver detect the IR light of the LED directly; before it hits an objects that reflects it back, the whole process of object detection wont work. Figure 3.A shows the path of the beams from the IR LED to the object and finally to the IR receiver.

You can also notice that the PCB is inclined at 35°. Actually the PCB was designed to be mounted this way on a robot or for other application to totally protect the sensor from ambient light. This way, even the sun light with all its infrared radiations don't perturb the operation of the sensor. This is due to the fact that most - if not all - of the strong ambient light sources come from a relatively high position and thus, the light beams of the such sources of light will hit the PCB instead of the receiver. Only the vertical or almost vertical beams will reach the receiver. It is clear that we may be losing a part of the 40 KHz IR beams sent

Figure 3.A
from the IR LED, but we also also eliminating all most probable sources of error. If you want to be sure for 100 % that the reading of the sensor is not affected by ambient lightning conditions, you can still use the "software based ambient light detection" technique explained in this previous article.

A last note on component positioning is the fact that we used two IR LEDs instead of one in the previous sensors. The use of two leds increases the angle of vision of the sensor, but do not increase the range to am important extent. if you want to build a sensor that concentrates on a smaller angle, you can use a single IR LED.

Figure 3.B shows the two IR LEDs while they are being carefully positioned by trial and error to achieve the desired coverage area.


Figure 3.B


4. Conclusion
The technique proposed in this article is sophisticated and reliable enough to be used in mobile robots for obstacle avoidance, for automatic doors, for parking aid devices or for alarm systems, however, the main weakness of IR remains the same, which is the fact that the reflectivity of the IR beams highly depend on the shape, size and color of the object. In other words if you adjust your sensor for detecting objects at a distance of 50 cm, important variation of this distance can be observed between a big white wall and a small black purse on the ground for example.

Techniques that are further more sophisticated have been developed to overcome this point of weakness of IR proximity sensors...



Some picture of the IR proximity sensor.

Join the Mailing List
Let us get in touch with you when we upload new interesting content.
Name:
Email:
Subscribe  Unsubscribe 


Discussion (Last 15 posts preview...)
Preview of the last 15 messages discussing this page. Messages are sorted from the newest to the oldest.
Posted by:
User avatar
ikalogic

on: 02 Mar 2010
Re: Infra-Red proximity sensors PART 2 (40 Khz Mudulated)
['Quote ]

Quoting huayuliang: fish and fishery

simple chinese


Great! Now, as the french say "je me coucherais moins bête ce soir" meaning, when i go to sleep tonight i'll be less stupid than yesterday (meaning i learnt somthing new) !


Yes... french proverbs are always that ironic! lol
Posted by:
huayuliang
on: 01 Mar 2010
Re: Infra-Red proximity sensors PART 2 (40 Khz Mudulated)
['Quote ]
fish and fishery

simple chinese
Posted by:
User avatar
ikalogic

on: 01 Mar 2010
Re: Infra-Red proximity sensors PART 2 (40 Khz Mudulated)
['Quote ]

Quoting huayuliang:
Quoting rami00972:
Quoting islammath: where is pcb

hay man
you should learn how to make your own pcb
Chinese saying :"Don't give me fish, teach me to fish"



? and ?

although the difference between different languages, but the base is same...



mhhh... any translation plz? :)
Posted by:
huayuliang
on: 01 Mar 2010
Re: Infra-Red proximity sensors PART 2 (40 Khz Mudulated)
['Quote ]

Quoting rami00972:
Quoting islammath: where is pcb

hay man
you should learn how to make your own pcb
Chinese saying :"Don't give me fish, teach me to fish"



? and ?

although the difference between different languages, but the base is same...
Posted by:
User avatar
ikalogic

on: 01 Jan 2010
Re: Infra-Red proximity sensors PART 2 (40 Khz Mudulated)
['Quote ]
here you go http://www.ikalogic.com/cat_sensors_measurment.php
Posted by:
yuvi
on: 29 Dec 2009
Re: Infra-Red proximity sensors PART 2 (40 Khz Mudulated)
['Quote ]
i need circuit diagram of ir transmission and receiver
Posted by:
johncoths
on: 29 Oct 2009
Re: Infra-Red proximity sensors PART 2 (40 Khz Mudulated)
['Quote ]
I am thinking of a best sensitivity of a Infra-Red proximity sensors? Just wanna know about the accurate sensitivity for several proximity? And about the an IR sensor module for some distance measurement of the order for a micro mouse.


_________________
[url=http://www.protectyourhome.com>Security Systems"> [link]
Posted by:
huayuliang
on: 27 Sep 2009
Re: Infra-Red proximity sensors PART 2 (40 Khz Mudulated)
['Quote ]

Quoting cassandra: Hi !

I am using a 555 timer to generate the 40 Khz square wave to the transistor's base .Where can i connect my CTRL pin to ?


555 timers pin 3 is output ,you can use a resistor connect it to CTRL pin.
Posted by:
User avatar
ikalogic

on: 13 Aug 2009
Re: Infra-Red proximity sensors PART 2 (40 Khz Mudulated)
['Quote ]

Quoting ryan_chandl: I have built a similar device but the receiver is too sensitive, it detected the ir beam even when i put the led in different direction. I think this is because the led doesn't focus the ir beam, any solution for this?


Put the receiver leds behind the sender, and enclose the sender with thermotube or any other thing that prevent IR from going backward by reflection or any other means...
Posted by:
ryan_chandl
on: 13 Aug 2009
Infra-Red proximity sensors PART 2 (40 Khz Mudulated)
['Quote ]
I have built a similar device but the receiver is too sensitive, it detected the ir beam even when i put the led in different direction. I think this is because the led doesn't focus the ir beam, any solution for this?
Posted by:
ivan123_ph
on: 12 Jul 2009
Infra-Red proximity sensors PART 2 (40 Khz Mudulated)
['Quote ]
what is an IR barrier configuration? can you please explain w/ details.
Posted by:
User avatar
ikalogic

on: 01 Jul 2009
Re: Infra-Red proximity sensors PART 2 (40 Khz Mudulated)
['Quote ]

Quoting ivan123_ph: im doing a thesis on a security system that uses proximity sensors as a triggering device and plans to use IR proximity sensors. This site really helps alot in my study. What is the maximum range for this sensor because i wish for the sensor to detect or trigger the security system 1 meter or more away from the sensor. will i be able to use the sensor in this site? pls reply

Thank you


for 1 meter indoor, yes.

If you want really big ditancces you can use the same sensor in an IR barrier configuration, where you can easily reach anything from 1m to 20m
Posted by:
ivan123_ph
on: 01 Jul 2009
Infra-Red proximity sensors PART 2 (40 Khz Mudulated)
['Quote ]
im doing a thesis on a security system that uses proximity sensors as a triggering device and plans to use IR proximity sensors. This site really helps alot in my study. What is the maximum range for this sensor because i wish for the sensor to detect or trigger the security system 1 meter or more away from the sensor. will i be able to use the sensor in this site? pls reply

Thank you
Posted by:
User avatar
ikalogic

on: 25 Apr 2009
Re: Infra-Red proximity sensors PART 2 (40 Khz Mudulated)
['Quote ]

Quoting gaurav21gupta: hello sir can u plz tell the value of the capacitor C1 it is visible as 102???


102 is the Japaneses notation. it means 10 + 2 zeros = 1000
the unit it in pF, so 102 = 1000 pF.
Posted by:
gaurav21gupta
on: 07 Apr 2009
Infra-Red proximity sensors PART 2 (40 Khz Mudulated)
['Quote ]
hello sir can u plz tell the value of the capacitor C1 it is visible as 102???
You have to be a member to post replies.
Username: Remember me
Register now! it only takes an instant.
Forgot your password?
ikalogic.com: Electronics and Robotics related projects.
All content on this site is provided as is and without any guarantee of any kind. We cannot be held responsible for any errors, omissions, or damages arising out of use of information available on this web site.
Creative Commons License
IMPORTANT COPYRIGHT NOTE: Electronics and Robotics Articles by Ibrahim KAMAL are licensed under a Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 United States License.