RoboSense

The Next disruptor in Robotics

Auto Light Intensity Control

2 min read

Auto Intensity Control of Power LED using Arduino

“Be a bright spark, lights off till it’s dark!” sometimes we forget to turn off the lights and waste electricity and you must have also seen street light turned on in the day. We have already built few circuits on where lights turn off automatically if it is bright outside and turns ON if it is dark outside. But this time, in this circuit we are not only turning On and off lights based on light conditions but also varying the intensity of light according to outside light conditions. Here we have used LDR for decreasing or increasing the brightness of the 1 watt Power LED automatically.

Basically, PWM refers to Pulse Width Modulation, the output signal via a PWM pin will be an analog signal and acquired as a digital signal from the Arduino. It uses the duty cycle of the digital wave to generate the sequential analog value for the signal. And, that signal is further used to control the brightness of the Power LED.

Material Required

  • Arduino UNO
  • LDR
  • Resistor (510, 100k ohm)
  • Capacitor (0.1uF)
  • Transistor 2N2222
  • 1 watt Power LED
  • Connecting wires
  • Breadboard

How it Controls the Light Intensity Automatically: 

As per the circuit diagram, we have made a voltage divider circuit using LDR and 100k resistor. The voltage divider output is feed to the analog pin of the Arduino. The analog Pin senses the voltage and gives some analog value to Arduino. The analog value changes according to the resistance of LDR. So, if is dark over the LDR, its resistance get increased and hence the voltage value (analog value) decreases. Hence, the analog value vary the PWM output or the duty cycle, and duty cycle is further proportional to intensity of light of power LED. So the light over the LDR will automatically control the intensity of Power LED. Below is the flow diagram how this will work, upside arrow sign is indicating “increasing” and downside arrow sign is indicating “decreasing”.

Intensity of light (on LDR) ↓ – Resistance↑ – Voltage at analog pin↓ – Duty cycle (PWM)↑  –Brightness of Power LED 

If its full bright outside (when analog value increases more than 500) the power LED turns off.

This is how you can control the intensity of light automatically using LDR.

Leave a Reply

Your email address will not be published. Required fields are marked *

Welcome to RoboSense

Thank you for coming this long, you can donate from following options.

Paypal- paypay.me/robosense

UPI Payment Options

Paytm

 

 

Categories