DEVELOPMENT OF ARDUINO-BASED COUNTER SYSTEM

0
1078

ABSTRACT

Arduino.cc created the Arduino Nano, an 8-bit open-source microcontroller board. The board has a number of digital and analog input/output pins that can be used to connect to other circuits. A visitor counter is a device that measures visitor traffic entering and exiting institutions, recreational centers, malls, etc with the incorporation of an energy-saving lighting system in a bid to maximize energy consumption whilst providing crowd control and crowd traffic information. This thesis is based on the design of an Arduino Nano bi-directional visitor counter using Baze University as a case study. With the emergence of the Covid-19 pandemic and the need to enforce social distancing guild lines the importance of the digital counter increases daily. The primary idea behind this project is to calculate and show the number of people entering any environment, such as a lecture hall, a conference room. The LCD monitor located outside the room shows the number of individuals in the room. This counter is said to be bi-directional since if a person enters the room, the counter will be increased and decreased if a person exits the room. The counter is fitted with two ultrasonic sensors each at the exit and entrance of the enclosed room that generates a 40 kHz sound wave which when obstructed reads as an individual entering or leaving the environment. In various enclosed settings, such as seminar halls, where space capacity is limited and should not be exceeded, implementations of these systems are important. The device will show the exact number of people inside the room and potential system upgrades include adding a voice warning system to signify when the room limit is exceeded and people can no longer enter inside compared to the buzzer already included. The counter is fitted with a relay system which powers the lighting system. The counters system project achieved crowd control to enable social distancing whilst implementing small-scale energy conservation.

Table of Contents

DECLARATION……………………………………………………………………………………………………… iii

CERTIFICATION……………………………………………………………………………………………………. iv

DEDICATION………………………………………………………………………………………………………….. v

ACKNOWLEDGMENT…………………………………………………………………………………………… vi

ABSTRACT……………………………………………………………………………………………………………. vii

LIST OF FIGURES………………………………………………………………………………………………….. xi

LIST OF TABLES…………………………………………………………………………………………………… xii

LIST OF ABBREVIATIONS………………………………………………………………………………….. xiii

CHAPTER ONE……………………………………………………………………………………………………….. 1

    1. Importance of Crowd Counters………………………………………………………………………………………………………… 3

CHAPTER TWO: LITERATURE REVIEW………………………………………………………………… 6

CHAPTER THREE: MATERIALS & METHODOLOGY…………………………………………… 12

      1. LCD Design…………………………………………………………………………………………………………………………………….. 14
      2. Buzzer15
      3. Diode16
      4. Capacitor16
      5. Transistor17
      6. Relay18
      7. UltrasonicSensor…………………………………………………………………………………………………… 19
        1. Distance Measurement for Ultrasonic Sensor……………………………………………………………………………… 20
        2. Measurement Scenarios………………………………………………………………………………………………………………. 21
    1. CircuitDiagram…………………………………………………………………………………………………….. 22
    2. Writing theControl Program……………………………………………………………………………………. 24
      1. Program Development…………………………………………………………………………………………………………………………………. 24
      2. Arduino IDE…………………………………………………………………………………………………………………………………………………. 24
      3. Program Flowchart……………………………………………………………………………………………………………………………………….. 25

CHAPTER FOUR……………………………………………………………………………………………………. 26

RESULTS AND DISCUSSION……………………………………………………………………………….. 26

    1. System Overall Test………………………………………………………………………………………………………………………… 26

The overall systems test was conducted with the aid of the Arduino serial monitor……………………………….. 26

CHAPTER FIVE…………………………………………………………………………………………………….. 32

CONCLUSION, RECOMMENDATIONS & FUTURE CHALLENGES…………………….. 32

REFERENCES……………………………………………………………………………………………………….. 34

APPENDIX A-CODES……………………………………………………………………………………………. 37

LIST OF FIGURES

Figure 2. 1 Arduino Uno…………………………………………………………………………………………….. 7

Figure 2. 2 Raspberry Pi 3 Model B+……………………………………………………………………………. 8

Figure 3. 1: System Block Diagram    12

Figure 3. 2 : Arduino board……………………………………………………………………………………….. 13

Figure 3. 3 : An LCD Display Device…………………………………………………………………………. 13

Figure 3. 4 : Display Unit………………………………………………………………………………………….. 14

Figure 3. 5: Lithium Ion battery…………………………………………………………………………………. 14

Figure 3. 6 : Diode……………………………………………………………………………………………………. 16

Figure 3. 7 : Capacitor………………………………………………………………………………………………. 16

Figure 3. 8 : Transistor………………………………………………………………………………………………. 17

