I am trying to run a small 3v motor with a Keyestudio MEGA 2560(which is the same as the Arduino MEGA 2560). I am getting a consistent 5 volts everywhere I check with a multimeter. The voltage drops to 0.01-0.05 once I connect the motor. The motor runs once it is connected directly to the Arduino's 5v output pin. The motor draws about 600mA consistently when we connect it directly to 5v.

My code is rather basic, which just sends voltage out pin 5. I am not using any shield. controlling the speed is not my main concern here, though later on in my project I would like the motor to be able to reverse as well.

I found this circuit diagram in "Arduino for dummies," and found this same diagram on many other websites too.

void setup() {

void loop() {


simulate this circuit – Schematic created using CircuitLab

1 Answer 1


An NPN bipolar transistor requires a current to flow from base to the emitter which is then multiplied by the beta of the transistor controlling the maximum current which flows from the collector to the emitter. A 2n2222 beta is about 100. Let us calculate the amount of current which will be allowed to flow from the collector to the emitter of the 2n2222 transistor. First calculate the current from the base to the emitter:

I(be) = (5.0 volts- 0.7 volts) / 1,000 ohms
I(be) = .0043 Amps

Use this current to find the maximum current flowing from the emitter to the collector:

I(ce) = 100 x I(be) = 0.430 Amp or 430mA

We see that the transistor does not provide enough current to drive a 600mA motor.

We need to reduce the value of R1 such that I(ce) is at least 600mA which means that I(be) needs to be at least 6mA. Rearranging the earlier equation to find R1:

I(be) = (5.0 volts- 0.7 volts) / 1,000 ohms
I(be) = (5.0 volts- 0.7 volts) / R1
R1 = (5.0 volts- 0.7 volts) / I(be)
R1 = (5.0 volts- 0.7 volts) / 0.006 Amps
R1 = 716.67 ohms

However, because of the large amount of I(ce) current necessary to drive the load, we find the transistor reaching it's limits and the beta of the transistors drop apprecably:

enter image description here

This diagram is a little hard to understand. And there is no curve for 600mA. But we can get an idea of what to expect if we look at the 500mA curve. We see that in order to get less than a volt drop across the transistor (V(ce)) we need to pump in more than 10mA (I(be)). To get similar results for 600mA we would likely approach 20mA and now we are dangerously close to the processor pin current driving capabilities.

A common alternative is to use a Darlington Transistor configuration:

enter image description here

The resulting beta is essentially the product of the individual transistor's betas.

Let's do some rough calculations. If the 2n2222 that switches the load current has a lower beta of about 10, we would need about 60mA to switch a 600mA current. To generate 60mA through the transistor connected to the processor, we would need about 0.6mA from the processor. That's really small and we can afford to triple it to ensure reliable operation. So let's pick 3mA:

R1 = (5.0 volts- (2 * 0.7 volts)) / 0.003
R1 = 1200 ohm

So a 1K ohm resistor should likely work.

  • 2
    The DC gain of the transistor will likely be lower than that. “About 100” is an order of magnitude estimate of the typical gain at moderate currents. The gain goes down when I_C goes above 100 mA. According to this datasheet (Fig. 4), the typical gain @ (I_C = 500 mA, V_CE = 1 V) is 50, and more like 10 if you want to be well into saturation (V_CE ≈ 0.2 V). Nov 23, 2020 at 8:23
  • Dang, I missed that entirely @EdgarBonet. I'll fix the answer. Thanks.
    – st2000
    Nov 23, 2020 at 15:03
  • Ok, I fixed the solution. I'm eager to hear your thoughts @EdgarBonet.
    – st2000
    Nov 23, 2020 at 15:05
  • Wouldn't a power MOSFET be a better choice for this application, since they have very low on resistance and require almost no current to the base?
    – Duncan C
    Nov 23, 2020 at 16:05
  • That is a good suggestion @DuncanC. I've see both used. Do you have a reference to a good discussion we can read?
    – st2000
    Nov 23, 2020 at 16:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.