This project for Automatic Street Light Circuit using Arduino how street light can think smart.
Light will turn ON when night come.
Light will turn OFF when sun come.
No need of a human to press switch.
Arduino and LDR do all work automatic.
It save power and make street more smart.
Simple idea but very useful for city and village both.
Arduino Coding:
int sensorPin = A0;
int ledPin = 13;
int sensorValue = 0;
void setup() {
pinMode(ledPin, OUTPUT);
Serial.begin(9600);
}
void loop() {
sensorValue = analogRead(sensorPin);
Serial.println(sensorValue);
if(sensorValue < 500) {
digitalWrite(ledPin, HIGH);
} else {
digitalWrite(ledPin, LOW);
}
delay(100);
}Coding Explanation:
- A0 pin reads value from LDR sensor.
- If value is less than 500 means dark and LED turns ON.
- If value is more than 500 means light and LED turns OFF.
- Serial monitor shows light level in number.
- Delay gives small pause between readings.
Circuit Working:

Parts List:
| Component Name | Quantity |
|---|---|
| Resistors 10k and 330Ω | 1 each |
| LDR | 1 |
| Arduino UNO | 1 |
| LED any color | 1 |
In the above circuit diagram.
LDR changes its resistance with light.
In bright light resistance is low and gives high voltage to Arduino.
In dark the resistance is high and voltage becomes low.
Arduino reads this change and controls LED.
LED now has one extra resistor 330Ω.
This resistor just controls LED brightness and saves it from damage.
When it is night the light glows.
And when it is day the light goes OFF automatically.
Formula with Calculation:
LDR and resistor make a voltage divider.
Vout = (R2 / (R1 + R2)) × Vin
here,
- R1 is LDR
- R2 is 10k resistor.
This formula gives voltage at A0 pin.
For LED we can calculate resistor value using:
R = (Vsource – Vled) / Iled
here,
R = (5 – 2) / 0.01 = 300Ω
So nearest standard resistor used in this circuit is 330Ω.
How to Build:
To build a Automatic Street Light Circuit using Arduino follow the below steps:
- Gather all the parts as shown in circuit diagram.
- LDR one end connect to 5V of Arduino.
- Other end of LDR connect to A0 pin and one side of 10k resistor.
- Other side of 10k resistor goes to GND.
- LED positive leg connect to pin 13 through 330Ω resistor.
- LED negative leg goes to GND.
- Arduino powered by USB or adapter.
Conclusion:
Automatic Street Light Circuit using Arduino saves power.
It works without human help.
Its useful for highways, gardens and streets.
Arduino makes control simple and automatic.
System works day and night based on light sensor.
Leave a Reply