I am trying to drive a 2.5mA 12v load from a 5v Arduino digital output using this transistor. However, as expected, when the 12v load is connected to the Drain, it cannot be switched on from the 5v output of the Arduino. That seems to make sense, as if I'm not mistaken (correct me if I am), the Gate voltage should be above the Drain voltage to allow the full current to flow from Drain to Source.
If I'm not mistaken that Vgs should be above Vds to allow the full current to flow from Drain to Source, then how could the transistor have a rated Vds of 100v yet only a rating of Vgs of 20v?
If it is relevant, this is the load:
Side note: Running the load at 8.8v with the power supply that I currently have available, I've measured only 2.5mA of current, but it does operate properly. The page states that it should be 0.4A, might my inexpensive multimeter be faulty or could the current really be so low? This was tested without a transistor in the circuit, just the multimeter, load, and AC wall wart power supply outputting ostensibly 9v.
Since your mosfet is an N-channel mosfet you should wire it like in the picture attached.
VGS (gate source voltage should be above VGS-threshold voltage in order for mosfet to turn on); according to the datasheet 5V from the arduino pin should be enough.
Make sure you identify the right pins from the package to the schematic.
In this picture the Source is connected to GND.
Edit: also if the load is inductive you will need a protection diode (not in the picture)
srnet:
So if the MOSFET was off, not conducting, and there was a resistive load connected up to 100V the drain would be at 100V
So you think that Vg would then have to be > 100V to turn the MOSFET fully on ?
Yes, in fact I thought that with the source attached to ground and the drain attached to the cathode of a resistive load powered by 100v, that the gate would need 100v to allow the current to flow fully.
On that page it is stated that if Ve < Vb < Vc then the transistor is in forward active mode, therefore the current from collector to emitter is proportional to the current flowing into the base.
Is that my mistake? I'm interpreting "collector" as "drain", "emitter" as "source", and "base" as "gate". Is that above sentence valid only for BPJ transistors?
senderene:
Since your mosfet is an N-channel mosfet you should wire it like in the picture attached.
VGS (gate source voltage should be above VGS-threshold voltage in order for mosfet to turn on); according to the datasheet 5V from the arduino pin should be enough.
Make sure you identify the right pins from the package to the schematic.
In this picture the Source is connected to GND.
Edit: also if the load is inductive you will need a protection diode (not in the picture)
In fact, the wiring is as seen in the picture attached, with two exceptions:
There is a LED inline with the resistor, for which I used a 220 Ω resistor.
There is also a 1000 Ω resistor from gate to source.
Note that the LED does light up when I expect the load to operate. But the load does not operate.
dotancohen:
Yes, in fact I thought that with the source attached to ground and the drain attached to the cathode of a resistive load powered by 100v, that the gate would need 100v to allow the current to flow fully.
On that page it is stated that if Ve < Vb < Vc then the transistor is in forward active mode, therefore the current from collector to emitter is proportional to the current flowing into the base.
Is that my mistake? I'm interpreting "collector" as "drain", "emitter" as "source", and "base" as "gate". Is that above sentence valid only for BPJ transistors?
In a MOSFET the gate is not actually connected to the transistor drain and source;
dotancohen:
If I'm not mistaken that Vgs should be above Vds to allow the full current to flow from Drain to Source, then how could the transistor have a rated Vds of 100v yet only a rating of Vgs of 20v?
This is due to pinch-off - as soon as the drain's voltage is enough to pinch-off the channel the charge
carriers at the end of the channel just drift to the drain under the electric field between that point and the drain.
The voltage drop is almost entirely across this drift path rather than across the channel itself. Normally this state of affairs lasts for 10 nanoseconds at most in a switching FET, as the normal on-state has very little drain voltage and the channel reachs the drain (no pinch-off), and the normal off-state has no channel at all.
In power MOSFETs the geometry keeps the high voltages at the drain from affecting the channel area too much,
most of the drift is well away from the channel area, and actually through the chip from top to bottom. The
layers of the structure are carefully doped so most of the voltage drop is in a layer well beneath the active
part of the device. Hence MOSFETs can go to very large voltages. The on-resistance has to be a lot more
in high voltage parts to ensure the voltage drop is not across the channel in fact.
Yes, in fact I thought that with the source attached to ground and the drain attached to the cathode of a resistive load powered by 100v, that the gate would need 100v to allow the current to flow fully.
So no, that's not the case at all.
The sparkfun tutorial is about BJTs, very different from FETs.
As the load is an inductor you require a free-wheel diode across it to prevent inductive kick-back spikes. A standard recitifer like 1N4001 will be fine here. Cathode to +ve supply, anode to MOSFET drain.
Also make sure the GND from the battery is tied with the GND of the arduino and the GND from the mosfet.
I would try 10k resistor instead of the 1k, or at least a little bit higher.
And also as it was suggested the protection diode.
And I think the circuit should work.
If not try something simpler: for example, instead of the "door lock" use a diode with a limiting resistor, and tell us what happens.
MarkT:
As the load is an inductor you require a free-wheel diode across it to prevent inductive kick-back spikes. A standard recitifer like 1N4001 will be fine here. Cathode to +ve supply, anode to MOSFET drain.
Thank you. In fact I don't have a supply of diodes!
The only diodes that I have are of the type in the attached photograph. I believe, but am not sure, that these are zener diodes. Can that be confirmed by the photograph?
The diodes' markings are extremely difficult to read, neither myself nor my daughter can make out the whole writing. I believe that the end of the top line is "007" and the second line is "C". Is this information, together with the photograph, enough to identify these diodes? If so, are they fit for purpose?
I think this is what the discussion is driving towards.
Arduino drives the gate, when on the LED conducts and the inductor is driven.
When turned off, the diode allows current generated in the inductor to be dissipated back in the power supply/inductor, vs the MOSFET seeing a 'big' jolt of current into its high offstate Rds and creating a big voltage spike (V = IR, that V can damage the MOSFET).
The two resistors before the gate limit Arduino current into the capacitance of the gate, and the lower one keeps the gate off when the Arduino is not actively driving the pin (when it is an Input during a Reset, and then until the sketch fires up to drive it low or high).
Will that be an acceptable replacement for the suggested 1N4001? Looking at the datasheet [1] it seems to me that the 1N4007 can tolerate higher voltages so I suspect that it could replace the 1N4001 but I'm sure there are nuances that I'm not familiar with.
senderene:
Also make sure the GND from the battery is tied with the GND of the arduino and the GND from the mosfet.
I would try 10k resistor instead of the 1k, or at least a little bit higher.
And also as it was suggested the protection diode.
And I think the circuit should work.
If not try something simpler: for example, instead of the "door lock" use a diode with a limiting resistor, and tell us what happens.
In fact, all the grounds are tied together.
I replaced the 1kΩ resistor with a 10kΩ resistor.
I added an 1N4007 across the load, with the cathode on the side of the positive supply voltage.
Still the load does not operate. Yet I do see the LED lit, so I tested and at the gate I measure only 4.2 volts. I then measured voltage at the 5v pin, and sure enough it's 4.2v. The Arduino (Nano clone) is getting a measured 8.8 volts on the Vin pin. Perhaps the Nano's voltage regulator is damaged? I've ensured that there are no additional loads other than the Nano, yet the 5v pin is putting out too little voltage.
I should have spotted the dreaded IRF520. Its not logic level and is 100V rated, and is generally a
poor choice for almost any Arduino project.
For low voltage stuff a 30V rated logic-level device with 10 milliohms on-resistance or better would
be a reasonable choice, much more current handling and it would be logic level of course.
To identify a logic level MOSFET you go to the datasheet and find the Rds(on) specification which will
tell you the Vgs needed to switch it (sometimes there are several entries). Basically if any of the entries
are for Vgs=5V or less (4.5V is common), then its logic level, otherwise it is not.
Ignore the threshold voltage, that confuses a lot of people and its not what you might think.