automatic LED light dimmer and control

Discussion in 'The Projects Forum' started by kaybie14, Nov 9, 2009.

  1. kaybie14

    Thread Starter New Member

    Nov 9, 2009
    hello.. im new here.. can anyone help me designing or finding circuit for my project automatic LED light dimmer and control using PIC. What do i want to do with my project is about controlling the luminance of the LED lighting based on the ambient light through PIC. what is the best light sensor to use?. Also i want to automate the control switch during closing hours and on when needed. i really need your help thanks a lot..
  2. SgtWookie


    Jul 17, 2007
    You might consider using an LDR (Light Dependent Resistor) in a voltage divider network, such as a CdS photocell. They are fairly slow to respond, but plenty fast enough to detect sunlight vs darkness - and they're inexpensive.

    Here's one way you could do it:


    R1 limits circuit current in case R2 is adjusted too low.
    R2 adjusts sensitivity (threshold level)
    R3 is the LDR; the CdS/LDR's I've experimented with decrease their resistance as the light increases. It might range anywhere from 10s of thousands of Ohms in darkness to very low resistance in full brightness.

    You could read the voltage on the divider using the ADC of the PIC. Or, you might could rely on the Schmitt-trigger input of the I/O pin and use it as a logic level; but this could be somewhat uncertain.
  3. kaybie14

    Thread Starter New Member

    Nov 9, 2009
    hello.. thank you for your response.. can i ask if you can help me in designing the entire circuit of my project?.. what do i want to do is to build my own LED Light that can replace our flourescent light with the same Looks and Luminance but more efficient then controlling the brightness of the LED light based on the ambient Light through PIC. thank you..
  4. ke5nnt

    Active Member

    Mar 1, 2009
    Then it's not really building your own is it?

    I've received a great deal of help in my endeavor to learn electronics from this forum, but I've always made the effort of doing it myself and then receiving constructive criticism and guidance after the fact.

    Designing something yourself is a great deal of fun, and quite rewarding, even if you got a lot of help, but at least you come out better in the end so you need just a little less help on your next go...

    Then again, just to be on the safe side, perhaps I'm reading your request wrong, and you simply need guidance on how to get started, in which case, you can disregard everything I've said :rolleyes:

    I can tell you that if you intend to use a microcontroller to read ambient light values and adjust the output of light from your LEDs, you will either need to find or create the code that gets programmed into the controller, and then you would need the hardware (a pic programmer) to get that code into the microcontroller.

    How many LEDs, and of what type are you using? Knowing the forward voltage and current needs of your LEDs would help greatly. What kind of power source do you intend on using for your lights?
    Last edited: Nov 29, 2009