Looking for opinions on LED dimmer circuit

Joel,

One very important rule with MOSFET's such as the IRF510 which you appear to be breaking is that the Voltage from gate to source must not exceed some critical value. This is usually 20 Volts. If you are really applying almost 24 Volts to the gate when the source is grounded, then you are playing with fire. The datasheet or package will call this Vgs max or something similar. You can fix this by tweaking resistor values so that the gate voltage is lower. For example, change both resistors to 10 k, then the maximum gate voltage will be around 12 V which should be fine for you. How fast is your PWM going, by the way? If it is really fast, then you might use smaller resistors than 10 k, but if it is slow, you could use larger resistors.

But more importantly, I don't think your circuit makes any sense. The MOSFET is nearly useless, if you really built the circuit as drawn above, because when the PWM output is low, the MOSFET will be on, but the PWM will be sinking all the current that flows through the MOSFET, and when the PWM output is high, there will be no potential from the drain to the source, and hence no current flowing. So you could just as easily remove the MOSFET from your circuit above, and replace it with a short circuit and there would be no change in behavior. The whole point of the MOSFET is to handle large currents, or possibly to act as a variable resistor capable of handling some power dissipation. In a PWM circuit, I would expect the former.

This leads me to believe that you didn't really wire it that way. You probably have the PWM output going to the gate of the MOSFET, and the source of the MOSFET is directly grounded?

The LED array should also contain some kind of current limiting resistor setup, as mentioned in the article. It might be helpful if you drew out the details of the LED array, since they matter.

Also, is your PWM circuit getting hot at all? If you DID really wire the circuit as shown, I imagine there is a lot of current going through it, and I would expect it to get warm.

Anyway, if you use the MOSFET as a switch, you can put a lot of current through it (two amps maybe for the IRF510? I don't know the exact number off the top of my head, but it would be called Id max). As long as you are not exceeding Id max, then you can keep connecting LED's until the FET feels warm. It may be possible in some situations to exceed Id max without the MOSFET getting warm, so you want to do some calculations to verify that you are not doing that. (To do this, we would need to know details of the LED array box.)

--Mac

Reply to
Mac
Loading thread data ...

Let me start by giving credit where due. I found this attractive LED dimmer design on the following site:

formatting link

I'm not at all familiar with MOSFETs (and to be honest my general electronics skills are very limited...which is why I'm here) so I was a little uncertain about how to proceed in adapting that design for 24VDC.

So I did some reading on MOSFETs and after getting even more confused about them I simply changed the layout of the LED array to work with 24V (6 LEDs and a 120 ohm current-limiting resistor in series) and plugged it in. No problem despite the fact that the MOSFET gate is now seeing nearly 24V rather than 12V. Then I connected 11 more of these LED strings in parallel and ran that. Still no problems.

Here's where I'm a little uncertain. According to the article one IRF510 MOSFET should be able to handle up to around 16 LEDs before you have to get something more powerful. But in my case I have 72 LEDs running through a single IRF510. The chip doesn't even feel warm. Should I not be surprised that I can support so many more LEDs simply by moving to a

24V design or is the author of that article either mistaken or being overly cautious about his MOSFET?

Is there anyplace I can read a simple description of how to design with MOSFETs? The back of the MOSFET package has a long list of parameters, none of which mean anything to me. What's important to consider when working with these things?

