Automatic Night Lamp With Dual Modes

by ___harsha___ in Circuits > Arduino

21 Views, 0 Favorites, 0 Comments

Automatic Night Lamp With Dual Modes

IMG_0683.PNG

i made an Automatic Night Lamp With Dual Modes using Arduino. It is a simple and efficient project for smart lighting control. Normally, in such projects, there are two major modes of operation: Automatic Mode and Manual Mode.

Auto Mode:

In this mode, the lamp automatically switches itself ON/OFF according to the detected ambient light by the LDR. An Arduino reads the values from the LDR via an analog input. In case of low ambient light-that is, at night or during dark conditions-the Arduino will turn the light ON by either directly powering an LED or triggering a relay that controls a higher power lamp. Whereas, when ample light is detected, it will switch the light OFF.

Manual Mode:

It will be full manual mode: the user is in full control of the light through a push button or any other available type of manual input. A click on the button would change the light state from ON to OFF or vice versa, and this state would be independent of automatic control by LDR. Manual mode provides flexibility if the user would like to override the automatic operation to suit specific situations.

lets get into in!!

Downloads

Supplies

IMG_0684.jpg
  1. Microcontroller (Arduino Uno)
  2. USB Cable
  3. LDR Sensor Module
  4. LED
  5. Resistor
  6. Breadboard
  7. Jumper Wires

Screenshot 2024-09-12 172247.png

Step 1: Gather Required Components


  1. mentioned above


Step 2: Build the Circuit


Connect the LDR:

  1. Place the LDR on the breadboard.
  2. Connect one leg of the LDR to 5V on the Arduino.
  3. Connect the other leg of the LDR to Analog Pin A0 on the Arduino

Connect the LED (or Relay):

  1. Place the LED on the breadboard (longer leg is positive, shorter leg is negative).
  2. Connect the positive leg of the LED to Digital Pin 13 on the Arduino through a 220Ω resistor.
  3. Connect the negative leg to GND.
  4. If using a relay, follow the relay's instructions to connect it to Pin 13 and control the lamp.

Step 3: Write the Code