No video
How to Use a MOSFET as a Switch
In this video we will cover: What is a MOSFET. Benefits of using a MOSFET switch vs mechanical switch. How to use MOSFET as a switch. Go over example using a MOSFET as a switch with Arduino. Here is a link to the Arduino code used in the video: forcetronic.bl...
Пікірлер: 220
At 7:18 for the P-Channel the 5V is supposed to be connected to the Source pin not the Drain pin. The Arduino wiring is correct.
@chrisw1462
3 жыл бұрын
Yep.. P-channel MOSFET is drawn backwards. I'm still learning, so I had to go look it up.
8:15 I think you can use a pullup resistor on the P channel base so that it is normally off when there is no signal driving the base as both an "initial condition" during controller powerup and as a "fail safe" if something goes wrong. One disadvantage of the N channel over P is that it is a high side switch which means that the device being switched always has live power to one terminal even when it is off. So there are tradeoffs with each approach.
Awesome video. This should be required for anyone EE students at the beginning of any courses dealing with transistors.
Don't know where to start man,. But I want to let you know,, this video, demo, explanation, is really helpful for me.. This is exactly what I needed instead of relay ,, just starting from scratch here man.. God bless you
I'm getting back into electronics after about 30 years. Thanks for the video, it's helping me to remember. Now if I can only figure out how to use my PicKit I'll be good?. 👍
7:38 that finally solved my confusion about P-channel and negative voltage value. thanks.
thanks for the best explanation of n-channel vs p-channel I have seen so far
Thank you for the video, it is very clear 5:12 and following may not be accurate for the mosfet used 5v on the gate will not garantuee the low Rds - you would need a "logic level" mosfet for that the datasheet for the buz11 notes in the electrical specifications: Id 15A and Vgs 10v for a typical Rds of 0.03ohm so, if you use this mosfet you might not saturate the mosfet with Vgs 5v, and the Rds might be a lot higher than what you anticipate, meaning lots of heat generated in the mosfet, and less voltage for the load, as there will be a voltage drop across the mosfet Rds depends on Vgs, Id, and the temperature of the mosfet, if i understand the datasheet correctly I wish the datasheet showed a graph noting the relation of Vgs to Rds breadboard time, i guess :) note: a "logic level" mosfet has a Vgs(th) of 1-3v - most of the time it will be noted in the description of the datasheet it is logic level
@tornadokat
5 жыл бұрын
@KiSwiSje, I just came across this video and was going to point out the same thing but saw you already did, so thank you for doing so. Some logic level mosfets have an L somewhere in the part number to denote it is logic level but it is not guaranteed to have an L or that having an L means it is logic level. Some examples of popular logic vs not-logic level ones are International Rectifier's IRLXXX vs IRFXXX series, or a Fairchild Semiconductor FQP30N06L vs FQP30N06.
Hello from India... Great video.. Very useful and informative 👌
Thank you. It was precise and helpful.
Enjoyed many of your arduino videos but your BUZ11 is not recommended for 5v. Special logic level fets are indicated for 5v. Most power fets are designed for 10 volts drive. Also if higher currents are anticipated a series gate resistor is needed to lower the frequency capability of the fet. A fet is really a programmable device depending upon the series resistor value. Power fets make excellent series regulators but must have 10k or higher series gate resistance. A series gate resistor should always be used, if the fet oscillates it may fail from various reasons. I have made power oscillators up to 150mhz( before failures) using typical parasitic inductance values. The threshold voltage of 2v to 4v is where conduction may start. " threshold" after 4v the resistance will decrease to the Resistance of 0.040 ohm at some level below 10v. Ray King
@samk2630
5 жыл бұрын
Ray, Any recommendations for a similar fet that has similar voltage / amperage maximums?
@antonioinochi9170
5 жыл бұрын
hi Ray, so following your thinking which is the right mosfet to use?
0:51 "They Will Live Longer Than YOU WILL" 😂😂
Besides the P-channel MOSFET being drawn backwards @7:01 , the only thing you might have added is how to attach an insulated heat sink (non-conductive heat pad and nylon screw/nut).
@darrylgodfrey9604
2 жыл бұрын
Thanks for your comment, Chris - I thought the p-ch MOSFET was upside-down - it should have the source connected to the positive rail.
This was your first video I've watched and I enjoyed it. Thanks from a new subscriber
You have a problem on schematic. You are connecting wrong the PMOS with drain on VCC and source on GND. In that case the body diode will be forward bias all the time. The PMOS indeed is used on high side but with source on VCC and drain between load and GND.
@michaelhawthorne8696
8 жыл бұрын
+Adrian Carstea I had to look at that twice, and I too was convinced he was wrong as the Body diode will conduct all the time.
@Empolitano
8 жыл бұрын
+Adrian Carstea Yes that's wrong
Your video on using MOSFETs was very informative and comprehendable.i would like you to do a video on how to use MOSFETs in constructing a H-bridge. Thank you.
Perfect explanation, Thank you!
Thanks man. I was struggling with a P-channel MOSFET and now I know why.
Great, been a long time away for me, I had a guess at what they were but needed to be sure. N - negative side. P- positive side. (Side being the load) N no power P powered. Which is the switch off. What I hadn't known was the reverse drain and source. But I guess the diode should have pointed that out. It get complicated when you've zenners and you're running reverse for low volt application. Then S to D works. But the gate then can be/have more important characteristics.
thank -you for the great explanation and visual aids well done!
You forgot to mention the capicity of the MOSFET and the resulting effects of these capacity. E.g. It is no good idea to connect an io pin of a mcu without a resistor to the gate of a n-channel FET. Also there should be an resistor between gate and ground allowing tha capacitor to discharge when FET is switched off.
Explained thoroughly well
Just an advice, add gate, source & drain symbols too at 7:22, beginners get confused with terminals all the time
superb explanation . . easily understood . . Thank you very much . .
Helpful explanation. I wish there had been G/D/S labels on your diagrams to help clarify the connections. Using an IRF4905 p-channel MOSFET, and copying the code from the video, I found that a HIGH signal turned it on and a LOW signal turned it off -- the exact opposite of what it says in the video. const int pMOS = 3; //create variable for gate of p-channel MOSFET IRF4905 void setup() { pinMode(pMOS, OUTPUT); } void loop() { digitalWrite(pMOS, HIGH); //Hmm, this turns it ON! delay(1000); digitalWrite(pMOS, LOW); //And this turns it OFF! delay(1000); }
Do you know how to connect two P-MOSFETs in parallel to give the same current, please?
very good explanation, thank you!
thanks what does it mean if my LED doesn't stay on it stays on for a couple seconds but then fades away does this mean my mosfet is broken or damaged
Hello sir, Can you help me for Dimming COB DC lamp with 28V 670mA? 1. TIP41C BJT [100V 6A 65W] it is getting to much hot. 2. IRF540 MOSFET[100V 30A 150W] it is not giving effective dimming Other Option is to use TIP120C BJT[60V 5A], IRF520 MOSFET[100V 10A] Which is best IC to use with 4N35 Optoisolator to dim DC with ARDUINO ?
Excellent, very clearly explained.
Thank you for the video on MOSFET switch control using Arduino.
Thanks, clear and easy to understand, I learned something.
Thanks for this. Really helpful. Your an excellent tutor!
Thank you Very much Sir for sharing this video about transistor
What kind of P channel was used? I tried the IRF9540 but it doesn't work. With the IRF540 it's ok.
For a better understanding when it comes on N type or P type I would have state that N-Type is normally open or NO and P-Type is normally closed or NC. Am I correct ?
As arduinos are a bit old, can these be used on an esp32 or 8266. These have 3.3v volt output. If so, can the go straight to the pin? Info on the internet is conflicting.
that's a lot of kit for a slow switch between the LEDs ? If I wanted say 2000 HZ at 35 amp 40V dc would I need this kind of set up ?
Great video! Helped me to better understand N and P MOSFET, Thanks!
hi ForceTronics, Please help me with this I have to switch a peltier module using a attiny 85 microcontroller.where the controller works on 5v and the pelteir works on 12v 3amp current. so my 1st question is can i be able to switch my peltier module using my attiny 85. and 2nd if yes which mosfet would you like to prefer to connect for better result. And do i need to connect a heat sink with the mosfet. Thanks you
I want to connect a supercap to a mosfet so that when the supercap is fully charged, the switch is on. Should i connect the drain to the supercap and source to the H-bridge? and how can actually turn on the switch or how can i make it understand that the supercap is fully charged. I am so confused
very informative, love watching your videos!
@ggaspord
7 жыл бұрын
Very good explanation...thanks
@josephmarino5304
6 жыл бұрын
smart india 0
Sir ek bt clear kar de mosfet or transiste ek he tara kam karte hain kya or kya ye sb resistans transister mosfet rectifire alag alag number k alag alag kam karte hain agar alag alag kam karte hain tu sub k bare me kese yad rakhe koi easy solution bata de plzzzz
I wish that I had paid more attention ! Before KZread was available.
Please help: I'm using a npn darlington tranzistor to switch on D.R.L. lights on the car . Been using the tranzistor as an amplifier and it is directly connected to the battery and switching on when there is power from the ECU. The problem is that it has a voltage drop of aprox 2.2 volts witch is way too much for the DRL brighteness , it's dimming the lights with defeats the whole purpose of Daytime Running Lights. Please help
@Hi.Al.
6 жыл бұрын
Bd901 is the tranzistor
@blurrrrrr44
6 жыл бұрын
Maybe you could use the transistor to activate a larger mosfet that has a lower voltage drop. Or use LED DLRs.
@Hi.Al.
6 жыл бұрын
Kuri the wolf Thank you for your reply. Could you name one that works with 12-15V 2W and unde the hood car temperatures? Maybe 42C degrees
@blurrrrrr44
6 жыл бұрын
Any i buy on the internet seem to be rated for it.
Is it possible to put mosfets in series in order to increase the source voltage? For example I have 5 mosfets rated at 450 volts. Can I put their sours and drains in series, so that I can increase the voltage up to for example 1200v?
I have a hard time finding a p-channel TO-220 fets with on resistance specified at 5v. I think the gate voltage that gives the rated on resistance is pretty important?
i tried it in tinkercad and it didnt work. Is that because tinkercad is a little bit buggy? I wired everything correctly, almost sure about the wiring. Can someone please confirm or deny that is because of tinkercad?
I want to switch 48 dc (i,e i am not applying any load, i just want to break the circuit when needed ) but I don't have 48v dc relay. can I use a MOSFET if yes how
I need to use three MOSFETs to switch high voltage DC. Three phase, up to 220 DCV. Which kind of MOSFET do you recomand?
Hello sir kindly make a video on 4 mosfet how to control 4 mosfet which is use in converters
Im trying to use my arduino UNO to send a +5V signal to a mosfet to drive a 24V solenoid. i know that i need a diode across the solenoid to protect it. What i don't know is how to pick the right mosfet. I know that i needs to be logic compatible. My power supply is 24VAC 750mA. the in rush current of the solenoid is 0.35A @ 24 VAC. The holding current is 0.23A @ 24VAC.
@ForceTronics
8 жыл бұрын
+Haitham Adwan So it sounds like you want to switch AC voltage with the MOSFET and not DC, is that correct? If so a MOSFET will not work for switching AC. You will need to use a TRIAC and I have a video on switching AC with a TRIAC that you can check out here is the link: kzread.info/dash/bejne/gphqmdSIpaqrl5M.html At current levels
@7LamarOdom
8 жыл бұрын
+ForceTronics Ok. Thank you for this. in the video, the circuit of the Thyristor as an AC switch setup. My load would be the 24V solenoid valve with the free wheeling diode to protect it from back emf. Now my question is, do i need the optoisolator? Also, would you be able to tell me in theory if eveyrthing should be fine now
At 5:37, it should state that the mosfet will turn off, or our switch will OPEN, when Vgs drops below 2V.
excellent clear explanation.
Hi Thanks for the video. I just couldn't get this working on a higher load than a LED. I have a 5VDC load that draws 2A. Could you please leave me some tips?
At time 7:02 of your video you show a pair of MOSFETS but I think you have the P channel device upside down.
Hi, can my Vdd be more than 5v, for example 30 V and my load be a battery? Here I am thinking of charging a battery using a solar panel, but controlling the process using a microcontroller.
@ForceTronics
8 жыл бұрын
+Elisha Mufambirwi Yes, it all depends on the MOSFETs ratings which you can access through the datasheet. Here is a link to the IRF540N which has a rating of 100V www.irf.com/product-info/datasheets/data/irf540n.pdf
can u tell me about what is aurdino ...is it a micro controller or a micro processor.. explain to me
Sir your video is very useful thanks Sir Rc curcite of igbt paller how to calculated resistance capacitor velue please video sed
nice video is there anyway to use the mosfet with floting ground ?
thanks for explaining so clearly
Awesome! Best explanation I have found!
Nice video. Is it safe to connect the battery positive to the gate with a wire without resistance?
So can i use the n channel with arduino and dc motor to give a signal HIGH from the arduino pin to make the motor run on the 5v
@ForceTronics
8 жыл бұрын
Yes, assuming you get an N Channel MOSFET that can handle the current of the motor and connect things up correctly.
@EngineeringNibbles
8 жыл бұрын
Add a flyback diode !
@garyh444
7 жыл бұрын
Sunderwolf Impulse I would like to know if the Marshall amps that are of the Mosfet variety have a whole bunch of these mosfet gates or are there only a few ?I really like the sound of them and was wondering if they still use them and just don't play up that fact or was there a problem with their use?
This one can I apply for 430V using microcontroller.application is 5HP moter,can you give nessary circuit
Thank you I made a error about the load BEFORE the drain with P chanel IRL530n I solve it now
The schematic representation of the p-channel mosfet is wrong. The cathode of the permanent diode should connect to the source as should the cathode of the other diode as well.
I cant find any large mosfets where I live. I can only get scrap electronics and use what I find. I have several smaller mosfets, can I use them in parallel for more power? Like resisters, if used together in parallel, they split power flow between them and conduct more power and lower the resistance, can mosfets work the same?
@ForceTronics
8 жыл бұрын
+Randy Travis In theory yes, you can put them in parallel to divide up the current flow. From a practical standpoint there are a couple challenges or pitfalls with this approach. First they may not all have the same on resistance so one of them may get more current than the rest. Second if they don't all turn on at the exact same time then one will get the full current for a short period of time.
@randytravis5893
8 жыл бұрын
That might be a problem. I plan on making a stun gun with a voltage multiplier and a flyback transformer, its going to be some fast killer voltage. I think I just might go out and just get a beefy relay, that might be a better idea, any ideas?
Really great video, thanks for sharing!
Is the mosfet just transistor?If it's transistor,what's make the difference of their name?
@rich1051414
7 жыл бұрын
Mosfet stands for metal-oxide-semiconductor field-effect transistor. What that means to YOU is, it is designed for relatively high current applications(on drain) but controlled by voltage based low current triggering(on gate). Basically, it allows you to control a rail that would otherwise be too much current for you to work with directly. For instance, by using an op amp, a voltage reference, and the drain feeding back to the op amp, you have a high current voltage regulator without burning out your op amp.
Let me put it this way we have a 12/volt battery on a table that has a light on but in time the battery is dying with voltage going lower and lower and the light brakes at 9/volt and lower . It is this I want to stop , put something on the line that would sense the lower voltage and shuts off and only comes on when volts are 12v or high
Very nice presentation. Exceptionally well done. Do you know anything about "latching" mosfet switches? I need to turn a PIR "on" with a "pulse", a logic high from my AtMega 328 bare bones chip before it goes into POWER_DOWN_MODE. I need the PIR to remain on, until it receives another "pulse" from the 328 chip to turn it "off". I have found many examples on line, however NONE have been as clear as your presentation on switches and I am hopeful you might be able to explain an "on" "off" latch circuit. Regards
@thenextproblem8001
Жыл бұрын
Have you figure it out?
Good job. Thank you for doing this.
Hi. I just bought lot of 20 pieces of irfz44n, i was searching for a logic one and got this one up, so i thought it was logic, but it dosn't state that anywhere, and ofcource i discovered that after the purchase...lool. Never the less, its specs are vds 55v ID 49A and VDR 17,5 mohm. Its for to be used with an arduino and controling a solonoid valve (12v 4,7W), so its almost the same as the buzz11 , and i can use as intended as a switch with 5v and 0v?
@ForceTronics
3 жыл бұрын
Most likely. You need to look for its threshold voltage spec or Vth and ensure it is lower than 5v and higher than 0v which it probably is
Hi, is it necessary to have a pull-down resistor attached to the gate for N-mosfets? Some people say, the mosfet could misbehave without it.
@ForceTronics
8 жыл бұрын
+Anab Akanda Having a pull down resistor is a good idea if you want to ensure the MOSFET is in a known state when the MCU is powering up or is reset.
@MiniHydrostat
8 жыл бұрын
+ForceTronics Thank you. Makes sense.
Very gud information sir plz upload without Arduino circuit only with discrete circuit of switching both type mosfet
what is the p channel mosfet used here?
How about a video about fets and e-bike motor control?
So I've been doing a long running car restoration and have been having a thought. I just ordered an arduino to get into programming a little, really boost my electronics potential, and was thinking of how I could replace most of the relay panel and computers in the car. It's from 79, the computers and relay panel don't do much that's too complicated, but they are big, bulky, and easily add about 3" to the passenger side foot well plus all the heavy gauge wire running everywhere. Also I think it would be really cool to make new wiring harnesses and be able to take care of all my check engine lights and whatnot in a custom manner. So are mosfets a viable alternative to relays for headlights, wipers, starters, etc...? Could I just run power through a fuse bar and then directly to each component with a mosfet at the component, and a signal cable from a control unit? Sounds like more cable but with it I could have a power wiring harness and a signal harness run separately. Or I could just build a smaller unit to replace the massive relay board and other hardware. Or are relays better in most of these applications and there's a reason car manufactures use them?
@ForceTronics
7 жыл бұрын
I have not worked in the automotive industry so I can't give you an exact answer on why they use relays versus MOSFET. My guess is relays are better for the rugged life of a vehicle since they are less susceptible to electrical noise and harsh environments. Also automotive is a highly regulated industry and they maybe required to have a literal air gap when an electrical connection is turned off (often referred to as galvanic isolation)
@MrKillermeatball
7 жыл бұрын
That does make sense. And how are MOSFETs susceptible to electrical noise; what should I look out for when using them in a design?
@ForceTronics
7 жыл бұрын
MOSFETs require less power to turn on then relays. If you have wiring connected to the MOSFET that is not shielded it can act like an antenna and pick RF noise. Also I believe vehicles are noisy electrical environments in general. For instance when the engine is started a huge spike of current is pulled from the battery which can induce noise onto the electrical system. There also may be other sources that I am not aware of.
What mosfet did you use? I thought MOSFETS need a drive circuit as arduino can supply only 5V output
@ForceTronics
7 жыл бұрын
It all depends on the MOSFET you use. For lower power MOSFETs you can often drive with MCU and for higher power you may need drive circuit. You have to look at the datasheet. The BSS138 you can drive directly with MCU.
Do you get a sharp transition with a MOSFET? Would you get a true square wave from a MOSFET?
@ForceTronics
7 жыл бұрын
Typically you can get a rise and fall time in the order of micro seconds or 100s of nanoseconds (possibly better for high Mosfets). Data sheets for Mosfets will have this spec listed typically as V/usec or V/nsec
@AllegedlyDave
7 жыл бұрын
Thank you, for the application I have in mind I'm looking for a transition time that approximates a mechanical switch :)
@ForceTronics
7 жыл бұрын
Well with a mechanical switch you have to wait for the switch bounce to settle which is probably longer than the switching time for a MOSFET. If you are not familiar with switch bounce I have a video where I discuss it kzread.info/dash/bejne/i2xqj9ZympnKn9I.html
@AllegedlyDave
7 жыл бұрын
Thanks for your quick response, I guess I should have been more specific, the switch in question is a commutator so I don't think bounce is an issue in this case :) Thanks again, I appreciate your help and your work :)
hello can u tell me other mosfets name with gate to source voltage less than 5 volts
Can i use BUZ11 N Chanel to switch 36VDC , 5A LOAD??
Isn't the P-Channel FET upside down in the diagram?
make a video on how to use mosfet as switch in place of relays in car wiring harness
Great Video, THANK YOU!!!!
i like it to use it for boost voltage up and make good pair with capacitors 😊
what would happen if the threshold voltage sat in between 2 and 4V ?? ( 6 min )
@ForceTronics
5 жыл бұрын
If the MOSFET is not fully off or not fully on (as defined to act like a switch) then it is operating in the non-linear region. In the non-linear region you can use it for amplification or as a variable resistor or other things that I may not be aware of
for automotive application which one do you think would be better- pMOS or nMOS ?
@ForceTronics
8 жыл бұрын
Both are equal. The determining factor for P versus N is where in the particular circuit you are working with is the best place to put the switch. If it is between ground and the load then N is the best. If it is between the load and power source then P is the best.
سلام 👋سپاس وهزاران لایک و تشکر. ...وممنون شما برلیان هستین.....🙏🙏🙏👌👌👌
can 24v 10 amp power control be provided with arduino with this method?
@ForceTronics
4 жыл бұрын
The answer is yes as long as you properly spec your design to handle the power level and heat dissapation needs of the design. There could be additional circuit design needs depending on your load. For instance if you are powering an electric motor there could be inductive fly back that needs to be addressed
Am I the only one to notice that the figure @7:02 appears to have the P-Channel MOSFET placed UPSIDE DOWN?? Shouldn't the SOURCE be connected to Vcc and the DRAIN connected to the load?
@friedhelmschroter8124
4 жыл бұрын
No, I fully agree to your point. The source of the p-channel MOSFET should be connected to the 5V power source and the drain should be connected to the LED. Looking at 9:40 and enlarged later it looks the wrong circuit for the p-channel MOSFET was also realized with the Arduino (the most left Pin on the p-channel is connected to the LED, but it should be connect to the +5V supply). Obviously it still works in this combination, but I assume the Gate - Source voltage is less than the optimal -5V (may be something like -3.5V or -3.7V just letting the extremely large MOSFET pass the little current the LED needs).
Awesome , thank you sir
what is the P channel MOSFET used here???
The diagram of p channel mosfet is wrong I guess because as you have showed it in schematic the body diode will conduct all the time
@ForceTronics
9 жыл бұрын
Yash Kudale Thank you for the comment. I am not sure that I do have it wrong. The diode shown is a zenor diode and (from what I know) it is there to protect against fly back voltages from inductive loads. It has a higher threshold voltage than the MOSFETs normal operating voltage.
@YashKudale
9 жыл бұрын
***** true ! just check on 7.12 the body diode of P channel MOSFET is forward bias hence conducting irrespective of the gate voltage
@YashKudale
9 жыл бұрын
***** and sorry if I am wrong
@qwertyuiopasdfghjkl6991
8 жыл бұрын
93ح3ح
Amazing video!
very helpful video!! thanksss!!!!
excelent video, thanks.
i was wondering what the difference would be if you wanted to switch a separate power source thats not the arduino?
@ForceTronics
7 жыл бұрын
You can do that as long as it is DC and they share a common ground
@starcitizenmodding4436
7 жыл бұрын
Thanks thats what i assumed. sub to my channel so you can help me with mods lol. it took me a while to work out how to control multiple leds in a bar graph. Thanks
If you don't need 50V and 40V will do (@ a max of 195A) use IRLB3034 instead. RDS(on) is typ 1.4 milli ohm and max 1.7 milli ohm not that crazy 40 milli ohm which is horrible.