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 dimming LEDs with a MOSFET, am I missing something here?

Status
Not open for further replies.

JacobT

New Member
Hi Guys
I have probably misunderstood something here, but I'm a little confused.
I have a 12V LED strip I'm trying to dim using an Arduino as the PWM signal source and a IRF3204 N-channel MOSFET.
I've kept the circuit simple, basically used this as a guide: https://bildr.org/2012/03/rfp30n06le-arduino/

When I measure the PWM output from the Arduino with my oscilloscope i get a nice square wave going from 0 to 5V. However, when I measure on the "12V side" I still get a nice square wave, but it only "drops" from 12V to about 10V, should it not also drop to 0V when the signal from the Arduino is 0V or have I misunderstood something?

I hope my question makes sense and that I have provided enough info.
Thanks in advanced.
Jacob
 
Provide a URL Link to the exact 12 Volt LED strip that your are using.
Provide a URL Link to the exact IRF3204 N-channel that your are using.

Can you post your schematic and a picture of your circuit.
What PWM frequency are you using?

Q1) Can you illuminate the 12 Volt LED strip with a 12 Volt Power Supply?
Q2) If you disconnect the Arduino from the Gate, then can you control the MOSFET - On/Off manually - ie does your hardware work?
Q3) How much Gate Drive do you need, to energize the MOSFET?

Using the above three questions and some deductive reasoning, what it is your conclusion?
 
Last edited:
I could find no info on the IRF3204.
Are you sure it's not an IRF3205?
What ever kind you use it must be a logic-level type MOSFET, not just "any MOSFET" as your bildr.blog reference incorrectly stated.
 
It's probably working fine. Once the voltage falls to around 10 V the LEDs (probably 3 white LEDs in series) stop conducting so there is nothing to pull the voltage further down. At PWM frequencies, quite a small capacitance will keep the voltage up.

Add maybe 1 kOhm in parallel with the load and the voltage will go all the way down during the off phase.
 
We don't really know but this is from post #1.
1554075884468.png
 
When the voltage at the gate is zero, the MOSFET is not conducting. That means, you have essentially infinite resistance across your mosfet. If you calculate the voltage divider of an infinite resistor in place of the mosfet, a small resistor (1000 ohms) and an LED, above the mosfet (I.e. they are connected to the 12v rail, you will see 12v Minus the diode (LED) voltage drop, which I assume is a red LED so a drop of 2v to get to 10v.

92DE77A9-0DEB-4424-AC0B-FD459847B2E6.jpeg
 
Hi Guys
Thanks for all the feedback. Let me try to answer your questions.

Provide a URL Link to the exact 12 Volt LED strip that your are using.
Provide a URL Link to the exact IRF3204 N-channel that your are using.

Can you post your schematic and a picture of your circuit.
What PWM frequency are you using?

Q1) Can you illuminate the 12 Volt LED strip with a 12 Volt Power Supply?
Q2) If you disconnect the Arduino from the Gate, then can you control the MOSFET - On/Off manually - ie does your hardware work?
Q3) How much Gate Drive do you need, to energize the MOSFET?

Using the above three questions and some deductive reasoning, what it is your conclusion?

Not sure what PWM frequency I'm using, whatever the arduino uses standard. (according to the arduino doc it should be approximately 490 Hz)

Q1: Yes it lights up just fine, and when connected to the "dimming" circuits it also dimms, I just had an idea that I could dimm it more than seems to be possible at the moment and figured it might have something to do with the fact that the voltage at the LED never went below 10V.
Q2: yup, works just fine.

The circuit is as Ronsimpson posted it:
We don't really know but this is from post #1.
View attachment 117435

Also the Mosfet is a IRF3205 not 3204 (sorry typo).

The LED strip is this one: https://www.banggood.com/50cm-9W-18...12V-p-1016898.html?ID=515219&cur_warehouse=CN

It's probably working fine. Once the voltage falls to around 10 V the LEDs (probably 3 white LEDs in series) stop conducting so there is nothing to pull the voltage further down. At PWM frequencies, quite a small capacitance will keep the voltage up.

Add maybe 1 kOhm in parallel with the load and the voltage will go all the way down during the off phase.

OK, I'll try this tonight, as I wrote in my original post it may just be me why has misunderstood how this should work/look.

Once again thanks for all the feedback.
-Jacob
 
Hi Guys
Thanks for all the feedback. Let me try to answer your questions.

Not sure what PWM frequency I'm using, whatever the arduino uses standard. (according to the arduino doc it should be approximately 490 Hz)

Q1: Yes it lights up just fine, and when connected to the "dimming" circuits it also dimms, I just had an idea that I could dimm it more than seems to be possible at the moment and figured it might have something to do with the fact that the voltage at the LED never went below 10V.
Q2: yup, works just fine.

The circuit is as Ronsimpson posted it:

Also the Mosfet is a IRF3205 not 3204 (sorry typo).

The LED strip is this one: https://www.banggood.com/50cm-9W-18...12V-p-1016898.html?ID=515219&cur_warehouse=CN

OK, I'll try this tonight, as I wrote in my original post it may just be me why has misunderstood how this should work/look.

Once again thanks for all the feedback.
-Jacob

You wrote ...
Q2: yup, works just fine.

So, are you going to tell us ... what voltage did you manually apply to the Gate to energize the MOSFET and Illuminate the LED?
Was it 12 Volts or 5 volts?

I will ask you my original question #3 again ...
Q3) How much Gate Drive ( ie voltage ) do you need, to energize your MOSFET ???

Do you understand what "Gate Voltage" is ?
Do you understand that your MOSFET requires a much higher "Gate Voltage" vs the RFP30N06LE MOSFET in the example circuit?
 
