Design And Construction Of An Automatic Room Lights Using Arduino And PIR Sensor

This work is on an Automatic Room Lights using Arduino and PIR Sensor, where the lights in the room will automatically turn ON and OFF by detecting the presence of a human.

This Automatic Room Lights can be implemented in your garages, staircases, bathrooms, etc. where we do not need continuous light but only when we are present. Also, with the help of an automatic room light control system, you need not worry about electricity as the lights get automatically off when there is no person. The aim of this work is to build a device that lights in the room will automatically turn on upon detecting a human motion and stay turned on until the person has left or there is no motion.

TABLE OF CONTENTS

COVER PAGE

TITLE PAGE

APPROVAL PAGE

DEDICATION

ACKNOWELDGEMENT

ABSTRACT

CHAPTER ONE

1.0      INTRODUCTION

1.1      BACKGROUND OF THE PROJECT

  • PURPOSE OF THE PROJECT
  • AIM OF THE PROJECT
  • OBJECTIVE OF THE PROJECT
  • PURPOSE OF THE PROJECT
  • LIMITATION OF THE PROJECT
  • ADVANTAGES OF THE PROJECT
  • PROBLEM OF THE PROJECT
  • APPLICATION OF THE PROJECT
  • RESEARCH QUESTION
  • PROJECT ORGANISATION

CHAPTER TWO

LITERATURE REVIEW

  • OVERVIEW OF THE STUDY
  • REVIEW OF THE RELATED STUDY

 

CHAPTER THREE

3.0     CONSTRUCTION METHODOLOGY

3.1      BASIC OF THE SYSTEM

3.2     BLOCK DIAGRAM OF THE SYSTEM

3.3      SYSTEM OPERATION

3.4      CIRCUIT DIAGRAM

3.5      CIRCUIT DESCRIPTION

3.6     DESCRIPTION OF COMPONENTS USED

3.7      POWER SUPPLY UNIT

CHAPTER FOUR

4.0      TESTING AND RESULTS

  • CONSTRUCTION PROCEDURE AND TESTING
  • INSTALLATION OF THE COMPLET DESIGN
  • ASSEMBLING OF SECTIONS
  • TESTING OF SYSTEM OPERATION
  • COST ANALYSIS

CHAPTER FIVE

  • CONCLUSION
  • RECOMMENDATION
  • REFERENCES

Keyword:  automatic room light controller using arduino pdf, automatic room light controller using arduino and pir sensor, automatic staircase light using pir sensor, automatic room light control using pir sensor arduino, automatic room light controller using arduino and ir sensor, automatic room light using arduino and pir sensor, home automation using pir sensor and arduino, automatic room light control upon human presence pdf

So, in this DIY project, we have implemented Automatic Room Lights using Arduino and PIR Sensor.

Table of Contents

  • Overview
  •  Circuit Diagram of Automatic Room Lights using Arduino
  • Components Required for Automatic Room Lights using Arduino
  • Component Description
    • PIR Sensor
    • Relay Module
  • Circuit Design
  • Code
  • Working of the Project
  • Applications

Overview

Automatic Room Lights System using Arduino is a very useful project as you need not worry about turning on and off the switches every time you want to turn on the lights. The main components of the Automatic Room Lights project are Arduino, PIR Sensor and the Relay Module.

Out of the three components, the PIR Sensor is the one in focus as it is the main device that helps in detecting humans and human motion.

In fact, the Automatic Room Lights project can be considered as one major application of the PIR Sensor. A similar concept is being already implemented in automatic toilet flush valves, hand dryers, etc.

Also Read: ARDUINO PIR SENSOR TUTORIAL

 Circuit Diagram of Automatic Room Lights using Arduino

The following image shows the circuit diagram of the project implemented using Arduino UNO, PIR Sensor and a Relay Module.

If you do not have a relay module, you can make one yourself using very simple hardware. The following circuit diagram shows the project being implemented with the help of discrete components for the Relay Module.

CAUTION: The project involves connection with 230V AC Mains (or 110V, depending on where you live!!!). Be extremely careful when connecting the bulb and Relay to mains supply. If you are unfamiliar with the connections, I strongly recommend having an adult supervision (or an expert supervision).

Components Required for Automatic Room Lights using Arduino

  • Arduino UNO [Buy Here]
  • PIR Sensor [Buy Here]
  • 5V Relay Module (Relay Board) [Buy Here]
  • LED [Buy Here]
  • 100Ω Resistor (1/4 Watt)  [Buy Here]
  • Connecting Wires [Buy Here]
  • Breadboard [Buy Here]
  • Power Supply [Buy Here]

If you do not have a Relay Module, use the following components:

  • 5V Relay
  • 2N2222 (or BC547) NPN Transistor [Buy Here]
  • 1N4007 PN Junction Diode [Buy Here]
  • 1KΩ Resistor (1/4 Watt) [Buy Here]

Component Description

PIR Sensor

We have already seen about PIR Sensor in the PIR Motion Sensor Tutorial and also implemented in a variety of projects like Home Security System and Automatic Door Opener.

Relay Module

A Relay Module is a very useful component as it allows Arduino, Raspberry Pi or other Microcontrollers to control big electrical loads. We have used a 2-channel Relay Module in this project but used only one relay in it. The relay module used in this project is shown below.

In order to control a single relay on the board, we need to use three pins of the relay module: VCC, GND and IN1.

Before continuing, read How to use 5V Relay on Arduino

NOTE: The relay module used in this project is as active LOW one i.e. when the IN1 pin is HIGH, the relay is OFF and when it is LOW, the relay is activated. This point is important while programming the Arduino UNO.

