Introduction: Outdoor Lighting (hands Free)

About: Junior Data Scientist with a keen interest for gaining useful information from data and steering positive knowledge . I also love electronics and create things from time to time .

The project is aimed on hands free initiative where we try to minimize hand contact on surfaces .The project was done by my younger brother who will be in grade 9 in the fall.
The idea is to be able to turn off outdoor lights automatically without having a switch at all.I used a light dependent resistor to detect the amount of light in the atmosphere which in turn will allow the bulb to turn on or off .

The RBD dimmer used allows the bulb to be light on and off as well.


  • Arduino Mega
  • RBD dimmer
  • Power-bank(optional)
  • Cables
  • Bulb
  • Light Dependent Resistor

Step 1: Connections

The connections can be seen on the diagrams above.The ldr sensor has a 10K resistor connected to it .

The RBD sensor has four pins : voltage , ground ,zero cross and psm.The voltage pin is connected to the 5V on the arduino mega while ground is connected to the ground port in the arduino mega .The zero triac is connected to the digital pin to control the phase null of AC while the psm also connected to the digital pins is used to control current .

On the other side of the RBD dimmer ,the sensor is connected to the load and the other one is connected to the AC IN

Step 2: Code

Once light levels drop , the lamp will automatically light on and once the light levels increase , the lamp will switch off. The code shows how to declare a dimmer so that you can easily use its methods to control the lamp.
It is important to be cautious when handling AC current .

"Can't Touch This" Family Contest

Participated in the
"Can't Touch This" Family Contest