Wednesday 10/05 – Lab 6: Output: DC motors


Lecture Slides

Available here

Readings in Physical Computing

  • Ch 10: Pg 249-271

Before the Lab

You should have experiments with the piezo buzzer and various ways to control it. Congratulations!

In Lab Exercise


We will be learning how to control the DC motor with the various input devices you have learned about.

Background Information

The circuit we’re building in this lab will be significantly more complex than prior circuits. In addition to using the components you are already familiar with, you’ll also be using a DC Motor, diode (marked 1N4004 in the diagram), and a transistor (marked TIP120 in the diagram).

DC motors convert direct current into rotational motion. It’s our first actuating device.

Diodes allow current to flow only in one direction and not in the other. Motors often create current spikes as they turn on and off. These spikes can damage the transistor, so we use a diode in this circuit to protect the transistor from these spikes. Diodes have polarity, so the direction you install them matters. The bar in the schematic diagram corresponds to a white stripe on the actual diode. Current can only flow in the direction of the triangle.

Transistors have three terminals. The base controls the amount of current allowed to flow between the collector (positive terminal) and the emitter (negative terminal). Because the motor requires much more power than the Arduino is capable of providing, we use batteries to power the motor. The transistor allows us to control the amount of current that flows from the battery and through the motor.


1. Build the circuit shown below.

The diode has to be pointed the right way. The stripe on the diode marks the cathode. The “arrow” on the circuit symbol for the diode points toward the cathode end of the diode. You can read more about diodes here.

2. Load the program PotControlsMotor.txt onto the Arduino.

You should now be able to control the speed of the motor!

3. Use the other senosrs you’ve learned about to control the speed of the motor.

4. Try attaching different propellers and eccentric weights to your DC motor.


Explore motion as an output (in a form of display or tactile feedback). Use your DC motor to create vibration or rotational motion (e.g., pinwheels, dancing wires, etc.).

Optional: Combine it with other output (sound, lights, etc.)