Skip to main content

Automatic Night Lamp using arduino

 Project Name:- Automatic night lamp.
 I am going to make automatic night lamp using Arduino. For this we need some hardware component named as below

  1. Arduino
  2. Computer
  3. Led
  4. LDR sensor
  5. Resister(2.2k)
  6. USB cable 

And a software named Arduino Ide in computer.
This project is based on the LDR[light dependence resistor] sensor whose value is dependent on the light i.e its value is high during the night time and low during day time.
 The voltage divider circuit is made in the analog input of arduino between  LDR and 2.2k resistor provided 5v power supply.A voltage divider is a simple circuit which turns a large voltage into a smaller one. Using just two series resistors and an input voltage, we can create an output voltage that is a fraction of the input. Voltage dividers are one of the most fundamental circuits in electronics.
program coding 
int led =13;
int ldr = A0;
void setup()
{ pinMode(led,OUTPUT);
   pinMode(ldr,INPUT);
   Serial.begin(9600);
}// to establish the serial communation between arduino and computer.
void loop()
  int value = analogRead(ldr); // to read the analog value of the sensor
{
   Serial.println(value);
   // to print the serial value in  serial monitor
  if (value>500)  
 {
  digitalWrite(led,HIGH);
 }
else
 {
 digitalWrite(led,LOW);
}
}
}
during the day time the value of the LDR is low  that means the value is less than 500 so the led is off but during the night time value of the sensor is high that means the value is greater than 500 so the led is turn on.
This is the sample of automatic night lamp.

Popular posts from this blog

Multiple mcp23017 interfacing with Arduino

MCP23017 is the I/O port extender that runs on 12C. It is 16-bit I/O expender.in this tutorial we are going to interface the single and multiple  mcp23017 with arduino.  fig:- mcp32017 module IT has 16 I/O ports from PA0 to PA7 and PB0 to PB7. first of all we are going to interface the single mcp23017 with Arduino. For this  connect the circuit as shown on figure. Download the library for mcp23017  from  sketch-- include library -- manage libraries.

warm clothes distribution program

‘ Small step can make a big difference ’ Rural Women Development Centre from morang,Nepal distributed the warm clothes to the needy people. They manage it possible by collecting fund from working staffs and management committe. Here is the video link of the distribution program. https://youtu.be/AxaHbivcQUM

Top 10 sites for free stock images and videos in 2023.

Visual content is a crucial element in any successful online presence, whether it’s a website, blog post, or social media platform. However, creating high-quality images and videos can be expensive and time-consuming. Fortunately, there are many websites that offer free stock images and videos to help you elevate your content without breaking the bank. In this article, we will discuss the top 10  sites for free stock images and videos in 2023. Unplash Pexels Pixabay Freestocks.org Burst StockSnap Gratisography Kaboompics Reshot PicJumbo  Unplash Unsplash offers a large collection of free high-resolution photos so, it is popular choice for many content creators due to its extensive library of high-quality stock images. The platform offers a wide variety of photos, including images of nature, people, and architecture, making it a great choice for many types of projects. Unsplash also allows users to download and use the images for both pers...