Project Report On Bidirectional Visitor Counter With Automatic Light Control Project
Project Report On Bidirectional Visitor Counter With Automatic Light Control Project
1. INTRODUCTION
1.1 Introduction
The objective of this project is to make a controller based model to count number of
student present particular room and accordingly light up the classroom. Here we can use
sensor and can know present number of student. This project aims to create a system that
combines a student attendance monitoring system with automatic light control. The purpose
is to efficiently manage lighting in spaces based on occupancy, promoting energy
conservation while providing accurate student counting functionality. In today’s world, there
is a continuous need for automatic appliances with the increase in standard of living, there is
a sense of urgency for developing circuits that would ease the complexity of life. Also if at all
one wants to know the number of people/student present in classroom/room so this circuit
proves to be helpful. , enhancing convenience and efficiency in various tasks. One such
application is the development of a bidirectional people counter with automatic light control
using arduino Uno R3 and an ultrasonic sensor. This project combines the functionalities of
counting peoples entering and exiting a space while dynamically controlling the lighting
system based on occupancy. This Project “Student Attendance Monitoring System with
automatic light control using Microcontroller is a reliable circuit that takes over the task of
controlling the classroom lights as well us counting number of persons/student in the
classroom very accurately. When somebody enters into the classroom then the counter is
incremented by one and the light in the classroom will be switched ON and when any one
leaves the classroom then the counter is decremented by one. The light will be only switched
OFF until all the student in the room go out. The total number of student inside the classroom
is also displayed on the 128x64 L.C.D. displays. The microcontroller does the above job. It
receives the signals from the sensors, and this signal is operated under the control of software
which is stored in ROM. Microcontroller AT89S52 continuously monitor the ultrasonic
Receivers, When any object pass through the ultrasonic Receiver's then the ultrasonic Rays
falling on the receiver are obstructed , this obstruction is sensed by the Microcontroller. The
primary objective of this project is to design a system that accurately counts the number of
student entering and exiting a classroom or premises. Additionally, the system automatically
ON/OFF the lighting conditions based on the presence or absence of individuals. This not
only offers convenience but also promotes energy efficiency by ensuring that lights are only
illuminated when necessary.
2
Key Components of this project is Arduino Uno R3: The central microcontroller that
processes data and controls the system's operations, Ultrasonic Sensor: Ultrasonic sensors are
used to detect the presence of student/person entering or exiting the space. These sensors are
strategically placed at entry and exit points, Resistors, Breadboard, and Connecting Wires:
Essential components for circuit connections and voltage regulation, Power Supply: Provides
the necessary stable power supply is essential to ensure continuous operation of the system.
This can be achieved using batteries or a DC power adapter, LCD Display: An LCD display
is incorporated to provide real-time feedback on the student count. It shows the current count
(in or out). Functionality of this project is 1. People counting: the ultrasonic sensor detects
individuals passing through its range and triggers the Arduino to increment or decrement the
people count accordingly. By tracking both entries and exits, the system maintains an
accurate tally of the number of student present in the (classroom) monitored area, 2.
Automatic Light Control: based on the student count data, the Arduino dynamically the ON
or OFF the LED lights. When the student count is non-zero, indicating occupancy, the lights
remain illuminated. Conversely, when the student count reaches zero, signaling an empty
space, the lights are turned off to conserve energy, 3. Real-time Display: The LCD display
provides real-time feedback on the student count, enabling users to monitor the system's
operation. Benefits of this project (student attendance monitoring system) is 1. Energy
Efficiency: By automatically controlling lighting based on occupancy, the system reduces
energy consumption and lowers electricity costs, 2. Accurate People Tracking: The
bidirectional counting ensures precise tracking of people movements, providing valuable data
for space management and security purposes, 3. Convenience: The automated operation
eliminates the need for manual control of lights, enhancing convenience for users and
occupants of the space.
1.2 Overview
In this project, student attendance monitoring system with an Automatic Light Control
System using Arduino. This project is based on a pair of ultrasonic Sensor that detects
interrupt when it detects an obstacle. The pair of ultrasonic sensors can detect the people from
both directions, i.e. the number of entering peoples and the number of exiting peoples.
This Arduino Based student attendance monitoring system Project can be used to
count the number of persons entering a hall, Shopping mall, office, functions in the entrance
gate. It can also be used at gates of parking areas and other public places. The device counts
3
the total number of people entering through the gate and also the total number of people
leaving through the same gate. And finally, it counts the total number of people currently
present inside the room. When no people are inside the room, i.e. the total number of people
is zero then the room light is turned off. When even a single person is found inside the room,
the light turns on. The light control system is automatic based on the student/people’
presence.
We can make the entire project using a single Arduino Uno Board. We can use a
128×64 LCD Display to show the number of student/people. The. A 5V Single channel relay
gets activated when a person is detected inside a room. The light turns ON automatically
which is connected to the Relay. The main element of this project is the ultrasonic Sensor
which works as a Human Detector. Whenever the ultrasonic sensor detects an interrupt it
counts the person and adds it to the previous value.
1.3 Objective
The primary objective of the student attendance monitoring system with automatic
light control project is to design, develop, and implement an intelligent system that enhances
security, convenience, and energy efficiency in various environments such as offices, retail
stores, school, college and public facilities. Specifically, the project aims to achieve the
following objectives
4
2. Automatic Light Control: a system for automatically ON/OFF the illumination within the
monitored space based on the detected occupancy. The system should be able to control the
lighting intensity to optimize energy usage while ensuring adequate illumination for
occupants.
3. Bidirectional Capability: Ensure that the student/people counting system can accurately
differentiate between entries and exits, enabling bidirectional counting to provide more
comprehensive insights into people traffic patterns and occupancy trends.
6. Energy Efficiency: Design the automatic light control system to prioritize energy
efficiency by dynamically ON/OFF lighting system based on occupancy. This will help
reduce energy consumption and operating costs while minimizing environmental impact.
7. Reliability and Robustness: Ensure the reliability and robustness of the system through
rigorous testing and validation procedures. This includes testing the system under various
environmental conditions and scenarios to identify and address potential issues or limitations.
8. Scalability and Flexibility: Design the system to be scalable and adaptable to different
environments and applications. This may involve modular design principles and flexible
configuration options to accommodate varying space sizes and requirements.
solution for managing lighting and monitoring people traffic in various environments,
including offices, retail stores, and public buildings.
In recent years, there has been a growing emphasis on reducing energy consumption
and promoting sustainability. Buildings, both residential and commercial, are significant
contributors to energy usage. Lighting, in particular, accounts for a substantial portion of
energy consumption in buildings, especially in public spaces such as offices, malls, airports,
and educational institutions. Finding ways to optimize lighting usage without compromising
safety or comfort has become imperative in the pursuit of energy efficiency.
The concept of a student attendance monitoring system with automatic light control
capitalizes on these trends by integrating sensors and smart control mechanisms to optimize
lighting based on occupancy levels. Traditional occupancy sensors often lack precision and
can lead to inefficient lighting practices, such as lights staying on when spaces are
unoccupied or turning off prematurely while still in use. By employing bidirectional counting
mechanisms, which can track both entries and exits, and coupling them with automatic light
control, this system aims to provide a more accurate and responsive solution to managing
lighting in public spaces.
Moreover, beyond just energy savings, such a system offers additional benefits such
as improved security through better monitoring of space utilization, enhanced user experience
6
by ensuring adequate lighting levels, and valuable insights into visitor traffic patterns for
space planning and optimization.
2. LITERATURE SURVEY
2. Smart Lighting Control System with People Counter Using Raspberry Pi by S. Jadhav et
al. (2018): The paper discusses a smart lighting control system that incorporates a
bidirectional people counter using Raspberry Pi. The system integrates infrared sensors for
counting peoples and automatically adjusts the lighting intensity based on occupancy.
3. Real-Time People Counting System for Smart Lighting Control in Indoor Environment by
K. Zhang et al. (2019): This paper proposes a real-time people counting system for smart
lighting control. It utilizes depth sensors and image processing techniques to accurately count
peoples in indoor environments. The system dynamically adjusts lighting levels to optimize
energy usage.
4. Design and Implementation of a Bidirectional People Counter System for Smart Buildings
by H. S. Kim et al. (2020): The paper presents a bidirectional people counter system designed
for smart buildings. It employs ultrasonic sensors for accurate people counting and integrates
with a lighting control system to regulate illumination based on occupancy patterns.
5. A Survey on People Counting and Occupancy Detection Methods for Smart Lighting
Systems by A. Ran et al. (2021): This survey paper provides an overview of various methods
and technologies for people counting and occupancy detection in smart lighting systems. It
covers infrared sensors, camera-based approaches, and other emerging techniques, offering
insights into the state-of-the-art solutions.
These papers offer valuable insights into the design, implementation, and performance
of student attendance monitoring system with automatic light control systems. They address
8
various aspects such as sensor technologies, system architectures, and energy efficiency
considerations, providing a comprehensive understanding of the field.
1. People Counting Techniques: Explore different methods for counting people, such as
ultrasonic sensors, video-based systems, or RFID technology. Review studies comparing the
accuracy, reliability, and cost-effectiveness of various counting techniques.
2. Automatic Light Control Systems: Investigate research on automatic lighting control
systems, including motion sensors, occupancy sensors, and daylight harvesting techniques.
Analyze the effectiveness of different control strategies in reducing energy consumption
while maintaining adequate lighting levels.
3. Integration of People Counting and Light Control: Look for projects or studies that
integrate people counting with automatic light control to optimize energy usage in buildings.
Examine approaches for correlating people/student presence with lighting requirements and
ON/OFF the lighting system accordingly.
4. System Design and Implementation: Review literature on the design and implementation
of bidirectional people counting systems, including hardware selection, sensor placement,
and data processing algorithms. Identify best practices for integrating people counting and
light control functionality into a cohesive system.
5. User Interaction and Experience: Explore research on user interfaces for configuring and
monitoring people counting and light control systems. Investigate user feedback and
satisfaction with existing implementations to identify areas for improvement.
6. Energy Efficiency and Sustainability: Look for studies assessing the energy-saving
potential and environmental benefits of integrating people counting with automatic light
control. Analyze case studies or simulations demonstrating the impact of such systems on
energy consumption and carbon emissions.
7. Real-World Applications and Case Studies: Identify real-world applications of student
attendance monitoring system and automatic light control systems in commercial buildings,
museums, libraries, school, college or other public spaces. Examine case studies documenting
the implementation process, performance metrics, and lessons learned.
9
By conducting a comprehensive literature survey across these areas, you can gain
valuable insights into the state-of-the-art technologies, methodologies, and challenges
associated with bidirectional people counting with automatic light control projects.
Problem: The current lack of an integrated solution for student/people counting and automatic
light control poses several challenges:
1. Inefficient Energy Usage: Manual control of lighting systems often results in energy
wastage, as lights may remain on in unoccupied areas or during daylight hours.
2. Inaccurate people counting: Existing people counting systems may fail to accurately track
people entering and exiting a space, leading to unreliable occupancy data and inefficient
resource allocation.
3. Limited User Comfort: Inadequate lighting control can negatively impact user comfort and
productivity, as lighting levels may not be optimized for different occupancy levels and time
of day.
4. Maintenance Challenges: Traditional systems require frequent manual intervention for
calibration, maintenance, and troubleshooting, increasing operational costs and downtime.
The objective of this project is to design and implement a student attendance
monitoring system with automatic light control system that addresses the aforementioned
challenges. The system aims to provide accurate student/people counting in both directions
and dynamically ON/OFF lighting system based on occupancy patterns, thereby improving
energy efficiency and user comfort.
The proposed solution involves the development of a sensor-based student/people
counting system integrated with a lighting control mechanism. Advanced sensors, such as
infrared or ultrasonic sensors, will be deployed to accurately detect people entering and
exiting the space. The system will utilize algorithms to track people movements and update
the count accordingly, ensuring real-time occupancy data. Additionally, the system will
automatically ON/OFF lighting system based on occupancy status, time of day, and ambient
light conditions, optimizing energy usage while maintaining user comfort.
Expected Outcomes:
1. Improved Energy Efficiency: By automatically controlling lighting based on occupancy,
the system is expected to reduce energy consumption and operating costs.
2. Enhanced User Experience: Optimized lighting levels will create a more comfortable and
productive environment for occupants. Reliable data on people traffic, enabling better
resource planning and management.
3. Accurate people/student tracking: The system will provide reliable data on people traffic,
enabling better resource planning and management.
4. Simplified Maintenance: Automated functions and self-monitoring capabilities will
minimize the need for manual intervention and troubleshooting.
11
The student attendance monitoring system with automatic light control project aims to
address the challenges associated with manual lighting control and inaccurate student/people
counting. By developing an integrated solution that combines advanced sensors, algorithms,
and automated control mechanisms, the project seeks to improve energy efficiency, user
comfort, and operational efficiency in various environments.
Previous studies on energy efficiency in public spaces have laid the groundwork for
the development of studant attendance monitoring systemwith automatic light control
systems. These studies have explored various aspects related to occupancy sensing, lighting
control, and energy conservation in different types of environments. Here's a breakdown of
some key findings and methodologies from previous research:
3. Integration of Occupancy Sensing with Lighting Control: Several studies have focused on
integrating occupancy sensing with lighting control systems to create more responsive and
energy-efficient solutions. By automatically adjusting lighting based on occupancy patterns,
these integrated systems aim to minimize energy waste while ensuring optimal lighting
conditions for occupants. Research in this area has explored various algorithms, feedback
mechanisms, and user interfaces to optimize system performance and user satisfaction.
4. Validation in Real-world Environments: Many studies have conducted field trials and case
studies to validate the effectiveness of student attendance monitoring system with automatic
light control systems in real-world public spaces, such as offices, classrooms, retail stores,
and transportation hubs. These studies have assessed the impact of these systems on energy
12
savings, occupant behavior, and overall building performance, providing valuable insights
into their practical application and scalability.
5. Cost-benefit Analysis and Return on Investment (ROI): Some studies have evaluated the
economic feasibility of implementing studant attendance monitoring systemwith automatic
light control systems by conducting cost-benefit analyses and ROI calculations. These
analyses consider factors such as installation costs, energy savings, maintenance expenses,
and potential incentives or rebates, helping stakeholders make informed decisions about
investing in these technologies.
Overall, previous studies on energy efficiency in public spaces have laid a solid
foundation for the development and implementation of student attendance monitoring system
with automatic light control systems. By building upon existing research findings and
methodologies, future studies can further refine these systems to achieve even greater energy
savings, occupant comfort, and environmental sustainability in diverse built environments.
13
In the digital world, there is a need for every possible thing around us to be automatic
which reduces human efforts. This brings about a sense of urgency for developing systems
that would ease the complexity of life due to the increase in standard of living. The process of
measuring people traffic entering and leaving a place such as seminar and auditorium halls,
conference rooms, etc. is known as people counting. The count is incremented by one only
when someone enters into the room and decremented by one only when someone leaves, and
the room light will only be turned on where there is at least one person in the room;
otherwise, it will be off.
3.1 Scope
The scope of a student attendance monitoring system with automatic light control
project typically includes designing and implementing a system that counts the number of
people entering and exiting a space using sensors, and automatically controls the lighting
based on occupancy. This project involves hardware components such as sensors (like
infrared sensors or ultrasonic sensors), microcontrollers (such as Arduino or Raspberry Pi),
and relays for controlling lights. Additionally, it involves programming to process sensor
data, increment/decrement counters, and control the lights accordingly. The project can be
expanded with features like data logging, remote monitoring, and integration with other smart
home systems.
A bidirectional student attendance monitoring system using an ultrasonic sensor and
arduino Uno board can offer several advantages in various contexts, such as businesses,
educational institutions, or organizations. Here are some of the key reasons why such a
system might be necessary or scope of the project
1. Accurate Attendance Tracking: Bidirectional people/student counting systems are highly
accurate and difficult to manipulate. They ensure that attendance records are precise,
reducing the likelihood of errors associated with traditional methods like manual paper-based
systems or card swiping.
2. Real-Time Data show on L.E.D display allows for real-time data. Entry and tracking.
When an employee or student inter into the room ultrasonic sensor is detected and sent signal
to arduino Uno board, the attendance data is immediately show on L.C.D screen, providing
up-to-date information for administrators or managers.
14
3. Easy Data Management: Google Sheets offers a user-friendly interface for data
management. It allows you to easily organize, sort, and analyze attendance records.
Additionally, multiple people can access and collaborate on the data simultaneously.
4. Accessibility: Google Sheets can be accessed from various devices with an internet
connection, making it convenient for remote monitoring and management of attendance
records.
5. Cost-Effective: Implementing a student attendance monitoring system with Google
ultrasonic sensor can be cost-effective compared to other attendance tracking solutions,
especially over the long term. It reduces the need for physical attendance registers and
associated administrative tasks.
6. Scalability: This system can be scaled up or down as needed. Whether you have a small
team or a large organization, you can easily adapt the system to accommodate your
attendance tracking requirements.
7. Compliance: In some industries or educational institutions, accurate attendance records are
required to comply with regulations. A student attendance monitoring system can help ensure
compliance by providing reliable data.
8. Time Efficiency: It reduces the time required for attendance tracking and data entry,
allowing administrators to focus on more valuable tasks.
9. Audit Trail: Google Sheets maintains a history of changes, providing an audit trail for
attendance data. This can be useful for tracking changes and resolving disputes.
10. Integration: Depending on the ultrasonic sensor attendance monitoring system and
software used, it may offer integration options with other software and systems, further
streamlining processes and improving efficiency.
While a student attendance monitoring system with ultrasonic sensor offers several
advantages, it's essential to consider the privacy and legal implications, as real time data is
show on display. Ensure that you comply with relevant data protection laws and regulations
and implement appropriate security measures to protect this data. Ultimately, the necessity of
such a system will depend on the specific needs and goals of your organization or institution.
If accurate attendance tracking. Security, and efficient data management are priorities, then
implementing such a system may be a valuable investment.
When implementing a student attendance monitoring system using an ultrasonic
sensor with arduino Uno board, you should define clear objectives to ensure that the system
meets your organization's needs and goals effectively. Here are some key objectives to
consider.
15
1. Accuracy: Ensure that the system accurately records the counting of student attendance
data by sensing. Minimize errors and false positives/negatives to maintain data integrity.
2. Security: Implement robust security measures to protect the data and attendance records.
Ensure that only authorized personnel have access to the system and its data.
3. Efficiency: Improve the efficiency of attendance tracking by automating the process.
Reduce manual data entry and administrative tasks associated with traditional attendance
methods.
4. Real-Time Data: Enable real-time data entry and tracking to provide up- to-date attendance
information for administrators, managers, and other relevant parties.
5. User-Friendliness Design the system to be user-friendly for both employees/students and
Administrators. Ensure that the ultrasonic sensing process is straightforward and that data
entry is intuitive.
6. Integration Integrate the system seamlessly with Google Sheets to facilitate easy data
management, reporting, and analysis. Ensure that attendance data is automatically transferred
to Google Sheets in real time.
7. Scalability Build a system that can scale to accommodate varying numbers of users and
locations, whether you have a small team or a large organization with multiple branches.
8. Cost-Efficiency: Optimize the system to be cost-effective in terms of both initial setup
costs and ongoing maintenance. Consider the return on investment (ROI) in terms of time
saved and accuracy achieved.
9. Backup and Redundancy Implement backup and redundancy measures to safeguard
attendance data in case of system failures or data loss.
3.2 Future Implementation
3. Integration with IoT and Building Management Systems: Future implementations could
leverage the capabilities of IoT and building management systems to create seamless and
interoperable solutions. By integrating student attendance monitoring system with existing
building automation systems, such as HVAC and security systems, it would be possible to
achieve holistic energy management and optimize overall building performance.
4. Smart User Interfaces and Feedback Mechanisms: Implementations could feature intuitive
user interfaces and feedback mechanisms to enhance user engagement and satisfaction.
Interactive dashboards, mobile applications, and smart control panels could provide real-time
visibility into energy usage, occupancy levels, and lighting settings, empowering users to
make informed decisions and adjust settings as needed.
5. Scalability and Flexibility: Future implementations should be designed with scalability and
flexibility in mind to accommodate diverse building types and occupancy patterns. Modular
and interoperable components would allow for easy expansion and customization, enabling
the system to adapt to changing needs and requirements over time.
7. Data Privacy and Security: Future implementations must address concerns related to data
privacy and security by implementing robust encryption protocols, access controls, and an on
imitation techniques to protect sensitive information collected by the system. Compliance
with relevant regulations, such as GDPR and CCPA, should be ensured to safeguard user
privacy rights.
8. RFID based: We are going to implement the student attendance module using RFID to
ensure accurate attendance, educational institutions need to leave the time-consuming
17
traditional paper-pen method & switch to RFID Attendance Management System to register
daily attendance. RFID attendance system manages, organizes, and records attendance
without any errors.
9. by using Servo Motor: Linear actuator which works on the principle of pulse width
modulation. It can be used in this project to open or close the door.
4. METHODOLOGY
We should come up with a solution able to solve the problems inherent to common
urban mean of counting number of people entering and existing in the particular room,
classroom, hall, small retail stores, large office buildings or public facilities and optimizing
energy usage in various environments.by combining student counting with automatic light
control.
4.1 Design
This student attendance monitoring system is designed to count the total number of
people in a particular place such as halls, auditorium, conference room, etc. and it is powered
by an external source of power supply via an AC to DC power adapter. The power adapter
converts the alternating current of 220v/240V into a direct current of 5V as required to power
the device. The system consists of the Hardware and Software. The Hardware is divided into
six sections: Power supply, HC-SR04 Ultrasonic sensor, Microcontroller, Relay, Liquid
Crystal Display (LCD) and a Bulb while the software is program is written in C language
(version 1.8.9) 2016 Environment. The code was written in a way that it embeds the High and
Low logic of the sensor, the relay unit, LCD and the programmed microcontroller. The block
diagram of the student attendance monitoring system is as shown in Fig 4.1
L.C.D DISPLAY
1. System Design and Architecture: Define the overall architecture of the system, including
hardware and software components, determine the integration points between the people
counter and the light control system, Specify the communication protocols and interfaces for
data exchange between components.
2. Hardware Selection and Configuration: Identify suitable sensors for student attendance
monitoring system, considering factors such as accuracy, range, and power consumption,
Select microcontrollers or single-board computers to process sensor data and control lighting,
Configure the hardware components, including sensor placement and wiring infrastructure.
3. Sensor Calibration and Testing: Calibrate the sensors to ensure accurate detection of
peoples entering and exiting the space, conduct thorough testing to validate sensor
performance under various conditions, such as different lighting levels and people densities.
4. people/student Counting Algorithm Development: Develop algorithms to track people
movements and update the count in real-time, Implement mechanisms to handle edge cases,
such as multiple peoples entering or exiting simultaneously, Validate the accuracy and
reliability of the counting algorithm through simulation and real-world testing.
5. Automatic Light Control Algorithm Development: Design algorithms to adjust lighting
system based on occupancy status, time of day, and ambient light conditions, incorporate
feedback loops to continuously monitor occupancy and optimize lighting settings
accordingly, evaluate the effectiveness of different control strategies in reducing energy
consumption while maintaining user comfort.
6. User Interface Development: Design a user interface for configuring system settings,
monitoring people counts, and adjusting lighting preferences, ensure the user interface is
intuitive and user-friendly, catering to both technical and non-technical users, conduct
usability testing to gather feedback and iteratively improve the interface design.
7. Integration and Testing: Integrate the people counting and light control algorithms with the
hardware components. Conduct comprehensive system testing to verify functionality,
accuracy, and reliability, Test the system under various scenarios, including different
occupancy levels and lighting conditions.
8. Deployment and Optimization: Deploy the system in the target environment, following
installation guidelines and best practices, Monitor system performance and gather feedback
20
from users to identify any issues or areas for improvement, Optimize system parameters, such
as sensor sensitivity and control thresholds, based on real-world usage data.
9. Documentation and Knowledge Transfer: Document the entire development process,
including hardware configurations, software implementations, and testing procedures,
provide training and support to end-users on system operation, maintenance, and
troubleshooting, Publish project documentation and share lessons learned with the broader
community to contribute to knowledge dissemination.
By following this methodology, the student attendance monitoring system with
automatic light control project can be systematically developed, tested, and deployed to
achieve its objectives of improving energy efficiency and user comfort.
4.2 Advantages
A student attendance monitoring system with automatic light control project offers
several advantages:
1. Accurate People Counting: By tracking both incoming and outgoing people, the system
provides a more accurate representation of the total number of people in a space, which can
be useful for various purposes such as occupancy management or security.
2. Efficient Resource Management: Automatic light control based on student/people count
helps in optimizing energy usage. Lights can be turned on or off based on the presence of
people, reducing unnecessary energy consumption and lowering electricity bills.
3. Convenience: With automatic light control, there's no need for manual intervention to
switch lights on or off. This adds convenience and saves time for occupants and facility
managers.
4. Enhanced Security: By monitoring the flow of people in and out of a space, the system can
provide insights into any unusual patterns or unauthorized access, thereby enhancing security
measures.
5. Data Collection: The system can collect data on people traffic patterns, peak hours, and
occupancy trends, which can be valuable for optimizing space utilization, planning staffing
schedules, or making informed decisions about facility management.
6. Customization and Integration: Depending on the requirements, the system can be
customized and integrated with other systems such as access control or HVAC (Heating,
Ventilation, and Air Conditioning) systems to further enhance efficiency and functionality.
Overall, a student attendance monitoring system with automatic light control offers
convenience, efficiency, and improved management of resources, making it a beneficial
addition to various environments such as offices, retail stores, or public facilities.
21
4.3 Disadvantages
One potential disadvantage of a student attendance monitoring system with automatic
light control project is:
1. Dependency on Accuracy: The accuracy of the student counting system is crucial for the
effectiveness of the automatic light control. If the counting system fails to accurately detect
student entering or leaving the space, it could result in improper lighting adjustments, leading
to discomfort for occupants or unnecessary energy consumption.
To mitigate this disadvantage, it's essential to use reliable and accurate sensors or
technologies for people counting and implement proper calibration and maintenance
procedures to ensure the system's accuracy over time. Additionally, having manual override
options or backup systems in place can provide a failsafe mechanism in case of any issues
with the automated functionality.
22
6. The process continues, maintaining accurate student count and controlling the lights based
on present numbers of student in the room.
5.1.3 Benefits
Efficient energy usage by automatically controlling lighting based on person
presenting in the room, accurate student/people tracking for various purposes such as
security, occupancy management, or statistical analysis, Challenges: Calibration of sensors
and light thresholds for accurate detection and control, Ensuring reliability and robustness of
the system for long-term operation, Designing an intuitive user interface for configuration
and monitoring.
By integrating these components and functionalities, the student attendance
monitoring system with automatic light control project provides a smart and efficient solution
for managing spaces with fluctuating person traffic and lighting needs.
5.2 What is student attendance monitoring system?
A student attendance monitoring system with automatic light control project is a
system designed to track the number of people/student entering and exiting a space in both
directions (bidirectional) while also automatically controlling the lighting system.
Here's how it typically works: 1. People Counting: Sensors (such as infrared or
ultrasonic sensors) are placed at entry and exit points to detect movement. Each time
someone enters, the count increases, and each time someone exits, the count decreases. This
allows for accurate tracking of the number of people inside the space. 2. Automatic Light
Control: The system includes a light ON/OFF system based on counting of people, By
combining student attendance monitoring system with automatic light control, the project
offers several benefits: Efficient energy usage: Lights are only turned on when needed,
reducing electricity consumption, Accurate occupancy management: The system provides
real-time data on the number of people inside the space, which can be useful for various
purposes such as security, crowd control, or resource allocation, Enhanced convenience: The
automatic light control eliminates the need for manual operation, providing a hassle-free
experience for users.
5.3 components
5.3.1 Power Supply Unit
The Power Supply unit converts the main converts the main supply (240AC at 50Hz)
to a lower direct current voltage that is suitable for Powering Low power devices. The user
can either choose to use an AC to DC adapter or 5V-12V battery to power the circuit. A
24
higher input voltage is 12V. The ultrasonic sensor will generate some heat at 12V. There are
two types of power connector for the circuit: DC plug (Jumper) and Power connector.
Normally, an AC to DC adapter can be plugged to the Jumper connection. Power supply
consists of the rectifier, transformer, voltage regulator, and the filter capacitor. The 5V power
supply must have the following characteristics:
• Accurate voltage
• Sufficient current
The Arduino is specified to draw less than 200mA at 16MHZ and the LCD module
draw up to 10mA and any interfacing circuit must be included in the power supply current
budget. A standard 1A linear regulator chip should be sufficient in most cases, as any high
power loads will normally run from the unregulated supply. A 5V regulator circuit can be
added to the circuit necessary, but an external plug-top regulated supply and coaxial input
could be more convenient. These typically supply at least 500mA while a bench supply will
provide at least 1A. Standard IC regulators
In order to calculate the distance between the sensor and the object, the sensor
measures the time it takes between the emissions of the sound by the transmitter to its contact
with the receiver. The formula for this calculation is D = ½ T x C (where D is the distance, T
is the time, and C is the speed of sound ~ 343 meters/second).
Ultrasonic sensors are used primarily as proximity sensors. They can be found in
automobile self-parking technology and anti-collision safety systems. Ultrasonic sensors are
also used in robotic obstacle detection systems, as well as manufacturing technology. In
comparison to infrared (IR) sensors in proximity sensing applications, ultrasonic sensors are
not as susceptible to interference of smoke, gas, and other airborne particles (though the
physical components are still affected by variables such as heat).
Ultrasonic sensors if configured correctly can even measure fluid flow rates. In the
simplest case, an emitter and a receiver (separate in this configuration) are aligned with the
flow of a fluid. Since sound is traveling through a moving medium, the speed of sound
26
relative to these elements will be increased or decreased by the velocity of the fluid. This can
be applied to flow inside pipes by aligning these two elements at an angle to each other,
calculating the effective velocity increase based on the trigonometric relations between the
two. Flow rate accuracy can be increased by using data from multiple ultrasonic elements,
giving results accurate to within a fraction of a percent. A typical Ultrasonic sensor used in
this project work is shown in the figure below.
The Arduino Uno comes with USB interface, 6 analog input pins, 14 I/O digital ports
that are used to connect with external electronic circuits. Out of 14 I/O ports, 6 pins can be
used for PWM output. It allows the designers to control and sense the external electronic
devices in the real world.
Since it was first debuted, the Arduino Uno has been a huge hit with electronics
enthusiasts from beginner hobbyists to professional programmers. It is an open-source
platform, means the boards and software are readily available and anyone can modify and
optimize the boards for better functionality. The software used for Arduino devices is called
IDE (Integrated Development Environment) which is free to use and required some basic
skills to learn it. It can be programmed using C and C++ language.
Arduino Uno Features this board comes with all the features required to run the
controller and can be directly connected to the computer through USB cable that is used to
transfer the code to the controller using IDE (Integrated Development Environment)
software, mainly developed to program Arduino. So, let’s dive into the features of Arduino
Uno. More frequency and number of instructions per cycle: Atmega328 microcontroller is
28
placed on the board that comes with a number of features like timers, counters, interrupts,
PWM, CPU, I/O pins and based on a 16MHz clock that helps in producing more frequency
and number of instructions/cycle.
Built-in regulation: This board comes with a built-in regulation feature which keeps
the voltage under control when the device is connected to the external device. Flexibility &
Ease of use: There are 14 I/O digital and 6 analog pins incorporated in the board that allows
the external connection with any circuit with the board. These pins provide the flexibility and
ease of use to the external devices that can be connected through these pins. Configurable
pins: The 6 analog pins are marked as A0 to A5 and come with a resolution of 10bits. These
pins measure from 0 to 5V, however, they can be configured to the high range using analog
Reference () function and AREF pin. Quick Start: Reset pin is available in the board that
reset the whole board and takes the running program in the initial stage. This pin is useful
when board hangs up in the middle of the running program; pushing this pin will clear
everything up in the program and starts the program right from the beginning. Greater Flash
Memory: 13KB of flash memory is used to store the number of instructions in the form of
code. Low Voltage Requirement: Only 5 V is required to turn the board on, which can be
achieved directly using USB port or external adapter, however, it can support external power
source up to 12 V which can be regulated and limit to 5 V or 3.3 V based on the requirement
of the project. Plug & Play: There is no hard and fast interface required to connect the devices
to the board. Simply plug the external device into the pins of the board that are laid out on the
board in the form of the header. USB interface: Arduino Uno comes with USB interface i.e.
USB port is added on the board to develop serial communication with the computer. Power
alternatives: Apart from USB, battery or AC to DC adopter can also be used to power the
board. More Storage: There is a provision of Micro SD card to be used in the boards to make
them store more information. Arduino Uno boards are quite similar to other boards in
Arduino family in terms of use and functionality, however, Uno boards don’t come with
FTDI USB to Serial driver chip.
Arduino Uno Specifications. The specifications of Arduino Uno is as given in the table
below.
Operating Voltage 5V
Microcontroller ATmege 38p , 8 bit
29
Liquid Crystal Display (LCD) is a flat panel display, electronic visual display, or
video display that uses the light modulating properties of liquid crystals. Liquid crystals do
not emit light directly. LCDs are used in a wide range of applications including computer
monitors, televisions, instrument panels, aircraft cockpit displays, and signage. They are
common in consumer devices such as video players, gaming devices, clock, watches,
calculators and telephones.
The operation of the 16 character LCD is connected in 8-bit mode, that is, ASCII
codes are fed to it in two stages, high nibble then low nibble. For this reason, the data inputs
are connected to the high bits of Port D. The low bits provide the control lines RS (Register
Select) and E (Enable). The RW (Read/Write) line is connected low for writing only.
The 16X2 LCD used in this project work has 16 output pins out of which 6 are left
unconnected. The output pins are Vss, Vdd, Vee, Rs, Rw, Re, Do, D1, D2, D3, D4, D5, D6,
30
D7, A and K. The Vss pin is connected to the ground, the Vdd pin to 5V, the Vee pin to
10Kohms variable resistor, Rs to pin 4, Rw ro ground, E to pin 5, D4 to pin 11, D5 to pin 12,
D6 to pin 13 and D7 to pin 14.
5.3.5 Relay
The 5V DC relay was used in this project work. The 5V relay is an electromechanical
switching device which can control the AC or DC devices through the 5V DC relay coil. It is
equipped with high-current relay that work under AC250V 10A or DC30V 10A. The 5V DC
relay has 5 pins namely the Coil End 1, Coil End 2, Common, Normally Close and Normally
Open. The Coil End 1 and Coil End 2 were connected to Positive 5V and negative 5V
respectively, the Common is connected to digital pin 15 of the microcontroller while the
Normally Open is connected to the positive terminal of the AC bulb.
5.3.6 AC Bulb
A 220V AC Bulb was used to indicate the presence of at least one person in the room. It has
two terminals: the positive terminal and the terminal. The positive terminal is connected to
Normally Open of the 5V DC relay while the negative terminal is connected to the ground.
31
5.4 Software
This project was implemented using C language (version 1.8.9). The code was
generated and debugged in C language 2013 environment. Arduino 1.8.9 software was used
in writing the codes. The code was written in a way that it embeds the High and Low
sensitivity of the ultrasonic sensor, the relay unit, LCD, and the AC bulb. The main program
which consists of the whole programming is located in control unit of the microntroller where
it is saved. The reason for choosing C over other languages (python, perl5, etc.) is its speed,
stability and near universal availability. There is an option to program and reprogram the IC
(ATMEGA328P) a thousand times to perform different functions.
5.5 Construction
This is the aspect of the project that deals with assembling, soldering, casing, etc. The
circuit components used was locally sourced from the local shops around the vicinity. After
getting the components needed for the project, the components were then assembled and
soldered on a Ferro board according to the specifications of the circuit diagram.
After Soldering, the testing of the circuit design took place across the nodes of the
circuit. The major components such as ultrasonic sensor, liquid crystal display were held
solidly to the case with the use of glue.
This is a step by step explanation of how the project works. When an external power
is supplied to the system, the LCD displays ‘a student attendance monitoring system’ for
about 5 seconds. Then the two ultrasonic sensors switch to active mode waiting for the
detection of an obstacle with zero person displayed on the screen. When a person passes in
front the sensor at the entry, the person on the display change to one and the AC bulb turn to
ON state. With more people passing, the number gets incremented while the bulb still remain
ON. But when a people passes in front of the exit sensor, the number gets decremented and
the bulb turn to OFF state only when the number of people is zero.
The operation of a student attendance monitoring system with automatic light control
project involves several components working together:
1. People Counter: This typically consists of sensors (like infrared sensors or proximity
sensors) placed at the entrance and exit points. These sensors detect the presence of a person
entering or exiting and increment or decrement the count accordingly.
3. Display Unit: This unit displays the current count of peoples. It could be an LCD display,
LED display, or even a smartphone app connected via Bluetooth or Wi-Fi.
33
4. Light Control System: The microcontroller also controls the lighting system based on the
count of peoples. For example, it can turn on the lights when the number of peoples exceeds a
certain threshold and turn them off when the premises are empty.
5. Power Supply: The entire system requires a stable power supply to operate consistently.
Here's how the system generally operates: When a person enters or exits, the
respective sensor detects the movement and sends a signal to the microcontroller. The
microcontroller updates the count of peoples accordingly. If the count exceeds a predefined
threshold, the microcontroller triggers the light control system to turn on or off the lights. The
current count of person is continuously displayed on the display unit for monitoring. This
system helps in tracking the number of people inside a premises and automatically adjusts the
lighting to conserve energy when the premises are empty.
6.1 Result
This chapter projects the analysis and discussion of results and findings during and
after the implementation of design. It describes in detail the final design perspective as well
as highlighting the probable defects engulfing. The project preview to the entirety of this
project establishes the essence and need for embedded systems towards technological
advancement. The diagram in Figure 4.1 represents the block diagram of the student
attendance monitoring system. This project incorporates the following; an arduino Uno R3,
ultrasonic sensors, resistors, diodes, LEDs, LCD display. The block diagram gives a preview
as to what the project entails.
this command, which the microcontroller is made to send control signals to the other I/O
devices. The microcontroller also sends a data signal to the LCD to visually display the exact
number of peoples remaining in the building.
The Bi-Directional student counting machine with automatic light control has
demonstrated promising results in terms of accuracy, efficiency, and energy savings. Key
outcomes include:
1. Accurate Student counting: - The system accurately counts the number of students entering
and exiting the premises, minimizing errors and providing reliable data for administrative
purposes.
2. Real-Time Monitoring: - Through the user interface, administrators can monitor the current
count of students in real-time, facilitating better management of resources and facilities.
3. Cost savings: - By optimizing energy usage and reducing manual intervention for light
control, the system contributes to cost savings over time
4. Enhanced Security: - The system provides and additional layer of security by accurately
tracking the movement of students in and out of the monitored area.
Test Results and Analysis after uploading the student attendance monitoring system
code to Arduino Board, the device is ready for installation. You can use a 5V DC Adapter to
Power on the Device. The device has a pair of ultrasonic Sensor module. One of the
ultrasonic Sensors needs to be placed at the entrance and the other at the exit, i.e. inside the
room door and outside the room door. When no student are inside the room, the light turns
off and the LED Display will indicate no students are present inside the classroom. When
someone makes an entry, the student is added and LED Display, displays the number of
incoming students. At this instance, the light automatically turns ON. When a person leaves
the room or exit, the student is subtracted. Hence the total number of current students is
displayed on LED display. The LED Display also displays the number of students in the
classroom and the number of students exit. This is how an Arduino student attendance
monitoring system with Light Control System works. You can use this project for Hall,
Schools, Office, Functions, etc.
6.2 Application
35
The student attendance monitoring system with automatic light control has diverse
applications in various educational, commercial, and public settings.
1. School and Universities: - it can be deployed in classrooms, lecture halls, libraries, and
other areas to track student attendance, manage occupancy, and optimize lighting.
2. Office Buildings: - The system can be used in office buildings to monitor the flow of
employees, improve workspace utilization, and reduce energy coast through smart lighting
control.
3. Retail stores: - Retailers can utilize the system to track customer traffic, analyze footfall
patterns, and adjust lighting conditions to enhance the shopping experience and conserve
energy.
4. Public Spaces: - It can be installed in public facilities such as museums, galleries, and
transportation hubs to manage visitor’s traffic, ensure crowd control, and implement energy-
efficient lighting solutions.
5. Event Venues: - Event organizers can benefit from the system to manage attendee flow,
optimize space utilization during conferences, exhibition, and concerts, and minimize energy
wastage.
6. Healthcare Facilities: - Hospitals and clinics can employ the system to monitor patient
movement in waiting areas, manage occupancy in wards and treatment rooms, and implement
energy – saving measures in non-critical areas.
In summary, the student attendance monitoring system with automatic light control
offers versatile applications across various sectors, contributing to improved efficiency,
sustainability, and user experience in different environments. Its ability to accurately count
students, manage occupancy, and control lighting makes it a valuable asset for modern
facilities seeking enhanced resource management and operational efficiency.
36
7.1 Conclusion
Conclusion the student attendance monitoring system with Automatic Light Control
project offers a practical solution for monitoring numbers of present student and optimizing
energy usage in various environments. By combining student attendance monitoring system
with automatic light control, the system enhances both user experience and energy efficiency.
With further refinement and customization, this project can be adapted for a wide range of
applications to meet specific requirements. In conclusion, the student attendance monitoring
system with automatic light control project represents a significant advancement in both
energy efficiency and occupancy management. Through the integration of sophisticated
sensor technology and automated lighting systems, this project offers a comprehensive
solution for monitoring and optimizing illumination. Throughout the development and
implementation phases of this project, several key objectives were successfully achieved.
Firstly, the bidirectional student/people counter accurately tracks the movement of
individuals entering and exiting a space. Moreover, the automatic light control system
seamlessly interfaces with the student counter, ON/OFF the illumination based on occupancy.
By this system not only reduces energy consumption but also creates a more comfortable and
welcoming environment for occupants. Whether in commercial buildings, public spaces, or
residential settings, the ability to intelligently manage lighting based on occupancy represents
a significant step towards sustainability and user-centric design. One of the notable strengths
of this project lies in its bidirectional functionality, which allows for accurate counting of
individuals entering and exiting the monitored area. This bidirectional capability ensures that
the student counter provides precise data, minimizing errors and false readings. Additionally,
by incorporating motion sensors and advanced algorithms, the system can distinguish
between legitimate entries and exits, further enhancing its reliability and accuracy.
Furthermore, the flexibility and scalability of this project make it well-suited for a wide range
of applications and environments. Whether deployed in small retail stores, large office
buildings, or public facilities, the bidirectional student/person counter with automatic light
control system can adapt to varying spatial layouts and traffic patterns. Moreover, its modular
design allows for easy integration with existing infrastructure and the potential for future
expansion or customization.
37
The conclusions drawn from a student attendance monitoring system with automatic
light control project would encompass a comprehensive assessment of the system's
functionality, effectiveness, and implications. Here's an overview of the conclusions one
might derive from such a project:
1. Energy Efficiency Validation: The project confirms the effectiveness of the student
attendance monitoring system with automatic light control in improving energy efficiency.
By accurately tracking student movement and adjusting lighting levels accordingly, the
system reduces unnecessary energy consumption, validating its role in promoting sustainable
practices.
2. Cost Savings: Through the reduction of energy usage and operational costs associated with
lighting, the project demonstrates the cost-effectiveness of implementing such a system. The
potential savings in electricity bills and maintenance expenses highlight the financial benefits
for building owners and operators, making a compelling case for widespread adoption.
3. Enhanced User Experience: The project findings indicate a significant improvement in the
user experience within spaces equipped with the automatic light control system. Occupants
benefit from consistent lighting levels that adapt to their presence, creating a more
comfortable and inviting environment conducive to productivity and well-being.
4. Optimized Resource Utilization: By providing real-time data on visitor traffic patterns, the
system enables better resource utilization and space management. This insight allows for
informed decision-making regarding facility operations, layout optimization, and future
planning, ultimately maximizing the efficiency of resource allocation.
5. Environmental Impact Reduction: The project underscores the system's positive impact on
reducing environmental footprint by minimizing energy consumption and carbon emissions.
By aligning with sustainability goals, the system contributes to mitigating climate change and
promoting environmental stewardship.
6. Reliability and Scalability: The project demonstrates the reliability and scalability of the
system, indicating its suitability for deployment across various environments and usage
scenarios. The robustness of the bidirectional visitor counting mechanism and the flexibility
of the automatic light control algorithms ensure seamless integration and operation in diverse
settings.
38
7. User Feedback and Acceptance: Feedback from users involved in the project highlights a
positive response to the automatic light control system. Users appreciate the convenience,
comfort, and energy-saving benefits offered by the system, indicating a high level of
acceptance and satisfaction among occupants.
8. Future Development Opportunities: While the project's outcomes are promising, there are
opportunities for further innovation and refinement. Future iterations could explore advanced
sensor technologies, predictive analytics, and integration with smart building systems to
enhance functionality and performance.
In conclusion, the student attendance monitoring system with automatic light control
project demonstrates its effectiveness in improving energy efficiency, enhancing user
experience, and optimizing resource utilization. The findings support the system's value as a
practical solution for addressing the evolving needs of modern built environments, with
potential for widespread adoption and long-term sustainability.
The future scope of student attendance monitoring system with automatic light control
is promising, with several avenues for advancement and application. Here are some potential
areas of future development
1. Integration with Smart Building Systems: Future implementations could involve tighter
integration with broader smart building systems. This would allow the student attendance
monitoring system with automatic light control to communicate with other building systems
such as HVAC, security, and occupancy scheduling, enabling more holistic building
management and optimization.
3. Predictive Analytics and Machine Learning: Future systems could leverage predictive
analytics and machine learning algorithms to anticipate occupancy patterns and optimize
lighting control strategies proactively. By analyzing historical data and environmental factors,
39
the system could predict future occupancy trends and adjust lighting settings accordingly,
maximizing energy savings and user comfort.
6. Integration with IoT and Connectivity: As the Internet of Things (IoT) continues to evolve,
there are opportunities to enhance connectivity and interoperability with other IoT devices
and platforms. By integrating with IoT ecosystems, the student attendance monitoring system
with automatic light control could access additional data sources and functionalities, enabling
more advanced features and applications.
8. Data Analytics and Insights: Future developments could focus on leveraging the data
collected by student attendance monitoring system for deeper insights into occupancy
patterns, space utilization, and building performance. Advanced data analytics techniques
could extract valuable insights that inform decision-making, optimize operations, and drive
continuous improvement in building management practices.
Overall, the future scope of student attendance monitoring system with automatic
light control is vast, with opportunities for innovation in sensor technologies, data analytics,
connectivity, and integration with smart building systems. By embracing these advancements,
future implementations can further enhance energy efficiency, user experience, and
sustainability in built environments.
40
8. APPENDIX
The Student Attendance monitoring system with Automatic Light Control project is
an innovative system that not only counts the number of people/student entering and exiting a
particular area but also integrates automatic light control based on the presence of student.
This project is designed to offer convenience, energy efficiency, and data collection
capabilities for various applications such as classroom, malls, libraries, museums, and other
public spaces.
1. Student Counting: The system uses ultrasonic sensors placed at the entry and exit points to
detect the presence of student. When a person/student crosses the entry point, the ultrasonic
sensor detects and increments the counter. Similarly, when someone exits, the counter
decrements. The total number of student inside the classroom is also displayed on the L.C.D.
displays.
41
2. Automatic Light Control: When the student count is greater than zero (indicating the
presence of student), the system triggers the relay module to turn on the lights. Once the
student count reaches zero, the lights are turned off automatically.
There are some sections of whole student attendance monitoring system circuit that
are sensor section, control section, display section and driver section.
1. Sensor section: In this section we have used two ultrasonic sensor modules which contain
potentiometer, Comparator (Op-Amp) and LED’s. Potentiometer is used for setting reference
voltage at comparator’s one terminal and ultrasonic sensors sense the object or person and
provide a change in voltage at comparator’s second terminal. Then comparator compares
both voltages and generates a digital signal at output. Here in this circuit we have used two
comparators for two sensors. LM358 is used as comparator. LM358 has inbuilt two low noise
Op-amp.
2. Control Section: Arduino UNO is used for controlling whole the process of this student
attendance monitoring system project. The outputs of comparators are connected to digital
pin number 14 and 19 of arduino. Arduino read these signals and send commands to relay
driver circuit to drive the relay for light bulb controlling.
3. Display section: Display section contains a 128x64 LCD. This section will display the
counted number of people and light status when no one will in the room.
4. Relay Driver section: Relay driver section consist a BC547 transistor and a 5 volt relay for
controlling the light bulb. Transistor is used to drive the relay because arduino does not
supply enough voltage and current to drive relay. So we added a relay driver circuit to get
enough voltage and current for relay. Arduino sends commands to this relay driver transistor
and then light bulb will turn on/off accordingly.
The outputs of ultrasonic Sensor Modules are directly connected to arduino digital pin
number 14(A0) and 19(A5). And Relay driver transistor at digital pin 2. LCD is connected in
4 bit mode. RS and EN pin of LCD is directly connected at 13 and 12. Data pin of LCD D4-
D7 is also directly connected to arduino at D11-D8 respectively.
42
#include <LiquidCrystal.h>// initialize the library with the numbers of the interface pins
long dis_a=0,dis_b=0;
int person = 0;
//*******ultra_read*********
long time;
pinMode(pin_t,OUTPUT);
pinMode(pin_e,INPUT);
digitalWrite(pin_t,LOW);
delayMicroseconds(2);
digitalWrite(pin_t,HIGH);
delayMicroseconds(10);
time=pulseIn (pin_e,HIGH);
ultra_time = time / 29 / 2;
}void setup(){
pinMode(relay, OUTPUT);
lcd.begin(16, 2);
lcd.setCursor(0, 0);
lcd.clear();
Void loop () {
//*********
ultra_read(t_s1,e_s1,dis_a);delay(30);
ultra_read(t_s2,e_s2,dis_b);delay(30);
//*********
Serial.print("da:");Serial.println(dis_a);
Serial.print("db:");Serial.println(dis_b);
if(flag2==0){person = person+1;}
if(flag1==0){person = person-1;}
flag1=0, flag2=0;
delay(1000);
lcd.setCursor(0, 0);
44
lcd.print(person);
lcd.print(" ");
lcd.setCursor(0,1);
lcd.print("Light is ");
else{digitalWrite(relay,LOW); lcd.print("Off");}
1. Mount the ultrasonic sensors at the entry and exit points, ensuring they are aligned
properly to detect student or people.
2. Connect the components as per the circuit diagram, ensuring proper wiring and
connections.
3. Upload the code to the Arduino board using the Arduino IDE.
4. Power up the system and calibrate the thresholds for people counting and light control as
needed.
This project offers a practical solution for monitoring numbers of present student and
optimizing energy usage in various environments. By combining student counting with
automatic light control, the system enhances both user experience and energy efficiency.
With further refinement and customization, this project can be adapted for a wide range of
applications to meet specific requirements.
45
9. REFERENCES
[4] Erdem, H, "Design and implementation of data acquisition for fuzzy logic
controller", Industrial Technology, (2002). IEEE ICIT ('02. 2002) IEEE International
Conference on (11-14Dec. 2002) Page(s):199– 204 vol.1.
[6] Kadam Shah, Prakash Savaliya and Mitesh Patel, “Automatic Room Light
Controller With Bidirectional Visitor Counter,” International Journal of ICT Research
and Development (IJICTRD), Vol-1 Issue-4, ISSN: 2395-4841.
[7] Gaurav Waradhar, Hitesh Ramina, Vinay Maitry, Tejasvi Ansurkar, Asha Rawat
and Parth Das, “Automatic Room Light Controller With Bidirectional Visitor Counter,”
International Journal of Engineering Science and Computing (IJESC), March 2016.
[8]http://ww1.microchip.com/downloads/en/DeviceDoc/25093B.pdf.