About This Project

In this tutorial, we will learn how to make a counter robot and how it works.

Project Info

  • Programming Platform: Arduino IDE
  • Difficulty: Estimated
  • Estimated Time: 2 Hrs
  • Category: Arduino, Robotics

Introduction

Counter robot as the name hints is a robot that does the counting. Which counting one may argue. Well for example, when placed on the door of a room/hall/auditorium, this robot calculates the number of persons who crossed the door (entered or left).  Here, the IR sensor plays a vital role. We will be using two IR sensors for this project.

What is IR Sensor?

IR sensor or infrared sensor is an electronic component that is used to detect specific characteristics like motion, heat, etc. in its surrounding by emitting/detecting IR radiations. This sensor is used to measure the heat of the target and its motion. An IR sensor comprises of two parts viz. the emitter and the receiver and this is jointly called an optocoupler or a photo-coupler. Did you know that IR sensors use three basic Physics laws like Planck’s Radiation, Stephan Boltzmann & Wein’s Displacement! IR sensor is one of the major components used in in the making of counter robot

Components Required

IMAGE COMPONENT QUANTITY

ir-sensor

IR Sensor

2

jumper-wire

Jumper Wires

As Per Required

battery

Battery

4

arduino

Arduino

1

ini Piezo Buzzer

1

Building Guide

Step 1: Assembly

  • Take all the required components and make the connection by following the instructions given below.

counter-robot

Connections:

  • Connect the VCC pins of both the IR Sensors to the 5v and 3v pins of the Arduino respectively. Now, connect the GND(ground) pins of both the Sensors to the GND pin of Arduino.
  • Thereafter. connect the OUT pins of both the sensors to the Arduino digital pins 2 and 3 respectively. Connect any terminal of the Buzzer to the digital pin-11 and another terminal to the GND (ground) pin of the Arduino for the output.

connect-ir-sensor-to-arduino

Step 2: When all the necessary connections are done, go to the Arduino IDE software for programming.

PROGRAM CODE:

counter-robot-programming-code

counter-robot-programming-code-3

Step 3: Upload the program on the Arduino Board.

Step 4: Perform the test by crossing an object in front of both the IR Sensors. If the Buzzer Sound beeps, the counter bot setup is done fine and is ready to use.

Note: To know the number of crossing counts, open the Serial Monitor and perform the test. Now, you can see the number of count(s) per crossing.

The following code will help you to make the Arduino Based Counter Robot:

Code

DESCRIPTION

DOWNLOAD CODE

Arduino Based Counter Robot Code


Download Code

With this, we come to an end of this project. Did you like the project? Do share your views with us by leaving the comments below.