Circuit Design

PIR Sensor’s Data OUT Pin is connected to Arduino’s Digital I/O Pin 8. An LED is connected to pin 13 of Arduino to indicate whether the light is turned ON or OFF.

The IN1 pin of the Relay Module is connected to Pin 9 of Arduino. A bulb is connected to mains supply through relay. One terminal of the bulb is connected to one wire of the mains supply. The other terminal of the bulb is connected to the NO (Normally Open) contact of the Relay Module.

COM (Common) contact of the Relay is connected to the other wire of the mains supply. Be careful when connecting this part of the project.

 

Code

The code for the Automatic Room Lights using Arduino and PIR Sensor is given below.

int in1 = 9;

 

int sensor = 8;

 

int led = 13;

 

unsigned long t=0;

 

 

void setup()

 

{

 

Serial.begin(9600);

 

pinMode(in1, OUTPUT);

 

pinMode(sensor, INPUT);

 

pinMode(led, OUTPUT);

 

 

digitalWrite(in1,HIGH);

 

digitalWrite(led,LOW);

 

 

while(millis()<13000)

 

{

 

digitalWrite(led,HIGH);

 

delay(50);

 

digitalWrite(led,LOW);

 

delay(50);

 

}

 

digitalWrite(led,LOW);

 

 

}

 

 

 

void loop()

 

{

 

digitalWrite(in1,HIGH);

 

digitalWrite(led,LOW);

 

if(digitalRead(sensor)==HIGH)

 

{

 

t=millis();

 

while(millis()<(t+5000))

 

{

 

digitalWrite(in1,LOW);

 

digitalWrite(led,HIGH);

 

if((millis()>(t+2300))&&(digitalRead(sensor)==HIGH))

 

{

 

t=millis();

 

}

 

}

 

}

 

}

view raw Automatic_Room_Lights_Arduino.ino hosted with by GitHub

Working of the Project

The Automatic Room Lights using Arduino and PIR Sensor is a simple project, where the lights in the room will automatically turn on upon detecting a human motion and stay turned on until the person has left or there is no motion.

Working of this project is very simple and is explained here.

Initially, when there is no human movement, the PIR Sensor doesn’t detect any person and its OUT pin stays LOW. As the person enters the room, the change in infrared radiation in the room is detected by the PIR Sensor.

As a result, the output of the PIR Sensor becomes HIGH. Since the Data OUT of the PIR Sensor is connected to Digital Pin 8 of Arduino, whenever it becomes HIGH, Arduino will activate the relay by making the relay pin LOW (as the relay module is an active LOW module).

This will turn the Light ON. The light stays turned ON as long as there is movement in front of the sensor.

If the person takes a nap or leaves the room, the IR Radiation will become stable (there will be no change) and hence, the Data OUT of the PIR Sensor will become LOW. This in turn will make the Arduino to turn OFF the relay (make the relay pin HIGH) and the room light will be turned OFF.

Applications

I’ve already mentioned a few applications of the Automatic Room Lights concept. Some of them are:

  • Garage Lights
  • Bathroom Lights
  • Hand Dryers
  • Toilet Flushers
  • Security Lights
APA

Design And Construction Of An Automatic Room Lights Using Arduino And PIR Sensor. (n.d.). UniTopics. https://www.unitopics.com/project/material/design-and-construction-of-an-automatic-room-lights-using-arduino-and-pir-sensor/

MLA

“Design And Construction Of An Automatic Room Lights Using Arduino And PIR Sensor.” UniTopics, https://www.unitopics.com/project/material/design-and-construction-of-an-automatic-room-lights-using-arduino-and-pir-sensor/. Accessed 23 November 2024.

Chicago

“Design And Construction Of An Automatic Room Lights Using Arduino And PIR Sensor.” UniTopics, Accessed November 23, 2024. https://www.unitopics.com/project/material/design-and-construction-of-an-automatic-room-lights-using-arduino-and-pir-sensor/

WORK DETAILS

Here’s a typical structure for Design And Construction Of An Automatic Room Lights Using Arduino And PIR Sensor research projects:

  • The title page of Design And Construction Of An Automatic Room Lights Using Arduino And PIR Sensor should include the project title, your name, institution, and date.
  • The abstract of Design And Construction Of An Automatic Room Lights Using Arduino And PIR Sensor should be a summary of around 150-250 words and should highlight the main objectives, methods, results, and conclusions.
  • The introduction of Design And Construction Of An Automatic Room Lights Using Arduino And PIR Sensor should provide the background information, outline the research problem, and state the objectives and significance of the study.
  • Review existing research related to Design And Construction Of An Automatic Room Lights Using Arduino And PIR Sensor, identifying gaps the study aims to fill.
  • The methodology section of Design And Construction Of An Automatic Room Lights Using Arduino And PIR Sensor should describe the research design, data collection methods, and analytical techniques used.
  • Present the findings of the Design And Construction Of An Automatic Room Lights Using Arduino And PIR Sensor research study using tables, charts, and graphs to illustrate key points.
  • Interpret Design And Construction Of An Automatic Room Lights Using Arduino And PIR Sensor results, discussing their implications, limitations, and potential areas for future research.
  • Summarize the main findings of the Design And Construction Of An Automatic Room Lights Using Arduino And PIR Sensor study and restate its significance.
  • List all the sources you cited in Design And Construction Of An Automatic Room Lights Using Arduino And PIR Sensor project, following a specific citation style (e.g., APA, MLA, Chicago).