About Me

Pilani, Rajasthan, India
I am an engineering student currently pursuing an undergraduate degree in Electronics & Instrumentation from BITS Pilani, Pilani campus. My hobbies are reading novels- fiction and non-fiction alike, playing and watching football, dabbling with new software and going through blogs. I love reading Electronics For You. It has helped me a lot in my college life. And sometimes, people around me.

Hope you find this blog useful. Thank you.

Saturday, May 21, 2011

A Basic Proximity Sensor

Robotics involves working on sensors at some point of time or other. Also, at college level, students generally make robots that involve some sort of obstacle avoidance or seeking or sometimes both. In any case, detecting an obstacle is the first step. If you are concerned only with the presence (or absence) of some solid material in front of your robot, it makes absolutely no sense to use a camera as it would be a total waste of resources, a needless addition to your costs and most importantly it will also affect the response time of your robot.

What you really need is a 'proximity sensor'. As the name suggests, proximity sensors sense the proximity of an obstacle. (Du-uh ?!)

The most common proximity sensors used are IR LED-Photodiode based. In alternative implementations, Photodiodes can be replaced by Phototransistors, IR LED can be replaced by a LASER source. But, in all these implementations, the principle is the same:

There is a transmitter and a receiver( also called photodetector). The transmitter transmits EM rays all the time...if the receiver receives any of these rays, it can mean two things - either you have an obstacle in front of you reflecting these rays or you have another source of the same type of rays. Thus, this technique may not be the best obstacle-detecting technique around...but yeah..we still use it.

The following schematic made in TinyCAD illustrates the connections for a proximity sensor using IR LED and a Photodiode. Please note, this is a very basic circuit. Generally, the output voltage is first converted to a digital signal for use ( more on this later :) )

Basic Functioning of the Circuit

The IR LED is connected in series with a 330 ohm resistor to provide the correct voltage drop across the LED.
The Photodiode that is used must be sensitive to only that range of frequencies that the IR LED emits, else the purpose is lost - it is like a Chinese man receiving a message in Tamil. A Photodiode is used because it has the property that when reverse biased, the current it allows to pass across itself is a function of the intensity of optical illumination. Hence, it is very important to have the Photodiode reverse-biased i.e. the longer leg should have a lower potential than the shorter leg. Only then, your circuit shall work as desired.
As the robot goes nearer to the obstacle, more the number of reflected rays, more the optical illumination, more the current across the Photodiode and the resistor, more the output voltage..SIMPLE EH ?

Approximate cost break up

IR LED - Rs. 5-7
Photodiode - Rs. 5-10
Resistors - nominal


Alternative implementations

1) In the above circuit you can replace the IR LED by a laser source, so you will have to change your receiver accordingly, since the frequency of the rays has changed.
2) Also, if you want to increase the sensitivity of your sensor, you can replace the Photodiode by a Phototransistor as it provides a reasonable change in current even for a very small change in illumination at the cost of a teeny-weeny change in the circuit.
3) Yet another implementation which is much less complex is that using a Photoresistor or Light Dependent Resistor (LDR). But this type of proximity sensor is not generally used because it provides an appreciable output only after going very close to the obstacle, which is undesirable. Also, owing to memory effect, the response of LDR to changing illumination is very very slow compared to IR LED-Photodiode pair.

Hope this post was useful.
See ya.

1 comment:

  1. Hi... thanks for the posts... i am starting my journey into robotics.. through your posts...

    ReplyDelete