Resistor sizing for transistor relay switch circuit

Thread Starter

paulus_v

Joined Nov 19, 2017
11
Hello all,

I need to repair a board where the original circuit had a BCR512 transistor with built in 4.7 kΩ bias resistors switching a Nais JQ1aP-24V relay (8.3 mA, 2880 Ω).

Someone repaired it with a 2N3904 transistor and resistors R1 10 kΩ, R2 22 kΩ. The circuit worked but not for a very long time.

Now I want to use a BC337 transistor but I don't know what values for the resistors should I use. Or if someone could point me a better approach by using a Mosfet it would be great.

I found calculators for the base resistor but I am not sure about the base-emitter resistor.

edit: the input switching voltage is 5V

I do electronics stuff as a hobby so I still have a lot to learn... Any help will be appreciated!
 
Last edited:

Ian0

Joined Aug 7, 2020
9,668
Try R1 = R2 = 4.7k
Because the gain of the BC337 isn't much different from the BCR512. By the way, a BC337 in a surface mount package is a BC817.
You could try replacing the BCR512 directly by a 2N7002 or similar MOSFET (Pinout is the same)
It should have worked with a 2N3904 and 10k/22k. Perhaps the real fault was elsewhere.
 

Audioguru again

Joined Oct 21, 2019
6,673
The datasheet of a transistor tells you what is needed.
The 2N3904 is shown on its datasheet that it turns on and saturates very well when its base current is 1/10th its collector current.
Then for a collector current of 8.3mA, its base current should be 0.83mA. With a 5V inputs signal and a 0.65V base voltage, the series resistor needs to be (5V - 0.65V)/0.83mA= 5.24K or be a little less to allow some current in R2. Then the 10k fix resistor value was too high. I would use 4.7k for R1 and use 10k for R2.
 

Audioguru again

Joined Oct 21, 2019
6,673
Ian, the gain of a transistor is used only when it has plenty of Vce in an amplifier circuit. When used as a switch the Vce is only 0.2V so the gain number is not used. Most transistors have a saturation spec when the base current is 1/10th the collector current.
 

Thread Starter

paulus_v

Joined Nov 19, 2017
11
Thanks for the replies.

I think the failure on the long run is due to the "wear" of the transistor that does not fully energize the relay coil and the relay contacts wear prematurely. Or this is just my imagination...

Which it better to use, 2N3904 or BC337 or something else? I do not need SMD as there is plenty of space for THT. The most important thing is to be able to buy it locally.
 

Ian0

Joined Aug 7, 2020
9,668
Ian, the gain of a transistor is used only when it has plenty of Vce in an amplifier circuit. When used as a switch the Vce is only 0.2V so the gain number is not used. Most transistors have a saturation spec when the base current is 1/10th the collector current.
Interestingly enough, the 2N3904 has it's gain spec'ed at Vce=1V (at least it does in OnSemi's datasheet), and it has a value of >100 for Ic=10mA. 10k/22k from 5V logic would give a base current of 412uA. That gives Ic/Ib=20 which is Infineon's definition of saturation (as used on the BCR512 datasheet). It would certainly be dissipating less than 8mW, so I don't see how the transistor could "wear out" as the Ts suggested.
 

Audioguru again

Joined Oct 21, 2019
6,673
An NPN transistor gain drops slowly (wears out?) each time its base is driven negative more than its maximum allowed negative voltage (-10V for the original transistor, -6V for a 2N3904 and -5V for a BC337).

The relay coil uses such a low current then any transistor will work fine.

Is there a good reverse diode parallel with the relay coil to clamp the flyback high voltage?
 

Ian0

Joined Aug 7, 2020
9,668
An NPN transistor gain drops slowly (wears out?) each time its base is driven negative more than its maximum allowed negative voltage (-10V for the original transistor, -6V for a 2N3904 and -5V for a BC337).
I've actually observed that, but I don't understand why it does it. I expected it to behave as a zener.
 

Audioguru again

Joined Oct 21, 2019
6,673
A zener is designed to survive heating when it has avalanche breakdown and has no current gain. Its reverse voltage does not have an "absolute maximum never exceed" voltage rating, just a maximum heating rating.
The fragile tiny emitter-base junction of a transistor loses the transistor's current gain each time its tiny junction has avalanche breakdown.
 

Thread Starter

paulus_v

Joined Nov 19, 2017
11
Is there a good reverse diode parallel with the relay coil to clamp the flyback high voltage?
Yes there is a working diode there.

I am going to use the 2N3904 but found a better quality relay with 16.7 mA coil. Am I getting right the values for the resistors: R1=2.4k and R2=4.7k? I still don't get how you calculate de R2 value.
 

Ian0

Joined Aug 7, 2020
9,668
If your 5V signal is from a logic gate, then R2 is unnecessary.
It's normal purpose is to make sure that the transistor switches off when it should, but sinking any charge in the junction and any signals picked up in the wiring to 0V.
If the logic signal can pull the base to 0V through R1, then R2 doesn't do much - it is just in parallel with R1
 

DickCappels

Joined Aug 21, 2008
10,152
A zener is designed to survive heating when it has avalanche breakdown and has no current gain. Its reverse voltage does not have an "absolute maximum never exceed" voltage rating, just a maximum heating rating.
The fragile tiny emitter-base junction of a transistor loses the transistor's current gain each time its tiny junction has avalanche breakdown.
The reduction of Beta has only been reported for low current beta. Think of all those tens or hundreds of millions of television sets and computer monitors made in the last century that avalanched the horizontal drive emitter-base junction to rapidly sweep the minority carriers from the base region tens of thousands of times each second.
 
Top