Ece249project PDF

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

Digital Object Counting System

Abstract—In this project, we are making an Digital Object

Counting System. This project presents the development of an


o b j e c t counting system utilizing a n Arduino Uno
microcontroller, an LCD screen, and an infrared (IR) sensor. A. WORKING OF ARDUINO UNO
The system effectively detects objects passing through a
designated area and displays the real-time count on the LCD
Arduino UNO is a microcontroller board used to control other
screen. The IR sensor emits and receives infrared rays, enabling parts of the circuit just like the CPU of a computer. It is based on
it to detect the presence of objects. The Arduino Uno processes ATmega328P. It has a 16 MHz ceramic resonator, 6 analogue inputs,
the sensor input and increments the count accordingly. The 14 digital input/output pins, a USB port, a power jack, an ISCP
LCD screen provides a visual representation of the object header, and a reset button. Everything required to support the micro
count. controller is contained in it. Just use a USB cable, an AC to DC
adapter, or a battery to connect it to a computer to get started. Since
the ATmega328P on the Arduino board is not soldered to the board,
it is simple to replace. It also has 1 kb of EEPROM memory, which
I. INTRODUCTION is not lost when the device is turned off. Additionally, the Arduino
Digital counters are widely used in various applications, Uno has a barrel plug connector, that works greatly with a standard
including manufacturing, electronics, and retail. They 9v battery.
provide a convenient and accurate way to track the
number of items passing through a system or process.
Traditional mechanical counters rely on physical
movement to increment the count, which can be prone to
wear and tear and may not be suitable for high-speed
applications. Electronic counters, on the other hand, use
electronic components and software to increment the
count, offering greater reliability and precision.

II. MATERIALS AND METHODOLOGY


MATERIALS
USED ARE MENTIONED BELOW
SI.
NO Item Qty

1 Arduino UNO 1

Fig. 1 Basic Structure of Arduino UNO


2 Battery 1
B. Battery

3 IR Sensor 1

4 LCD Screen 1

5 Jumper Wire As
Require To power a Digital object counting project using a
d
battery, we all need to consider the power
requirements of our components and the desired
operating time. Choose a battery with sufficient
capacity (mAh) and voltage to meet these
requirements. Additionally, consider using low-power
components and sleep modes to conserve energy
when the Digital object counting is not actively
sensing or signaling. Implementing a power
Management system.
like a voltage regulator, can help optimize energy
usage. Lastly, periodically check and replace the
battery as needed for continued functionality. If you
provide more details about our project, I can offer
more specific advice.
D. LCD Screen

C. IR Sensor

The 16x2 LCD screen is used to display the current object


count. It is a simple and inexpensive LCD screen that is
gadget intended to identify the existence of precipitation commonly used in electronic projects. It has a number of
or water. These modules are frequently found in many features that make it well-suited for this project, including:
different applications, including rain-sensing windscreen
wipers in cars, autonomous irrigation systems and weather • 16x2 character display: The LCD screen can
stations. The Ir sensor operates by determining the display up to 16 characters on each of its 2 lines.
water's conductivity. This is enough to display the current object count.
The following are some essential elements and parts
that are usually present in a Ir sensor module: • Backlight: The LCD screen has a backlight that
makes it easy to read in low-light conditions.

• Ultrasonic range finding: The HC-SR04 ultrasonic sensor can


• HD44780 controller: The LCD screen uses an
detect objects up to 4 meters away. This is enough to detect HD44780 controller, which is a common type of
objects passing through the designated area. LCD controller that is easy to interface with the
Arduino Uno.
• High accuracy: The HC-SR04 ultrasonic sensor is very
accurate, with a range accuracy of ±3mm.
• Easy to use: The HC-SR04 ultrasonic sensor is easy to
interface with the Arduino Uno. It has only four pins: VCC,
GND, TRIG, and ECHO.
• Arduino Code:
E. Jumper Wire
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x37,16,2); // set the LCD address to 0x3F for a 16
chars and 2 line display
//assigning of Arduino to LCD
unsigned int count=0;// variable to count the number of visitors
int ir; // variable to store the value of the sensor
int vis; // variable that stores the number of visitors
#define irpin 7 // Arduino pin for IR sensor
#define LED 9// Arduino pin for LED
void setup()
{
Serial.begin(9600);// initializing the Serial communication
lcd.init();
lcd.clear();
lcd.backlight(); // Make sure backlight is on
// Print a message on both lines of the LCD.
Jumper wires are an indispensable component in the object lcd.setCursor(2,0); //Set cursor to character 2 on line 0
counting system project, enabling seamless connections lcd.print("DIGITAL");
lcd.setCursor(2,1); //Move cursor to character 2 on line 1
between the Arduino Uno microcontroller, IR sensor, LCD
lcd.print("COUNTER"); // initializing the dimensions of the LCD
screen, and 9V battery. They facilitate the transmission of
data and power, ensuring the system's ability to accurately
detect and count objects while displaying the real-time count pinMode(irpin, INPUT); // assigning the sensor as a input to Arduino
on the LCD screen. The flexibility and ease of use of jumper pinMode(LED, OUTPUT); // assigning the LED as output of Arduino
// displaying data on LCD
wires make them ideal for prototyping and experimentation, }
allowing for quick adjustments and modifications to the void loop(){
circuit layout. Their versatility extends to connecting various ir=digitalRead(irpin); // reading the output of the sensor
if(ir==LOW){
components on breadboards and circuit boards, making
lcd.clear(); // if the sensor detects the any reflected radiation
them a ubiquitous tool in electronics prototyping digitalWrite(LED,HIGH); // turn on the LED
vis=count++; // increment in the number of visitors
lcd.setCursor(0,0);
III. PROCEDURE lcd.print("COUNT");
lcd.setCursor(0,1); /* setting the place for the data that is to be
• Connect the IR sensor to the Arduino Uno: displayed*/
lcd.print(vis);
Connect the IR sensor VCC pin to the Arduino 5V pin. delay(1000); // displaying the number of visitors
Connect the IR sensor GND pin to the Arduino GND pin. }
Connect the IR sensor OUT pin to the Arduino D12 pin. else {
digitalWrite(LED,LOW); // otherwise keep the LED in off state
• Connect the LCD screen to the Arduino Uno: }
}
Connect the LCD screen VCC pin to the Arduino 5V pin. The Arduino Uno continuously reads the input from the IR sensor.
Connect the LCD screen GND pin to the Arduino GND pin.
Connect the LCD screen RS pin to the Arduino 12 pin.
Connect the LCD screen RW pin to the Arduino GND pin.
Connect the LCD screen E pin to the Arduino 11 pin. When an object passes through the designated area, it interrupts the IR
Connect the LCD screen DB4 pin to the Arduino 5 pin. beam, causing the IR sensor to output a LOW signal.
Connect the LCD screen DB5 pin to the Arduino 4 pin.
Connect the LCD screen DB6 pin to the Arduino 3 pin. Upon detecting the LOW signal, the Arduino Uno increments the count
Connect the LCD screen DB7 pin to the Arduino 2 pin. variable and updates the LCD screen to display the current object
count.
• Connect the 9V battery to the Arduino Uno:
The LED turns on to indicate the detection of an object.
Connect the 9V battery positive terminal to the Arduino Vin pin. The Arduino Uno waits for a delay of 1 second before checking the
Connect the 9V battery negative terminal to the Arduino GND pin. IR sensor input again.

