I'm aiming to find a transistor that will be used to switch a relay, and can handle the following specifications. I think I've found one and would appreciate having the calculations checked and checking if I have missed anything important:

A device is an Arduino and is connected to base of transistor.

Device voltage: 5V
Device source current: <= 5mA

The collector pin of the transistor is connected to a relay.

Collector voltage (Vce): = 5V
Collector current (Ic): = 90mA
Transistor power dissipation: >= ( 5 * 90 ) >= 450mW

DC current gain F.O.S. = 5
DC current gain >= ( Collector current / Device source current ) * DC current gain F.O.S.
DC current gain >= ( 90 / 5 ) * 5
DC current gain >= 90

I've found the BC337 transistor by ON Semiconductors and using this datasheet.

Collector - Emitter Voltage (Vceo) is 45 Vdc, which covers the 5V required.

Collector current - continuous (Ic) is 800 mA, which is well above the 90mA the circuit requires.

Total Device Dissipation @ Ta = 25c (Pd) is 625 mW, which is above the 450mW required.

DC current gain is given for Ic = 100mA and Vce = 1V, which the Ic is quite close to the collector current (90mA), so this should be okay. The Vce given is 1V, although the circuit runs at 5V, but from all that is understood, the Vce is a bit on the meaningless side once the transistor is saturated.

The resistor is needed to restrict the transistor sourcing too much current from the device, which is limited to 5mA.

Base − Emitter on voltage (Vbe(on)) for the transistor has a maximum of 1.2V, which will be used for a worst case scenario. So, the resistor connected between the device and the base pin should drop:

Resistor voltage drop = Device voltage - Base − Emitter on voltage
Resistor voltage drop = 5 - 1.2
Resistor voltage drop = 3.8

This means the resistor must have a resistance value of:

