Go Down

### Topic: tip 120 controlling relay. resistance help (Read 4688 times)previous topic - next topic

#### roybenmo

##### Aug 29, 2011, 06:52 am
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.
http://www.azettler.com/pdfs/az973.pdf

Below is the link for the relay data sheet.
http://www.azettler.com/pdfs/az973.pdf

#### roybenmo

#1
##### Aug 29, 2011, 06:54 am
I forgot to mention its a 12volt relay

#### Grumpy_Mike

#2
##### Aug 29, 2011, 08:10 am
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.

#### roybenmo

#3
##### Aug 29, 2011, 09:10 am
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?

#### dc42

#4
##### Aug 29, 2011, 10:20 am
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.
Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

#### roybenmo

#5
##### Aug 29, 2011, 07:17 pm
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

#### bill_kerr@shaw.ca

#6
##### Aug 29, 2011, 07:31 pm
Hi Roybenmo

Check ou this tutorial, good explanation when using transistors as a switch with calculations.
http://www.electronics-tutorials.ws/transistor/tran_4.html

#### Daanii

#7
##### Aug 29, 2011, 07:39 pm
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.

#### roybenmo

#8
##### Aug 29, 2011, 07:57 pm
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.

#### Daanii

#9
##### Aug 29, 2011, 09:10 pm
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.

#### dc42

#10
##### Aug 29, 2011, 09:44 pm

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

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.
Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

Go Up