Resistor value for base of TIP 120

I'm late to this post, but i think I understand your confusion. First of all, when applying voltage to the bass of a transistor, (presumably with the emitter grounded),you have to remember that the Base to Emitter junction will look like a diode. A diode will behave like an open circuit until it sees about 1/2 volt, at which point it will change only slightly. In fact, if you try to force it much beyond .6 volts, you will fry it. But the BE junction makes sense if you think of it as a pure current device (or current "sink"), and the transistor itself as a "current" amplifier. So assuming you have a 5V source available to drive the BE junction, what you have to consider is "hFE" parameter, which translates into the current gain. That current gain will change depending on the load (its not a straight line), but its a good starting point. So lets say you have 5V, and we know the BE junction will try to maintain about .6V. Now this is a darlington, so we'll double that and assume about 1.2V. So that means you have 4.5 Volts to work with. Now since we're dealing with a pure current "sink", we can simplify say that if the TP transistor has an hfE of 1000 at 3 amps (its high, of course, because it is a darlington transistor). So that means all you need to drive it is 3 mA ( 3/ 1000). So, plugging that into ohms law, you have (5 - 1.2) / .003, = 1266 ohms. So all you need to do is feed the available 5V through 1266 ohms to the base of the Emitter grounded transistor, and you're good to about 3 amps. Add a little extra current to ensure saturation, and the 1000 ohms offered earlier should be perfect. But to be sure, recalculate based on your actual load.

Be aware that the darlington transistor will "eat" up a little over a volt from your load. Just like the BE junction, the whole transistor will lose some voltage across it.

Now... one more tip.... since you have 12 volts to work with, and have already committed to adding an opto idolator, you might want to make the jump to re-thinking this to work with a MOSFET. Google some basic MOSFET circuits and you'll see they are a lot easier to work with than you may think. believe me... I understand about sticking with parts and components you already have some familiarity with, and I too tended to use transistors (and darlingtons) in many cases where a MOSFET would have been better, and after making the switch once I was hooked! A MOSFET, first of all, won't "eat" a volt or so from your load. Instead, what you lose will likly be in the millivolt range. Second, since there's less voltage "dropped" across a MOSFET, it will dissipate much less power, run cooler, and control a much bigger load for the same size part. Want more reason to switch? A MOSFET (unlike a BJT) is a pure VOLTAGE device. You won't have to worry about how much current to drive its "gate" with, because for all practical purposes a MOSFET draws no gate current at all. You'll just need to throw in a pull up resistor, and you pretty much can pick the value at random. Have I sold you yet? The oly down side is that because they are a voltage device, and the Arduinno (like many processor boards) only offers 3.3V, finding MOSFETs that can work without an interim voltage amplifier (or opto idolater) will take a little more careful parts selection. But opto isolation is a good choice and solves a lot of protection problems, so as long as you work with those, you probably can get ideal MOSFETs for your application dirt cheap.

This reply is to both the OP and PeterPan321:

PeterPan321:
So assuming you have a 5V source available to drive the BE junction, what you have to consider is "hFE" parameter, which translates into the current gain. That current gain will change depending on the load (its not a straight line), but its a good starting point. So lets say you have 5V, and we know the BE junction will try to maintain about .6V

The current gain of a transistor does not apply when the device is saturated. The base current required to saturate the device to a given C-E voltage drop is many times specified, especially so for devices designed as switches. The TIP120 data sheet clearly shows the base current required when used as a switch at different C-E currents. This was already covered in this thread, see post #3 for the data already established, no need to repost duplicate content.

The b-e junction in a darlington is two junctions so the drop is nominally 1.2 volts, not 0.6 as mentioned and with the TIP120, it can go as high as 2.5 volts with 3 amps C-E.

PeterPan321:
You won't have to worry about how much current to drive its "gate" with, because for all practical purposes a MOSFET draws no gate current at all. You'll just need to throw in a pull up resistor, and you pretty much can pick the value at random

Not so. The gate has capacitance. Depending upon the device, that capacitance, referred to as gate charge, can be significant and can make the gate look like a dead short to a high impedance signal. It takes current to overcome the gate charge and allow the gate voltage to rise to the point where the device will turn on.

While you can eliminate the gate resistor, you may well be rolling the dice every time you switch the digital output from low to high without a current limiting resistor. If you have the patience to slog through it, there is a great thread on this topic here:

