Implementation-of-Arduino-based-Counter
Implementation-of-Arduino-based-Counter
used is CASIA pedestrian counting dataset and trained using calibrate the distance range at which the object should be
SVM classifier. The system requires real time monitoring of detected.
the pedestrians via camera modules which are very expensive.
Kartik Madhira and Aditya Shukla [5] have proposed a
method that uses image processing techniques to count human
specific areas such as ATMs, retail shops, malls etc. “The
people counter solution was made using computer vision
library OpenCV for Python computer language”. The method
achieved around 80-93% accuracy. The cameras were
positioned in many angles to test the accuracy of the method.
The system requires real time monitoring of the persons via
camera modules which are very expensive.
Shubham Mathur and others [6] have come up with a Fig. 1 Infrared Sensor
method that uses image processing with sensor feedback for
counting people entering or leaving a lab. Histogram of The sensor consists of three pins namely vcc, ground and vin.
oriented gradients (HOG) technique was used for this method. The vcc pin is connected to a 5 volts DC supply to power up
The images are captured using Raspberry Pi fitted with a the sensor. The ground pin is connected to ground. The vin pin
RaspiCam. A pair of PIR sensors is installed to instruct the is connected to one of the digital input/output (I/O) pins of
system to capture the images. The data can be sent via arduino. Once powered up, the sensor transmits IR light.
Bluetooth to local servers for security purposes. An efficiency Whenever there is an obstacle in front of the sensor, the light
of 83% is achieved using this method. The equipment used in will get reflected which is detected by the IR receiver.
this system is very expensive. The sensors add extra cost to B. Piezoelectric sensor:
the system apart from camera module and Raspberry Pi. The piezoelectric sensor has the ability to convert mechanical
Another method proposed by Dr.P.Satyanarayana and stress to electrical energy (AC output). The principle involved
others [7] involves the use of OPEN CV3 using python 3.5.2. is piezoelectric effect. It is a reversible effect means if electric
“The implementation goes on like the process of background energy is provided, mechanical stress is induced. Common
subtraction on the incoming frames followed by the blob materials used in piezoelectric sensors are quartz, Rochelle
analysis using which the person can be detected and by using salt. Synthetic materials including zinc oxide and gallium
virtual lines, the count of the people entering and leaving a arsenide are also used.
particular area can be evaluated”. The system requires real The sensor has two terminals namely positive and negative.
time monitoring of the persons via camera modules which are The positive terminal is connected to one of the analog pins of
very expensive. arduino and the negative terminal is connected to ground. By
David Beymer [8] proposed a method that involves 3D pressing the sensor, the mechanical energy produced is
stereo vision. “The stereo system performs real-time 3D converted to electrical energy.
reconstruction by employing table lookup to map from image
coordinates and disparities to 3D. Based on the 3D
coordinates, the scene is (1) segmented by filtering out pixels
outside the volume of interest, and (2) reprojected to a top-
down, orthographic view. Finally, people are detected and
tracked in the orthographc reprojection using a Gaussian
mixture model and Kalman filtering”. The system requires
real time monitoring of the persons via camera modules which
are very expensive.
III. CONSTRUCTION
A. Infrared sensor:
An infrared (IR) sensor emits and detects infrared radiation. It
is used to detect obstacles. An IR sensor consists of IR
transmitter, receiver, operational amplifier (Opamp), variable
resistor and an light emitting diode (LED) in brief. IR Fig. 2 Piezoelectric Sensor
transmitter is an IR LED which emits light in the range of C. Arduino UNO
infrared frequency. IR light is invisible to us because the Arduino is an open-source microcontroller board based on
wavelength of IR radiation (700 nm – 1mm) is much higher ATmega328p microcontroller [11]. It is one of the popular
than visible light. IR light have emitting angle of development boards used for experimental purposes and it
approximately 20-60 degrees with a range of approximately serves as an intermediate to Internet of Things (IoT) [12]. The
few centimeters to several feet. board consists of other components such as serial
The photodiode receiver acts as the IR receiver which detects communication, crystal oscillator, voltage regulator etc. It
the reflected IR light. Photodiode is an LED with black color consists of 2 KB of RAM, 1 KB of ROM, flash memory of 32
coated on its outer side. The Opamp is used as a voltage KB and can be easily programmed with the open-source
comparator in the IR sensor. The variable resistor is used to software Arduino IDE.
It also includes 14 digital I/O pins for both reading and writing whenever a person passes through the mat it records the signal
data, and 6 analog pins for reading input: and the value is high for a certain period of time. The person
GND (3 pins): Abbreviation for ‘Ground’. The board consists then passes by the IR sensor which detects the entry. The
of 3 pins and is used as the negative terminal of any sensor or algorithm is designed in such a way that if both piezoelectric
circuit connected to the Arduino. and the entry IR sensor are high at the same time, it detects the
5V & 3.3V: These pins supply 5volts and 3.3 volts of power person and the count is increased by one.
to the circuit respectively. Most sensors are designed to be
compatible with these 2 voltages.
Power: All Arduino boards require a power source to run on.
There are two ways to power the board. The first is by using a
USB cable connected to a computer. Alternatively, the board
can be powered by connecting it directly to a wall power
supply using the barrel jack given. But the voltage of the
power source should be in the range of 6-12V.
Analog: Analog pins are designated under ‘Analog In’ label
and consist of pins A0 to A5. These pins can read signals from
analog devices such as piezoelectric sensors and convert it to
binary data for the processor to read.
PERSON PERSON
ENTERS EXITS
PIEZOELECT PIEZOELECT
-RIC -RIC
SENSORS SENSORS Fig. 6 Scenario 1 – One person entering the room
ACTIVATED ACTIVATED
ARDUINO ARDUINO
MICROCONT MICROCONT
-ROLLER -ROLLER
\ ENTRY IR EXIT IR
SENSOR SENSOR
ACTIVATED ACTIVATED
Fig. 7 Scenario 2 – One person leaving the room
ARDUINO ARDUINO
MICROCONT MICROCONT
-ROLLER -ROLLER
COUNT COUNT
INCREASED DECREASED
IF BOTH IF BOTH
SENSORS SENSORS Fig. 8 Scenario 3 – Two persons entering the room at the same
ARE HIGH ARE HIGH
REFERENCES
[1] Carvalho, Bruno & Silva, Caio & Silva, Alessandra & Buiati,
Fábio & de Sousa Junior, Rafael. (2016). Evaluation of an
Arduino-based IoT Person Counter. 129-136.
10.5220/0005954601290136.
[2] J. W. Choi, X. Quan and S. H. Cho, "Bi-Directional Passing
People Counting System Based on IR-UWB Radar Sensors,"
in IEEE Internet of Things Journal, vol. 5, no. 2, pp. 512-522,
April 2018, doi: 10.1109/JIOT.2017.2714181.
[3] Jothibasu M, Aakash B, Shanju Ebanesh K, Gokul Vinayak L,
Fig. 9 Scenario 4 – Two persons leaving the room at the same time “Automatic Room Monitoring with Visitor Counter (ARM –
VC)”, IJITEE, Volume-8 Issue-7, May, 2019
[4] Jingwen Li, Lei Huang and Changping Liu, "An efficient self-
learning people counting system," The First Asian Conference on
Pattern Recognition, Beijing, 2011, pp. 125-129, doi:
10.1109/ACPR.2011.6166686.
[5] K. Madhira and A. Shukla, "Pedestrian flow counter using image
processing," 2017 International Conference on Energy,
Communication, Data Analytics and Soft Computing (ICECDS),
Chennai, 2017, pp. 1911-1915, doi:
10.1109/ICECDS.2017.8389782.
[6] S. Mathur, B. Subramanian, S. Jain, K. Choudhary and D. R.
Prabha, "Human detector and counter using raspberry Pi
microcontroller," 2017 Innovations in Power and Advanced
Computing Technologies (i-PACT), Vellore, 2017, pp. 1-7, doi:
10.1109/IPACT.2017.8244984.
[7] Dr.P.Satyanarayana , P.Gopikrishna , K.Soukhya , M.Satvik ,
Y.CharanKumar, “A Robust Bi-Directional Algorithm For People
Count In Crowded Areas, IJPAM, Volume 116 No. 6 2017, 73-78
[8] K Mohana Prasad et al 2019 IOP Conf. Ser.: Mater. Sci. Eng. 590
Fig. 10 One person entering and other person leaving the room at the same 012012.
time [9] Beymer, David. (2000). Person counting using stereo. 127-133.
10.1109/HUMO.2000.897382.
[10] Wikipedia contributors. "Piezoelectric sensor." Wikipedia, The
Free Encyclopedia. Wikipedia, the Free Encyclopedia, 28 Jun.
2020. Web. 18 Aug. 2020.
[11] Arjun Varma, Ashwath A, Ayush Verma, A. Bagubali, Kishore V
Krishnan, “Implementation of Obstruction Avoiding Robot using
Ultrasonic Sensor and Arduino UNO”, IJRTE, Volume-8 Issue-4,
November 2019.
[12] Wikipedia contributors. "Arduino." Wikipedia, The Free
Encyclopedia. Wikipedia, the Free Encyclopedia, 18 Aug. 2020.
Web. 18 Aug. 2020.
[13] Dhaief, Zahraa. (2016). People Counting Technology.
Fig. 11 Results of the experiment 10.21884/IJMTER.2016.3142.ABPRK.
[14] S. Saxena and D. Songara, "Design of people counting system
using MATLAB," 2017 Tenth International Conference on
VII. CONCLUSION AND FUTURE SCOPE Contemporary Computing (IC3), Noida, 2017, pp. 1-3, doi:
The counter system has the ability to detect two simultaneous 10.1109/IC3.2017.8284344.
visitors, entering or leaving at the same time. The system is [15] S. Saxena and D. Songara, "Design of people counting system
developed using Arduino UNO development board and it’s using MATLAB," 2017 Tenth International Conference on
Contemporary Computing (IC3), Noida, 2017, pp. 1-3, doi:
IDE. The project uses two IR sensors and several piezoelectric 10.1109/IC3.2017.8284344.
sensors for more accuracy and precision. Arduino helps
achieve the coordination among the sensors.
The system is designed to use at places like laboratories or
classrooms where the intensity of crowd is intermediate. The
system can be enhanced by installing industrial IR sensors
which have better sensitivity at detecting persons at sufficient