Contents

Interfacing 4 Channel Infrared Tracking Sensor Module with Arduino

4 Channel Infrared Module Features

This module has 4 IR transmitter and receiver pairs that can be used to detect black and white color as well as obstacles. Each channel has digital voltage output. You can adjust the sensor’s sensitivity using the on board potentiometers.

Pinout

You can see pinout of IR module in the image below.

Required Materials

Hardware Components

Arduino UNO R3 × 1
4 Channel IR Obstacle Avoidance Proximity Module × 1
Male to Male jumper wire × 1
Male to Female jumper wire × 1

Software Apps

Arduino IDE

Interfacing with Arduino

Step 1: Circuit

The following circuit shows how you should connect Arduino to IR  module. Connect wires accordingly.

Step 2: Code

Upload the following code to your Arduino.

    /*
  /*
  IR Sensors
  modified on 03 Oct 2020
  by Mohammad Reza Akbari @ Electropeak
  
Home
*/ // constants won't change. They're used here to set pin numbers: const int sensor1 = 2; int val = 0; void setup() { Serial.begin(9600); pinMode(sensor1, INPUT); } void loop() { val = digitalRead(sensor1); Serial.println(val); delay(20); }

The code output is as follows. When sensor detects an obstacle or a white object, the output is LOW.

Liked What You See?​
Get Updates And Learn From The Best​

Leave a Reply

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