I'm a noob but hopefully I won't be too insufferable here. Basically, I want to use a transistor to switch an RFID board (RDM630) on and off, to be controlled by an I/O pin on the Arduino. The board will be powered by the 5V pin on the Arduino. My plan was to put an NMOS between the RDM630 and the 5V pin on the Arduino and have the I/O pin on the Arduino connected to the gate. I'm also questioning whether I should use a BJT instead of a MOSFET.
Any recommendations on which FET to get? I've seen FETs that are rated for much more current/power than I would need for this simple switch application. I'm probably not understanding everything I've read, but is it a problem that Vds would be equal to Vgs?
Look for a P channel MOSFET, Logic Level, Low Rds (like tens of milliohms).
P-channel as you intend to Source current (switching 5V), vs sinking it (swithching Gnd).
Thru-hole for easier handling.
Logic level means it will switch on/off at 0-5V levels,
Low Rds means there won't be a big voltage drop across it.
Digikey.com has good selection and easy to use filtering.
I am doing something similar and I have a couple of questions.
This looks like a job for a 2-cent PNP BJT (I'm using a 2N3906) and a current-limiting resistor.
As I understand it, if I keep the output pin configured with pinMode(outputPin, OUTPUT); I don't need a pull-up resistor on the base of the PNP, correct? As long as the output is HIGH, the PNP is biased and off an virtually no current will flow. Then when I do digitalWrite(outputPin, LOW); it turns on power to my Load.
My Load is about 50 mA, and my datasheet says the current gain at Ic=50mA is minimum of 60. Does this mean my current over the resistor should be at least 0.83 mA? At 5 volts, that means my resistor should be 6K Ohms or less? So if I use a 4.7K resistor, that should do it.
What would be the advantage of using a MOSFET instead of BJT?
The datasheet for the 2N3906 at Intelligent Power and Sensing Technologies | onsemi says that the hfe you quoted is measured @ Vce = 1V. So if you drive it with 0.83mA base current, you can expect a voltage drop of up to 1V in the transistor; so the load may receive as little as 4V.
The datasheet also says that Vce(sat) @ Ib = 5ma, Ic=50mA is 0.4V maximum. So if you give it 5mA base current, the load will get at least 4.6V.
A transistor designed for switching medium currents such as BC327 will have a lower saturation voltage, allowing more current to the load. A P-channel mosfet may not may not perform better, depending on its Rds(on).
TanHadron:
Then when I do digitalWrite(outputPin, LOW); it turns on power to my Load.
My Load is about 50 mA,
I don't see any difference between your schematic and just writing HIGH direct to load. The point of having the transistor in there is so that you can switch loads that use more current (50mA) than your Arduino can safely sink (40mA) per pin.
high voltage high current > load > transistor > common ground
low voltage > arduino > transistor > common ground
The resistors in the Arduino itself are probably sufficient if done this way.