Embedded Electronics Blog

How to make simple Infrared Sensor Modules


Overview :

In this tutorial / blog post, we will see how to make simple infrared sensor module for detecting reflecting surface. This sensor can be used to detect reflecting silver/white strip, obstacle detection, flame detection, etc. These sensors are primary requirement of any simple line follower robot car.

If you are looking for ready-made infrared sensors, check here.


New Tutorial

If you want to make more reliable, sensitivity adjustable, IR sensor modules checkout the new tutorial here – DIY Infrared Sensor Module.

Principle :

IR LED emits infrared radiation. This radiation illuminates the surface in front of LED. Surface reflects the infrared light. Depending on reflectivity of the surface, amount of light reflected varies. This reflected light is made incident on reverse biased IR sensor. When photons are incident on reverse biased junction of this diode, electron-hole pairs are generated, which results in reverse leakage current. Amount of electron-hole pairs generated depends on intensity of incident IR radiation. More intense radiation results in more reverse leakage current. This current can be passed through a resistor so as to get proportional voltage. Thus as intensity of incident rays varies, voltage across resistor will vary accordingly.

This voltage can then be given to OPAMP based comparator.Output of the comparator can be read by uC. Alternatively, you can use on-chip ADC in AVR microcontroller to measure this voltage and perform comparison in software.

IR LED and IR sensor :

IR LED is used as a source of infrared rays. It comes in two packages 3mm or 5mm. 3mm is better as it is requires less space. IR sensor is nothing but a diode, which is sensitive for infrared radiation.

This infrared transmitter and receiver is called as IR TX-RX pair. It can be obtained  from any decent electronics component shop and costs less than 10Rs. Following snap shows 3mm and 5mm IR pairs.

Colour of IR transmitter (IR-TX) and receiver (IR-RX) is different. However you may come across pairs which appear exactly same or even has opposite colours than shown in above pic and it is not possible to distinguish between TX and RX visually. In case you will have to take help of multimeter to distinguish between them.

Here is how you can distinguish between IR TX-RX using DMM :

Following snap shows typical DMM reading obtained when IR receiver is connected to it as mentioned above. Second snap shows how sensor’s resistance increases when it is covered by a finger. Note that, these are just illustrative figures and they will depend upon sensor as well as DMM that you are using.

While buying an IR sensor, make sure that its reverse resistance in ambient light is below 1000K. If it is more than this value, then it will not be able to generate sufficient voltage across external resistor and hence will be less sensitive to small variation in incident light.

The circuit diagram :

Infrared sensor circuit is very simple and straight forward.

Circuit is divided into two sections. IR TX and IR RX are to be soldered on small general purpose Grid PCB. From this module, take out 3 wires of sufficiently long length (say 1 ft). Then, as shown above, connect them to VCC, preset and to ground on main board. By adjusting preset, you can adjust sensitivity of the sensor. VCC should be connected to 5V supply.

Making the sensor module :

You can follow these steps to make a sensor module ….

  • First cut the 1 inch piece of grid PCB such that you get 4 columns of holes .
  • Now Solder IR Transmitter and Receivers as shown. While bending their leads, make sure that cathode of each one comes to RHS after mounting on PCB.
  • Solder 470E current limiting resistor as shown.
  • Solder, 47nF capacitor to other end of resistor and anode of RX. Refer circuit diagram.
  • Now take 3 pin RMC connector and twist its wires as shown.
    You can also use wires of your choice, may be FRC.
  • Solder these wires to GND, SIGNAL and VCC points on the PCB. Refer circuit diagram.Finished !!!

 Testing sensor module :

If you have a breadboard(BB) you can quickly test this module and see how it works.

Test setup :  

Here are some test results of my module :

    Glow of IR LED. Since sensors in out digital cameras are sensitive to IR, we can easily see IR led glowing !!
    vOut when K750i’s camera flash was turned on
    vOut in ambient lighting.
Two fluorescent lights are there in room.
    vOut when a piece of white paper is held near to the module.

Here are some of the snaps of my sensor modules :

    Four IR transmitters are  used to flood the surface. Sensor diode is at the centre. I had made this when I had to detect black wall. Even black colour reflects detectable IR, if irradiated sufficiently.
    Sensor module covered with black tape to lessen effect of ambient IR radiation. Also metal strip is glued for easier mounting on robot-car’s chassis.
    This is how I use sensor module with my mega16 development board. Blue preset is connected to sensor in exactly same way as shown in circuit diagram. vOut is connected to ADC input of AVR.

NOTE :

vOut is the output from sensor module. You can connect this to ADC input of AVR microcontroller. Now using ADC, you can read the voltage developed across the movable tap and grounded pin of preset. Alternatively you can also use OPAMP based comparator.

…. And finally, if you found this tutorial helpful or have any suggestions … do leave a comment.

Ready made modules:
Making things by our own hands is fun!! However, if you are in a hurry, here are some readily available infrared sensor Modules:

Low cost infrared sensors(from Amazon):

Low cost infrared sensors(from DX):
(Approx cost ~ $4 to $10 / INR 300 to 600, free world wide shipping)


Questions/topics covered by this Post:
  • How to build an infrared sensor?
  • How to make an infraded sensor?
  • How does an infrared sensor work?
  • How to use an infrared sensor?
  • Infrared sensor circuit diagram
  • Infrared sensor circuit design
  • Infrared sensor detector
  • Infrared sensor working
  • Infrared sensor application
  • Infrared sensor project

Exit mobile version