Help with circuit analysis - Transistor, dc-motor, arduino, resistors

currently I am trying to improve my skills in electric circuits by small hobby project. I want to spin one mini dc motor, which is just spinning if the Arduino activates the flow of current with a NPN transistor (2A2222A). The motor is powered by a $$\9V\$$ battery and I want to operate it with $$\150\$$ to $$\250 mA\$$ (which is what I suspect from some datasheet specifications).

I have used these equations to specify the base & emitter resistor. $$R_B = \frac{U_{Arduino - U_{BE}}}{I_{Base}} \cdot \beta = \frac{5V - 0.7V}{0.2A} \cdot 100 = 2.1 k\Omega$$ $$R_E = \frac{U_{Battery}}{I_{Motor}} = \frac {9V} {0.15A}=60 \Omega \rightarrow 100 \Omega$$

That's my current circuit diagram:

That's the real circuit:

My problem

Is that either the motor doesn't spin or $$\R_E\$$ gets burning hot. From my point of view this means that either too much or less current flows. Perhaps there is already a flaw in my theoretical circuit or real world effects I am not considering. Can somebody help me with that?

• What’s the purpose of the emitter resistor? Commented Jul 19 at 21:08
• Use Ohm's law to see how much voltage a 100 Ω resistor will drop @ 0.15 - 0.25 A. Then use Ohm's law again to see how much power that resistor would be dissipating. Finally, try to answer @winny's question. I think things will be a lot clearer for you after that. Commented Jul 19 at 21:28
• Also the usual boiler plate: Beware of circuits that depend on β of a transistor to work correctly. Commented Jul 19 at 21:31
• Motors require a lot more current to start than they do to run. Your circuit may (I haven't analyzed it) be able to power an already-spinning motor, but unable to start a stopped motor. Commented Jul 20 at 2:22

Let me draw your circuit with some annotations that I can refer to later:

simulate this circuit – Schematic created using CircuitLab

Your equation for $$\R_B\$$ was calculated as follows:

$$R_B = \frac{V_{IN}-V_{BE}}{I_B} \times \beta$$

There are a couple of things wrong with that. Firstly, Ohm's law doesn't care about the transistor, or its gain $$\\beta\$$, so when you apply Ohm's law, you can't just throw in $$\\beta\$$. It should have been:

$$R_B = \frac{V_{IN}-V_{BE}}{I_B}$$

That's still incorrect though. The term $$\V_{BE}\$$ is defined to be the potential difference between base and emitter, which as you say is 0.7V:

$$V_{BE} = V_B - V_E = 0.7V$$

However, that doesn't say anything about the potential at the emitter. You've assumed it to be $$\V_E=0\$$, which would be true if the emitter were tied directly to ground, but it isn't. The emitter is permitted to rise in potential above 0V by the emitter resistance $$\R_E\$$, and the equation to determine $$\R_B\$$ must account for this:

\begin{aligned} R_B &= \frac{V_{IN}-V_{BE}-V_E}{I_B} \\ \\ &= \frac{V_{IN}-0.7-V_E}{I_B} \end{aligned}

That's the correct equation. It's now up to you to find expressions for $$\I_B\$$ and $$\V_E\$$, which I won't go into here.

The second big issue with your design becomes clear if you treat the transistor as a closed switch, leaving the motor and $$\R_E\$$ in series between the supply nodes:

simulate this circuit

This represents the state where the transistor is switched "as on as it is possible to be", nearly a short circuit between collector and emitter. In this state, the motor and $$\R_E\$$ form a voltage divider, with each element sharing a fraction of the total supply potential difference, according to the ratio of impedances:

$$V_{MOTOR} = 9V \times \frac{R_{MOTOR}}{R_{MOTOR}+R_E} = 9V \times \frac{5\Omega}{105\Omega} = 0.43V$$ $$V_{RE} = 9V \times \frac{R_{RE}}{R_{MOTOR}+R_E} = 9V \times \frac{100\Omega}{105\Omega} = 8.57V$$

With the caveat that motor impedance increases as it spins faster, it's clearly impossible for the motor (at startup, when stalled, or when under heavy load) to have more than 0.43V across it, regardless of the state of the transistor. $$\R_E\$$ places an upper limit on motor voltage.

Worse still, the maximum current that can be achieved down that path (again with motor stalled or heavily loaded), through the motor and $$\R_E\$$ is:

$$I = \frac{9V}{5\Omega + 100\Omega} = 86mA$$

Now we can address why the resistor gets hot. With the transistor fully turned on, so the system resembles the schematic above, and a maximum current of 86mA is flowing, the power being dissipated by resistor $$\R_E\$$ is:

$$P = I^2R_E = (86mA)^2 \times 100 = 0.74W$$

If you are using a small 0.25W resistor, it will be grossly over-loaded and will get extremely hot.

• Thank you Simon for that answer of yours. I was explained very well. I will come back here after studying your answer and the circuit changes more thoroughly. Commented Jul 20 at 8:27
• I have adjusted $R_E=40 \Omega$. The $R_{Motor}=3 \Omega$ is in fact, such that $I_C = \frac{9V}{43 \Omega} = 209 mA$, which is seems to be a good amount of current for the motor. Measuring the current spits out only roughly $103mA$. $U_{Motor}=0.275V$, $U_{BE}=2.25V$, $U_{CE}=1.6V$, $U_E=4.05V$, $U_{R,Base}=-0.67V$, $U_{Battery,measured}=8.22V$. I don't seem to get it. Do you have any further advice? Commented Jul 23 at 17:34
• @lmixa You can't have $U_{BE}=2.25V$, unless the transistor is dead. Do you mean voltage base-to-ground? Commented Jul 23 at 18:36
• No, I have measured between base and emitter. I have measured it again and it is still at 1.6V. Commented Jul 23 at 19:37

To start with, your formula for $$\R_B\$$ is incorrect if you're using an emitter resistor. You have to take the voltage drop across that resistor into consideration. But then you don't really need the emitter resistor, you're using the transistor as a switch so you want as much of the voltage across the load as you can get. You don't need a resistor to limit the motor current, it's own impedance will do that as long as the motor is rated at 9 V. Do away with the resistor, ground the emitter.

Next, you're underestimating the required base current. By taking the beta as 100 and calculating the base current as 200 mA / 100 you're putting the transistor in it's active region. You want saturation, so typically you would want $$\I_C / 10\$$ or around 20 mA.

So figure the base resistor as: $$R_B = \frac{5.0V-0.7V}{20mA} = 215\Omega$$

A 220Ω resistor should be close enough, and that will get your transistor into saturation and around 8.8 V across the motor and 75 mW dissipated in the transistor according to an LTspice simulation. With the 2.1K base resistor you calculated I get 7.5 V across the motor and 350 mW dissipation in the transistor. That's the difference between active and saturation, by not fully turning the transistor on you increase the voltage across it and thus the power dissipation as well.

To avoid burning resistor or transistor, use constant current buck converter IC to generate the required current. But, my advice is - don't make your life difficult; check the specification of the motor (example below) and power it with the appropriate rated voltage and avoid putting emitter resistor. Operate your transistor as a switch, i.e., either fully ON or fully OFF. At the rated voltage, the motor will run at its rated current.