How to use MOSFETs ?


I was told on another forum, that the way to switch "large" currents is a MOSFET since a regular transistor cant, atleast not from a mcu output.

Now I have a few of these IRF530 MOSFETs, and are trying to get them working.

I connect ground/common to one of the outer legs, a led (cathode) to the other outer leg. The anode of the led to VDC+ (4V) Then I connect the base to a 1K resistor and then to common/ground.

So in my understanding, when I apply power the led should be off, well its not, no matter where I connect the base with 1K resistor, the led is always on.

I tried searching google for some guides, and found some, but I cant get their exsamples to work, the led is either always on or off, no matter what the gate/middle led is.


Reply to
Jan Nielsen
Loading thread data ...

You don't connect ground to "one of the outer legs". Insure you connect the Vss leg ground. That is the 'S' lead or source.

Connect the LED cathode to the Vdd leg. That is the 'D' or drain pin. You then need a current limiting resistor in series with the LED anode. The value of the resistor depends upon the power supply voltage and the current specified for the LED. 10mA is a good round number. Connect the other end of the resistor to the positive power source.

The 'G' or gate of the IRF-530 doesn't require a limiting resistor as the device is a MOSFET. It is an N channel MOSFET so applying a positive voltage to this pin will activate the LED. Grounding the pin will deactivate the LED.

The device is sensitive to static electricity so you can damage it by touching the pins or by not observing ESD precautions.

Reply to
Lord Garth

The first hit is the data sheet:

formatting link

Terminal 3 is the source, which goes to ground.

Jumper that to terminal 1 to turn the gate off, and connect your led and current limiting resistor between the positive supply and terminal 2 (also the tab), which is the drain.

This should result in a very dim or off led (just the leakage current).

Turning the mosfet on is accomplished by bringing the gate up to a positive voltage with respect to the source. Unfortunately, from the Electrical Characteristics section, you will find that 10 volts is needed to get the thing essentially all the way on. The gate threshold voltage (where the channel just begins to turn on) may be anywhere between 2 and 4 volts.

If you want to switch a large current from a logic level signal, you need a logic level (low gate threshold) device. For instance:

formatting link

Reply to
John Popelish

_____ | o | |_____| /_____/| | IRF || | 530 || |_____|/ | | | | | +----Source | +------Drain Gate

Source to ground, drain to LED, LED to resistor, resistor to +


Reply to

ehsjr skrev:

Oh, I thought gate was the middle, since the datasheet didnt show a clean pinout, atleast not the one I found.

Thanks, it works.


Reply to
Jan Nielsen

Hello, A MOSFET gate looks superficially like a Capacitor. It gets more interesting when you begin to drive them at higher frquencies. At the same time if is a large device then you will begin to see an appreciable charging current pulses from the output of your Micro. In this regard, I would install a current limiting resistor, in order not to overload the output pin spec.

In the case of a large MOSFET, the drive power is equal to P = f*C*V^2, where f is drive frequency, C is the gate capacitance, and the V is the drive voltage. Some people like to drive them with a negative voltage (me included) when off, such that any dv/dt seen on the drain-source route, does not take the gate positive due to the drain-source capacitance, and so turning it on mistakenly.

There is usually a resistor stated as suitable for the gate drive of the FET, you see it in the spec data sheets. This should be taken as the minimum resistance to drive the fet with. Also remember if you are switching the FET *really* smartly you will see some RF emission due to the harmonics of the very fast transtition of voltage due to the switching speeds.

Is that of use?


Rob Wilson, Robstech Consulting Ltd, UK.

Reply to
Robert Wilson

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.