Summary of Simple Infrared Barrier
This article explains the design and operation of an IR barrier, a system where a constant infrared signal travels from an emitter to a receiver. When an obstacle blocks this signal, the receiver detects the interruption. The project uses a 940nm IR LED driven by a transistor for range, controlled by a microcontroller like the PIC12F675.
Parts used in the Infrared Barrier:
- IR LED (940nm)
- Infrared receiving element
- Transistor
- Microcontroller (PIC12F675)
Although infrared communication might look like the technology of the 1990s, it is still present in a multitude of applications around us. Every time you press the button of a remote control, it is most likely it is using the IR (infrared) technology for transmitting data. The TV remote is the most common example. Air conditioning remote controls are another good one.
1. Introduction
Although a remote control is not so difficult to design and build, there is an even simpler option: the IR barrier. This consists of a constant IR signal permanently going from an emitter to a receiver, both of them being in two different places (a few meters apart). When an obstacle comes in between the emitter and the receiver, the IR signal is blocked and the receiver senses that it is missing, flagging the event in an appropriate manner (figure 1)
The principle of operation is simple enough, and with most components taken off the shelf, it is easy to design the schematic. The IR element in the emitter is a simple IR LED. This behaves absolutely like any other LED, with the sole exception that it emits light in the infrared spectrum. The emitted light is thus invisible to human eye, but it is meant to excite the infrared receiving element on the other side of the barrier. One important element of this LED is the wavelength of the emitted light, of which we already know that is in the infrared spectrum.
2. Features and design
The infrared spectrum itself is pretty wide, starting at about 700nm up to 1mm. It has been subdivided by the International Commission on Illumination in three further bands:
-
- • IR-A: 700 nm–1400 nm
-
- • IR-B: 1400 nm–3000 nm
- • IR-C: 3000 nm–1 mm
A common wavelength for the LEDs on the market is around 900nm. Any major component distributor (Farnell, Digikey or even Comet – if you live in Eastern Europe) will be able to provide you with infrared LEDs, as they are very common on the market nowadays. 940nm LED is chosen, as it would best match with the sensitivity of the receiver. This IR LED behaves like any other regular LED. So you must bear in mind that the intensity of the light, even if in IR spectrum, will also be dependent on the current intensity flowing through the LED. LED is not directly driven from the pin of a microcontroller, but through a transistor capable of handling a higher current and to obtain a range of about 7-8 meters for my barrier. In the figure 2 is shown the simple schematic of the emitter. It is based around a PIC12F675, but the only reason for that is that this is what I had in the drawer. Any general purpose micro will do.
For More Details: Simple Infrared Barrier
- What is an IR barrier?
An IR barrier consists of a constant IR signal permanently going from an emitter to a receiver; when an obstacle blocks the signal, the event is flagged. - How does the IR LED behave compared to a regular LED?
The IR LED behaves exactly like any other LED, except it emits light in the infrared spectrum which is invisible to the human eye. - Why is a transistor used instead of driving the LED directly from a microcontroller pin?
A transistor handles higher current to achieve a range of about 7-8 meters. - Which specific wavelength LED was chosen for this project?
A 940nm LED was chosen because it best matches the sensitivity of the receiver. - Can any general purpose microcontroller be used for the emitter?
Yes, while the author used a PIC12F675, any general purpose micro will do. - What are the three bands of the infrared spectrum defined by the International Commission on Illumination?
The bands are IR-A (700 nm–1400 nm), IR-B (1400 nm–3000 nm), and IR-C (3000 nm–1 mm). - Where can common infrared LEDs be purchased?
They are available at major component distributors such as Farnell, Digikey, or Comet.

