DC Motor

A small 5V brushed DC motor that turns direct current into continuous rotation for wheels, fans, and pumps.

DC Motor: Brushed direct-current motor

What is the DC Motor?

A brushed DC motor converts direct-current electrical energy into continuous rotary motion. Inside, a wound rotor (armature) spins between permanent magnets, and a mechanical commutator with sliding carbon brushes reverses the armature current twice per revolution to keep the rotor turning in one direction. It has just two terminals: a positive lead and a negative lead, so it is one of the simplest actuators to wire.

Rotational speed rises roughly in proportion to the applied voltage, and swapping the polarity of the two leads reverses the direction of spin. Because the motor is an inductive load that draws a large inrush current at startup and an even larger current when stalled, it cannot be driven directly from a microcontroller output pin. It is switched instead through a transistor, MOSFET, or a dedicated motor driver, and its speed is regulated with PWM on that driver.

This model is a 5V nominal unit measuring about 20 x 15 x 25 mm and weighing around 25 g. In the Tinkered simulator it is represented with a positive (+) and negative (-) terminal, and its shaft spins whenever the positive terminal is driven high relative to ground.

Specifications

Operating voltage
5 V
Dimensions
20 × 15 × 25 mm

Verified from the Tinkered component library.

Circuit requirements

  • Never wire the motor terminals straight to an Arduino output pin. Startup and stall currents far exceed the tens of milliamps a GPIO pin can safely source, and doing so can reset or permanently damage the board.
  • Switch the motor through a transistor, MOSFET, or motor-driver IC. Use the microcontroller pin only to drive the base/gate or the driver's input.
  • Power the motor from a supply sized for its stall current, kept separate from the Arduino's onboard 5V regulator, which can brown out the board if the motor draws through it.
  • Tie the motor supply ground and the Arduino ground together so the control signal and the motor share a common reference.
  • Place a flyback (freewheeling) diode across the motor terminals, cathode toward the positive side, to clamp the inductive voltage spike generated when the motor is switched off. Many driver ICs include this protection internally.
  • For forward and reverse control, use an H-bridge such as the L298N, DRV8833, or TB6612FNG. A single transistor can only switch one direction on and off.
  • Set speed with PWM on the driver's enable or input pin rather than by varying the supply voltage.

Board compatibility

The DC Motor connects to any of the microcontrollers supported in Tinkered. Mind the 5 V logic level on 3.3 V boards.

Simulate the DC Motor in your browser

The DC Motor is fully simulated in Tinkered. Wire it into a circuit, write your firmware, and read real values back with no physical hardware. Test your logic before you touch a breadboard.

Open it in the simulator

Common DC Motor mistakes

Connecting the motor directly to a GPIO pin

The pin cannot supply the motor's inrush or stall current. This can trip the board's protection, reset the sketch, or blow the pin. Always drive the motor through a transistor, MOSFET, or motor driver.

Omitting the flyback diode

When the switching device turns off, the motor's coil dumps a high-voltage spike back into the circuit. Without a freewheeling diode across the motor (or a driver with built-in clamping), that spike destroys transistors and can damage the microcontroller.

Powering the motor from the Arduino's 5V regulator

Motor current pulled through the onboard regulator causes voltage sag and brownout resets. Use a separate battery or supply for the motor and only share the ground line.

Forgetting the common ground

With a separate motor supply, the driver still needs the Arduino ground tied to the motor supply ground. Without a shared reference, the control signal is meaningless and the motor behaves erratically or not at all.

Expecting direction reversal from a single transistor

One transistor can only turn the motor on and off in a fixed direction. Reversing spin requires reversing the terminal polarity, which needs an H-bridge driver.

Popular DC Motor projects

Two-wheel robot car

Pair two motors with an L298N or TB6612FNG H-bridge to build a driveable robot chassis with forward, reverse, and turning.

PWM speed-controlled fan

Switch the motor through a MOSFET and vary the PWM duty cycle to smoothly control airflow or cooling.

Line-following or obstacle-avoiding robot

Combine the motors with IR or ultrasonic sensors so the microcontroller steers by adjusting each wheel's speed and direction.

Small pump or actuator

Drive a peristaltic pump or mechanism from the motor, using a flyback diode and driver to handle the inductive load safely.

Build with the DC Motor.

Drop the DC Motor into a circuit, write firmware, and simulate it in your browser, then deploy to real hardware. All in one editable Tinkered project.