Introduction: Automatic LED ON and OFF Using LDR and Arduino

This is a simple project based on LDR's principal to turn on LED when it's dark and turn off when is light using Arduino UNO R3.

Step 1: Components Required

1. Arduino Uno

2. LED

3. LDR (photoresistor)

4. 220 and 10k ohm resistors

5. Male to Male Jumper Wires

6. Breadboard

Step 2: LED and LDR Connection

1. LED is Connected to the breadboard.

2. LDR is Connected to the breadboard.

Step 3: Resistors Connection

1. Resistor of 220 ohm one leg is attached to LED's long leg.

2. Resistor of 10k ohm is attached to LDR's one leg.

Step 4: Wire Connections

LED PART

1. The green wire is attached to resistor's another leg

2. The orange wire is attached to LED short leg

LDR PART

1. The yellow wire is attach to LDR in the same resistor column. The blue wire is attached to resistor's empty leg and

2. The red wire is attached to LDR another leg.

Power Rail section:

1. The other terminal of the orange wire is connected to power rail section in the Breadboard.

2. Blue wire's other terminal is connected to same power rail in the Breadboard.

3. Brown wire is connected in the same row where Blue and Orange wire is connected in Power rail.

Step 5: ​Arduino Connections

1. The green wire is connected to digital pin 3 from resistor leg.

2. The brown wire is connected to GND from power rail.

3. The Red wire is connected to +5V pin from LDR.

4. The yellow wire is connected to A0 pin.

Step 6: Arduino Code

Arduino IDE

Step 7: THANK YOU!