Myth Busters 3 – Myth: “You must have a gate resistor”

If you manage to get through all fifteen pages, and I do recommend it, remember the game can significantly change when either device changes. The thread was based on the AVR ATMega class of parts and they have a significantly higher current drive capability than more modern ARM 3.3 volt devices (Arduino Zero, Due, M0 and others like ESP8266). Those devices would probably fail in short order with MOSFETS with high gate charges and no resistors.

bigred1212:
I thought R2 needed to be about 1000, but it has been suggested the optoisolator is a current limiter and R2 is not needed.

The TIP120 base resistor (R2) is absolutely required, nowhere in this thread has anything to the contrary been posted. The value of 1000 was accepted as correct in post #3.

Base current for a TIP120 should be 1/250 of collector current for saturation.
Stop using hFE for switching/saturation. It's not relevant.

Because the CTR of an optocoupler can vary wildly, it's better to saturate the opto transistor and set base current needed with a resistor (R2).

Opto LED current should be at least "TIP base current * CTR".
e.g. 20mA opto LED for 10mA opto transistor if... (worst case) CTR is 50%.
Leo..

avr_fred:
The TIP120 base resistor (R2) is absolutely required, nowhere in this thread has anything to the contrary been posted.

Actually it has. Twice.

Grumpy_Mike:
You have no need to put one on the output side, the current is limited by the current transfer you get.

Grumpy_Mike:
Therefore their is no need for an extra current limiting resistor on the output transistor.

avr_fred:
This reply is to both the OP and PeterPan321:

The current gain of a transistor does not apply when the device is saturated. The base current required to saturate the device to a given C-E voltage drop is many times specified, especially so for devices designed as switches. The TIP120 data sheet clearly shows the base current required when used as a switch at different C-E currents. This was already covered in this thread, see post #3 for the data already established, no need to repost duplicate content.

I believe its appropriate to post anytime I believe I have a helpful explanation. Often (here and in other forums) I'll see pots where I can see such basic explanations would be helpful to fill in some possible mis-understandings by an OP. This was such a case. Any explanation of a how a device (such as a transistor) starts with ensuring an understanding of the basics. I believe it this case, a basic explanation of how the transistor works as a current amplifier is useful, before moving on to characteristics in saturation. My post was already getting long, so adding this factor is helpful too. I've since then edited my post.

avr_fred:
The b-e junction in a darlington is two junctions so the drop is nominally 1.2 volts, not 0.6 as mentioned and with the TIP120, it can go as high as 2.5 volts with 3 amps C-E.

Yes. Actually that was the main reason for my edit today. I had caught my error immediately, but there is a long standing issue where this forum won't allow an edit shortly after a post, until you've posted about 100 times.
[/quote]

avr_fred:
Not so. The gate has capacitance. Depending upon the device, that capacitance, referred to as gate charge, can be significant and can make the gate look like a dead short to a high impedance signal. It takes current to overcome the gate charge and allow the gate voltage to rise to the point where the device will turn on.

While you can eliminate the gate resistor, you may well be rolling the dice every time you switch the digital output from low to high without a current limiting resistor. If you have the patience to slog through it, there is a great thread on this topic here:

Well, "YES SO", in the context of my post. I'm always willing to learn, and engineering is often a combination a accumulating data, applying it, and ultimately learning what things are as critical as some people rant about, and conversely what things are important that no one is mentioning. In this case, once again, it was a matter of offering some useful advice (maybe not to you but to the OP) encouraging them to consider a MOSFET. My reference to not needing to worry about the gate current was first, my way of further describing that the MOSFET behaves as a voltage amplifier, and as such the gate drive current is of little importance, especially when compared to a BJT transistor. Second, in a case like this where the OP has already committed to an opt0-isolator, even a direct gate connection to the OPTO would protect the Arduino output. And if they choose to go further and find a MOSFET that can be driven directly, a small resistor would be there to prevent too much instantaneous current to provide that protection. The response time would not be an issue in this case, simply because as a replacement for his TIP120, I doubt it would make any practical difference. Again, I say "PRACTICAL" difference. I feel when describing basics to someone new to possible approach, simplifying things is useful.

avr_fred:
Myth Busters 3 – Myth: “You must have a gate resistor”

