IR-Sensors

In infrared spectrum, all the objects emits some kind of radiation which is not visible to the naked human eyes.

There are many other waves that exist in our environment but can’t be seen by human eye but they exist. Human eye can only see in a specific range known as visible range.

Project description:

Infrared sensors are electronics devices that have the capability of emitting and receiving infrared radiation. Infrared sensors can be used to detection of objects, motion sensors, detection of heat radiation.

In this project we will explore the infrared sensor module and its working.

Types of infrared sensor:

  

 

 

 

Infrared modules:

Infrared sensors are of two types:

ACTIVE

PASSIVE

Active Sensors:

Active IR sensors are source dependent sensors which implies that active sensors consist of two elements.

  • Infrared source
  • Infrared detector

These are used in remotes in TV, Speakers etc.

Active sensor have led to send data on one, and an IR receiver on the other end to which receive data and generate codes accordingly to generate a unique vale with reference to every key press.

Passive IR Sensor:

Passive IR sensors are source independent sensors.

Passive sensors are not dependent on any particular source instead of using a source it receives energy emitted by objects (obstacles). 

Two types of passive sensors:

  • Thermal

Thermal IR sensors are independent wavelength sensor.

Thermal infrared sensors are used to deduct heat in the real world with the help of infrared energy.

Examples: Thermocouple, Pyro-electric, Bolometers   

  • Quantum

Quantum infrared sensor is wavelength dependent sensors.

Quantum IR sensors are faster and better than thermal IR sensors in case of object detection.

Used in object detection and motion sensing.

     

Two types of quantum sensors:

  • Extrinsic
  • Intrinsic

 

Reading IR values using an IR-Enabled remote by receiving input via IR-Remote and processing the input using Arduino UNO:

This tutorial is divided into three parts for better understanding:

  1. Connecting IR-Sensor to Arduino.
  2. Reading value of available remote.
  3. Using that particular value for switch function.

Let's start, we will need:

  • An Arduino, we will be using Arduino Uno.
  • IR-Receiver
  • IR-Remote
  • Jumper wires
  • Obstacle Avoidance sensor

 

Recording IR-Values of Remote using serial monitor:

Step 1:

Connecting IR-receiver to Arduino

Connection:

  • Connect GND pin of IR-receiver to GND pin of Arduino UNO
  • Connect VCC pin of IR-receiver to 5v pin of Arduino UNO
  • Connect SIG pin of IR-receiver to pin 11 of Arduino UNO

 

 

Step 2:

Reading value of available remote

  • Upload the sketch provided below
#include <IRremote.h>
int RECV_PIN = 11;
IRrecv irrecv(RECV_PIN);
decode_results results;

void setup()
{
  Serial.begin(9600);
  irrecv.enableIRIn(); // Start the receiver
}

void loop()
{
  if (irrecv.decode(&results))
    {
     Serial.println(results.value, HEX);
     irrecv.resume(); // Receive the next value
    }
}
  • Open Serial Monitor in Arduino IDE under TOOL
  • Press button of IR-Remote

NOTE-This key is the digital value of IR-Remote buttons. Every button has its own unique value.

 Recording IR-value of obstacle avoidance sensor using serial monitor

Step 1:

Connecting obstacle avoidance sensor to Arduino

Connection:

  • Connect GND pin of obstacle avoidance sensor to GND pin of Arduino UNO
  • Connect VCC pin of obstacle avoidance sensor to 5v pin of Arduino UNO
  • Connect SIG pin of obstacle avoidance sensor to pin 11 of Arduino UNO

 

 

Step 4:

Reading value of available obstacle avoidance

  • Upload the sketch provided below
int sensorPin = A0; // select the input pin for IR

int sensorValue ; // variable to store the value coming from the sensor
void setup() {
Serial.begin(9600); //sets serial port for communication
}
void loop() {
sensorValue = digitalRead(sensorPin); // read the value from the sensor
Serial.println(sensorValue); //prints the values coming from the sensor on the screen

delay(100);

}
  • Open Serial Monitor in Arduino IDE under TOOL