Arduino Motors and Transistors

This week, we’ll finally be using the Arduino to control some motors! First up, we’ll control a standard DC motor running off a 9V battery with the help of an NPN transistor and a PWM (Pulse Width Modulated) signal from the Arduino.

Arduino Motors and Transistors

[box type=”note” color=” #202020 ” bg=”#ffbb00 ” font=”verdana” fontsize=”14″ radius=”20 ” border=”#000″ float=”right” head=”Attributes”]Thanks to Jeremy , for this articles[/box]


Next, it’s onto 180 degree servo motors, which we will power on an independent 5V rail using a voltage regulator. We’ll control the servo using a PWM signal from the arduino, and I’ll show you how you can turn analog distance readings into precise angles for the servo to turn to!

I mention in the video that you can control DC motor direction using an H-Bridge. If you want to wire that up, take a look through this Wikipedia article, and read through this tutorial.

If you want to learn more about analog input filtering in software, check out this example code.

The Arduino Contest has been extended! So don’t forget to submit your project.

 Arduino Motors and Transistors Schematic

You can download the files associated with this episode here:


[box color=”#985D00″ bg=”#FFF8CB” font=”verdana” fontsize=”14 ” radius=”20 ” border=”#985D12″ float=”right” head=”Major Components in Project” headbg=”#FFEB70″ headcolor=”#985D00″]PARTS LIST
1.   Arduino Uno: -board/dp/13T9285
2.   USB Cable: http://us .element –
3.   Arduino Software:
4.   Breadboard: h ttp://us.element
5.   .1uF capacitor: elec -0- 1%C2%B5f-50v-radial/dp/65R3169
6.   22uF capacitor: elect -22uf -50v-radial/dp/38M6812
7.   5V Regulator:
8.   9V Battery Clip: -3449/battery-clip- 9v -wire -lead/dp/34M2183
9.   NPN Transistor:
10.  1k ohm Resistor: -0 -25w -1k/resistor-carbon – film -1kohm -250mw/dp/38K0327
11.  1uF Capacitor: -bc -components/ k105z205ve5th5/capacitor -ceramic-1uf-25v5v-radial/dp/95C0982
12.  1N4004 Diode: -general- semiconductor/1 n4004 – e3- 54/standard-diode-1a -400v -do-204al/dp/78K2126
13.  IR Distance Sensor: http://us.element-
14.  Geared DC Motor:
15.  Servo Motor:
16.  Jumper Kit:  [/box]

For more detail: Arduino Motors and Transistors

About The Author

Ibrar Ayyub

I am an experienced technical writer with a Master's degree in computer science from BZU Multan University. I have written for various industries, mainly home automation, and engineering. I have a clear and simple writing style and am skilled in using infographics and diagrams. I am a great researcher and is able to present information in a well-organized and logical manner.

Follow Us:
Scroll to Top