PWM LED array dimmer - need help !

Discussion in 'The Projects Forum' started by sjmusic2, Aug 8, 2008.

  1. sjmusic2

    Thread Starter Member

    Aug 6, 2008
    12
    0
    I am in the process of building an LED array to light my saltwater aquarium. I have viewed a number of circuits online and have tried to combine various elements, but although I can follow a schematic well, I struggle with the design side !

    My psu is 12V, 20A (cctv psu) and the LEDs are 18 x white Seoul P7's (3.6 Vf, 2.8A, 700-900 lumens)

    I tried to calculate the sensing resistor from one website : 0.55/2.8 = 0.20 ohm ; power is 0.25/0.2 = 1.25W but when using : http://home.cogeco.ca/~rpaisley4/LEDcalc.html it gives a 0.43ohm, 3.5W resistor...this is where I'm a bit shakey.

    If you have the time I would be grateful if you could check the components and the design.

    I would also like to add a 9 LED array using royal blue K2 stars (3.85Vf, 1A, 27 lumens) which ideally would run from the same power supply but have a separate dimmer control. How could this be integrated into the circuit ?

    Thanks so much for your assistance - I'm looking forward to learning from you !
     
    Last edited: Aug 8, 2008
  2. bertus

    Administrator

    Apr 5, 2008
    15,645
    2,344
    Hello,

    Are the white LEDs 10 Watt?
    You can not connect them parallel as drawn.
    I would take seperate stages with IRF and transistor circuit for each string of 3 LEDs.
    The resistor from the 555 to the gate of the IRF should be lower (say 1K).
    The current limiter resistor should be 0.7/2.8 = 0.25 Ohm, E12 value 0.27 Ohm.
    For the 1 A strings the current limiting resistor should be 0.7 / 1 = 0.7 Ohm, E12 value 0.82 Ohm.
    You can only use 2 LEDs in the 1 A strings, the voltage is to high for regulation.
    When you use this kind of current regulation, the IRF's must be cooled as they act as dynamic resistors.

    Greetings,
    Bertus

    PS in your drawing you made a short on the IRF and 100 uF capacitor lines.
     
    Last edited: Aug 9, 2008
  3. sjmusic2

    Thread Starter Member

    Aug 6, 2008
    12
    0
    Hi Bertus,

    Many thanks for your reply !

    I have tried to revise the schematic according to your thoughts - is it good ? There is one area that I still don't quite understand...

    I'm using this resistor calc http://home.cogeco.ca/~rpaisley4/LEDcalc.html and it is telling me different values for the sensing resistor - can you guide me through your calculation so that I can learn where I am going wrong, could you advise on what resistor wattages are appropriate for the ciruit.

    Another query, you said that I couldn't put 3 blue leds in series...is this because 11.55Vf is too close to the 12V source - I know that my psu can increase to around 13.5V - but maybe that is still too tight ? If I have to go to 2 leds in series, what would the sensing resistor value be ?

    I am sorry, so many questions, but I only ask because I really want to learn from you :)

    Nice catch on the shorted IRF/ Cap !!

    Thanks again,

    Simon
     
  4. bertus

    Administrator

    Apr 5, 2008
    15,645
    2,344
    Hello,

    For the calculation of the sensing resistors I asume a Vbe of 0.7 Volt.
    So the resistor is 0.7 / sens_current.
    Not completely. Each IRF stage should have its own 1K resistor.
    Otherwise the current regulation will fail.
    There should be no horizontal connections between the leds.
    The sensing resistor in case of 2 LEDS will be the same, There will be more voltage over the IRF, this can make it warm, so cooling is essential.

    As you see I use an other symbol for the resistor.
    More information on symbol usage can be found here.
    http://www.kpsec.freeuk.com/symbol.htm

    Greetings,
    Bertus
     
    Last edited: Aug 9, 2008
  5. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    The blue LED's aren't going to work properly.
    3 x 3.85v=11.55v dropped across them, leaving 0.45v across the MOSFET(RdsON=0.16) and sense resistor(0.82); 0.16+0.82=0.98 Ohms. This gives you a maximum of .459A (459mA) current if the blue LEDs' actual Vf is 3.85. They will be about half their maximum brightness.

    Bertus briefly tried to explain this to you when he stated "You can only use 2 LEDs in the 1 A strings, the voltage is too high for regulation." What he was trying to say was that the total voltage drop across the three LEDs is too high for your current regulation scheme and your supply voltage.

    Back to the white LEDs and the resistors from the output of the 555 to the MOSFETs. Bertus is again correct suggesting that they need to have individual resistors; otherwise the first string that reaches the maximum current will turn off ALL of the MOSFETs.

    A standard bipolar 555 can source or sink up to 200mA. You have six MOSFETS to control, so 200mA/6 = 33.333...mA is available for each MOSFET gate. So, to calculate the individual resistors, 12v/33.333...mA = 360 Ohms, which is the smallest value to use for each resistor. To avoid unduly stressing the 555 timer, I suggest a somewhat larger resistor; 390 Ohms. 12/390 = 30.8mA (rounded off) for a max 185mA load on the 555's output.

    Let's calculate the resistor wattage required:
    Power(Watts) = 12v x .0308A = 0.3696; double it for reliability = 0.7392W. You might "sneak by" using 1/2W resistors, but for longevity, use 1W.
     
  6. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    Just another $0.02 worth,
    I'm really not very enthused about the current limiting scheme you're using, as it's causing the IRF530's to operate in the linear region, where they will begin dissipating power as waste heat; thus large heat sinks will be required.

    MOSFETs are best used as switches rather than linear devices.
     
  7. sjmusic2

    Thread Starter Member

    Aug 6, 2008
    12
    0
    Bertus and Sgt. Wookie,

    Thank you both for taking the time to help me ! I really do appreciate your comments and especially your efforts to help me to learn.

    The calculations make sense. Would the wattage of the LED string resistors be...
    12/0.27 = 44.4mA; 12 x 0.0444 = 0.533W (1.00W for safety)
    12/0.82 = 14.6mA; 12 x 0.0146 = 0.175W (0.50W for safety)

    I'm contemplating using germanium diodes to extend the dimming range.

    Sgt. Wookie, you suggest in your follow-up msg that MOSFETs are not so good for this application...I will be driving the LED arrays for 8-10 hours per day, 7 days per week, can I ask what would be your circuit of choice ?

    TIA, Simon
     
  8. bertus

    Administrator

    Apr 5, 2008
    15,645
    2,344
    Hello,

    The power for the sensing resistors are :
    P = I * I * R
    P = 2.8 * 2.8 * 0.27 = 2.11 Watt , 3 Watt minimal for safety.
    P = 1 * 1 * 0.82 = 0.82 , 1 Watt minimal for safety.

    Greetings,
    Bertus
     
  9. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    Nope!
    First, if you had 12v across 0.27 Ohms, you would have 44.444...Amperes current, and 533.333...Watts of power! :eek:
    Let's take the white LEDs.

    You have the voltage supply stated at 12v, but then you have three LEDs that drop voltage. You need to subtract the LEDs' voltage from the supply.
    12V - (3 x 3.6) = 12-10.8 = 1.2V.
    Along with that 0.27 Ohm resistor, you have the Rds(on) of the IRF530 in series, which is 0.16 Ohms. Added together (since they're in series), that's 0.43 Ohms.

    So, the current will be E/R, or 1.2v/0.43 Ohms, or 2.791 Amperes flowing through them. Now that's if your supply voltage is precisely 12v, and each LED drops exactly 3.6v across themselves.

    The real world isn't quite that perfect, I'm afraid. Your LED's Vf at the rated current may vary by as much as 10%. You won't know unless you test them. Measuring/recording each of their Vf with a constant current source would be a very good idea.

    Now the power rating. The voltage across both the IRF530 and the resistor is 1.2 (in a perfect world) and the current is 2.791 Amperes. Since the IRF530 and the resistor basically make up a voltage divider, the Vdrop across the resistor will be 1.2 x 0.27/0.43 = 0.753V (rounded off)
    So, the resistor's power dissipation will be:
    P = E x I = 0.753V x 2.791A = 2.19 Watts. Double it, and you'll need a 5W resistor, because I haven't seen many 4W resistors lately. However, you need a non-inductive resistor, because many of the resistors you'll find in that resistance and power range will be wire-wound. Inductive resistors have this nasty habit of generating very large reverse voltage spikes when their current flow is cut off; such spikes can easily kill MOSFETs.
    Germanium diodes are great for RF detection. They are not really suited for power applications. Schottky diodes is what you're looking for. Something like 1N5828 (maximum overkill for your application) or the like.

    MOSFETs are great for this application. What's not so great is how they're being used!
    I have no clue what transistors you're planning on using, except that they're in a TO-92 case. Your schematic gives no other indication of what they are.

    If they are a standard BJT (Bipolar Junction Transistor) what will happen is when they start to become biased ON, they will begin to turn off the IRF530 in their string by lowering the voltage on the IRF530's gate due to conducting current through the collector.

    At some point, they will reach equilibrium. Unfortunately, it's quite impossible to tell what that point will be, since each BJT has it's own unique characteristics - they're much more individualistic than LEDs are. But basically, the BJT will start conducting when the voltage on the base is somewhere between 0.6 and 0.7 volts higher than the emitter; their saturation voltage can be considerably higher than that.

    But when they DO reach equilibrium, the MOSFET will be conducting in a linear mode; it's Rds(ON) will be much higher than what's specified in the datasheet, and it will be dissipating a great deal of power as heat.

    It would be far better if the MOSFET were turned completely OFF. However, you can wind up using a lot of power charging and discharging the gates of the MOSFETS, too.

    It would help us a great deal to make decent recommendations if we knew the manufacturer and part number of the LEDs that you are dealing with. If you have datasheets for them, attaching them would be a big help.

    The more facts that you present, the better your project will end up.
     
  10. sjmusic2

    Thread Starter Member

    Aug 6, 2008
    12
    0
    Bertus and SgtWookie,

    Thanks for the continued support - I'm learning slowly, but still feel a little like a fish out of water :)

    I have attached a revised schematic (with component id's) and the LED datasheets :

    Seoul Semiconductor P7, white with heatsink star driven at 2.8A eg. http://www.dealextreme.com/details.dx/sku.12721

    Philips Luxeon K2 star, royal blue driven at 1A.

    Please feel free to recommend a different circuit if there is one better suited to running the array for 8-10 hours daily and 7 days per week. Initially I found 2 circuits online, one for the array and one for the 555 and tried to combine them - I am by no means set on using them. The only components I have right now are the LEDs and psu (12V, 20A unregulated).

    FYI, I did an online search for the 1N5828 diode but could not find a US source to buy from.

    I really do appreciate your help, thank you !

    Simon
     
  11. sjmusic2

    Thread Starter Member

    Aug 6, 2008
    12
    0
    Guys,

    Please see the post above for all of the requested info...

    Re. non-inductive resistors - I found some Dayton ones but couldn't match all of the required values exactly. Do you know of a good US source ?

    TIA,

    Simon
     
  12. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    Hang on, Simon - looking at some different possibilities for you that won't be too hard to put together.
     
  13. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    After a good deal of looking around, the "simple" methods just won't do I'm afraid - not for the kind of service you're expecting out of this LED array. Most of them involved using linear regulators, or like the schematic you came up with used MOSFETS in a linear mode, resulting in a great deal of wasted power as heat.

    However, I just found this application note from Microchip:
    http://ww1.microchip.com/downloads/en/AppNotes/01138A.pdf
    The drive is certainly more complex than what you currently have in mind, but it will be far more efficient, and has the capacity to add more functions such as monitoring the temperature of the LED to ensure they don't exceed their recommended limits (which would drastically shorten their lifespan), and a pushbutton switch or two to change the intensity of the LEDs.

    Over its lifetime, a project like this that isn't built with efficiency and reliability in mind can cost you quite a bit in time spent fiddling/repairing and higher utility bills - and energy costs are skyrocketing.
     
  14. sjmusic2

    Thread Starter Member

    Aug 6, 2008
    12
    0
    SgtWookie,

    Thank you for taking the time to research this for me - the PIC looks interesting. I want to really do my homework on this, but I'm visiting family in the UK, so it will be a week before I have a chance.

    If you don't mind, can I repost with my questions after I've looked at the attachment ?

    Thanks again,

    Simon
     
    Last edited: Aug 13, 2008
  15. yubyub

    Member

    Aug 13, 2008
    19
    6
    I have a suggestion. if you have some idea of what your doing (so you dont fry too many components), Play around on breadboard, see what works, see what doesnt. Maybe use cheap versions of stuff, and resistors everywhere to limit current. This is how i do my designs. Breadboard will save you from soldering up something that doesnt work.

    Also as a side note, if the led's are heating up past about 80 degrees C, use some heatsinks. the datasheets of those leds show they dont go as bright when they are hot, also it will drastically reduce lifespan. (half per 15 degrees over 50C)
     
  16. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    Yubyub,
    While normally I would agree with you, this project is rather different. Each of his LED strings requires approximately 2.5 Amperes, which is far too much for most breadboards. He doesn't have sufficient headroom to use current limiting resistors. His LEDs will require heatsinks, even if the driver is 95% efficient.

    After reviewing quite a few designs, this particular design stood out as an elegant and efficient answer to the OP's particular project, and solved dilemmas such as monitoring the temps of the LEDs in the array. Even the latest LED driver ICs were inadequate.

    Basically, the solution consists of a switching constant current supply; an inductor keeps the current relatively constant through the LED strings via a "flywheel" Shottky diode. The uC gets current feedback from the amplified drop across Rsense. The demo implementation doesn't include temperature feedback, however the application note does mention that this is certainly possible. Feedback from an inexpensive thermistor in a simple voltage divider network, reading it via an ADC, and reducing current if in overtemp via software would be all that was required.

    "Standard" requests for LED projects typically require 1/100 of the power per string that this particular project does. In those cases, I completely agree with you - experiment on a breadboard, etc. - at such low power levels, that's quite do-able. Using plain resistors, linear current regulators, etc even at those low power levels is wasteful, however the waste is negligible.

    In our OP's case, the potential for waste on many levels is far greater due to the power levels involved and the cost of the basic equipment; thus requires a good bit of contemplation and research before a suitable solution might be reached.
     
  17. sjmusic2

    Thread Starter Member

    Aug 6, 2008
    12
    0
    SgtWookie,

    Thanks for the PIC info, I have read it over and also read http://ww1.microchip.com/downloads/en/AppNotes/00874C.pdf too.

    I think I understand the principles involved but I don't know how to design the circuit I now have in mind (see attached)...

    I would like to have both the white led array and the blue led array controlled by the 12hv615, preferably with separate potentiometer dimmers for each - or another system to dim without reprogramming the pic every time. I like your idea to provide a temperature feedback loop too !

    Would it be possible for you to draw the schematic for me with the component values identified ? Do you also know where I could find the appropriate code for these applications - there are pieces of code associated with the datasheets, but nothing that has everything. I have done a little programing before (BASIC and Forth) but this is a little beyond my abilities right now.

    I have several 12HV615 mcu's and a PICKit 2 Debug Express on their way to me.

    Finally, the led stars will be attached to a 36" x 12" x 0.25" piece of aluminum with additional angle on the top to dissipate the heat. I will also blow a pc fan across the top if required. This is a similar commercial version of what I am trying to build... http://www.aquaillumination.com/index.html

    Thanks again for all of your help.

    Simon
     
    Last edited: Aug 21, 2008
  18. sjmusic2

    Thread Starter Member

    Aug 6, 2008
    12
    0
    Now I'm getting a little too excited, but would it be difficult to add a small lcd unit into the circuit to display the % dimming for each of the white and blue arrays ?

    Thanks !
     
  19. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    Good that you read it and looked at the other application note. :)

    Well, it wasn't my idea - it was in the application note!
    And really, there isn't much in the way of design work involved - it's all right there in the application note.

    I would not recommend trying to drive two seperate LED arrays with a single uC; there would not be enough I/O pins nor "horsepower"; mainly program space.

    There is already a schematic in the application note, with the components identified. Basically, all that's left to add is a thermistor and the code for it.

    There are the forums here, Microchip sample code, the Microchip forums, and a number of other PIC programming forums on the Web. Google is your friend here ;)
    Well, you already have some code samples in the application notes, there are many more application notes with code examples on the Microchip website, and you'll get tuturial code along with your PICkit 2. Time to start with getting the basics out of the way before you can fly.

    Very cool - so you'll have at least a couple of them to use for the two separate dimmers :)

    Looks nice. Are you also going to have a number of ridges along your aluminum angle? Those help dissipate heat by increasing the surface area.
     
  20. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    Well, the I/O pins are already pretty much accounted for; even a serial LCD would require a couple of pins. If you really want to add something like that, consider getting a different pic with similar capabilities that has about 8 more I/O pins.
     
Loading...