Hi, welcome to an Arduino tutorial from Robojax. In this video we are going
to see how we can use this IRF 520 MOSFET a switch with arduino to control
a high current load or a board like this or to control a high current motor like
this you can get the code for this project by clicking at the link at the
description below which will take you to www.robojax.com/learn/arduino
know let's get started with this
This is the module we have two pins here for the load they have been labeled
as V+ V- we will connect your load motor whatever you want to turn on but
of course it should be DC and this is a ground and V and this will be connected
to your power supply there are three pans here to use so this is ground and
that is signal so this will be connected to pin 9 in this
application and this will be connected to the ground the space that they left
for the heat sink is very minimal and you cannot install a proper heating here
length of this module is thirty three point six millimeters the width is
twenty five point six millimeters and the height without any heat sink at the
current condition is about two centimeter or twenty millimeter if you
want to know the weight of this module seven point two grams
Datasheet Viewed
now let's have a look at the data sheet manycam there are many manufacturers are
producing this drain source voltage or power supply that you can use would be
up to 100 volts so the drain source between this drain and that source
resistance here when gate source is 10 volt is zero point two seven M so 270
million so the depends are from left gate drain
source at 25 degrees temperature 9.2 amp ere this can of course it needs heat
think this is a drain current but if it reaches 200 degrees Celsius gets very
hot then it can handle up to six point 5 ampair here is rather data sheet for
this YRF v 2 n this is from international rectifier and the
resistance of drain source when it's on this one is 20 million 200 million and
drain current is nine point seven ampere the characteristics have changed a
little here so you see pulse current if it just momentarily comes it can handle
up to 38 but this is again nine point seven and six point eight ampere the
same thing at 25 degrees 100 so they are very close
drawn quickly on eagle here is a schematic diagram this is the MOSFET and
we have drain and source the load that you put will be connected between the
positive and the drain so that current comes here and goes and this acts as a
switch to connect this to the ground this way it will be connected to the
ground and then the gate here the gate has the signal comes this way and we
have a 1 kilo ohm resistor to the ground so it's always low even if its low or
high so this will keep us low if it's not connected and then then we have 1
kilo ohm on an LED so when there is a signal the LED will go on and remember
because Arduino goes with a high it goes up to 5 volts so this is the gate and
source so these will never be above 5 volts and for that reason because the
gate source resists and that drain source resistance of this MOSFET is zero
point 2 or 200 ohm or 270 m depending on the type if it is 10 volt so when gate
source is 10 volts then we have lower assessment if gate source is lower then
this will be higher for that reason we will see a huge voltage drop here so
this is 12 volt this will act as a switch to connect but we have some
voltage drop here keep that in mind when you use this module
now let's have a look at a could I've defined an 8 for the controlling the
MOSFET so I call it 8 so I would use throughout this code the keyword control
because it's defined and then here we say pen mode control which is 8 as an
output and inside the set up this is the only thing that we do and inside the
loop we digitalwrite control hi so we turn on the motor and then wait for 2
second and then turn off and set it low and wait for 2 seconds so this loop is
like that so of course for your application it might be different for
example if you're controlling a load based on temperature pressure some
action some motion you will say if you put your condition here if something is
true then you will turn based on whatever condition you put here let's
say the temperature and temperature is a variable temp is greater than 30 then
this should start the motors running on a pump that is pushing a liquid whatever
then you can put here else if that condition does not met then it should be
off and then also you can remove this because let's say for this condition you
want continuously the motors to be running or the switch to be on doesn't
have to be murdered for whatever is your application this way you can control
your load with the switch
the question is why do we need this one why should we use this module the answer
is that this module the adrenal can supply very little current this from usb
some machines or computers can supply 500 million pairs some of them one
ampere and some phone chargers can supply let's say two point two amperes
so for that reason this can not supply enough current to your load your bulb to
your motor whatever you have and also that's one reason the second one is that
the voltage from use from this will be always 5 volts the maximum but when you
connect this one so you can connect it to directly to your power supply let's
say up to 50 volts at 100 volts this can work so you can connect it to your power
supply regardless of the voltage of 200 volts from 0 to 100 volts and then from
here this will be connected to the load so Arduino cut no supply above 5 volts
that's why we are using this to handle higher voltage and higher current
this is the ground and this is a positive for the power supply so you
will connect your power supply here and then these are the two output one is the
class which has been labeled and one is a - fault alert so you will connect this
site let's say if this is a resistor bulb or whatever you have so this would
be connected like that and then for these two wires the ground the G and D
will be connected to the ground or dinner and then the signal will be
connected to pin 8 with the code that I have provided
now that is efficient using a motor
as you can see their current this is now rotating counterclockwise if I put
negative to the negative
so if I if you want to change the direction of the model just switch the
wires positive and negative I just put it here so it will giving it directed
five volts but connected so if I connect it you will see with the same way for
the high current load any other DC load that you have as long as it fits the
criteria of amount of current that passes through this that will be fine
this is now a car electric ball I've corrected now a current meter to measure
the current for this ball as you can see here the current is around 3.6 3.8 or
three point six amperes now I have connected a 9 ampere load to the switch
and I want to see if this can handle it but of course I know it needs her heat
sink but let me just try it very hot so now this is extremely hot even for a few
seconds now let me test it with 2 ampere and see how hot this one gets
I'm holding my hand here making sure so - impaired is very cool now a little
warm warmed up some few seconds that warm that but with this speed of
increasing temperatures shows that might be running cool because now let's go for
three amp now it's getting hot quickly I realize because it needs me think yes it
got very hot now slowly now I cannot hold it it's very hot
so let's go for 2.5 amp so now a 2 point 5 ampair still very hot because it was 3
amp aftercooler so it seems with 2 amp ere's without the heating this can work
continuously yes it's very cool now installing a heating this way then
correct but at least it will have some surface area to dissipate some heat so
I'm gonna attach it here let me just apply some silicone here for
now I have this heatsink it's all hissing here because at least it will
dissipate some heat let me turn it on at 200 so we know it's good so 2 point 5
ampair now this will dissipate portion of the heat not fast but still it's
working not hot so now it's a 3 ampere
that was getting a little warm
first now warm not hot
it's
it's warmer but this area is very cool so that's good majority of the heat is
dissipated here so overall we can say that the sellers it's working that's
good this area is cooler under self warmer
maybe I should increase it for you see the voltage dropped it's supposed to be
12 volts
it's hot now
not hot I can hold it but yes now it's getting
now it's getting very hot
I will leave it for few seconds see it's getting very hot now I cannot hold it so
four amperes
with this tiny you think it seems unbearable now the room temperature is
around 25 degrees so keep that in mind if you are putting it in an environment
that is 30 or 40 degrees this this is very many months for this so it's very
hot now I cannot hold more than a second okay so for impaired will not work
because if it continues like that it will be very hot 3 ampere might make it
cooler
yeah it got cooler now I can hold it a little longer but it's getting cooler
so without this heatsink to impair and what the heatsink with this tiny
heatsink 3 ampere 4 ampere is getting very hot maybe you can experiment and
put a fan or something to blow otherwise this will not tolerate that because the
design is so bad they we should have enough space on the other side this
would have been enough but still this heat sink is not enough for this so it
needs a larger heating
now let's have a look at the voltage change where the current increases
because this switch we want to see when it passes current to the load how much
voltage drop occurs here because according to the datasheet this is 200
milli ohm or 270 million and if we lose some calculations we have 5 ampere so
five times zero point two seven as you can see we will have one point two three
volt voltage drop and if we have 10 ampere 0.2 times 10 - volts so keep that
in mind if you have higher current so let's change this I am going to change
it to five and this is a voltage so nine point seven so thank you for watching
this introduction to this by RF 520 and MOSFET switch for Arduino please make
sure to subscribe so you can get updates of my upcoming videos if you have any
questions or comments please post it at the comment section below I'll try to
answer and reply take care
you