Ultimate Automatic Lighting System Using Arduino L
Ultimate Automatic Lighting System Using Arduino L
by Smart Technology
In this project,We will set up an automatic lighting The main purpose of this project is to prevent loss of
system using arduino, so the ideas came when I tried current unnecessarily during day time and make the
to build automatic lighting system using arduino and system more efficient then before.
PIR motion sensor but I confronted big issue because
the light turn ON even if daytime,this is why I thought
to use LDR in order to solve this issue.
Hardware Supplies:
1. Arduino Uno ( any other arduino board will be just fine as long as it provides an Analogical pin ).
3. LDR (Photoresistor)
4. 10 KOhms resistor
5. Relay module
6. Lamp
7. Breadboard (optional)
Software Supplies:
1. Arduino IDE
The PIR sensor stands for Passive Infrared sensor. It A photoresistor (or light-dependent resistor, LDR,or
is a low cost sensor which can detect the presence of photo-conductive cell) is a light-controlled variable
Human beings or animals. There are two important resistor. The resistance of a photoresistor decreases
materials present in the sensor one is the pyroelectric with increasing incident light intensity.a photoresistor
crystal which can detect the heat signatures from a is made of a high resistance semiconductor. In the
living organism (humans/animals) and the other is a dark, a photoresistor can have a resistance as high
Fresnel lenses which can widen the range of the as several megohms (M ), while in the light,a
sensor. Also the PIR sensor modules provide us photoresistor can have a resistance as low as a few
some options to adjust the working of the sensor as hundred ohms.(Source : Wikipedia )
shown in above image.
To make the circuit assembly more easy I will 2.Connect the other LDR leg to the A4 pin Of Arduino
explained in Two parts : and also to the resistor
1. Arduino and LDR 3.Connect the (empty) resistor to the GND of the
The schematic is quite simple you should just follow Arduino.
the instructions bellow :
Note: You can see all the connections in the picture
1.Connect one of the LDR leg to the VCC (5v of the above.
Arduino).
https://youtu.be/UDEQ-l4gdAU
void setup()
Serial.begin(9600);
pinMode(LAMP, OUTPUT); // declare lamp as output
void loop() {
Serial.println(valeur_ldr);
Serial.println(valeur_pir);
delay(6000);
}
else {
}
}