Figure 3. 9: Relay……………………………………………………………………………………………………… 18

Figure 3. 10 : Omron Relay……………………………………………………………………………………….. 18

Figure 3. 11: Ultrasonic sensor…………………………………………………………………………………… 19

Figure 3. 12 : HC-SR04 Timing Diagram…………………………………………………………………….. 19

Figure 3. 13 : Principles of Measuring Distance……………………………………………………………. 20

Figure 3.14 : Typical Ultrasonic Measurement Scenarios……………………………………………….. 21

Figure 3. 15 : System Circuit Diagram………………………………………………………………………… 22

Figure 3. 16 : System Flow Chart……………………………………………………………………………….. 25

Figure 4. 1 : System on Bread-Board 27

Figure 4. 2 : System ON Test…………………………………………………………………………………….. 28

LIST OF TABLES

Table 2. 1: Summary of literature of Arduino-Based Counter System………………………………. 9

Table 3. 1: Battery Specification………………………………………………………………………………… 15

Table 4. 1 :Power Supply Unit Result…………………………………………………………………………. 29

LIST OF ABBREVIATIONS

Vcc- Collector Supply Voltage Vss- Voltage Source Supply LFP- Lithium Ferro Phosphate

LIFEPO- Lithium Iron Phosphate PWM – Pulse Width Modulation LCD- Liquid Crystal Display GPIO – General Input/output

ICSP- In Circuit Serial Programming USB- Universal Serial Bus

DC- Direct Current

IDE- Integrated Development Environment

CHAPTER ONE

 Introduction

The world is fast becoming a digital hub as manual and time-consuming tasks are readily being digitalized. Looking back in the 90s, individuals made use of crude meanings to count visitors by manually counting them or they used a manual tally counter. But with continual developments and rising needs and challenges such as the covid-19 pandemic which required social distancing and crowd control, load control for buildings, room temperature control, sense trespassers, and several others. The demand for electronic devices that can control crowds and room facilities has risen to the point where they could be used in a variety of real-time applications such as hotels and living rooms. As a result, an automated counter system has emerged as a cost-effective way to count the number of people entering or exiting a room. It uses simple sensors such as IR sensors or ultrasonic sensors to intelligently find and count the number of people and is coded using an Arduino development board.

The Ultrasonic Sensors will detect people entering the room through the door, and the signal will be sent to the Arduino Nano for processing and regulating the count in the room, as well as specifically monitoring the lighting system in the room. [1]. It also provides crowd monitoring information and accuracy. The Ultrasonic Sensors will detect people entering the room through the door, and the signal will be sent to the Arduino Nano for processing and regulating the count in the room, as well as specifically monitoring the lighting system in the room.

 Background of Study

Measurement, counting to be exact plays an important role in nature and human existence. It is a broad discipline in both engineering and science encompassing the areas of detection, acquisition, control, and analysis of different data. Measurement provides means of describing natural, human, and artificial activities in quantitative terms. It comprises the precise and accurate measurement and recording of physical and non-physical parameters that play a vital role in every branch of scientific research and industrial processes.

Recent advancement in science and technology, has led to the development of several sophisticated and high precision measurement and counting devices. Among the devices developed, are those for counting the number of people present in a particular place (up/down counters). These devices are essential because of the role it plays virtually in all aspects of life [2] .Visitor counting is simply a measurement of the number of visitors entering and exiting conference rooms, malls, sports venues, etc. With the rise in the standard of living, there is a growing sense of urgency to create circuits that will make life easier.

An ancient memory aid system used to record and register numbers, amounts, or even texts, was a tally (or tally stick). Pliny the Elder makes historical reference to the best wood to be used for tallies, and Marco Polo discusses the use of tallying in China. Tallies have been used to the point of being reliable for various purposes, such as messaging and scheduling, and particularly in person counting, financial and legal transactions. The mechanical tally counter was the replacement for the tally stick, it’s a mechanism used in counting anything incrementally. Counting people, animals, or objects that are quickly entering and leaving a location is one of the most common uses for tally counters [2] .

In the last two decades visit estimations and counting were done using; trial logs, examination of footprints, various permits and best estimates made by staffs working in institutions [3].

As time went on, an electronic counting counter with an LCD screen to display the count and a push-button to advance the count was added. In the mid-1990s, some still had a button to reduce the count in case of a miscalculations. Different types of people counters have now been introduced as a result of technological advancements to automatically count the number of people entering and leaving a building at a specific time. Laser beams, thermal imaging, video cameras, and infrared sensors are just a few of them. All of these sensors serve as visitor detectors in their own right.