MOSFET saturation

Hi

I've always had a hard time understanding transistors and mosfets.

I have an ESP8266 (3.3v logic) and am trying to PWM pilot a 12v LED with a 30N06L.

It's working, but at PWM 255, the mosfet is not saturated, it's only letting 3.3v through.

Also, when I don't put the two grounds in common, the MOSFET becomes fully open. How come ?

Thanks for your help

I think that a schematic of your circuit will help.

the mosfet is not saturated, it's only letting 3.3v through.

How are you measuring the voltage? Between which 2 points?

Ok first I had multimeter set on AC voltage, shame never killed anyone

Second, I did not know that ESP8266 has 1024 pwm range and not 256.

It's working now.

The problem now is that PWM won't change after it has reached 1023. Weird...

1024 pwm range = 0 to 1023.

Also keep in mind you mosfet is ON but not anywhere fully.

Think of the mosfet as a water valve with a sloppy actuator:

As you first start to move the actuator (being a sloppy connection) nothing happens

Then at some position ( for your FET, between 1 and 2.5 volts) the valve starts to open but just a little bit.

As you continue to move the actuator (i.e. voltage increases above 2.5V) the valve starts to open wider.

Finally the valve is fully open (about 10 Volts)

Further actuation (and higher voltages) will not bring any change because the valve is fully open (aka saturated)

If you read the above again an replace water flow with possible max current you will get a better understanding of the MosFet operation.

Hope this helps more that it confuses.

Last problem was programmatic problem, I solved it (bad cleaning on char[] made 1024 keep the 24 and when I requested 50 it applied 5024)

At PWM set to 1023, I get 0.76A out of 0.83A when plugged directly to the power source, fair enough for me.

Therefore I should look for something where Vgs is lower which will then reach max current with lower voltage on gate, right ?

I now understand why I have to put grounds in common.

Thanks for the replies

JeanneD4RK:
Last problem was programmatic problem, I solved it (bad cleaning on char[] made 1024 keep the 24 and when I requested 50 it applied 5024)

I'm wondering why your using an array of chars. Why not an array of ints? A char only holds 8 bits, with a range from 127 to -128. An int is a 16-bit variable, with a range of 32767 to -32768, thus it will accomodate values up to 1023, and beyond.

BTW: for purity sake, a char data type should only used for "character literals", like 'A' or '3'. Better to use byte for 8-bit numbers.

JeanneD4RK:
Therefore I should look for something where Vgs is lower which will then reach max current with lower voltage on gate, right ?

Sort of. Ultimately you want to look at the datasheet, and find a MOSFET whose gate resistance is low enough at the Gate Voltage you will be driving it with. It all depends on how low you want the Drain to Source saturation voltage to be and/or how much you want to minimize power dissipation in the MOSFET.

So, if you want 830mA, when the MOSFET is saturated, and a voltage drop below, say, 50mV [which will be a power dissipation of 50mV * 830mA = 41.5mW (plenty low!)], then you want a MOSFET with a saturation resistance of:

50mV/830mA = 60mΩ

So, look for a MOSFET with 60mΩ channel resistance (or below), when the Gate Voltage is at 3.3V

AND, I would double the current, to mitigate variation among devices and other variations. For instance: set the target current at 1.7A, then, check the power dissipation:

50mV * 1.7A = 85mW -- still plenty low

Then get a target channel resistance:

50mV/1.7A = [b]29mΩ[/b]

But, looking for a MOSFET can be daunting, because there are SO MANY!! Especially when trying to find one for 3.3V logic, since there isn't any distinguishing terminology for that, like there is for 5V logic [e.g. the "Logic Level" designation--which generally applies to 5V logic]. But I start by getting a ballpark "bracketing", then digging into the datasheets and looking at graphs, since they are a more reliable indication of device functionality.

I use the parametric search on the Mouser website, but DigiKey also has such a search feature. Or, you can pick a manufacturer, go to it's website, and often find a device selection tool.

But, it's a complicated, somewhat frustrating process, that I'm still figuring out. Complicated because the values listed in the parametric search are not always comparable. You can look for a particular RDS(on) but, some of the values are for a Gate Voltage of 10V, some for 5V, some for 4.5V, etc. -- so, all you're getting is a vague ballpark. You can try setting the Gate Threshold voltage first, and rely on the "Smart Filtering" to remove the values that are outside the range you select. But, the Gate Thresh values you select, could be anything from Typical values, or Maximum values, or a range, or something else! Plus, there are errors in their database [clearly non-electronics educated people did the data entry, because there will be things like negative threshold voltages, when N-Channel is selected, and other such oddities. Also, I've seen things like 10A, in the list of parameters of a particular part, when it should be 10mA, and stuff like that--but it's fairly rare -- though, I've been seeing less of this these days.