Smart Lighting System
3402 61
Shruti Vij

Smart Lighting System

PROJECT PITCH I have implemented this project as it has a variety of applications nowadays, and it...

Description:-

PROJECT PITCH I have implemented this project as it has a variety of applications nowadays, and it can be further extended to build more and more special features and can provide a large number of Automation functionalities In this project, we have the SMART STREET LIGHT SYSTEM, A AUTOMATIC LIGHT SYSTEM, and a SMART LIGHT SYSTEM that can be controlled from anywhere in the world. SMART STREET LIGHT - When the LDR sensor detects the Darkness in the environment, it will turn on the light, this can be widely used in smart cities to implement the SMART STREET LIGHT SYSTEM. Smart street lights are one of the street lighting solutions. Along Roads & Highways – High-quality automatic street light systems can enhance night-time visibility on rural roads, main roads & highways. These are also very easy to install & are affordably priced AUTOMATIC SMART LIGHT SYSTEM - Whenever any person entered the room, it will automatically turn on the Light. We have another light that can be controlled with the help of the Blynk app so that we can control our lights remotely with the help of the Blynk Application

Project Used Hardware

Smart Lighting System Hardware

NodeMCU ( ESP8266 ), Arduino UNO, A Light Dependent Resistor (LDR), Ultrasonic Sensor, LED Lights, Jumper Wires

Project Used Software

Smart Lighting System Hardware

Arduino IDE and Blynk Cloud

Project Hardware Software Selection

Smart Lighting System Hardware

Node MCU is selected because we have connected the project to the Blynk cloud to operate it remotely, for this, we needed wifi so, NodeMCU provided us the ESP8266 module we have used the Arduino for the functionality of those sensors, those do not need the wifi to operate..they can be considered as embedded systems only I have used the LDR and Ultrasonic sensor to detect the darkness and the object presence respectively. With the help of these two sensors, I have created a smart street light and Automatic lights for the home.

Circuit Diagram

Circuit Diagram

As shown in the image, we have two microcontrollers Node MCU and ARDUINO UNO Nodemcu is connected to the Blynk cloud and the LED light so that it can be controlled by the Blynk cloud And Arduino is connected to the ultrasonic sensor and this sensor is connected to the LED via Arduino so that when any person comes, it can turn the light ON. Arduino is connected to the LDR sensor and this sensor is connected to the LED via Arduino so that when it detects the darkness, it can turn the street light ON and when it detects light it turns the Light OFF.

Code

#define BLYNK_PRINT Serial

#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>

char auth[] = "YourAuthToken";

char ssid[] = "YourNetworkName";
char pass[] = "YourPassword";

void setup()
{
  // Debug console
  Serial.begin(9600);

  Blynk.begin(auth, ssid, pass);
}

void loop()
{
  Blynk.run();
}

----------------------------------------------------------------------------------------------------------------------

int ldr=A0;
const int trigPin = 10;
const int echoPin = 11;
int led1 = 6;//ultrasonic connected
int led2 = 3;//ldr connected

int value=0;
long duration;
int distance;

void setup() {
Serial.begin(9600);
pinMode(led2,OUTPUT);
pinMode(trigPin, OUTPUT);
pinMode(echoPin, INPUT);
pinMode(led1, OUTPUT);
}

void loop()
{
digitalWrite(trigPin, LOW);
delayMicroseconds(2);
digitalWrite(trigPin, HIGH);
delayMicroseconds(10);
digitalWrite(trigPin, LOW);
duration = pulseIn(echoPin, HIGH);
distance= duration*0.034/2;
value=analogRead(ldr);
Serial.println(distance);
Serial.println(value);
if(distance<8)
{
  digitalWrite(led1, HIGH);
}            
else
{
  digitalWrite(led1, LOW);
}    
if(value>900)
{
  digitalWrite(led2,HIGH);
}
else 
{
  digitalWrite(led2,LOW);
}
}