Resistance = Voltage / Current
Resistance value = Resistor voltage drop / Device source current (A)
Resistance value = 3.8 / 0.005
Resistance value = 3.8 / 0.005
Resistance value = 760 Ohms

  1. Is this all correct, or have I made some fantastic error or overlooked a large problem?
  2. Vbe(on) is quoted for Ic=300mA and Vce=1V. I think I understand that Vce isn't too much of a problem once the transistor is saturated, but the collector current is 300mA, while I'm passing only 90mA - is this something to be concerned about, and why should or shouldn't I be concerned over this?
  • 1
    \$\begingroup\$ Although you go through the requirements in detail, I miss one point: What do you actually want to do with this transistor ?? Dissipate energy ? Or just switch something on and off. And why not use an NMOS (like a 2n7000) ? \$\endgroup\$ Jul 6, 2015 at 10:27
  • \$\begingroup\$ That's a very good point, sadly I've been so wrapped up in smaller details over the past few days I've missed the obvious one! :) The transistor shall be used as a switch... Question updated.. Thank you. :) \$\endgroup\$
    – R4D4
    Jul 6, 2015 at 10:32
  • \$\begingroup\$ F.O.S.?????????? \$\endgroup\$
    – Andy aka
    Jul 6, 2015 at 10:32
  • 1
    \$\begingroup\$ I would say you can safely go at least up to 10mA. And with a transistor current gain of 10 or 20 while saturated you could use any general purpose (collector current above 100mA) BJT. Of course you should take into consideration power dissipation. \$\endgroup\$
    – Golaž
    Jul 6, 2015 at 10:56
  • 2
    \$\begingroup\$ Power dissipation- if you drive the transistor correctly- will take place mostly in the relay, so you can look at Vce(sat) * Ic = 0.3V (say) * 90mA = 27mW (will run cool). Even if you drive the transistor in the worst possible way (2.5V across it and 2.5V across the relay) you can only get 112mW in the transistor (and a relay that won't work). @Golaž answer is a good one, but I wanted to point out this detail. It's quite common to use a transistor as a switch to control load power that could burn up the transistor in seconds if it was all dissipated in the transistor. \$\endgroup\$ Jul 6, 2015 at 11:56

2 Answers 2


Since you will be using transistor as a switch the rule of thumb for a saturated BJT is to use beta (current gain) of 10 or 20. Meaning you can directly drive a general purpose BJT (with at least 100mA of collector current) from your Arduino pin.

This is how I would do it:


simulate this circuit – Schematic created using CircuitLab

NPN always has a base voltage ~0.7V higher than its emmiter. Since the emmiter here is grounded the base voltage sits at around 4.3V (5V that the Arduino can provide -0.7V). And a base current of 10mA gives us 4.3/0.01 =430 Ohm, but you can use a more standard value of 470 Ohm.

Diode D1 is there to dissipate the energy stored in the relay coil when the transistors shuts off. You can read more about this here on EE stack exchange.

  • \$\begingroup\$ Thank you! :) Would you mind though updating your answer just to confirm if the figures I've used in the original question are all okay? Thanks. \$\endgroup\$
    – R4D4
    Jul 6, 2015 at 13:07
  • \$\begingroup\$ @R4D4 Spehro Pefhany already commented about power dissipation calculations. I've talked about current gain and BE voltage drop here. So other than that, everyhing else seems to be fine. \$\endgroup\$
    – Golaž
    Jul 6, 2015 at 14:07
  • \$\begingroup\$ I really appreciate your comments, and I've seen it around quite a bit about this rule of thumb of assuming a gain of between 10 - 20, although really do prefer when there's actual theory, figures and accurate graphs involved. Would you mind taking a look at question 2 please? \$\endgroup\$
    – R4D4
    Jul 6, 2015 at 14:47
  • 1
    \$\begingroup\$ @R4D4 Take a look at "Figure 5." for this transistor: onsemi.com/pub_link/Collateral/BC337-D.PDF There is a line commented VBE(sat) @ Ic/Ib=10. So this transistor is guaranteed to be saturated at beta of 10. And you can see that BE voltage at 100mA collector current is around 0.8V and CE voltage is even below 0.1V. Most of BJT transistors have these similar numbers at saturation.They are normally present in datasheets but are so alike between transistors that we just use average values. \$\endgroup\$
    – Golaž
    Jul 6, 2015 at 15:01
  • 1
    \$\begingroup\$ @R4D4 Vbe(on) is only valid when transistor is in a linear mode of operation. \$\endgroup\$
    – Golaž
    Jul 6, 2015 at 15:15

Golaž answer is the correct procedure to follow- and you should accept his answer. I'll just comment on the power dissipation factor.

For the purposes of steady-state analysis consider the relay to have a fixed resistance of R= 5V/0.09A = 55.6 ohms.

The transistor is thus an element in series with 55.6 ohms with a total of 5V across it.

Power dissipation of the transistor is Pd = Vce * Ic. Vce can be anything from about 0.1V (heavily saturated) to 5.0V (completely off), depending on how much base current you feed it.

Ic = (5V - Vce)/55.6 ohms

So Pd = (Vce*5 - Vce^2)/55.6 ohms.

Maximum is when dPd/dVce = 0, which is at 5-2Vce = 0, or Vce = 2.5V.

Pd(max) = 112mW So even if you drive the transistor as badly as possible (say with 11K) it won't overheat at any reasonable ambient temperature.

As for the actual power dissipation in use, the worst-case saturation voltage is not specified directly at 100mA, but it's typically less than 100mV at Ic/Ib = 10, which would be a dissipation of 0.09 * 0.1 = 9mW. Even if it was the 700mV which is guaranteed at 500mA it would only be 63mW, and we can see from the curves that it's much more controlled and lower at 90mA than at 500mA.

enter image description here

(By 'controlled', I mean that sliding along the x-axis a bit does not lead to much change in Vce(sat) so we might expect that unit-to-unit variations would be low).


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.