If you manage to get through all fifteen pages, and I do recommend it, remember the game can significantly change when either device changes. The thread was based on the AVR ATMega class of parts and they have a significantly higher current drive capability than more modern ARM 3.3 volt devices (Arduino Zero, Due, M0 and others like ESP8266). Those devices would probably fail in short order with MOSFETS with high gate charges and no resistors.

The TIP120 base resistor (R2) is absolutely required, nowhere in this thread has anything to the contrary been posted. The value of 1000 was accepted as correct in post #3.

I've designed many successful control circuits using MOSFETS with various drive schemes, and well understand about gate capacitance and how it affects speed and can tax a directly coupled drive source. This is why schemes like the OP's initial Opto-isolator, and even more common a separate MOSFET for drive of the MOSFET handing the power are widely used. I did not say anything about eliminating the base resistor. I specifically told the OP to consider a MOSFET, saying "especially since you've already committed to an opto-isolator", explaining that drive current for the Gate (not Base, unless I made another Typo) is not critical with a MOSFET in his application. In any case, the idea is to help and advise the OP, and I stand by the idea of providing the basics before getting off into the weeds. If you feel my posts are useless, you're free to say so. But in the interest those trying to learn electronics, I'll just say supplying stand alone information in posts is more useful than an apparent argument between those trying to help. Every forum has its "flavor", but I won't argue this point any more. The OP, as with all things related to internet information, will have to figure out and separate the heat from the light.

Hi,
Go for it.

Tom... :slight_smile:

Hi,
MOSFET version, feel free to edit etc etc.


Tom.. :slight_smile:

TomGeorge:
Hi,
Go for it.

Yep, that's it.

R1 between 220 and 475. R2 between 0 and 1000. We'll see what works.

Hi,

R1 between 220 and 475. R2 between 0 and 1000. We'll see what works.

Nooooo... R2 must be 1K or higher, NEVER 0 ohms.

Do you have DMM ?

Tom.... :slight_smile:

TomGeorge:
Hi,Nooooo... R2 must be 1K or higher, NEVER 0 ohms.

Do you have DMM ?

Tom.... :slight_smile:

Don't know what DMM is. See earlier posts about the value of R2.

Hi,
DMM == Digital Multi-Meter.

If R2 you are referring to is the TIP120 base resistor, DO NOT use zero Ohms.

Tom.. :slight_smile:

You can use zero ohms if the value of the led's current resistor is carefully designed.

The current out of the photo transistor is limited by the number of photons being injected into the base. That in turn is controlled by the brightness of the opto's LED.

However for a rough and ready design use a resistor as it looks like the OP is not yet capable of a careful design.

Grumpy_Mike:
However for a rough and ready design use a resistor as it looks like the OP is not yet capable of a careful design.

I realize you are grumpy, but I don't think that kind of comment is really necessary.

I'm butting in here, not to interfere with Mike - as I absolutely know he can and will respond if and when he feels like it- but because I have to agree with his post.

I would have never commented in this thread, had it not been for one sentence in your first post. Call me sensitive but I thought it rather arrogant of you to barf numbers all over the page, putting up the pretense of knowing what you were doing and then closing the post with:

I am leaving this post up in the hopes that the thought process involved will benefit someone else.

It could not be left to stand. It was totally wrong. Okay, you did ask for help. Fair enough. Then you got that help and you started to play the village idiot. Why? You had already demonstrated an understanding of the concepts, you just had all of the data points wrong.

Then it's Explain it to me like I'm five? Seriously?

Please stop with the wounded routine when you get exactly what you give. It's the Internet. I'd actually say everybody has treated you pretty darn well, considering the fact that it was us that had to teach you something. At times, it almost seemed as though you didn't want to learn. Suck it up and move on.

What is missing in all this R2 value stuff? The optocoupler transfer ratio. You/We have absolutely no idea what it is. It's worst case 50%. But what happens with no resistor if it's best case of 300%? What then?

Holly two cent resistor Batman. Use one or not and please move on to something more beneficial. To everyone. Enough already.

bigred1212:
I realize you are grumpy, but I don't think that kind of comment is really necessary.

Why not? You show little signs of competence. If you could design things carefully then you would have done so when I told you in the first place, but you ignored me or disbelieve me but you did not ask for further clarification.

One big problem with learning electronics is that you try and run before you can crawl. It is something a lot of people are prone to these days. A sort of sense of entitlement to knowledge you don't have and without the commitment to want to actually learn stuff.

