Need help calculating resistance for transistor base - Electrical Engineering Stack Exchange most recent 30 from electronics.stackexchange.com 2019-09-17T22:20:59Z https://electronics.stackexchange.com/feeds/question/83685 https://creativecommons.org/licenses/by-sa/4.0/rdf https://electronics.stackexchange.com/q/83685 12 Need help calculating resistance for transistor base jM2.me https://electronics.stackexchange.com/users/4040 2013-09-28T17:00:52Z 2017-11-15T10:52:55Z <p>I have 3 12VDC/40A automotive relays (<a href="http://www.radioshack.com/graphics/uc/rsk/Support/ProductManuals/2750001_DS_EN.pdf" rel="noreferrer">datasheet</a>) that I want to use with my Arduino. Based on the tutorial I am following (<a href="http://www.instructables.com/id/Connecting-a-12V-Relay-to-Arduino/?ALLSTEPS" rel="noreferrer">link</a>) I need transistor, resistor, and diode. I am not an electrical engineer therefore I am unsure about the parts and calculations I made.</p> <p>For the start, relay coil resistance is 90+-10% Ohm per datasheet. So I proceed by calculating the current flow. </p> <blockquote> <p>Voltage=Resistance*Current</p> <p>Current=Voltage/Resistance</p> <p>Current=12V/90</p> <p>Ohm Current = 133mA</p> </blockquote> <p>For the transistor I can get 2N3904 or 2N4401. At this point I have to calculate resistance for the base of transistor. In tutorial its as following</p> <blockquote> <p>hfe = Ic / Ib</p> <p>Ib = Ic / hfe</p> <p>Ib = 0.03 A / 75 Ib = 0.0004 A => 0.4 mA</p> <p>R1 = U / Ib</p> <p>R1 = 5V / 0.0004 A</p> <p>R1 = 12500 Ohm</p> </blockquote> <p>2N3904 datasheet states the H(fe) is 30-300 when lc = 100mA (mine is 130mA) and Vce = 1V. At this point I have no clue what is going on, thus I need help.</p> <p>Edit: Here is what I ended up with. RLY1 in the picture is 12VDC/40A (<a href="http://www.radioshack.com/graphics/uc/rsk/Support/ProductManuals/2750001_DS_EN.pdf" rel="noreferrer">link</a>)</p> <p><img src="https://i.stack.imgur.com/moB3R.png" alt="enter image description here"></p> https://electronics.stackexchange.com/questions/83685/-/83689#83689 4 Answer by Olin Lathrop for Need help calculating resistance for transistor base Olin Lathrop https://electronics.stackexchange.com/users/4512 2013-09-28T17:12:04Z 2013-09-28T17:12:04Z <p>You are right in that the relay coil seems to need 133 mA nominal. However, that's not worst case, and that assumes 12 V is applied accross the coil. Nevertheless, that's a good place to start, then we'll throw in a factor of 2 margin later anyway.</p> <p>Let's say the minimum guaranteed gain of the transistor you will use is 50. That means the base current needs to be at least 133 mA / 50 = 2.7 mA. If your digital output is 5 V, then there will be about 4.3 V accross the base resistor after accounting for the B-E drop of the transistor. 4.3 V / 2.7 mA = 1.6 k&Omega;. To leave some margin, use about half that. The common value of 820 &Omega; should be good.</p> <p>Now check back to see what the digital output must supply. 4.3 V / 820 &Omega; = 5.2 mA. Many digital outputs can source that, but you need to check that yours can. If it can't, you need a different topology.</p> https://electronics.stackexchange.com/questions/83685/-/83690#83690 1 Answer by JIm Dearden for Need help calculating resistance for transistor base JIm Dearden https://electronics.stackexchange.com/users/24182 2013-09-28T17:13:45Z 2013-09-28T17:13:45Z <p><em>Ib = Ic / hfe (Fine)</em></p> <p><em>Ib = 0.03 A / 75 Ib = 0.0004 A => 0.4 mA</em> </p> <p>Hmmm! Ic = .13 A not 0.03 and I would take hfe to be about 50, rather than 75. (generally the small signal transistors have at least this gain) This gives Ib = 0.0026 or 2.6mA</p> <p>For a 5V input the voltage drop across the input resistor will be 5 - 0.6V = 4.4V (remember the base-emitter drop needs about 0.6V before the transistor is turned on.) This gives;</p> <pre><code> Rb = 4.4/0.0026 = 1k7 </code></pre> <p>Now this is really <strong>a maximum value</strong> for the base resistor so chose a standard value resistance below this say 1k5 or even 1k0. </p> https://electronics.stackexchange.com/questions/83685/-/83691#83691 10 Answer by jippie for Need help calculating resistance for transistor base jippie https://electronics.stackexchange.com/users/8627 2013-09-28T17:15:50Z 2013-09-28T17:55:07Z <p>Let's design for worst case, that is a good practice.</p> <p>\$Ic = 133\text{mA}\$</p> <p>\$h_{FE} = 30\$ # according to the <a href="http://www.fairchildsemi.com/ds/2N/2N3904.pdf" rel="noreferrer">datasheet</a> minimum 30, typically much better; @Ic=100mA</p> <p>You can calculate Ib now:</p> <p>\$I_b = \dfrac{I_c}{h_{FE}} = \dfrac{133\text{mA}}{30} = 4.43\text{mA}\$</p> <p>\$V_{BE,SAT} = 0.95\$ # datasheet, nearest match is 50mA. Maximum value, practical value is probably much lower (0.65V)</p> <p>Now let's calculate the base series resistance. This is equal to the voltage across the resistor, divided by the current through it. The current through the resistor is the same as the base current. The voltage across it is the rail voltage (5V) decreased by the base-to-emitter voltage of the transistor V(CE,sat).</p> <p>\$R_B = \dfrac{U_{R_b}}{I_b} = \dfrac{V_{CC} - V_{BE}}{I_B} = \dfrac{5 - 0.95}{4.43/1000} = 913\Omega\$</p> <p>With all the worst case engineering up to here, for once let's just round it up to the nearest E12 resistor value of 1kΩ (or 820Ω for worst case engineering, it will work with either).</p> https://electronics.stackexchange.com/questions/83685/-/83694#83694 3 Answer by Michael Karas for Need help calculating resistance for transistor base Michael Karas https://electronics.stackexchange.com/users/12135 2013-09-28T17:22:35Z 2013-09-28T17:22:35Z <p>Since you are using the transistor in a saturated switching configuration it is OK if you pump more base current into the part than actually required for the amount of collector current that you intend to sink through the device from the relay coil. </p> <p>That is a practical limit to the maximum base current that you can inject in the case of the 2N3904 / 2N4401. That limit is not always explicitly stated in the data sheets for the parts but I can tell you from experience it is in the 5->6 mA range. </p> <p>For a switching design you may want to plan for the minimum guaranteed Hfe plus a margin. So lets say you pick 25 as the worst case working Hfe. With a needed collector current of 133mA and a Hfe of 25 will result in a working base current of 5.32mA. This seems to be in the OK area for these transistor types. </p> <p>It appears that you intend to drive the base from a 5V signal. With a nominal Vbe of 0.7V that leaves you with a 4.3V drop across the base resistor. Resistance to limit current to 5.32mA at 4.3V is approximately 800 ohms. Use an 820 ohm standard value base resistor. </p> <p>Final note. If you are driving this direct from an MCU output pin the MCU may not be able to source 5.32mA at 5V output level. As such the MCU output will drop down some from 5V. This will reduce the base current some but since we calculated using worst case Hfe the relay drive will still work for most transistors that you will pickup out of the bag.</p> https://electronics.stackexchange.com/questions/83685/-/83695#83695 2 Answer by Andy aka for Need help calculating resistance for transistor base Andy aka https://electronics.stackexchange.com/users/20218 2013-09-28T17:31:58Z 2013-09-28T17:31:58Z <p>You can certainly put more current into the base of a transistor than that implied by collector current requirements and \$h_{fe}\$. In fact you usually need to - this ensures that under all normal operating conditions the circuit will continue to work as expected.</p> <p>There are limits though - the data sheet for the transistor might tell you that absolute maximum base current is (say) 50 mA - you don't really want to go that high if collector current requirements and \$h_{fe}\$ imply 50 \$\mu A\$. So choose 500 \$\mu A\$. This will likely cover all eventualities.</p> <p>However you need to work out if the circuit driving the base can continuously supply the current you decide upon. Again, the data sheet will inform you and you don't want to sail too close to this number either else you might be reducing the chips reliability.</p> <p>There's another consideration too. A lot of CMOS devices will state that there maximum output current is (say) 20 mA BUT they'll also state a maximum power current of (say) 100 mA. This is fine if the chip is driving 3 outputs but what if the chip is an octal buffer. Realistically check the current output per pin AND double check on the power supply current - there may be a limit on this that prevents all o/p pins pushing out 20 mA.</p> https://electronics.stackexchange.com/questions/83685/-/340016#340016 0 Answer by Biddut Mitra for Need help calculating resistance for transistor base Biddut Mitra https://electronics.stackexchange.com/users/84374 2017-11-15T10:46:34Z 2017-11-15T10:52:55Z <p>I would like to share this link, it has good information on using microcontrollers to interface with real world electronics. Look at <a href="http://www.w9xt.com/page_microdesign_pt7_transistor_switching.html" rel="nofollow noreferrer">Part 7</a> of <a href="http://www.w9xt.com/page_microdesign_toc.html" rel="nofollow noreferrer">Microcontroller Interfacing Table of Contents</a></p> <p><a href="https://i.stack.imgur.com/vqqFP.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/vqqFP.jpg" alt="enter image description here"></a></p>