tip 120 controlling relay. resistance help

O.k. so im trying to power a relay with a tip120 transistor. When I look online at other peoples projects they say to use a 1k or 2.2k base resistor. I cant for the life of me figure out how they figured this out.

The transistor is a darlington pair.
It is going to switch the relay on and off.
I will use my arduino uno to control the transistor.

Below is the link for the tip120 data sheet.

Below is the link for the relay data sheet.

I forgot to mention its a 12volt relay

This is not critical, the resistor must be such that the current In the base times the transistor's gain is at least equal to the current in the collector / emitter. Make it twice as much but more doesn't matter, up to the limit of what the base can take and arduino can deliver.

Thats the problem im having. Its not simple gor me because i kerp getting what seems like all the wrong numbers.

So if the relay coil is 87 ohms at 12 volts I have a draw of 137ma. How do I figure out the base resistor from this? I know the output from the arduino is 5 volts and since this transistor is a darlington pair so I subruct 1.4 from 5 to get 3.6 volts. Whats next?

TIP120 collector current = 137mA
TIP120 base current = 137mA/1000 = 137uA
times 2 ~= 300 uA
R = 3.6v/300uA ~= 12K

So 12K is the maximum resistor you should use. In fact the TIP120 is overkill for this application (switching 137mA), a small signal transistor with a current rating of 200mA or more would have done, e.g. BC337 with 1K base resistor.

Don't forget to include a flyback diode across the relay coil.

After looking at the data sheet I noticed it already has a fly back diode in the tranistor. Do I need another one for the relay?

http://www.fairchildsemi.com/ds/TI/TIP120.pdf

Hi Roybenmo

Check ou this tutorial, good explanation when using transistors as a switch with calculations.

Rgerads Bill

It does seem strange to use a TIP120 to switch an automotive relay. The TIP120 is a power transistor that can switch up to 5 Amps. You can often use it in place of a relay.

As noted by dc42, a BC337 would be a better choice. Compared to the TIP120, it's cheaper, and uses less power. Just right for the application.

Ok great. I will look into getting the BC337 transistor. For now I already have tip120 they only cost me 90 cents each so not to bad.

The reason im not using the tip as a relay is because I need the relay to power christmas lights.

Well, there's certainly nothing wrong with using what's at hand. As dc42 says, the TIP120 is overkill. But it will certainly work. No need to use anything else to get your project working.

But in general, the BC337 is a good choice for projects like this. You can get them for about 7 cents each.

Another choice is this board: http://iteadstudio.com/store/index.php?main_page=product_info&cPath=18&products_id=448 But it's only good for 10 Amps. Maybe you need more.

roybenmo:
After looking at the data sheet I noticed it already has a fly back diode in the tranistor. Do I need another one for the relay?

Intelligent Power and Sensing Technologies | onsemi

The flyback diode in the transistor is connected across the transistor and protects it against negative voltages between the collector and emitter. When switching a relay, you need a flyback diode across the relay coil, to protect the transistor against high positive voltages between the collector and emitter.