ENERGY SAVING lights

hi guys… i want to ask for y’al help. recently im doing a project about energy light saving. what im doing is just a prototype. im using Arduino UNO (Atmega328p). So here is the idea. i have an LDR in my analog input. and output is actually a bunch of LED’s connected to the PWM digital input of the atmega328p. What im goin’ to do is, i wanted to reduced the uses of LED’s (only several of LED’ are ON) in my output that is controlled by the arduino. Arduino will get a signal from the LDR of how much intake of light it gets. If the LDR received high amount of light, the LED’s at the output will only ON half of it. If the LDR detects no light, (night, cloudy day) all of the LED’s will ON. I’ve posted the photo of my connection. i hope u guys an help me. thanks…

Remove C3. To measure the light, you have to know the voltage (the DC voltage). Why is there a feedback with Q3 ? The voltage drop over the diode D11 should activate Q3, that is not a good design. The voltage drop will also make the leds less bright. Can you remove D11 and Q3 ? Why do you have 5 leds in a group? Can it be 6 ? Now you have to tune the resistor so they will be more or less equally bright. That is inconvenient.

You can use transistors to drive the leds, but there are special chips for drivers (8 channels in a chip, as in the ULN2803) and even special led driver chips.

hi peter. thanks for replying. actually there is an add on i made for my project. which is the power failure (failure LED). And for the arduino to be able to know which LED’s are failure, there must be no current going trough the Collecter of Q1. If it happen the only way for the current to flow is to go through D11 and Q3. Therefore, a signal can be send back to the arduino and i will add an LCD to show what’s goin’ on at the output (LED failure). For this schematic, the connection of LED failure only exist at the 1st group of LED’s. That’s why i want u guys opinion… For the cases for tuning up resistor, i have done it. and im using crystal White 006 (3v, 5mm) led’s.

and output is actually a bunch of LED's connected to the PWM digital input of the atmega328p.

Well I haven't heard of any PWM inputs on the UNO . I know of ANALOG inputs and PWM OUTPUTS but no PWM INPUTS. What's up ?

my bad.. its not PWM input.. you are true. So, anyone can help me ?

I still don’t like the transistor Q3 and diode D11.
The transistor has a voltage drop of about 0.6V over base-emitter. The diode has the same voltage drop. Therefor that part of the circuit is not okay.
You can keep diode D11 (or use a resistor of 10 ohm), and measure the voltage over D11 (or resistor) with an analog input. You can protect the analog input with a resistor of 1k to 10k.
You can select the internal reference, that changes the analog input range from 0-5 to 0-1.1 Volt.

hmm…i get your idea peter and thanks. So, now i want to ask how do i send a signal to the arduino? telling that there are group of LED does not light up or broken. it still use the feedback wire right ? so,how do i programmed it ? thanks…

Use the diode D11 or a resistor of 10 ohm. Instead of the signal going to the base of transistor Q3, connect it to an analog input of the Arduino. Keep the resistor R6 (use a value of 1k to 10k) for protection of the Arduino.

In the sketch the function analogRead() reads the voltage of an analog pin. http://arduino.cc/en/Reference/analogRead

Peter_n: Use the diode D11 or a resistor of 10 ohm. Instead of the signal going to the base of transistor Q3, connect it to an analog input of the Arduino. Keep the resistor R6 (use a value of 1k to 10k) for protection of the Arduino.

In the sketch the function analogRead() reads the voltage of an analog pin. http://arduino.cc/en/Reference/analogRead

thanks a lot mate..