Need a little guidance. I have an UNO R3, I looked up how to control a MOSFET with Arduino and people are saying through one of the Digital outputs and PWM?
I am building an automated air compressor, which uses a pressure sensor (b
Couple questions:
I need the Arduino to switch voltage on and off to control the MOSFET. Can I turn the power supply voltage (5V) on and off through code, or is it always on? And if I can't turn it off, what is the voltage that comes out of the digital pins when I use digitalWrite(pin, value)?
Is a breadboard too weak to handle being connected to an air compressor (12VDC Car powered), I'm thinking I should wire the MOSFET to the air compressor directly
Also, I've been reading that a "protection diode" from drain to voltage source, as well as a resistor (100-200 ohms) from gate to ground, is recommended for mosfets (I think I'll be using the IRF510 from radio shack..seems like a popular one and it fits my project).
2 questions here.. If I am controlling the voltage from the Arduino's digital out, which should power off the mosfet at will, why do I need a resistor? Does it somehow shut it off faster?
And what is the protection diode for?
(Oops that was 3 questions Sorry for all the noobish questions, but they don't really teach this stuff in class, so trying to figure it out through google and arduino forum searches get confusing when I'm struggling to understand the concepts)
No do not, you want a logic level FET, this will not turn on with 5V on the gate.
as well as a resistor (100-200 ohms) from gate to ground, is recommended for mosfets
No a 10K is recommended to ensure that the FET is off when the arduino is off. You need a 100R resistor in line with the gate to protect the arduino's output pin from too much current.
And what is the protection diode for?
To short out a reverse voltage that is generated when turning off an inductive load.
using the IRF510 from radio shack..seems like a popular one and it fits my project).
It may be popular for others but that doesn't mean it is the right one for your application: you need to know much current you are switching to see if irf510 is the right one.
2 questions here.. If I am controlling the voltage from the Arduino's digital out, which should power off the mosfet at will, why do I need a resistor? Does it somehow shut it off faster?
You don't need it. It is only needed if you want to blow up your mosfet.