And can anyone see a possible flaw in this design? It almost seems too simple to me. I don't want to implement this if it's likely to fail a few months down the road. Commercial LED dimmers can cost hundreds of dollars yet here we have a circuit for less than $10 (including a 555 timer which I'm not using in my case) which seems pretty effective to me. So what's wrong with it?

Here's an ASCII version of my circuit:

24VDC ----------- | | | | 10K LED ARRAY | | | | | Drain | | -- Gate IRF510 | | | Source | | 470K | | | | | ----------- | Sinking PWM Output | GND---------

Thanks for any input on this.

Joel Moore

Reply to
Joel Moore

Joel Moore wrote:

The Radio Shack datasheet for the IRF510 is: ? Mfr. #IRF510 ? Case Type: TO-220 ? Channel Type: N ? V(DS): 60 ? V(GS): +/-20 ? I(D): 3.0 Amps ? Power Dissipation: 20W

So you are on reprieve running V(GS) at 20V -at least it is operating in the deep depths of its resistive region. Your white LEDs have a forward drop of about 3.3V at the 20-30mA level so that six in series gives 6x3.3=19.3V and this leaves 24-19.3=4.7 across the MOSFET + current limiting resistor. With 120 ohm current limiting and an ohm or two from the MOSFET, you end up with somewhat less than 40mA through the LEDs. The 12x of these strings is something like 0.5A which is well within the MOSFET rating. So your circuit is okay except for the V(GS) drive and the slightly excess LED current. You should change it around like so:

View in a fixed-width font such as Courier.

. . . 24VDC ----+-------------------------------------+ . | | . | | . | | . 1.2k | . | | . +----+------+ | . | | | | . ___/ |0.47u | LED ARRAY . 12V // \\ --- | | . zener --- --- |555 osc | . | | +---+ Drain . | | | |out | . | | | |-------+--------Gate IRF510 . | | | | | | . | | | | | Source . | | +-+-+ | | . | | | 10K | . | | | | | . | | | | | . GND----+----+------+---------+---------------+ . . . . . . LED ARRAY . . . 220 . +--|>|-|>|-|>|-|>|-|>|-|>|---/\\/\\-+ . | | . | 220 | . +--|>|-|>|-|>|-|>|-|>|-|>|---/\\/\\-+ . | | . | 220 | . 24Vdc ---+--|>|-|>|-|>|-|>|-|>|-|>|---/\\/\\-+--> TO MOSFET . | | DRAIN . | 220 | . +--|>|-|>|-|>|-|>|-|>|-|>|---/\\/\\-+ . | | . | 220 | . +--|>|-|>|-|>|-|>|-|>|-|>|---/\\/\\-+ . | | . | 220 | . +--|>|-|>|-|>|-|>|-|>|-|>|---/\\/\\-+ . . .

Reply to
Fred Bloggs

Fred Bloggs wrote:

You said 72 LEDs so- add a 100u 35WVDC cap from 24VDC to GND right at the LED array : View in a fixed-width font such as Courier.

. LED ARRAY . . . 220 . 24Vdc ---+--|>|-|>|-|>|-|>|-|>|-|>|---/\\/\\-+--> TO MOSFET . | | DRAIN . | 220 | . +--|>|-|>|-|>|-|>|-|>|-|>|---/\\/\\-+ . | | . | 220 | . +--|>|-|>|-|>|-|>|-|>|-|>|---/\\/\\-+ . | | . | 220 | . +--|>|-|>|-|>|-|>|-|>|-|>|---/\\/\\-+ . | | . | 220 | . +--|>|-|>|-|>|-|>|-|>|-|>|---/\\/\\-+ . | | . | 220 | . +--|>|-|>|-|>|-|>|-|>|-|>|---/\\/\\-+ . | | . | 220 | . +--|>|-|>|-|>|-|>|-|>|-|>|---/\\/\\-+ . | | . | 220 | . +--|>|-|>|-|>|-|>|-|>|-|>|---/\\/\\-+ . | | . | 220 | . +--|>|-|>|-|>|-|>|-|>|-|>|---/\\/\\-+- . | | . | 220 | . +--|>|-|>|-|>|-|>|-|>|-|>|---/\\/\\-+ . | | . | 220 | . +--|>|-|>|-|>|-|>|-|>|-|>|---/\\/\\-+ . | | . | 220 | . +--|>|-|>|-|>|-|>|-|>|-|>|---/\\/\\-+ . .

Reply to
Fred Bloggs

[snip]

Without doing any calculations, I'll just say stick with 10 k or thereabouts resistors, then.

OK, I see it now. Although you didn't mention the Vf in your post, I don't think.

No, the short would be from drain to source. The gate to source is like a capacitor, with the catch that the gate to source voltage controls the drain to source resistance. So when the PWM sinks current, the transistor gate will be at close to 24 Volts, the source will be at GND, and the drain to source will exhibit a very low resistance. Since the source is in series with the PWM (in your diagram) all the 240 mA would go through the PWM.

Well, that branch wouldn't contribute much due to the 470 k resistor in series with the 10 k resistor. (No DC current flows into or out of the gate of a MOSFET.) But as noted above, the drain to source path would be carrying the full 240 mA.

240 mA qualifies as a lot of current. But this is very light duty for that particular FET (I see where Fred dug up the datasheet). Also, in this application, it looks like you plan to always keep the FET either off or on all the way, so you probably don't need to worry about heat dissipation. In the article you referred to, the FET was being used in a mode where it was in between off and on. In this mode, FET's sometimes dissipate a lot of heat, that's why the guy worried about how many LED's were attached.

What duty cycle are you PWM'ing at? Right now you are sort of inverting. That is, when the PWM is high, your LED's are off, and when the PWM is low, your LED's are on. But here is how you WANT to hook it up: (since you have a whole Ampere of drive current available we'll use low value resistors):

