MOSFET or BJT? Which is better to use with Arduino

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey what's happening guys today I'm gonna try and answer a question from one of my viewers mr. Vijay Kapoor I'm not even gonna try and pronounce your first name buddy I don't want to insult you and the question you asked is an excellent question regarding peripherals I guess we call them or components use with an Arduino project that require more current than the Arduino is able to supply or sync natively now it's a quick refresher if you're unfamiliar with the Arduino I mean I'm gonna go to the hoard we know just each of the i/o pins for the Arduino is able to sink or source a maximum of 40 milliamps but that doesn't mean you can put 40 milliamps on each pin because we're looking at 200 milliamps total for the entire Arduino so obviously what we need to do is use an external power source to power both our Arduino and our component and there's a bunch of steps to get into and how to do this I'm going to try and keep it as simple as I can the most key component we have to remember is our grounds we have to share the same ground we have to have the same reference to what is zero volts in every component we use in our system if we don't do that at a minimum things won't work the way you expect them to work and in the worst case scenario you could burn up everything so obviously like I said we're gonna start with the external power source in this case we're just using my little old power supply here and we're feeding it ten volts if you take a look here power is just being fed in here to the power rail on the breadboard and then when we go up to our Arduino the power goes to the V n pin pretty simple so far right right so how are we going to control our component in this case it is a simple 12 volt incandescent bulb well we're going to use a transistor then the next question becomes what kind of transistor are we going to use a BJT or are we going to use a MOSFET which of these is the better choice my friends you could write a doctoral dissertation on which is the better choice there are just so many it's where I'm looking for intricacies that we need to take into consideration to make a scientifically solid answer but don't worry about it yeah a couple things to keep in mind will put you on the right path and everything will go smoothly so first let's talk about the BJT and the MOSFET all right there's a symbol for our bipolar Junction transistor in this case we are going to be using in NPN we have a collector the base and the emitter now our BJT is has a current controlled response a small current fed into the base so we have a small current flow between our base emitter junction allows the transistor to act basically as an amplifier and a large current can flow between our collector emitter junction we have to keep in mind that it will not conduct until we surpass what we call the voltage drop the silicon voltage drop which is about 0.6 volts so whatever we're feeding into this we're automatically going to have a minimum point the six volt drop going into it just know that keep in mind it's not a big deal I mean unless you're LS half a volt is something that you know you're needing somewhere else but in general it's not a big deal to worry about now our MOSFET is a voltage controlled device basically you forward bias it at the gate and boom it is going to conduct it will also act as an amplifier so physical differences if we want to if we want to take a look at that look at our BJT symbol here everything is connected look at the MOSFET and you see here there is no connection between the gate and the drain source components here it is a capacitively coupled gate does it matter not particularly but it has a couple advantages the first advantage is the resistance here is infinitely high so you could really kind of discount the resistance of this component in your overall system it's like we said a small current is required to keep the transistor in the on state conducting once we apply some current to the base we have to keep the current on the base so for instance we use this potentiometer here power that up now we're getting current through here is going it's coming from our power supply through the transistor and out to our bulb but if we stop that current flow then the bulb goes out the MOSFET on the other hand once we've charged that gate once we've got some electrons being bounding around in there it is going to stay on until we reverse bias that is that important again and not particularly but it's a good thing to know because it can be used to your advantage and if you don't pay attention to it it could possibly bite you on the tuchus so the big question which is better for Arduino usage the answer is how much time do you have again like I said we could write many scientific papers over this but it's not necessary in my opinion that's all this is it's my opinion based on my experience of course the MOSFET is going to be better for us in this case why well because I said so when we're dealing with the Arduino the one thing that we have a direct control over is voltage that's really all an Arduino is doing when we are telling it to when we're not telling it to read from a pin and we're telling it to turn a pin on we are controlling the voltage of that pin now we can control the currently you can can you you you can basically transmogrify voltage in the current through the use of a resistor or any other load but just to keep it simple in our minds we have direct control over voltage so we can use a MOSFET now why would we want to do that well one of the main reasons and the one that comes to the top of my head here besides the ease of use is heat so let's let's power this blue guy back up here that's uh it's it's fully open it's got five volts coming into it Wow actually has 4.4 because you got to remember we've got that little voltage drop going in there and if we come up here and we take a look at our power supply we're giving it a maximum of 0.3 amps let's call it a third of an amp so how do we figure out power watts well that is a simple calculation grab a pen here it's where you can read it power equals I times V so our power is our current which in this case is point three one five milliamps times our voltage which in this case is 10 volt and that is going to give us one point five watts one point five watts doesn't sound like much but it is going to be for that little BJT in this case it is a 2n 22 22 my favorite transistor maybe it's because of the numbers works with my OCD I'm not quite sure but that's going to get hot yeah it's like it's already extremely hot to the touch so you have to now start calculating in your thermal properties and that can burn up because bipolar Junction transistor very easily go into what's known as thermal runaway which is why when we set up our transistor and this is just rudely and crudely done here for demonstration purposes as we generally I'm not generally we mostly want to put a resistor on our emitter to prevent thermal runaway thermal runaway works as the hotter the transistor gets the more it is going to conduct and the more it conducts the hotter it's going to get so we need a way to stop that and we do that quite simply with a resistor again see how the complexity here is growing we can forget about all of that if we just switch over to a MOSFET so I'm going to pull out our little components here and a baby's a little warm and we're gonna bring in a MOSFET and anyone be careful I you touch these these guys are a little bit static sensitive now this one is the IR FZ 34 in you can grab yourself a datasheet and take a look at it but it will work in our case it's not ideal but it will work and it is setup gate drain and source so our control is going to be the gate we are going to drain from our power supply and source to our bulb so let's get this plugged in here I'm just going to pull this out so drain is pin number 2 the center pin put that there like that our gate is the first pin we'll put that there as such and then we can plug our ball back in to the third pin [Music] and finished our circuit by going back to ground and now we should be able to power that up there we go if we take a look up here at our power supply once again we're at 291 milliamps roughly the same current I mean yeah that's a little different but no big deal very nice now you can put a heatsink on here again we are still dissipating about the same amount of Connie but this is gonna handle more general rule of thumb when we're talking about MOSFETs versus bjts is MOSFETs are better for more power when you win when you're using more current want to go with a MOSFET they just simply handle it a little bit better I also remember what we talked about with that our capacitively coupled gate there if we remove the voltage there you see that we've removed the voltage from the gate but our MOSFET is still conducting in our circuit is still going if that's something that you don't want to happen you can simply puts a 10k resistor between the gate and the ground and that will solve that problem [Music] well I hope that answers your question mr. Kapoor again this is a really deep subject but that should give you enough information to keep going now you guys noticed this here I'm sure you didn't mean to sit here rather prominent PCB way celebrating their five years in business and we did that nice little goodie bag opening well here's the thing I like money who doesn't right they've offered me a contract a one-year contract haven't decided if I'm gonna do it yet but I probably will this is the actual contract right here twelve months they just want me to make couple videos a month forum to which they'll pay me $250 a video so here's my question to you guys should I do it there's no real downside to the contract they they don't want me to work with any other PCB manufacturers and I don't do a lot of PCB work anyway so it's that's not really a big deal to me what do you guys think do you think I'm being I'd be selling out if I did that I really want your opinion because you know even though this is my channel this channel is for you you are the guys that consume what I make here and I you know you guys know I read all the comments so I don't want to alienate anybody if you guys think this is a good idea let me know if you think it's a stupid idea let me know and we'll move on from there okay all right I hope you guys enjoyed this video if you did give me a thumbs up feel free to comment and share don't forget to subscribe if you haven't already and you know hit the little bell daily Whopper there if you want to be notified but you already know if you've been watching I make a video every other day unless something bad happens and you know I got them kidney stones rolling around so anyway that's it I'm out peace you
Info
Channel: learnelectronics
Views: 15,129
Rating: undefined out of 5
Keywords: MOSFET or BJT? Which is better to use with Arduino, bipolar junction transistor, npn transistor, arduino uno, arduino and transistor, arduino and mosfet, mosfet or transistor
Id: ciT3TbrkcAE
Channel Id: undefined
Length: 15min 59sec (959 seconds)
Published: Wed Jun 19 2019
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.