Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

LED Dimmer using mosfet

Status
Not open for further replies.

fliggygeek

New Member
Hi all,
I am building a simple LED dimmer circuit using a STP16NF06 FET. It takes input of 0-10v signal that represents the level of the LED, ie 10v == 100% 0v == 0%. The load circuit is 12v at about 1.5 amps. What I would like to know is whether I need a current limiting resistor on the gate of the FET or is it OK to hook up to the 10v? Any other things I should do to the circuit? Sorry no schematic as yet, but all I am doing is running the 10v + signal to the gate, +12v to the load and the - load to the source, drain to gnd of 12v and 10v.
 
At 1.5A, the FET will be dissipating ~10W worst case, so you will need a large heatsink!

What is the forward voltage drop across your LED at full-brightness? Did I get it right; this is a 1.5A Luxeon or other high-power LED?
 
no, simply a parralell array of series arrays of 5mm standard leds with a current limiting resistor. Foward voltage drop of ~3.6v per led arranged 3 in series with a 47ohm resistor, then that in parralell to 22 sets of three leds.
 
Last edited:
This will do what you asked for:

You want the current through the leds to be proportional to the control voltage. The maximum forward current for your leds is likely less than 30mA, so I set it up to get 27mA when the control voltage is 10V. Bad news: a supply voltage of 12V is not high enough to get sufficient current at 10V control voltage. The supply voltage must be at least 14V. This is a consequence of putting three leds in series with the 47Ω resistor. Two would have worked with only 12V.

Look at the sim plots: I(R1) red trace is current through one of the parallel branches as the control voltage goes from 0 to 10V. The Fet source voltage is V(s) light blue. The current being regulated by the opamp is proportional to the drop across the 1 Ω source resistance.

Note the Violet trace, which is the power dissipation in the FET. It will need a heatsink. The power dissipation in the 1Ω source resistor R2 is the green trace. It needs to be a 1W resistor( not 2w as shown in the schematic)

The opamp combined with the FET is a voltage to current converter. The Opamp can be a LM324 or LM358, or dozens of others. Your NFET will work in place of the one I simulated.
 

Attachments

  • DF175a.png
    DF175a.png
    25.5 KB · Views: 499
  • DF175b.png
    DF175b.png
    32.3 KB · Views: 442
Last edited:
OK, that was precisely the sort of information I wanted, I am buying a few bits ;like opamps and resistors in an hour or so to play with.
 
Just finished building the setup as you described, works almost perfectly, I am indebted to you. (The almost perfectly bit is just that I dont like the dimmer curve that is produced, but this is a common issue of LED systems so I will just software compensate)
[video]http://www.facebook.com/v/10150151411583717[/video]

Reputation awarded to MikeMl for awesomeness
 
Last edited:
There have been several threads on these forums about led dimming and "eyeball perceived brightness". I would appreciate it if you posted a "dimming Curve" that has the appearance of linearity.
 
I think the issue you are seeing there is that its not true linearity that is what people really want, they are after a dimming curve that replicates that of an incandescent light curve. Sure, incandescent lights arent linear either, but people are so used to the curve on them that they find it easier to have LEDs conform to that.
 
Ok, I have built a full test system for this, with the full number of leds on it and I have an issue where when the input voltage is 0v there is still enough current in the leds that they are lit. What do I need to change to fix this? I have a feeling that its because the bulk lot of leds I bought have a smaller foward voltage. Is it just the current limiting resistor in series with the three leds I need to change for a higher value?
 
Is the opamp rail-to-rail output? It is probably not pulling the gate of the FET low enough. An LM358 should work.
 
LM324 should work fine. Im assuming an enhancement mode NFet. Is yours?
Check that the voltages at Gate, Source, and Drain are similar to these for low input voltages. Note I added R26. See if that fixes it.
 

Attachments

  • DF175c.png
    DF175c.png
    12.2 KB · Views: 369
  • DF177d.png
    DF177d.png
    16.4 KB · Views: 307
Last edited:
Hmm, is there any issues you can see about me using the other three channels of opamp on the lm324 for 3 more dimming channels? I have tried and failed every time. Its most odd.
 
Are you sure you have the pinout? Post a link to to the data sheet.
 
Is Pin 4 of the LM324 tied to +12V to +15V? Is Pin 11 tied to 0V (gnd)? Do you have a bypass capacitor (at least 0.1uF) from Pin 4 to Pin 11?
 
What are the voltages at the corresponding pins on the channels that dont work compared to the one that does? Gate, source, drain
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top