Electronic circuits · no code

Transistor DC Motor Speed Control

Control the speed of a small motor with a potentiometer: turning the knob takes the motor from stopped to slow to fast. It is the basis of fans, toys and radio-controlled cars.

  • LevelBeginner
  • Time25 min
  • Power6 V DC (holder with 4 AA batteries)
  • CategoryMotors & robots

Bill of materials

Everything you need to build it, with the reference you will see on the schematic.

Bill of materials
Qty Part Ref.
1 10 kΩ potentiometer RV1
1 3.3 kΩ resistor (orange-orange-red) R1
1 TIP120 NPN transistor Q1
1 Small 3 to 6 V DC motor (type 130, toy motor) M1
1 Diode 1N4007 D1
1 Holder with 4 AA batteries (6 V) BT1
1 Breadboard (400 tie-points or more)
5 Jumper wires

Missing parts? The kits recommended by Impeca Tech include almost all of them. See the kits

Schematic & wiring

On the left, the circuit diagram; on the right, the same circuit built on a breadboard. Both connect exactly the same things.

Circuit diagram of “Transistor DC Motor Speed Control”
Circuit diagram
Breadboard layout of “Transistor DC Motor Speed Control”
Breadboard layout

Wire it step by step

  1. Place the components
    • 10 kΩ potentiometer RV1: its three legs in 7f (end 1), 8f (wiper, the middle one) and 9f (end 2).
    • 3.3 kΩ resistor R1 (bands: orange, orange, red, gold): one leg in 7i and the other in 3i (either way round).
    • TIP120 transistor Q1 with the flat face (the one with the text) towards you, left to right: base (B) in 10f, collector (C) in 11f, emitter (E) in 12f.
    • 1N4007 diode D1: the end with the silver stripe (cathode) in 6f and the other end (anode) in 3f.
  2. Add the jumper wires
    • Orange wire: from 8j to 10j.
    • Red wire: from 9j to the + (red) rail.
    • Red wire: from 11j to the + (red) rail.
    • Turquoise wire: from 6j to 12j.
    • Black wire: from 3j to the − (blue) rail.
  3. Connect the external parts
    • Small 3 to 6 V DC motor (M1): one wire to 12i and the other wire to the − rail.
  4. Connect the battery
    • Connect the holder with 4 AA batteries (6 V): the red lead to the + (red) rail and the black one to the − (blue) rail. Do this last, once everything else is in place.
  5. Test the circuit
    • With the knob at minimum the motor should be stopped. Turn it slowly: it starts gently and gains speed up to the maximum. Measure the motor voltage with the multimeter: it should rise from about 0 V to about 4 V. With fresh batteries the motor starts shortly after a quarter turn.

How to read the holes: the letter is the row and the number is the column of the breadboard (for example 7f). The red (+) and blue (−) rails are the two long lines along the edge.

How does it work?

  1. 1Potentiometer RV1 gives an adjustable voltage between 0 V and the battery voltage
  2. 2That voltage goes into the base of transistor Q1 (a TIP120)
  3. 3Q1 acts as a “follower”: it gives the motor almost the same voltage minus 1.4 V
  4. 4More motor voltage means more speed; D1 protects the transistor from the motor’s spike

The 10 kΩ potentiometer is wired as a voltage divider: its wiper (the middle terminal) gives a voltage between the low point and the battery voltage. R1 (3.3 kΩ) lifts the low point a little so the motor is not stuck at standstill until the knob is halfway to the start. Q1 is a TIP120, a power Darlington transistor (two transistors in one): its base draws almost no current, so the potentiometer can drive it without being loaded, and it can pass up to 3 A to the motor. It works as an emitter follower: the motor voltage is the wiper voltage minus about 1.4 V, so turning the knob changes the speed smoothly. With the 4 AA battery holder (6 V) the motor reaches about 4 V; if the batteries are worn it will only start in the upper half of the knob’s travel. D1 (1N4007) sits backwards across the motor: when the motor switches off it makes a reverse voltage spike that could damage Q1, and the diode absorbs it. Avoid gripping the shaft with your hand: a stalled motor draws up to 1 A and heats the transistor.

Testing & troubleshooting

What you should see

Potentiometer at minimum: motor stopped
Motor voltage≈ 0.08 V
Potentiometer at a quarter
Motor voltage≈ 0.56 V
Motor current≈ 23 mA
Potentiometer at half
Motor voltage≈ 1.55 V
Motor current≈ 65 mA
Potentiometer at maximum: top speed
Motor voltage≈ 4.15 V
Motor current≈ 173 mA
Shaft blocked at full speed (transistor must stay within its power limit)
Transistor power≈ 1.16 V
Motor current≈ 740 mA

Approximate values, calculated with typical parts. With real parts they can vary by 10 % or more.

If something does not work

The motor does not turn at any position

Check the batteries (under 5 V when worn) and that the TIP120 faces as in the drawing: printed face towards you, legs down, B, C and E run left to right. Also check the motor is connected between E and GND.

The motor always runs at full speed

The potentiometer wiper (middle terminal) is not on the base of Q1 or is on the positive. Check that the three potentiometer terminals go to: R1/GND, base of Q1 and the positive.

The transistor gets very hot

A little warmth at medium speeds is normal, but if it burns to the touch the motor is stalled or drawing too much. Free the shaft and disconnect the batteries. With a motor bigger than a 130 type you would need a heatsink.

Want to automate this circuit with code?

Learn how to program sensors and custom schedules in our e-book “Arduino from Scratch”.