Cognoscis

Think. Understand. Apply

Modulated IR sensor

Posted by cognoscis on October 3rd, 2008

You want better quality sensors that are immune to noise and have a good range too. All the conventional methods yield low range. Hence, we go for the modulated IR sensors. Modulation is a process of imposing the message signal on a “carrier”. Anyways, lets not get deep into it. For the context, its just that we use a particular frequency to transmit and receive the signal that is used in the sensor. Now, I am going to discuss the circuit that works around a IR receiver IC called TSOP. This receiver works at 38kHz frequency, hence the transmitter must be woring at the same frequency. So, lets design an IR transmitter for the same.

As shown, we use 555 timer in the astable mode to get the required frequency and supply it to the IR LED. The operation of the timer is pretty straight forward. The relevant equation is given below

f=1/(0.693 x C2 x (R1 + 2 x R2))

The values I have given are just an example. You can try out different combinations so that you will be able to place resistors that are close to the calculated values(meaning, we dont get resistors with value 111? so choose the value carefully). The reisitors R3 and R4 are current limiters and the transistor 2N2222 is used as a switch. You may use any other transistor as a switch. Now, lets come to the tricky part

The LED will always need more cooling time. You cant pump in more current into the LED than what it can take. If you dont take care of that, the LED will overheat and will be spoilt or worse generate very high noise. Hence, be sure of the current it can take and set a suitable value to R4. of course you can calculate the current flowing through the LED by considering the branch from VCC-R4-transistor-LED-ground. Usually the drop across the transistor will be 0.2V (It depends on which transistor you use) and the drop across the LED is around 2V (Again it depends on your LED). So, 5V for VCC minus 2.2V which leaves 2.8V across the resistor R4. So, 2.8/47? ? 60 mA .

This is the same current that flows through you LED!! Simple right? Now, depending on your LEDs you can increase the current flowing. Varying R3 will increase the current too so you may use that to tweak your power. Also, you can send the 38kHz as bursts for short time. This will allow the LED to cool between bursts. By doing this, we can increase the current that is driven through the LED thereby increaing the power output. More power means, more range. But be careful NOT to send more that 125% of the rated current calue through your LED. A simple burst circuit may consists of two timers, one at 38kHz and other at 1kHz and these are given to AND gate. Hence, the output will be burst of 38kHz waves for 0.5ms(50% duty cycle). You can use 2 LEDs in the same circuit, but you need to decrease the resistance R4 appropriately. But more than 2 is not recommended.

Now lets look into the receiver part. TSOP is an IR receiver module. It has many series that work at 38kHz and 40kHz. Lets consider the 38kHz(Since I have used it, I am considering it. You may try the other receiver modules as well, there are plenty of modules available in the market).

Its a 3 pin IC as shown and the pin that is away from the other two is pin number 3. Pin 1 in ground and pin 2 is Vcc. Pin 3 is the output of the sensor which will be a logic 1 or logic 0. Please read the datasheet for more details. Anyways, this receiver IC makes our life much simple as we dont need to break our head to build a receiver circuit and get digital output from it. The simplest way to connect the circuit is as shown below

Simple right? Anyways, you need to orient your sensor and transmitter correctly so that you can receive the reflected wave efficiently. So, mounting is very important of both your LED and TSOP. The receiver has a directivity of 45°. So, you might want to see to it that you will keep it aligned as straight as possible. To use this IC efficiently, as mentioned earlier, use two timers and AND gate to send burst of signals. That will eliminate noise and the efficiency and accuracy of the receiver will improve. As said in the data sheet “After each burst which is between 10 cycles and 70 cycles a gap time of at least 14 cycles is neccessary.” Hence, by sending bursts, you will be able to improve the range also. This circuit must give you a range of 30 cm from transmitter and receiver.

Any suggestions, corrections or queries please comment :)

7 Responses to “Modulated IR sensor”

  1. MorpHy Says:

    Hy! I have a problem…i did connect all the wires as shown in the schematics, but the output is very low, it’s about 13mV, and it can’t switch on the transistor! Any suggestion?!

  2. cognoscis Says:

    MorpHy:

    The circuit is a simple amplifier. The resistance R3 which is 4.7k? controls the base current. Hence, you can reduce it to get more current across your LED. You can reduce its value to as low as 300 ? without any problem. This will increase the collector current equivalently. Further reduction must be done carefully as there will be chances of the transistor being damaged.

    Hope this helps

    Also, to increase the range, do send the signals in bursts as explained by using a second timer at 1 kHz.

  3. MorpHy Says:

    Well, the problem is that the output of the 555 it’s about 13mV! I changed the 555 circuit but the problem persists! I changed the resistors: R1=120? and R2=180?, but i used the same capacitors C1 and C2. I rechecked the schematics and the way I soldered the parts, and it’s ok… Any idea what should i try next?

  4. cognoscis Says:

    Yes,

    You see the resistance 4.7 k will have more voltage drop across it. Meaning, less voltage to send the transistor to saturation. Hence, you need to reduce this resistance and you will be able to achieve proper biasing…

    Try reducing the resistance. It will definitely work. Reduce slowly. I think about 2.7 k will give you the desired results.. For more range, you can still reduce R4 from 47 ? to 22 ?. This will also give you proper biasing

    Regards

  5. How to make a PCB at home « Cognoscis Says:

    [...] The breadboard has a circuit to generate 38 kHz IR signal for modulated IR sensor explained in my previous post. The second picture is a part of LDR sensors I made for my line follower robot. The picture has a [...]

  6. Modulated IR sensor « Cognoscis Says:

    [...] Modulated IR sensor [...]

  7. Cognoscis » Blog Archive » Simple line follower Says:

    [...] For this, LDR or IR sensors can be used. For construction of LDR sensor click here and for IR click here. Now, we have two sensors which are like two eyes of our bot. Using these “eyes” we [...]

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>