#BB4 MOSFETs - From an Arduino Perspective

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
and welcome to my series of short videos in which we discuss how the Arduino interacts with various electronic components yes in less than 15 minutes we'll go over the basics how they can be used hints tips tricks and traps and it's MOSFETs this week yes MOSFETs which tends for metal-oxide-semiconductor field-effect transistor I know it doesn't help that you know that so we'll just forget about it okay but MOSFETs in the shape of transistors as you can see on my workbench here are used absolutely everywhere these days and far more than BJT bipolar Junction transistors which you may have seen if you've watched an earlier video in this series there will always be a place for a BJT but frankly off the top of my head in an Arduino environment I cannot think of where a BJT would be preferable to a MOSFET other than in price bjts now they are literally 10 a penny whereas MOSFETs are slightly more expensive and certainly the big ones but you can see at the back here these metal tabbed ones but you can some time to come in at a pound apiece so you wouldn't be throwing these around casually in your circuit unless you needed a particularly high-powered one now just a quick shoutout for PCB way especially for beginners who perhaps have never done this before it really is simple once you get your head around it create your PCB design in your favorite CAD program kicad or something like that and then get your Gerber files ready and upload them when you click on this button here now the dimensions I'm not important just put one hundred by hundred here put how many you want here remember it $5 for ten pieces so put in ten and then click the quote Now button but I want to talk to you about something else this week and that's about are you really gonna solder SMT components because they will do it for you for a very reasonable sum of $30.00 but that includes your shipping so you still to get it back don't you let's have a look what that means now this is the page you end up on when you specify how you want your board to be assembled okay and behind my head you can see that sign there look free shipping but this PC assembly so bear that in mind now here you say how am I going to source the components and the best ways to let PCB weigh source them for you you just give them a list of the components you want in a standard you know spreadsheet format so you say I want these of this value in this size so for example you might say I want a 100 nano farad capacitor Oh 603 and that's capacitor 1 and in capacitor 2 is something else and so on you just give the entire list they'll go and find them and believe me components are cheap in China so you'll be pleasantly surprised at the cost now having done all that you specified down here whether you want through-hole components which sort of the board you want soldered either top bottom or both and they'll just do the whole thing and send it back to you it really is a nice way of getting a prototype to you back very quickly without having to get the soldiering going out so what you waiting for have a go at PCB wait and try them out now now put a couple of links below this video where you can buy MOSFETs cheaply for use in general use arduino circuits alright and they're absolutely fine if you do need higher powered ones for any reason you probably know what you need light powered ones and you're already taking that into account ok the final thing is though just before you look at the next bit of whiteboard video is that this little dual chip MOSFET now this is an SI for $5.99 there's two little tiny MOSFETs in here but an in Channel and a P channel I'll explain what they mean in a little while but they're put on this little tiny board so you can put header pins obviously both sides and then plug them into your breadboard and pull em out with them and yeah there's a link down below for one of these you can get ten of these for about I think they're about a dollar apiece something like that from the far east and lots of places will sell you these and they're good for playing about with as I say though just watch the pins when you're touching them don't put your hands all over them like I'm doing now oh my goodness put it down quick right let's get on with the white ball because it will explain everything there is to know about MOSFETs from an Arduino perspective all right we're not building rocket ships we're not building radio transmitters so we're not even going to cover that we're looking at it from an Arduino perspective so let's go on with it so first things first these are the symbols for the MOSFETs and there are two types that we're interested in End channel MOSFET and P channel MOSFET and just to complete the picture these are known as enhancement mode MOSFET there is another one called a depletion mode we not be going there in the arduino world I've yet to see it being used so n-channel MOSFET most commonly used in the arduino world because this acts like a really wonderful switch to remember when we were talking about BJT transistors we were talking about switches well this is a switch on steroids why because the resistance between the drain which is usually positive in relation to the source the resistance across here when we apply a voltage here is tiny tiny naught point naught 2 of an ohm for example is not uncommon that is 2 milli ohms now what does that mean for us well it means we can pass an over lot of current through here without this thing heating up which is the problem with BG ATS which is why you have massive heat sinks with a MOSFET you could pass through this particular MOSFET here probably five or six amp'd without this really getting too warm at all brilliant what kind of voltage do we need to put on here to make this switch on basically to connect the drain to the source well luckily for us there are things called TTL which stands for transistor transistor logic versions also known as 5 volt gate versions now 5 volt does that not strike a bell to anybody who's ever used an Arduino before yes your Arduino here your little uno could literally out put something on GPI upon pin 8 for example anything and connect that directly to the gate here and this will switch on now just a word of caution I would always put in here a little resistor just in case things go a little bit awry with this design or you touch something if you put in here a resistor of about 180 ohms it have zero impact on the functioning of this circuit but will protect your uno or whatever chip you've got attached here should you accidentally short the ID of the gate to ground or however you managed it blow this up an internally short gate to source and then to ground it will rotate your uno it's been known believe me don't ask me how I know that so with this little tiny protection in here what else is so wonderful about a MOSFET apart from the fact it's an extremely low switch well it is also very fast yes and we mean fast fast much faster than the BJT you can put a single on here a square wave signal like this of many hundred thousand Hertz or even megahertz and this will keep up no trouble at all which is why you find MOSFETs for example in controlling motors you can put a stream of pulse width modulated pulses down here to control a motor nice and smoothly with all the full talk that that pumps with modulation gives you and the MOSFET doesn't even break into a sweat it just gets better and better doesn't it so here's a little typical example circuit I've just put together imagine your Uno is outputting a signal on pin 11 goes through the hundred eighty a resistor as I said just as a safety factor and is turning on a MOSFET connected to a load in its drained that then goes to much higher voltage 24 volts for example this will be able to pass as I say up to five amps through here without really breaking into a sweat and it works so much better than the BJT for start how much current do you think flows from your Arduino through this resistor and into the MOSFET and the answer is the forward current into a MOSFET is pretty much zero how can that possibly be well what happens is that the gate charges up initially was a tiny tiny amount of current and then stops and it's just voltage that decides to turn the MOSFET on no current passes through here no sweat on your Arduino Uno you could be driving a mini MOSFETs from your uno no problem at all what do we really have to think about though when using MOSFETs is there a downside well let's not call it a downside but you do have to be careful what the maximum voltage between your drain and source can be here for example we're saying we're going to use a 24 volt supply and being a TTL or logic level gate we know that this is going to switch on pretty much fully on at 5 volts sometimes you can go down below 4 volts and you can even switch these things on at 3.3 volts which is useful for things like esp8266 is of course another micro control the required very low voltage look at the datasheet and for this information you want to look at the V T H parameter this will tell you the threshold of the voltage on the gate that will turn this on sometimes VT h is also put down as V G s the voltage between the gate and the source between here and here that will enable this to switch on yeah they'd love to confuse it's done that with all these acronyms brilliant anyway you'll soon get a head around it when you look at your first MOSFET datasheet so that's brilliant for n channel mosfet yeah that's fine that sort of works in the way that we've come to expect BJT style transistors to work but what about this poor little P channel then now this could be I suppose compared to a PNP BJT right if you remember the symbol for a BJT in this case that so that PNP transistor it would look like that and it's sort of equivalent but not really why well as we said before no current passes down the gate and the resistance between the source and the drain remember they're flipped around where the source is over here for an N channel it's the drain down here for n to P channel so this is positive in respect to here the resistance is low but not as low as what you'd get for an N channel the resistance between the source and the drain for a p-channel could be as high as 10 ohms the ones I use in the dual mosfet package from an SI for $5.99 the resistance is naught point naught 6 ohms or 6 milliamps which is still fantastic but not as good as the end channel version I'll leave you with some MOSFET keywords that will enable you to talk about MOSFETs like you're a pro these are the abbreviations that you'll probably see on the datasheet of course they look very mysterious and learning but we'll soon gets the hang of it the things we need to know about in the Arduino world first of all what voltage can we apply between the drain and the source without this thing blowing up and that's what this is the drain to source voltage and most of them are 40 volts or higher occasionally you may find one that's only 20 volts but within an Arduino environment that's still okay isn't it we're working at secondly what maximum voltage do can we apply on the gate here compared to the source so if the source is at ground how much voltage can we apply here well in an Arduino world once again run likely to exceed 5 volts but this is what you need to look for on the datasheet vgs the gate to source voltage maximum and it's normally about 20 volts thirdly how much current can we pass between the drain and the source when we turn on our LEDs or motor or whatever it is we're doing and whilst there's no actual rule about this 5 amps is probably the norm if you want to do a lot more then you'll have to get a metal tabbed MOSFET and you still would probably need a heatsink in that stage but I guess if you're going to be using high power MOSFETs you probably know that already and I D is the little mnemonic you need to know now most importantly for us what is the voltage the minimum voltage we need to apply to the gate here in order to turn this on fully and that's what this is the Volt between the between the gate and the source threshold that's all it means the gate threshold voltage now we need it to be less than 5 volts because that's all we got isn't it 5 volts out of the arduino luckily for us a lot of them are 2 to 3 volts as long as they are TTL or logic level gates and finally what is the resistance between the drain and the source when we do finally switch this on and that's what this mnemonic stands for RDS resistance between the drain and the source when it's switched on and as I said earlier the one we've been looking at our naught point naught 2 4 n channel mosfet it goes up from anything from naught point naught 6 to 10 ohms but P channel ones because they're harder to make and indeed harder to find and more expensive but the the dual mosfet pair that i use in the SI 4 v 9 9 and it really is small the pair there do have these two resistances that's for the N channel and that one's for the P channel it's pretty good actually the SI 4 v 9 line that's why I keep using it and there we have it so that's the long and the short of MOSFETs as far as we needed within the arduino world now I hope the takeaway from this is that MOSFETs are extremely useful they're much more useful than BGA tees in terms of heat dissipation whereas for example a standard NPN BJT type transistor would only take something like half an amp before it started to smolder and the magic smoke escape a MOSFET will take easily five amps and of course if you do need something that takes 30 40 50 amps of power and who knows you might have some kind of route or CNC machine something out there then you know that these things can take it but you must select the MOSFET then according to your needs for general Arduino work these little things work just absolutely fine now there's a lot more detailed to MOSFETs and I'll put a few links down below in case you're interested in the in the real nitty gritty heil MOSFETs work you know depletion layers and installation layers and stuff like that that I'm not going to mention in a 15 minute video because it doesn't help you really in an Arduino world if you know about that or not so remember don't touch the MOSFETs by their leads when you put them into the breadboard make sure you've already connected up the ground to something so that as you plug in the MOSFET the leads will be grounded the ones that need to be for example the source is grounded and the gate is then held to ground as well apart from that they're a joy to use they really work well and cheep cheep ok links below hope this was useful do let me know by give me a thumbs up and see you in the next video I hope you're finding these videos useful and interesting there are plenty more videos to choose and a couple are shown below and if you'd like to subscribe to this channel just click on my picture below and enjoy the rest of the videos thanks for watching
Info
Channel: Ralph S Bacon
Views: 21,882
Rating: undefined out of 5
Keywords: Arduino, Beginners, electronics, C++, microcontrollers, programming, gadgets, ardiuno, mosfett
Id: 5FHLWGZ_FUQ
Channel Id: undefined
Length: 15min 9sec (909 seconds)
Published: Sun Jul 12 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.