That fet needs max of 4v on the gate before it starts to turn on, if you run the fet at a fairly high switching freq, like 31khz from an arduino the gate voltage might be too low for it to switch properly due to gate capacitance.
Try a lower Pwm frequency, above 50hz and you'll not see any flicker.
 
You wrote ...
Q2: yup, works just fine.

So, are you going to tell us ... what voltage did you manually apply to the Gate to energize the MOSFET and Illuminate the LED?
Was it 12 Volts or 5 volts?

I will ask you my original question #3 again ...
Q3) How much Gate Drive ( ie voltage ) do you need, to energize your MOSFET ???

Do you understand what "Gate Voltage" is ?
Do you understand that your MOSFET requires a much higher "Gate Voltage" vs the RFP30N06LE MOSFET in the example circuit?

Hi Summitville
Well either voltage works just fine, the gate threshold as Dr Pepper also mentioned is 4v, which is amply supplied by the arduino which supplies a 5v signal.

Anyway, diver300 and gophert seems to have hit it on the nose. Once I put a 1Kohm resister in parallel with the LED the PWM signal on the LED perfectly mirrored the input signal.

I'm assuming there is no need for the resister (apart from making the plot look nicer??)

Thanks for all the help!
-Jacob
 
the Mosfet is a IRF3205
That MOSFET requires 10V to fully turn it on.
You need a logic-level MOSFET with a Vgs(th) max of about 2V.
 
When the voltage at the gate is zero, the MOSFET is not conducting. That means, you have essentially infinite resistance across your mosfet. If you calculate the voltage divider of an infinite resistor in place of the mosfet, a small resistor (1000 ohms) and an LED, above the mosfet (I.e. they are connected to the 12v rail, you will see 12v Minus the diode (LED) voltage drop, which I assume is a red LED so a drop of 2v to get to 10v.

View attachment 117437
He has a 9 Watt LED Lighting Strip, with built-in current limiting resistors, designed for 12 Volts DC.

When the MOSFET is ON ... the junction between the MOSFET and the LED Strip should be near 0 Volts.
When the MOSFET is OFF ... the junction between the MOSFET and the LED Strip should be near 12 Volts.

It was reported by JacobT ... when the MOSFET is "ON", the voltage dropped down from 12 volts, to only 10 volts.
That tells me ... the 5 Volts on the Gate is causing the MOSFET to have a high Rds, not a low Rds.
For the IRF3205, the Rds is 8 milliohms when the Gate is at 10 Volts, well above 5 Volts.
Gate turn-on just begins somewhere between 2v - 4 v and the Arduino only applies 5 Volts?
Shouldn't the IRF MOSFET Part # have an"L" for Logic Level Gate compatibility?

Adding a 1 K Ohm resistor across ( in parallel with ) the LED Lighting strip should do nothing to make this MOSFET work better.

I wonder ...
could this new 1K Ohm resistor actually have been added between +12 V and the Gate, as an additional pull-up for the Gate?
 
He has a 9 Watt LED Lighting Strip, with built-in current limiting resistors, designed for 12 Volts DC.

When the MOSFET is ON ... the junction between the MOSFET and the LED Strip should be near 0 Volts.
When the MOSFET is OFF ... the junction between the MOSFET and the LED Strip should be near 12 Volts.
I think that JacobT has been measuring the voltage across the LED strip, not the voltage across the MOSFET.

When the MOSFET is off, there is nothing to pull the voltage across the LED strip below about 10 V. Once the LEDs stop conducting, which is at around 10 V, the voltage is essentially floating and a tiny bit of capacitance will keep the voltage at 10 V for the "off" part of the PWM cycle.


He has a 9 Watt LED Lighting Strip, with built-in current limiting resistors, designed for 12 Volts DC.
It was reported by JacobT ... when the MOSFET is "ON", the voltage dropped down from 12 volts, to only 10 volts.
I don't think he said that. He wasn't very clear about whether 10 or 12 V was measured when the gate voltage was 0 or 5 V.

That tells me ... the 5 Volts on the Gate is causing the MOSFET to have a high Rds, not a low Rds.
For the IRF3205, the Rds is 8 milliohms when the Gate is at 10 Volts, well above 5 Volts.
Gate turn-on just begins somewhere between 2v - 4 v and the Arduino only applies 5 Volts?
Shouldn't the IRF MOSFET Part # have an"L" for Logic Level Gate compatibility?
The IRF3205 is capable of way more power than is needed here, so it's not important to turn it on as hard as possible. If you look in fig 1 of the datasheet
you'll see that at Vds = 0.1 V, with Vgs of 4.5 V, the current is about 2.5 A. This application is 0.75 A, so the voltage drop will be far less than 0.1 V. So the MOSFET could be driven better, but it's being driven well enough.
Adding a 1 K Ohm resistor across ( in parallel with ) the LED Lighting strip should do nothing to make this MOSFET work better.
It's not making the MOSFET work better. It's making the output voltage look "nicer".
 
Snip
-
I wonder ...
could this new 1K Ohm resistor actually have been added between +12 V and the Gate, as an additional pull-up for the Gate?
I'm afraid not.
If the output of the Arduino is a low impedance cmos logic that's either 0 or 5 volts, then adding a pull up to +12 will just increase the current loading on the output pin, but won't increase the voltage.
 
The graphs on a datasheet usually show only a "typical" device. But you cannot buy a typical one, many being made are much less sensitive as shown in the guaranteed spec's. It might conduct only 250uA at its 4V threshold voltage then not do much more when driven with the Arduino.

You could buy hundreds of Mosfets from different places and still not find one that is sensitive enough. A logic level Mosfet is guaranteed to conduct a lot of current when its gate-source is only 4.5V.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top