3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

Use Arduino with TIP120 transistor to control motors and high power devices

Use Arduino with TIP120 transistor to control motors and high power devices
«
  • TIP120  (2).jpg
  • TIP120  (6).jpg
  • TIP120  (8).jpg
  • 251020112061.jpg
  • TIP120  (26).jpg
  • TIP120  (33).jpg
  • TIP120  (36).jpg
  • TIP120  (15).jpg
  • TIP120.jpg
  • last photo ←
»
Hello again.

So you have a DC motor or lamp but no matter how you connect them to your Arduino they just won't work? Guess what, the Arduino is a brain that comes with small muscles. It can control LEDs and other low power nicknacks but not those power motors or lights you need for your next project. The Arduino is good at thinking but not for heavy lifting. Lazy lad.

There are a few add-ons out there that you can buy such as power and motor shields for your Arduino. They have all the muscles in one nice package. Slap those shields on your Arduino and you are ready to control motors and other high power stuff (some soldering may be required.)

Or you can do it yourself for a fraction of the cost and double the pleasure. Enter the TIP120 and its sidekicks.

THE TIP120 DARLINGTON TRANSISTOR
The TIP120 is an NPN Power Darlington Transistor. It can be used with an Arduino to drive motors, turn lights on, and drive other high power gadgets.

The TIP120 acts as a power broker or gatekeeper between the Arduino realm and the high power realm composed of the PC fan and its battery pack. The Arduino can tell the TIP120 how much power to pass from the external battery pack to the PC fan but the Arduino does not share any of its power or share pins with the PC fan or its batteries. The TIP120 is the go in between.

The TIP120 has three pins. One is called Base, which we will connect to any of the Arduino PWM pins. Through the Base pin, the Arduino can tell the TIP120 how much power to supply to the motor from the external battery pack. That's it. The TIP120 does the heavy lifting while Arduino sits back and gives orders through one of its PWM pins to the TIP120 Base pin telling it how much power to pass to the motor. The poor TIP120 has to then pass the requested power from the external power to the motor based on Arduino's request.

THE PROJECT
In this tutorial, I will build a basic circuit in which I use an Arduino to control the speed of PC fan via the TIP120. You can take this basic circuit and replace the fan with other devices.

If you want to know more about Darlington transistors you can spend some time at Wikipedia http://en.wikipedia.org/wiki/Darlington_transistor It's an interesting read but you don't really need to understand it to use the TIP120. Heck I don't know what most of this stuff means.

THE SIDEKICKS
ENTER THE 1K RESISTOR & 1N4004 DIODE & 1UF CAPACITOR!
The TIP120 is a very robust item. It can handle lots of power (see specs) but the Arduino can't. So we must protect the Arduino from potential party crashers. For starters, we use a 1K Ohm resistor between the Arduino pins and the TIP120 Base pin. This is insurance against electric shorts. The TIP120 can handle 60V and 5A but I assure you the Arduino won't.

Then we have those DC motors. The internal brushes on toy/hobby DC motors generate lots of potentially harmful sparks and stray electricity that needs to be blocked. Instead of guessing which motor is safe and which is not, we simply add a $0.20 diode and $0.10 1uF ceramic capacitor to our circuit. Some electromechanical devices such as solenoids may require different capacitors.

Placing the ceramic capacitor on the + & - poles of the motor will act as suppressor of sparks and surges generated by motor brushes, which can be harmful to your circuit.

A small ceramic capacitor in the range of .01 to 0.1 uF is probably sufficient to offer protection from hobby DC motors. But If you are using brushless motors, such as the PC fan I am using in this tutorial, don't use a capacitor.

As for the 1N4004 diode, it allows current to pass in one direction from positive to negative but will block any stray current that tries to go in the opposite direction, which might have undesirable effects on your circuit.

Unlike resistors which allow current to flow in both directions, diodes were designed to let current pass from positive into negative, not the other way around. When you look closely at those small diodes we use in our projects, you will see a ring on one end of the diode cylinder. This tough guy can block high voltage (400V) with high current (1A). Again, no need to understand all this stuff so long as you connect the circuit properly.

I am a picture person so I have lots of pictures to help me explain my point.