100 PWM-----/\\/\\/\\---+-----Gate | / \\ 220 / \\ | | GND

With this arrangement, when the PWM is high, the LED's will be on, and when the PWM is low, the LED's will be off. If the duty cycle is not 50%, this will make a difference. At high duty cycles the LED's will be brighter, and at low duty cycles, they will be dimmer. But with your other circuit, it is just the opposite.

--Mac

By the way, it looks like Fred's posts are pretty good, too, though he is talking about the 555, not the tri-plc board.

Reply to
Mac

The bipolar 555 draws something like 8mA so a little more bias for the zener is called for- a first cut would look like this: View in a fixed-width font such as Courier.

. . . 24VDC ----+---------------------------------+-------+ . | | | . +----+ | | . | | | | . 1.2k 1.2k | | . | | | | . +----+------+ | | . | | | | | . ___/ |0.47u | LED ARRAY |+ . 12V // \\ --- | | --- . zener --- --- |555 osc | --- . | | +---+ Drain |100u . | | | |out | | . | | | |----100---+-Gate IRF510 | . | | | | | | | . | | | | | Source | . | | +-+-+ | | | . | | | 10K | | . | | | | | | . | | | | | | . GND----+----+------+------------+--------+-------+ . . . . . . LED ARRAY . . . 220 . 24Vdc ---+--|>|-|>|-|>|-|>|-|>|-|>|---/\\/\\-+--> TO MOSFET . | | DRAIN . | 220 | . +--|>|-|>|-|>|-|>|-|>|-|>|---/\\/\\-+ . | | . | 220 | . +--|>|-|>|-|>|-|>|-|>|-|>|---/\\/\\-+ . | | . | 220 | . +--|>|-|>|-|>|-|>|-|>|-|>|---/\\/\\-+ . | | . | 220 | . +--|>|-|>|-|>|-|>|-|>|-|>|---/\\/\\-+ . | | . | 220 | . +--|>|-|>|-|>|-|>|-|>|-|>|---/\\/\\-+ . | | . | 220 | . +--|>|-|>|-|>|-|>|-|>|-|>|---/\\/\\-+ . | | . | 220 | . +--|>|-|>|-|>|-|>|-|>|-|>|---/\\/\\-+ . | | . | 220 | . +--|>|-|>|-|>|-|>|-|>|-|>|---/\\/\\-+ . | | . | 220 | . +--|>|-|>|-|>|-|>|-|>|-|>|---/\\/\\-+ . | | . | 220 | . +--|>|-|>|-|>|-|>|-|>|-|>|---/\\/\\-+ . | | . | 220 | . +--|>|-|>|-|>|-|>|-|>|-|>|---/\\/\\-+ . .

Reply to
Fred Bloggs

And in that 555 dimmer circuit shown at

formatting link
replace the 1K resistor from the top of the 1M pot to the power supply with a 10K resistor.

Reply to
Fred Bloggs

Mac wrote in news: snipped-for-privacy@bar.net:

That's good to know and easy enough to fix.

I have it running at 5 KHz right now. The controller that's outputting the PWM gives me several choices ranging from 32 Hz to 32 KHz. I'm using the light to illuminate something for viewing through an camera and it seemed if I went lower than 5 KHz I noticed some slight "wavering" in the brightness.

I don't have the circuit in front of me right now but I'm pretty certain it's wired as shown in my ASCII diagram. There's only a few components so it would be hard to make that mistake (hard, but not impossible -- I'll verify it when I head back to work tomorrow).

Anyway, I think I see what you're saying about the MOSFET being pointless. However, at one point I tried wiring the LED array directly to the PWM's output and it wasn't shining as bright as when the MOSFET was involved. The controller's specs

formatting link
plc.com/t100md1616.htm) claim the output is capable of sinking 1A so I would have thought it was plenty capable but it looked like it wasn't getting enough current. I may have to re-experiment with that to verify it.

I did descibe it somewhere in my OP. It's 12 parallel strings of LEDs where each string consists of 6 LEDs (Vf = 3.6) and one 120 ohm resistor.

Hmmm. I haven't checked it yet. I'll do that tomorrow. For my own education, what tells you there's a lot of current going through there? The LED array should require around 240 mA. What's happening between the gate and the source when the MOSFET is conducting? Even if that looked like a short there wouldn't that branch of the circuit only draw a couple of mA through the 10K resistor?

Thanks for your help.

Reply to
Joel Moore

