How to Build an Infrared Proximity Switch Circuit Using an Arduino

In this project, we will build an infrared proximity switch circuit using an arduino.
This is a circuit in which a switch activates when the infrared sensor detects an object in its proximity.
How to Build an Infrared Proximity Switch Circuit Using an Arduino
The infrared proximity switch sensor is a reflection-type photoelectric snesor which sends and receives infrared beams. Infrared proximity switches work by sending out beams of invisible infrared light. A photodetector on the proximity switch detects any reflections of this light. These reflections allow infrared proximity switches to determine whether there is an object nearby. When the infrared is able to read back the infrared beams that it sends out, then this means the path is of infrared is unimpeded, which means there is no object nearby. When the infrared sensor cannot read back the infrared beams it sends out, this means that the path is impeded and an object is nearby the sensor.

When an object blocks the sensor so that the sensor cannot read back the infrared beams, then the sensor will output a LOW signal on its signal line. The sensor’s signal will normally be held HIGH when there is no object blocking its path. However, when an object blocks its path so that it cannot no longer read the infrared beams that it sends out, it outputs a LOW signal. A microcontroller board such as an arduino can easily detect and read this signal to determine if the sensor has sent a LOW signal, signaling it has detected an object.

This infrared sensor can tell us if an object is in the proximity of the sensor but cannot quantify how close or far the object is from the sensor. It simply functions to tell us if any object has been detected.

To test this circuit once it is built and with the program in place, all you have to do is place your hand or any object in front of the sensor.

In this circuit we are going to build, when the sensor is triggered, it will be made so that an LED turns on while an object is blocking and then shuts off when the object is removed.

An infrared proximity switch such as the one we are using in this circuit has great application for real life. The sensor can function to detect human beings. Being that the only moving objects in a building are humans, for the most part, the sensor circuit can be used to detect human intruders for a given area. And then once the sensor detects a person, the circuit can be made to do anything such as sound an alarm, flash sirens, have a buzzer alarm go off, have a camera begin recording, etc.

The sensor can also be made to pick up anything else that moves such as animals or any moving objects that may come into its path. So the application in real life circuits is immense from this simple infrared proximity switch.

Components Needed

  • Infrared Proximity Sensor Switch
  • Arduino Board
  • LED

The infrared proximity sensor switch can be obtained from ebay for about $5 normally.

It operates on 5V of power.

Being that an arduino has a 5V terminal, it is perfect for powering this sensor.

The distance the sensor can detect an object is between 3cm-80cm, and this distance is adjustable, so that if you want the sensor to only be triggered when within 10cm of the sensor, you can do so.

The infrared sensor is a 3-terminal device.

There is a red, green, and yellow wire.

The red wire is the +5V line. It connects to the 5V terminal of the arduino.

The green wire is the GND line. It connects to the GND terminal of the arduino.

The yellow wire is the signal line. It connects to a digital pin on the arduino to be read. Being that it only outputs 2 values, LOW or HIGH, it is a digital input. The arduino will either read it as LOW or HIGH. KNow that the signal on this sensor is active low. When the sensor does not detect any object, it outputs a HIGH signal. When it detects an object, it outputs a LOW signal (0v)

 Infrared Proximity Switch Sensor Circuit
The schematic diagram of the infrared proximity switch circuit with an arduino is shown below.
How to Build an Infrared Proximity Switch Circuit Using an Arduino schemetic

About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:
LinkedinTwitter

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top