IV. OUTPUT
The prototype object counting system was extensively tested to ensure
its accuracy and reliability. Objects of various sizes and shapes were
passed through the designated area, and the system accurately
incremented the count for each object. The system demonstrated
consistent performance under varying lighting conditions and
maintained stable operation for prolonged periods.
VI. CONCLUSION
The development of an object counting system using Arduino Uno, LCD
screen, and IR sensor has successfully demonstrated the feasibility of an
accurate and reliable object counting system. The system effectively
detects and counts objects passing through a designated area, displaying the
real-time count on the LCD screen. The IR sensor’s ability to emit and
receive infrared rays enables precise object detection, while the Arduino
Uno’s processing capabilities ensure accurate count increments. The LCD
screen provides a clear and visible representation of the object count,
allowing for real-time monitoring.

The object counting system offers several advantages over traditional


methods, including increased accuracy, real-time monitoring, and
versatility. Eliminating human error associated with manual counting, the
system provides a more reliable and consistent count. The real-time display
of the object count enables immediate monitoring of object flow,
facilitating decision-making and process optimization. Additionally, the
V. ARDUINO IDE system’s versatility allows for adaptation to various applications by
adjusting IR sensor sensitivity and count display format.

A software programme called the Arduino IDE (Integrated


Development Environment) offers a platform for creating, The object counting system finds its applications in diverse fields,
assembling, and uploading code to Arduino boards. including inventory management, production monitoring, and traffic
Professionals, students, and enthusiasts alike use the opensource control. Tracking the number of items entering or leaving a warehouse, the
Arduino electronics platform to build interactive projects. system facilitates effective inventory management. Monitoring the number
of products produced by a machine, it enhances production efficiency. In
traffic control, the system counts the number of vehicles passing through an
The Arduino IDE's salient characteristics and attributes are as intersection, aiding in traffic management and congestion reduction.
follows:

Code Editor: You can write your Arduino code in the text editor The developed object counting system using Arduino Uno, LCD screen,

that is included with the IDE. The programming languages C and and IR sensor proves to be an effective and reliable solution for a wide
C++ are supported by it. ion and the References section must not range of applications. The system’s simplicity, accuracy, real-time
monitoring capabilities, and versatility make it a valuable tool for inventory
be numbered.
management, production monitoring, and traffic control.

Sketches: In the world of Arduino, a programme is referred to as


a "sketch." A programme or piece of code created specifically for
an Arduino board is referred to as a sketch. VII. REFERENCES
Library Management: Pre-written code for a wide range of
sensors, actuators, and other components can be found in the
extensive library of Arduino. You can manage and incorporate
1) Arduino Uno https://docs.arduino.cc/hardware/uno-rev3:
these libraries into your projects with ease thanks to the IDE. https://docs.arduino.cc/hardware/uno-rev3
2) 16x2 LCD Screen with HD44780 Controller
https://www.amazon.com/16x2-lcd-display/s?k=16x2+lcd+display:
Board Manager: A range of boards featuring distinct https://www.amazon.com/16x2-lcd-display/s?k=16x2+lcd+display
microcontrollers are supported by Arduino, including the 3) HC-SR04 Ultrasonic Sensor https://www.amazon.com/ultrasonic- sensor/s?
Arduino Uno, Arduino Nano, and Arduino Mega. You can install k=ultrasonic+sensor: https://www.amazon.com/ultrasonic- sensor/s?
k=ultrasonic+sensor
the required drivers and choose the kind of Arduino board you're
using the Board Manager in the IDE.

Serial Monitor: To communicate with your Arduino board via the


serial port, the Arduino Development Environment (IDE) comes
with a tool called Serial Monitor. This helps with debugging and
keeping an eye on your program's output.

You might also like