Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

advice needed on the "art" of transistor switching circuit design

Status
Not open for further replies.

qtommer

Member
hi

im currently designing a transistor switching circuit for a 5VDC relay to switch an output of 240 VAC. There's no speed switching required. just on/off=)

The coil of my relay is 63 ohms requiring 79.4mA of current to turn it on as per datasheet.

As this is a switching circuit controlled by a MCU pin, I tend to make use of the saturation region so that Vce becomes almost completely zero (full drop across coil) thus resulting in almost no power dissipation across the transistor. (Is this assumption correct?) Apart from low power consumption, and acheiving the desired bias points, is there any other areas which I have overlooked in designing a switching transistor circuit?

In my college lab, there are 2n2222 transistors which I found are commonly used for switching and other small signal amplifiers like bc107 etc..

does purely using a 2n2222 have an advantage over the small signal amplifiers ? I know both will achieve the job of switching as I've tried but I want to know the distinctions or should I say strong points of using each respective one?

I also noticed that on the 2n2222 datasheet, the DC gain @ approx Ic=80mA as I require is not explicitly shown but only shown for values of Ic @ 10mA and other nice round numbers that start with 1. There also seems to be no graph unlike the BC547 transistors which show Ic versus gain. How should I extrapolate from the given values? All I can do for now is obtain the gain at the required current through orcad simulations.

thanks alot:)
 
The 2n2222 is a general purpose amplifier, and is not optimized for switching. It will do a decent job of switching, but there is no real advantage in using it. It's alos a low power transistor, so care must be taken when switching loads to not violate maximum power ratings.
 
For switching you do not use the DC gain on the data sheet. That gain is used in designing small signal amplifiers.

To insure that the transistor is saturated as a switch (which will give low power dissipation as you mentioned) you need to drive the transistor with more base current then the minimum gain value. A typical gain value used for this is 10, although 20 will probably work if you are limited in available base current. Thus for 79.4mA collector current, you would want at least 7.9mA of base current.

The 2N2222 is a common general purpose transistor (used for both amplifier and switching applications) which operates up to 500mA of collector current so should be fine for your requirements. Using an amp for this would work but it's more complex then you need.

Make sure you add a diode across the relay coil (cathode to positive side of coil) to protect the transistor from the inductive transient.
 
thank you very much for your replies...very helpful advice indeed:)

i have another qualm. should I want to connect an LED indicating relay turn on in parallel with the relay coil (as well as the flyback diode like crutschow mentioned except now opposite in polarity), the effective resistance of the coil and LED would then reduce. (the resistance of the LED to be taken into account would be the on state resistance i presume?)

Should I drive the base even higher to provide current for both the LED and the relay coil or is my perception on the matter wrong?

oh and how do I deduce how we arrived at a gain factor of 10 -20 as u mentioned? :)

thanks alot!!!
 
thank you very much for your replies...very helpful advice indeed:)

i have another qualm. should I want to connect an LED indicating relay turn on in parallel with the relay coil (as well as the flyback diode like crutschow mentioned except now opposite in polarity), the effective resistance of the coil and LED would then reduce. (the resistance of the LED to be taken into account would be the on state resistance i presume?)

Connect the LED across the relay, but make sure you have a series resistor to limit the current through the LED.

Should I drive the base even higher to provide current for both the LED and the relay coil or is my perception on the matter wrong?

You're correct. The collector current will be the sum of the relay coil and the LED.

oh and how do I deduce how we arrived at a gain factor of 10 -20 as u mentioned? :)

It is sometimes given on the datasheet. If not, it's just a rule of thumb.
 
Last edited:
All small 2Nxxxx American transistors spec the max saturation voltage loss when the base current is 1/10th the collector current.

All small BCxxxx European transistors spec the max saturation voltage loss when the base current is 1/20th the collector current even if the current gain is spec'd at up to 800.

The current gain is spec'd when there is plenty of collector to emitter voltage so that the transistor is not saturated.
 
thank you all! this has cleared up alot of doubts.

So assuming I need 80mA and a gain of 10 for the transistor, by REALLY driving the base of the transistor, does this mean not placing any base resistor at all or does it mean arranging for a base current input above what is required.

thanks alot:)
 
So assuming I need 80mA and a gain of 10 for the transistor, by REALLY driving the base of the transistor, does this mean not placing any base resistor at all or does it mean arranging for a base current input above what is required?
If you don't use a base resistor to limit the current then the base current might be infinite which will instantly destroy the base-emitter diode of the transistor.
So of course you calculate and use a series base resistor to limit the base current to 1/10th the collector current as is shown on the datasheet.
 
thanks audioguru :)
i noticed that regardless of the value of the collector resistor that limits IC, IC can still increase if IB increases.
For example I calculated Ic to be 80mA with a resistor of 63ohms. This does not mean that the maximum Ic that can ever occur regardless of how high I drive Ib will still remain strictly max at 80mA but will still have the capability to go up if Ib goes up..This is an aspect of transistor-ing that always leaves me baffled. Could u help me iron out my thoughts on this? :)
 
thanks audioguru :)
i noticed that regardless of the value of the collector resistor that limits IC, IC can still increase if IB increases.
For example I calculated Ic to be 80mA with a resistor of 63ohms. This does not mean that the maximum Ic that can ever occur regardless of how high I drive Ib will still remain strictly max at 80mA but will still have the capability to go up if Ib goes up..This is an aspect of transistor-ing that always leaves me baffled. Could u help me iron out my thoughts on this? :)
Ohm's law says that with a 5V supply, a 63 ohm load draws 79.4mA and no more. The transistor that has the 63 ohm resistance as its load and has a base current that is 1/10th its collector current is simply a switch so its max load current is also 79.4mA.
If the transistor does not have a base current that is 1/10th the collector current then it might not saturate then the load current will be less.
 
Might be helpful? but do a search for transistor simulator on the internet. There are several
you just input your load and voltages and BAM you have your answer
 
Small signal high gain transistors like 2N2222 will saturate nicely with forced gain of 20, or even 30.

Personally I would put the LED in the base circuit, and drive the base with about 10mA through the LED and resistor1, then put a resistor 2 from base to ground so that resistor 2 takes about 2mA. That gives 10mA LED drive, 8mA base drive, and keeps the LED well away from the relay coil.

Assuming your MCU pin can source 10mA that is a good way to do it.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top