Fred Bloggs wrote in news: snipped-for-privacy@nospam.com:

Actually, the white LEDs are spec'd with a forward drop of 3.6 V which is what I based my calculations on. So there should (in theory) only be around 20 mA of current running through them.

But yeah, I'll fix my circuit to lower the voltage at the gate.

Thanks.

Reply to
Joel Moore

That circuit is oscillating at around 3Hz- this is not a good dimmer frequency. You should replace that 0.47u shown for the timing capacitor to 0.0047u.

Reply to
Fred Bloggs

Why don't you measure it- that number is some kind of worst case and seems high.

Reply to
Fred Bloggs

Although I too know little about MOSFETs, like Mac I'm puzzled as to what purpose the IRF510 serves in your circuit as drawn?

Also, simulating it in the state when the MOSFET source is grounded looks like this:

formatting link
From which you can see that the voltage drop across individual LEDs is

1.6V, and your gate is safely under the 20V max specified.

And didn't you also say that you're not using the 555 PWM section of the original circuit? So how do you achieve the dimming?

Maybe I've just misunderstood...?

--
Terry Pinnell
Hobbyist, West Sussex, UK
Reply to
Terry Pinnell

On Sat, 27 Aug 2005 14:43:47 +0000, Fred Bloggs wrote: [snip]

^^^^^^^^^^^^^^^^^^^^^^ Ooops. I didn't catch that. Then he better not wire the circuit the way I showed it, with the PWM directly connected to the gate with no pullup!

I just skimmed through the datasheet and saw that it said 24 V 1 amp output for the digital outputs. I didn't notice that it was open-collector output.

--Mac

Reply to
Mac

[snip]

No. In your gif you've got the 10 K and 470 K resistors in series with the LED array. That is not how the OP drew it originally. The 10 K was connected between 24 VDC and the gate. The 470 K was connected between the gate and source, and the source was connected to the PWM output.

When the PWM sinks current and goes almost to GND, the 10 K and 470 K form a divider with 24 V across it. So Vgs is 24 * (470/(470+10)) = 23.5 V. At least that is the way I am reading it.

[snip]

--Mac

Reply to
Mac

He is using Nichia white LEDs with Vf=3.6V for If=20mA at 20oC. The Vf drifts at about -10mV/oC, and the heat conduction is not so good, so that the OP may be initializing at 20mA nominal, but the current will definitely drift upwards at a rate 60mV/(oC x 120Ohm)=0.5mA/oC in his array. My guess is he will end up with 27mA. And he is using a $330 PLC controller with open-collector NPN PWM output rated for 350mA continuous, 1A peak. He doesn't need the MOSFET at all.

Reply to
Fred Bloggs

Yeah- it's a sloppy manual- mentions Darlington NPN. They're just using some Allegro part.

Reply to
Fred Bloggs

Check

formatting link

Reply to
Fred Bloggs

You're right of course - careless drawing slip, sorry. I've corrected it. I've also included LEDs closer to the spec the OP and Fred described. (Best CircuitMaker can do is Vf = 3.4V @ 40mA.) So these are now dropping 3V, and Vgs is above recommended level.

formatting link

--
Terry Pinnell
Hobbyist, West Sussex, UK
Reply to
Terry Pinnell

Fred Bloggs wrote in news: snipped-for-privacy@nospam.com:

I should have posted a part number a long time ago. Sorry.

The LED I'm using is from Agilent, part # HLMP-CW30-PS000. Here's a (long) link:

formatting link

Anyway, I just got into work so I'm going to try a couple of the things suggested here (not using the MOSFET, fixing the resistors) and I'll post again with more info and some responses to points raised elsewhere in the thread.

Also, I confirmed that my circuit is wired as I described in my OP.

Joel

Reply to
Joel Moore

Fred Bloggs wrote in news:43107C20.3000506 @nospam.com:

Ok, I feel a little silly because I just tried connecting my LED array directly to the PLC's output and it works fine. You're absolutely right that the MOSFET isn't necessary in my application. I sort of recognized that before but when I tried it without the MOSFET I saw a significant reduction in the brightness. There was probably some other factor that caused this (maybe the PWM was running at 50% or something) but I managed to convince myself that the MOSFET was helping in some way.

Anyway, the effort was not a waste because I have started comprehending how MOSFETs work (pawing through some old college textbooks last night also helped in that regard) and I still plan on trying to produce the circuit using a 555 timer for use when the PLC isn't available.

Thanks everyone for your help (and for validating the worth of venerable USENET once again).

Joel Moore

Reply to
Joel Moore

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.