PARTS
- TIP120 transistor (datasheet: http://www.futurlec.com/Transistors/TIP120.shtml ) $0.70
- Diode 1N4004 (datasheet: http://www.futurlec.com/Diodes/1N4004.shtml ) $0.20
- 1K Resistor (Brown, Black, Red, Gold) $0.10
- 1uF ceramic capacitor to be used with hobby DC motors $0.10
- Arduino UNO with IDE
- Breadboard
- PC fan or hobby DC motor
- 9V Alkaline or 7.2V NiMh batteries (6 X AA)
- Wires.

NOTE: I don't get commission or any perks from linking to Futurlec.com. I just like their service and prices so far.

TEST SKETCH
// Define which pin to be used to communicate with Base pin of TIP120 transistor
int TIP120pin = 11; //for this project, I pick Arduino's PMW pin 11
void setup()
{
pinMode(TIP120pin, OUTPUT); // Set pin for output to control TIP120 Base pin
analogWrite(TIP120pin, 255); // By changing values from 0 to 255 you can control motor speed
}

void loop()
{
}

CREDITS
I must thank http://luckylarry.co.uk for his super blog.

TIP120: THE MOVIE

19 comments
Apr 15, 2012. 7:45 AMconorowenbarry says:
Very good tutorial,
Just what I needed to know.

I have found however that the batteries I use to power the motor are being drained very quickly.

I am using motors taken from a handheld fan and the battery pack of 2xAA that came with it. They can run for hours on end normally but when hacked to incorporate this circuit they only last a few minutes.
Would anyone have an idea why?
Apr 11, 2012. 2:59 PMms10 says:
are there any other transister i could use
Jan 8, 2012. 2:39 AMAntzyP says:
Hi techbitar,
I am using TIP121 since I could not find TIP120. I have to run 3 motors with seperate PWM pins on arduino and seperate TIPs, but sharing the same battery source. Since a battery would not suffice powering 3 3v motors, i used a 12V 500mA wall wart.

It was going fine with 1 motor running at full RPM but as soon as the 2nd motor starts, the first one slows down and on the third one starting, all 3 are just about crawling. I tried using the circuit with just 1 TIP and motor with 9volt battery and the batter was drained in 5 minutes. I'm pretty sure the circuit is all correct. Can you please help me. Should I get a wall wart with higher amperage? Thanks!
Apr 8, 2012. 4:08 PMbuteman says:
You will probably find that the wall wart is not able to supply enough current for the 3 motors. In fact from what you describe it cannot even supply enough for 2. If you have a wall wart which can supply 12 volt and 1 amp, or better still 2 amp you will likely find it works.
Apr 1, 2012. 1:41 PMnbrown14 says:
Hi AntzyP,

I saw this post, and I am trying to do a system you describe here with four motors. Do you mind sharing your schematic and the wall wart you had to use to resolve your power issue?
Apr 3, 2012. 9:53 AMAntzyP says:
Hi nbrown14,

I used a schematic similar to the one shown here:
http://bildr.org/2011/03/high-power-control-with-arduino-and-tip120/

you can replicate this circuit for 4 motors. I was able to run 3 motors rated at 3v using a 5V 3A wall wart. The voltage and current rating of the wall wart will depend on the motors.

My motors took about 500mA while running. They need to delivered about twice the current(due to stall currents, i.e. extra current required for starting motors up). So I took about 1A for each motor. So for 3 motors, I estimated the wall wart with 3A rating should be fine. And it did work awesomely :)

Let me know if you need any more help...

-Antzy
Mar 12, 2012. 9:12 PMAntzyP says:
Thanks for your help. I found that the curent wasnt large enough. Using a higher current wall wart solved the problem.
Jan 22, 2012. 8:50 PMThermionic says:
Great job man, I've wondering about interfacing Picaxes and motors for a while, this Instructable hit the spot!
Jan 4, 2012. 7:45 PMzanklob says:
Hi,

i am trying to make a 4-pin intel pc fan to work with a temperature sensor(LM335A).the fan to act according to the temperature.

i was wonderding how the schematic would be..
Nov 28, 2011. 11:58 AMcjensen25 says:
If no voltage was applied to the Base then would fan not spin (because its NPN - and gate not open?) or am I thinking of PNP - please explain if I am completely wrong!
Oct 26, 2011. 3:50 AMComputothought says:
I might add an opto isolator.
Oct 25, 2011. 6:35 PMWakko says:
(removed by author or community request)
Oct 26, 2011. 7:32 AMWakko says:
This is a great circuit ...if only could find a schematic?
Oct 26, 2011. 7:31 AMWakko says:
Thank you! now is more easy to understand!!!

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
33
Followers
18
Author:techbitar
Did I unplug the solder iron?