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.

PWM a 12v bulb

Status
Not open for further replies.
I want to build something that can dim an automotive bulb from 100w from full brightness to just glowing. I will be using a micro controller to do the PWM, but I am not sure where I should look in terms of a simple 12v (14.4v when the engine is running) PWM controller for a resistive load. Any suggestions to get me started. If it's just a few components to source I can easily build on that.

Doing some searching, an IRF530 looks like it could work?

http://www.datasheetcatalog.org/datasheet/fairchild/IRF530.pdf

Run a microcontroller PWM to control the mosfet to control the 12v light?
 
Last edited:
The principle is ok, but that FET has a specified 'on' resistance of 160mΩ, so will dissipate about 10W when the bulb is on. It will get hot. Better (lower resistance ) FETs are available.
 
Like Alec said, there are better mosfets. If you can stand dealing with a surface-mount part, you might try a IRFH6200TR2PBF. This has an RDSon of 1.2mΩ with a 4.5V gate voltage. This will dissipate a mere .083W driving that 100W bulb - won't even get warm. Costs less than $3.
 
I could possibly make that SMD chip work...wow it is light years better than the one I suggested. 45A!?!? I wouldn't mind spending a few extra bucks for a non-SMD unit though, just to make assembly easier and to know that it is heatsinked properly. However if there isn't something like that I could make it work. I'm going to be driving two lights total.

KISS, something like that would work, but I will be using the microcontroller to do the PWM. I just need the muscle to control the current of the lights.
 
Last edited:
I want to build something that can dim an automotive bulb from 100w from full brightness to just glowing. I will be using a micro controller to do the PWM, but I am not sure where I should look in terms of a simple 12v (14.4v when the engine is running) PWM controller for a resistive load. Any suggestions to get me started. If it's just a few components to source I can easily build on that.

Doing some searching, an IRF530 looks like it could work?

http://www.datasheetcatalog.org/datasheet/fairchild/IRF530.pdf

Run a microcontroller PWM to control the mosfet to control the 12v light?
You can even use a simple 555 timer circuit and a pot to adjust the pulse width.
 
Hi,

As already pointed out, the bulb will not dim in accordance with the pulse width but will dim more than the pulse width would have you believe. The reason for this is because the bulb voltage vs brightness varies as a power law, not a linear one. So at 75 percent of max pulse width you wont get 75 percent of max light output but actually less than that. At 50 percent pulse width you'd get much less than 50 percent of max light output.

Since you are using a micro controller however you could program it to sense the potentiometer position and adjust the pulse width based on that and the control law for the bulb. You could discover the law for the bulb by setting the PWM to several levels and then measuring the light output, then using that data as a lookup table and interpolate between table entries, or do a curve fit to fit an approximate curve for the control law of the bulb. This would work pretty nice, so with the pot set at 75 percent of max rotation you'd actually be able to get 75 percent of full brightness, and likewise at 50 percent.

The control law for the lumen output of a vacuum tungsten filament bulb is approximately:
PercentOutput=(Volts/NominalVolts)^3.5

so you could fit the curve:
y=(Volts/NominalVolts)^a

or something like that. This would mean you could program the formula into the microcontroller and use that to calculate the PWM requirement for a given pot setting.

'NominalVolts' above is the voltage the bulb normally operates at, so for an automobile bulb this would be 12v or nearly that.
'Volts' is the average voltage of the bulb as it is actually being operated, so 75 percent would mean this would be 9v.
 
Last edited:
dude you need not have to do all these circus just buy a regulator used for fan that wil do this job

There are people who build projects simply for the sake of and enjoyment of building them. Also, since the original post deals with PWM of an incandescent lamp I do not believe a regulator would be what they want, more like a PWM fan speed controller.

Ron
 
I have a handful of these microcontrollers and I am using it for much more than just controlling the lights, it will take switch inputs and also output info to a LCD screen. So I do agree it may be overkill if it was used for strictly controlling the brightness of a light, but it will be doing much more back end work that I haven't mentioned. In this case yes a simple 555 could do the job, I just needed to know the driver side of things.

Mr.Al thanks for that info, definitely keep that in my back pocket when I do a bit of programming.
 
Okay I ordered 20 of them. :D

So for connecting the gate, what do I need to ensure there is no damage to the microcontroller? I figured a 10k pull down resistor to ground (to ensure it stays off when there is no signal from the micro) on the gate, and then what size resistor should I use to connect the output pin of the microcontroller to the gate? 1k? 10k?
 
Last edited:
I figured a 10k pull down resistor to ground (to ensure it stays off when there is no signal from the micro) on the gate
Can there ever be 'no signal' from the micro? Is the port pin always configured for output or is it used also as an input?
 
Can there ever be 'no signal' from the micro? Is the port pin always configured for output or is it used also as an input?

It can be used as an input or output, but I will have it configured as an output. Well I wired one of them up and it only draws 0.5ma @ 5v to switch it on. So I won't need a resistor to the gate. Maybe won't need one to ground either? The less components the better!

I will try and tie it into the micro soon and PWM control the light.
 
If the micro port pin is always configured as an output then it can pull the gate up or down, so the pull-down resistor is unnecessary. However, unless the wiring from the pin to the gate is very short the wiring inductance combined with the gate capacitance may result in the FET oscillating. To prevent this it is recommended to have a resistor (say 100Ω or less) in series with and very close to the gate terminal.
 
If the micro port pin is always configured as an output then it can pull the gate up or down, so the pull-down resistor is unnecessary. However, unless the wiring from the pin to the gate is very short the wiring inductance combined with the gate capacitance may result in the FET oscillating. To prevent this it is recommended to have a resistor (say 100Ω or less) in series with and very close to the gate terminal.

I will try and get away without any extra resistors, but if i have issues I will be sure to add them. Thanks for the info, I appreciate it!
 
Status
Not open for further replies.

Latest threads

Back
Top