I have a setup where a halogen light will light up if my digital port 3 on the arduino is high. Since it uses 12 volt i used a mosfet to handle this. Im quite new to this hobby so i made the following schematic (ImageShack - Best place for all of your image hosting and image sharing needs), hope you guys understand a bit. I made the setup below and it doens't work. The light will turn on but it wont turn off, not responding on my digital high.
Now i tried it with a led and this mosfet and it did work ( not 12v but 5 v ). Does anyone has some advice on how to fix this problem?
Thanks,
That's not a logic level MOSFET - it needs 10V to drive the gate. With 5V it can probably pass a fraction of an amp or so, hence the LED will work, but you won't get its rated 0.2ohm Ron.
Its also a pretty poor specification for these days. Expect to get Ron less than 0.02 ohm for an n-channel power MOSFET at reasonable prices.
Logic level MOSFET part numbers often have an 'L' in them - the key thing to look for on a datasheet is that the Ron value is quoted at Vgs = 4.5V or 5V (and not just for 10V).
If you are stuck with the IRF520 then you can use an NPN transistor to level-shift the Arduino output to your 12V supply and thus drive the gate. I'm sure there are examples on the Arduino site.
It seems to be a common misconception that any power MOSFET will work directly from 5V - is there misleading information on one of the Arduino examples perhaps?
Yea we did connect the grounds
I guess the IRFL210 is a logic MOSFET. If i look at both the datasheets i can't really find a difference between the Vgs's. ( am i looking at the wrong places ?).
ps : i got the 520N in a kit along with the arduino and some other stuff, so i overlooked the exact specs i guess. I think i can get a IRFL210 if it will get the job done.
I guess the IRFL210 is a logic MOSFET. If i look at both the datasheets i can't really find a difference between the Vgs's. ( am i looking at the wrong places ?).
That's because both devices are NOT logic level mosfets. Both spec their minimum Ron resistance requiring a +10vdc Vgs voltage.
Just goes to show that device naming can be pretty random and there's no substitute for reading the specs carefully.
Also I've seen some lines of MOSFETs where the part number codes the voltage and current rating that they planned the device to have - the datasheet shows that the actual rating isn't always as good as the part number suggests!