Choosing a transistor

I have a 24V 1A pump, stall current not higher than 5A. I want the arduino to be able to switch the supply but in the event that the arduino fails, the supply should be cut (I understand that depending on the transistor current can pass if there's no gate voltage).

I'm assuming I'll need an N-channel FET, I've had a look at some datasheets and Im sure the informations there, just getting a bit lost in all the data. I have the IRF520 which came with my arduino, as long as it fits the above requirements!

Thanks for reading.

Circuit “E” “1” E1 Should work for you.
You can try C1 also. Correction, C1 only works for a logic level MOSFET.

You can easily determine if this cct. meets your failing conditions by doing a few simple tests.

larryd:
Circuit “E” “1” E1 Should work for you.
You can try C1 also.

Hi Larry, thanks for the reply.

I've not seen the symbol used in E1 and C1, I'm assuming it's depicting my N-channel mosfet? And it looks as though in E1 another type of transistor is controlling the mosfet, am I following this correctly?

I only have the 1 to hand so makes sense to try C1 first. Will all of the resistor values be applicable to 24V as well?

“ I only have the 1 to hand so makes sense to try C1 first. Will all of the resistor values be applicable to 24V as well?”

Yes


Correction
“ And it looks as though in E1 another type of transistor is controlling the mosfet, am I following this correctly?”

Yes

C1 will only work if you have a logic level MOSFET so you will have to use E1.

A 2N2222 for the NPN transistor should work.


Your IRF520 is not a logic level MOSFET so cct. E1 ‘is’ necessary, note the NPN will invert the Arduino output control signal too.

Now Vgs max is only +-20v but you have 24v so add ~27k resistor gate to GND to reduce the Vgs to a safe level.
(i.e. about 17v)

C1 will only work if you have a logic level MOSFET so you will have to use E1.

Meaning the gate can be operated by 5V? That's strange because I've used the transistor with the arduino to pwm a little 9V motor. Although looking at a datasheet it seems RdsOn is 10V

Now Vgs max is only +-20v but you have 24v so add ~27k resistor gate to GND to reduce the Vgs to a safe level.
(i.e. about 17v)

Now I'm confused about this. Isn't the source voltage 0 if the source is going to earth (in NPN format)? In which case wouldn't the Vgs be around 5V?

Sorry, I'm with you. You're talking about using my 24V to activate the gate on my IRF mosfet like in E1 and using the 2N2222 to control it, with a resistive divider to protect the gate.

If you don't mind could you explain why theres an additional 5v feed "for power up condition" in this particular circuit?

When you first power up the Arduino the pins are automatically set to INPUT.

This means the 2N2222 will be OFF hence the MOSFET will be ON at power up.

We normally want the MOSFET driver OFF at power up so that means we need the 2N2222 ON.

To get the 2N2222 ON at power up, we need to have some base current, hence we add R3 1K (you may have to play with this value some).

Note: during power up, we will be making the Arduino pump pin an OUTPUT by doing something like this:

void setup()
{
pinMode(pumpPin, OUTPUT);
digitalWrite(pumpPin, HIGH); //Turn on 2N2222, which turns off IRF520
. . .
}

Thanks again for taking the time to write such informative replies.

If I were to use a similar PNP transistor in the place of the 2N2222 would this mean that I could replace the 5V input with a 10k pulldown to ground and prevent the motor from running in the case of arduino failure/loss of 5V?

You need to level shift the Arduino 5v level to 24v to turn ON/OFF a PNP transistor if used in place of the NPN so you won’t be ahead.

You could use two NPNs so the inversion is canceled out, but again, you would not be that far ahead either.


Another option is to make 5v from the 24v using a Buck converter; as long as you have 24V you should have 5v.

6 for $17.00

I'm using this buck converter - OKI78SR, it's more just as a safety precaution in case the converter fails while the 24V psu is still running - that 5V is powering the arduino from the 5v pin so there's no backup.

“ it's more just as a safety precaution in case the converter fails while the 24V psu is still running”

My guess is you are more likely to win the lottery (twice) than a regulator failing. :wink:

These are nice.

You're probably right, just seems a bit risky having something that defaults to the ON position. I could use a relay but I reckon a transistor is going to be cheaper and more reliable.

If I had a logic level NPN like circuit C1 that could handle 24V would that make more sense? Or does such a thing not exist?

C1 is a piece of cake ;).

These are the logic level MOSFETs I have used with good results.

https://forum.arduino.cc/index.php?action=dlattach;topic=690136.0;attach=368349

Make sure you select one that can handle the desired maximum current.


You can also get a logic version of yours IRL520

Logic Level MOSFETs.pdf (1.3 MB)

The IRLZ44N looks like it will do the trick! Can't really go wrong at a quid a pop, will need to find some more bits to buy to avoid this delivery charge :slight_smile:

You've been a great help, cheers! Sods law as soon as I get this circuit hooked up my pump will shit itself.

Always buy a few spares :wink:

If you buy from a real electronics stockist you'll find there are literally thousands of MOSFETs available with all
sorts of ratings, no need to limit yourself to devices that are decades old such as IRF520 / IRFZ44N

You also won't be sold counterfeit/fake components (these days eBay/Amazon are not the places to buy
semiconductors, far too many fakes). So check out digikey/farnell/element14/mouser etc etc - they all
have useful search tools for finding components to match your requirements.