0% found this document useful (0 votes)
18 views4 pages

JMESTN42353243

Uploaded by

Manjusagar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views4 pages

JMESTN42353243

Uploaded by

Manjusagar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

Journal of Multidisciplinary Engineering Science and Technology (JMEST)

ISSN: 2458-9403
Vol. 6 Issue 12, December - 2019

Microcontroller Based Automatic Room Light


Controller and Visitor Counter: Design and
Construction
Ryan Greene
School of Undergraduate Studies Excelsior
College, Albany, NY 12203, USA
greenerbg@gmail.com

Sohail Anwar
Division of Business, Engineering, and Information System Technology Penn
State University, Altoona College Altoona, PA 16601, USA sxa15@psu.edu

Patrick Favier
Department of Electrical Engineering
IUT Bethune, Universite d’ Artois, Bethune, France
Patrick.favier@univ-artois.fr

Abstract – The key objective of green efficiently is the lighting mechanism in the building.
building is energy saving. Energy saving plan for Energy loss occurs when the lighting system in a
green buildings depends on the efficient use of building illuminates an area where no one is present, and it
three main systems; lighting, heating, and is not being used [2]. When the light switch is operated
cooling. The project described in this manuscript manually, there is a chance of keeping the lights in an area
is related to the lighting system. To achieve in ON state even though it may not be needed during that
energy saving lighting, a microcontroller based time. Therefore, a microcontroller based automated room
automated room light control system with a light controller with a visitor counter is proposed here.
visitor counter is proposed here. The control
This system is designed to control the room lights in
system uses infrared sensors to determine when
addition to counting the number of persons/visitors in the
a person enters or exits a room and counts the
room with accuracy. A microcontroller serves as the
number of people in the room. When a person
central processing unit (CPU) for this system. The
enters the room, the light turns on automatically
microcontroller receives signals from multiple sensors.
and the system adds one to the current person
These signals are operated upon by the code stored in the
count. As more people enter the room, a display
microcontroller-based system memory.
shows the number of people in the room. When
the counter goes down to zero, the light turns off. 2. DESIGN
The manuscript presents the design and
construction details for the microcontroller based
automatic room light controller and visitor
counter.

Keywords—green building; energy saving;


lighting system; microcontroller
1. INTRODUCTION

In comparison with conventional buildings, green


buildings focus on the efficient use of resources, such as,
water and material, and provide better lighting and
ventilation [1]. For energy saving in green buildings, one Fig. 1: The functional block diagram
of the key systems to perform

www.jmest.o
JMESTN423532 1
Journal of Multidisciplinary Engineering Science and Technology (JMEST)
ISSN: 2458-9403
Vol. 6 Issue 12, December - 2019

The functional block diagram for the automated room 2.3 Infrared (IR) Sensors
light controller is presented in Figure 1. The key
components of the system are shown in this block
diagram. The microcontroller interfaces with two (2)
infrared sensors, a display, relays, and LEDs. Each of
the functional blocks is described here.

2.1 Power Supply

The power supply circuit for this control system


accepts 120 volts at 60 Hz through a transformer to step
down the voltage to 24 volts AC. This voltage is supplied
to a full rectifier and smoothing capacitor and then to a
7812 voltage regulator. The regulated 12-volt output of the
voltage regulator powers an LED and then it goes through
a 7805 voltage regulator to produce a 5-volt output which
is used to power the microcontroller, the sensors, the LCD,
and the relay circuit.

2.2 Microcontroller

Fig. 3: Infra Red sensor module

To detect if someone enters or leaves the room, IR


sensor module is used. The module consists of an IR LED,
photodiode, and LM358 operational amplifier. The
schematic for the IR sensor module is presented in Figure
3.

2.4 Relay Circuit

Fig. 2: Microcontroller development board

The microcontroller used as a CPU for this system is


an MSP430G2553 ultra low power mixed signal controller
with built-in 16-bit timers and up to 24 I/O capacitive-
touch enabled pins. It has a 16-bit R1SC architecture with Fig. 4: Relay circuit
62.5 ns instruction cycle time and it supports up to 16
The relay switch circuit controls the LED light.
MHz internal frequency. More information regarding this
An NPN relay switch circuit is used for this lighting
microcontroller is provided in [3]. The microcontroller
control system. This circuit accepts digital input and
development board is shown in Figure 2.
employs a BC337 NPN transistor which activated the relay
to turn ON the LED lights with a 12-volt DC power
supply. Figure 4 depicts the schematic for the relay circuit.

www.jmest.o
JMESTN423532 2
Journal of Multidisciplinary Engineering Science and Technology (JMEST)
ISSN: 2458-9403
Vol. 6 Issue 12, December - 2019

2.5 LCD Display 5. Output the Visitor count to the LCD


6. If the visitor count is more than 1 then go to
step 6 else go to step 9
7. Set Port 1.0 to high
8. Go to step 11
9. Set Port 1.0 to low
10. Set visitor count to zero
11. If Interrupt on Port 1.1
12. Increment Visitor counter by 1
13. In Interrupt on Port 1.2
14. Decrement visitor counter by 1
15. Go to step 5.
16. End Program

The flow chart for the above-mentioned programming


steps is provided in Figure 6. The coding for this system is
done using the Texas Instruments Code Composer Studio.
More information regarding the Code Composer Studio is
provided in [4]. To get the LCD function effectively, Port
2 of the microcontroller was used as the main driver for
the LCD. The code to accomplish this step is listed in [5].
Fig 5: LCD display The code is provided in the APPENDIX.

The LCD display is a simple display that outputs the 4. CONCLUSION


number of persons entering the room. This information is
processed from the microcontroller, MSP430G2553. The This manuscript presents the design and construction
LCD is a 16x2 display which is connected to Port 2 of the details for a reliable microcontroller- based control system
microcontroller. The schematic for the connection of the that performs the task of controlling the room lights as
display to the microcontroller is shown in Figure 5. well as counting the number of persons/visitors in the
room. An LCD display shows the number of
3. PROGRAMMING people/visitors who enter the room. The microcontroller
continuously monitors the infrared sensors. The code
programmed in the system memory makes the
microcontroller turn the room lights ON and OFF
automatically.

REFERENCES

[1] Green Buildings and Energy Efficiency


https://doi.org/10.13140/rg.2.1.3950.9362
[2] K. Mehrotra, S. A. Khan and S. K. Pawar,
“Automatic room light controller using
microcontroller and visitor counter,” International
Journal of Research in Engineering and Technology,
Fig. 6: Flowchart pp. 69-72, 2016.
[3] MSP430G2553 – 16 MHz MCU
The microcontroller is programmed to attain the
www.ti.com/product/MSP430G2553
following steps:
[4] Code composer Studio (CCS) Integrated
1. Initialize the Visitor count to zero Development Environment (IDE)
2. Enable port 2 for LCD display and Port 1.0 as www.ti.com/tool/CCSTUDIO
output; [5] EE 3376 Lab 5.
3. Set Port 1.1 and Port 1.2 to input http://www.ece.utep.edu/courses/web3376/
4. Enable interrupts of Port 1.1 and Port 1.2 Lab_5_-_LCD.html

www.jmest.o
JMESTN423532 3
Journal of Multidisciplinary Engineering Science and Technology (JMEST)
ISSN: 2458-9403
Vol. 6 Issue 12, December - 2019

APPENDIX

www.jmest.o
JMESTN423532 4

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy