top of page

Smart Lighting System - Arduino - Controlling an LED & Buzzer using LDR Sensor

Updated: Apr 6

Efficient energy utilization plays an important role in sustainable economic development. For high-efficiency and reliability, LED is already a winner in lighting technology. Adding smartness to LEDs further boost its superiority. Smart Lighting System is a basic automation technology to reduce energy consumption and to prevent wastage of resources.


In this article, we will see how to make a Smart Lighting System using the LDR sensor.


Hardware Components :


The following hardware components are required for designing the circuit -

Required components
Components Required

Breadboard :

breadboard
Breadboard

They are basically a construction base used for prototyping electronic circuits. Breadboards allow us to make quick connections between hardware components, without soldering.


Buy Breadboard from here.


Arduino UNO :

microcontroller - Arduino UNO
Arduino UNO

#Arduino UNO is an open-source microcontroller board containing a set of digital, analog pins, power pins, and interfaces for serial communication and USB (Universal Serial Bus) ports. Arduino boards are used to read inputs like light on a sensor and turn it into an output.


Buy Arduino UNO from here.


LDR Sensors :

LDR sensors
LDR Sensors

#LDR ( Light Dependent Resistors ), also known as #photoresistors has a variable resistance that changes with the change in light intensity falling on it. It is inexpensive and mainly used to detect light levels in the automated lighting system.


Buy LDR Sensors from here.


Jumper Wires :


jumper wires
Jumper Wires

Jumper wires are the connecting wires that have connector pins at each end, allowing them to be used to connect the two points without soldering. They typically come in three versions - male-to-male, male-to-female, and female-to-female.


Buy Jumper Wires from here.


LEDs :

Light Emitting Diodes
LEDs

#LEDs ( Light Emitting Diodes ) are semiconductor devices that emit light whenever current flows through them. It consists of two leads - Cathode and Anode. Cathode lead is smaller as compared to the anode.


Buy LEDs from here.


Resistors :


220-ohm Resistor
220-ohm Resistor
10 k-ohm Resistor
10 k-ohm Resistor

#Resistors are passive two-terminal devices used to limit the amount of current flow in the circuit. For this project design, we will be using 1k ohm and 220-ohm resistors. They protect the sensor from the high electricity flow.


Buy Resistance box from here.


Buzzer :

buzzer
Buzzer

A #buzzer is a small and compact two-pin structure consisting of a positive ( longer terminal lead ) and a negative pin ( short terminal lead ). It is an audio signaling device mainly used to alarm the user with something important.


Buy Buzzer from here.


Softwares :


Arduino IDE :


Arduino Integrated Development Environment ( IDE ) is open-source software that facilitates the development and uploading of codes to the microcontroller. Program written in Arduino IDE is called Sketch. These Sketch files are saved with the file extension ino.


Here is the link to download the software


Circuit Connections :


The circuit connections are as shown in the figure below -



  1. The positive side of Buzzer is connected to pin 12 of the Arduino Board while the negative side is connected to the ground.

  2. The positive side of the LED pin is connected to a 220-ohm resistor while the other terminal of the resistor is connected to pin12 of the Arduino.

  3. GND ( Ground ) pin of the Arduino is connected to the ground of #Breadboard.

  4. One side of the LDR is connected to +5V of the Arduino Board, and another side is connected to a 10k ohm resistor as well as the A0 pin of the Arduino board.

  5. The other terminal of the 10k ohm resistor is connected to the ground of Arduino.


Code :



Note: Do not forget to change the file extension to .ino(Arduino IDE) file format before you upload the code to Arduino Board.


Once the hardware connections are completed and the code is written, connect the Arduino board to the system via USB cable. Now, upload the code to the board and then Run.


Working:


The working principle of the #Smart lighting system is based on the principle of photoconductivity, which states that the conductivity of the LDR varies according to the absorption of light. Whenever the LDR value reaches a threshold value ( 500 in this case ), the LED turns ON and the buzzer beeps.


Do watch the video given below to get a better idea of the Smart #Lighting System through practical implementation.


Video By - Abhishek Goud


This article demonstrates a #prototype of a Smart Lighting System in which we control the lights of a room depending on the intensity of light. The smart lighting system is no doubt an #innovation with many future #applications apart from street lights, headlights, and industrial lights.

 

See Also :


Related Posts

See All

2 Comments


Anushka Gupta
Anushka Gupta
Jul 31, 2023

Learn Electronics India deserves a round of applause for this blog. It's well-written, informative, and inspiring. I'm excited to delve deeper into Arduino and smart systems, all thanks to this amazing post.

Like

LearnElectronics India simplifies complex concepts beautifully. Thank you!

Like
bottom of page