# Resistor needed for 12V DC ~400mA pump?

Hello.
I am trying to design an automated pump setup that would start/stop a 12V DC pump that draws max 400mA power. I have a transistor (NPN ZTX651) that can hold 2Amps continuous current.

My questions are:

1. Is this the correct transistor that I need?

2. Will I need to get a resistor as well? The diagrams I've seen online indicate that I need a 10 Ohm resistor, but previous forum comments suggest that a 220Ohm resistor is too much.

My apologies for any silly questions, and thanks in advance for your responses.

1. Seems fine

2. There needs to be a resistor between the Arduino pin and the gate of the transistor. Since the gain ("hFE", think of it as a current multiplier) of the transistor is ~150 and you need 400ma for the pump you need (400ma / 150hFE) 2.6ma at the gate. Assuming your Arduino is running at 5V logic, the resistor should be around ( 5V / .0026A) ~2K ohms. Realistically though you would want to use a ~1K resistor to ensure you feed enough current to the gate of the transistor. You never connect an Arduino pin directly to the base of any transistor because it will allow current to flow unrestricted from the Arduino and anything over the maximum 40ma will wreck the Arduino.

Since your pump is an inductive device, it contains coils of wire, it will create voltage spikes that could damage the arduino or transistor. Because of this there should also be a diode between the collector and emitter of the transistor; the anode of the diode connects to the emitter and the cathode to the collector. Think of it as the diode pointing in the opposite direction of the normal current flow across the transistor.

I'm assuming that you're feeding 12V to the collector of the transistor to power the pump. If the voltage is higher than that then you will need an additional transistor to limit the current through the pump.

This is great. Thanks for your response.

I currently have a ton of 330 Ohm resistors, so if I place one before the transistor base, and one after, that should add to 660 Ohms, as they are in series, correct?

If I have my math correct, if we start with a 12V, and have 660 Ohms, then it would provide ~18mA power to the arduino pin. From what I understand, the Arduino website says the recommended power is 20mA.

Thanks again for your help!

A standard Arduino is 5V. You might power the Arduino with 12V but that gets regulated down to 5V.

But yes, two 330R resistors connected in series would be 660R and your plan would work fine. Even a single 330R resistor would be OK (at 5V) but generally you don't want to be feeding too much amperage into the base of the transistor because that current will be wasted and also causes the transistor to get a little bit hotter.

You need about 5% of the load current into the base of your transistor, ie 20mA, so a 220 or 270 ohm is
about right, not 2k ohms. small signal current gain is nothing to do with using a transistor as a switch.
If you use 2k ohm base resistor you'll probably cook the transistor.

If you look at the datasheet for the ZTX651 you'll see the saturation voltage is quoted for Ib/Ic = 0.1
as is the graph of Vsat.

In practice the kind of gain you get in saturation is between 4 and 20, hFE is not relevant as the base-collector
junction is not reverse biased and diffusion gradients dominate the device.

Chagrin:
A standard Arduino is 5V. You might power the Arduino with 12V but that gets regulated down to 5V.

But yes, two 330R resistors connected in series would be 660R and your plan would work fine. Even a single 330R resistor would be OK (at 5V) but generally you don't want to be feeding too much amperage into the base of the transistor because that current will be wasted and also causes the transistor to get a little bit hotter.

Absolutely the reverse, it runs a lot cooler with that extra current into the base because its in saturation and
the voltage between the collector and emitter is more like 0.1V than 1.0V.

Great! This information is all very helpful. In my searching, I’ve run also into a few online instructions that list that I need a diode. I understand the concept of how a diode provides uni-directional electricity flow, but would a resistor be a comparable substitute? Or should I get a resistor?

A resistor would not work since it would allow current past the transistor when the transistor was turned off.

MarkT:
If you look at the datasheet for the ZTX651 you'll see the saturation voltage is quoted for Ib/Ic = 0.1 as is the graph of Vsat.

In practice the kind of gain you get in saturation is between 4 and 20, hFE is not relevant as the base-collector junction is not reverse biased and diffusion gradients dominate the device.

Thanks for straightening me out on that.

Chagrin:
Since your pump is an inductive device, it contains coils of wire, it will create voltage spikes that could damage the arduino or transistor. Because of this there should also be a diode between the collector and emitter of the transistor

Yet another incorrect piece of advice...

The diode goes across the inductive load, not across the transistor, cathode to positive supply.