We all have our own levels of competence part of the fun is learning to increase that level, but you have to know your current limits. I am not saying you will never get there I am just saying that you are not within grasping distance yet.

@avr_fred

My first post was asking for a review of some proposed resistor values for a circuit I want to build. Unlike many newbies, I tried to show my work, use the formulas and do the calculations, and to demonstrate that I had attempted to come up with my own answer. In fact, the very act of posting, as is common, led me to believe I had in fact answered my own question. I sorry if trying to show some numbers is considered arrogant and barfing all over the page. I'm quite sure that if I had not made any attempt to solve the problem myself and just asked for the answer, I would have been asked "Well, what have you done already?" or something like that (and rightly so!).

I readily admit (and admitted) I had a flawed understanding of optoisolators. As I indicated earlier, a better understanding of how they work has been a good lesson.

As for the actual resistor values, it seems that a combination of Faraday, Brattain, Shannon, and God members can't answer the question ("We have absolutely no idea what it is"), so I guess I shouldn't worry that as a hobbyist I'm still a little unclear as to what value to use.

I do think the advice of just-stick-any-ol'-two-cent-resistor-in-there-Batman will be helpful, however. Oh wait. Not being reduced to just sticking in the first resistor I grabbed out of the box was the whole reason for the thread. So maybe that's not such good advice. If helping hobbyists who don't know the answers (and often may not even know the questions!) bothers or frustrates you so much, perhaps you should take your own advice and butt out, or at least not butt in not comment. [edit- I note you changed this to "commented" from butt in]

Thank you for pointing out about the current transfer ratio and the fact that the optoisolator was not just a simple digital on/off thing. I didn't realize that before and that is very helpful. I will try R1 at the 475 value you suggested.

@grumpy_mike I'm sorry my lack of competence distresses you. I am slowly learning if it is of any comfort. If asking for clarification of your responses offended you, I also apologize. That was not my intention. I am, however, glad that I asked. It seems there is at least one poster who does not agree that limiting the front end the optoisolator will be sufficient to not require a resistor on the back end. But more importantly, based on that discussion, I am getting a better grasp on how the parts work. I found the clarification helpful and I do seriously thank you for your contribution.

bigred1212:
As for the actual resistor values, it seems that a combination of Faraday, Brattain, Shannon, and God members can't answer the question ("We have absolutely no idea what it is"), so I guess I shouldn't worry that as a hobbyist I'm still a little unclear as to what value to use.

I think I gave you the clues to calculate it yourself.
I'll try again.

  1. 12volt/2Amp solenoid.
  2. 5volt Arduino.
  3. TIP120

Estimated saturation voltage of a TIP120 @2Amp is ~1.5volt, so a 13.5volt supply is needed if... you want ~12volt on the solenoid (a mosfet might do better here).

Base current for a TIP120 should be 1/250 of collector current, so 2Amp/250 = 8mA.
If... the supply is 12volt, and TIP120 B/E drop is ~1.5volt, and opto transistor drops ~1volt, then...
Base current limiting resistor is (12-1.5-1) / 0.008A = ~1k2. 1k gives a bit more base current, and that's ok.

Opto used could have a worst case CTR of only 50%,
so the opto LED needs twice the current of the opto transistor, 16mA.
Opto LED drops ~1.3volt, and 5volt is available from the Arduino pin (with internal resistance of ~25ohm).
Opto R needed: 5volt/0.016A = 312.5ohm, -25ohm = 287.5ohm.
220ohm is ok since it's more than needed. 330ohm could still be ok, since we calculated with worst case numbers. 470ohm or even 1k might still work.
Hope this answers your questions.
Leo..

Leo,

Thank you for your time and information. This is very helpful.

Mike

Grumpy_Mike:
One big problem with learning electronics is that you try and run before you can crawl. It is something a lot of people are prone to these days. A sort of sense of entitlement to knowledge you don't have and without the commitment to want to actually learn stuff.

@Grumpy_Mike

Yep! Though I have to say that's much more true of software design. You can do an awful LOT of things totally bass-ackwards in a program, and unless you find that formidable HCF (halt and catch fire) instruction, you've lost nothing but time (and maybe some sanity). On the other hand, electronics teaches you via the school of hard knocks, usually hard knocks on your wallet from burned out parts. Nothing like a puff of smoke to make you figure out what went wrong, and go the 2nd mile to avoid the same mistake!