Introduction: Arduino Light Intensity Lamp

This project is a lamp that will automatically turn on when it is dark.

Step 1: Gather Materials

The materials you will need to create this circuit:

- Arduino Micro Controller (1x)

- LDR /Photoresistor (1x)

- Lightbulb (1x)

- Relay (1x)

- 1k Ohm resistor (1x)

- Breadboard (1x)

- Power Source (1x)

Step 2: Configure the Circuit

Below, the connections that need to be made are listed. You can also use the photo above for reference.

- GND pin (Arduino) to ground rail (breadboard)

- 5V pin (Arduino) to power rail (breadboard)

- pin A0 to the LDR

- ground (breadboard) to LDR

- 1k ohm resistor to LDR

- 1k ohm resistor to power (breadboard)

- To configure the relay and lightbulb, refer to the diagram above

Step 3: Coding

The code needed for this circuit is pretty simple and short. The code takes the read input from pin A0 and prints it to the serial monitor. Next we state the values of A0 where we want the pin connected to the relay to either be high or low, depending on the value of A0. Above, I have put an image of what the code should look like. You should now have a working light intensity lamp circuit :)