-->
Notification texts go here Contact Us pelacakan

Automatic Room Lighting System

 Automatic Room Lighting System

Automatic Room Lighting System
 Automatic Room Lighting System

Introduction:

An automatic room lighting system is a convenient and energy-efficient way to manage lighting in a room. This system uses sensors to detect the presence of people in a room and adjust the lighting accordingly. By implementing such a system, energy can be saved by turning off lights when a room is unoccupied. Here's a simple design for an automatic room lighting system using passive infrared (PIR) sensors.

Components Required:

  1. Arduino Uno
  2. Passive Infrared (PIR) Sensor
  3. Relay Module
  4. Breadboard
  5. Jumper Wires
  6. LED Bulb
  7. 220V AC to 5V DC Power Supply

Circuit Diagram:

Working Principle:

The PIR sensor is used to detect the motion of people in the room. When it detects motion, it sends a signal to the Arduino Uno. The Arduino Uno then triggers the relay module to turn on the light. If no motion is detected for a certain period, the Arduino will turn off the light via the relay module.

Arduino Code:

cpp
// Pin Definitions 
const int pirSensorPin = 2; // PIR sensor connected to digital pin 2 
const int relayPin = 3; // Relay module connected to digital pin 3 // Variables
int pirState = LOW; // Variable to store PIR sensor status 
int relayState = LOW; // Variable to store relay status 
void setup() { // Initialize the digital pin as an output 
pinMode(relayPin, OUTPUT); // Initialize the digital pin as an input
pinMode(pirSensorPin, INPUT); // Initialize Serial Communication 
 Serial.begin(9600); } void loop() { // Read PIR sensor value 
 pirState = digitalRead(pirSensorPin); // Check if PIR sensor is triggered
if (pirState == HIGH) { // Motion detected, turn on the light 
digitalWrite(relayPin, HIGH); relayState = HIGH; Serial.println("Motion Detected!"); delay(1000); // Delay to avoid multiple detection
else { // No motion detected, turn off the light 
digitalWrite(relayPin, LOW); relayState = LOW; } }

Assembly:

  1. Connect the PIR sensor to digital pin 2 of the Arduino Uno.
  2. Connect the relay module to digital pin 3 of the Arduino Uno.
  3. Connect the LED bulb to the relay module.
  4. Power the Arduino Uno using a 5V power supply.
  5. Place the PIR sensor in a suitable location in the room where it can detect motion effectively.

Conclusion:

An automatic room lighting system is an effective way to conserve energy and provide convenience by automatically turning on the lights when someone enters a room and turning them off when the room is vacant. This project can be extended further by integrating Bluetooth or Wi-Fi modules to control the lighting system remotely via a smartphone or computer.

Post a Comment

Cookie Consent
We serve cookies on this site to analyze traffic, remember your preferences, and optimize your experience.
Oops!
It seems there is something wrong with your internet connection. Please connect to the internet and start browsing again.
AdBlock Detected!
We have detected that you are using adblocking plugin in your browser.
The revenue we earn by the advertisements is used to manage this website, we request you to whitelist our website in your adblocking plugin.
Site is Blocked
Sorry! This site is not available in your country.