Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations KootK on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Transistor relay driver 1

Status
Not open for further replies.

Nuke101

Electrical
Sep 5, 2003
11
Can someone tell me if the circuit in the link below will work ?
Im mostly concerned about transistor Q1 which is supposedly a constant current source. The input is a variable +3 to +12 volts which is meant to turn the transistor switch Q2 "on" which will close the relay contacts. Will this circuit supply a constant current to the base of Q2 with a changing input drive voltage on Q1 ?


 
Replies continue below

Recommended for you

Hi there. Q1 is NOT a constant current source - your current will vary with input voltage. This is because the classic single transistor source produces a constant current in the collector circuit - not the emitter - using a constant base-emitter voltage.The transistor is therefore the wrong type, i.e. you need a PNP not an NPN. You also need an emitter resistor to define the constant collector current required.

However, why do you need a contant current source just to turn a relay on and off? You should be able to design the circuit such that at 3V input the base current to Q2 is sufficient to turn it on and drive the relay. The resulting "excess" base current when the input is at 12V should not be a problem.
 
The resulting "excess" base current when the input is at 12V should not be a problem.


It needs a constant current source because the "excess" base current at 12 volts is the problem. In simulation, designing for a 3 volt drive, the base drew over 60mA @ 12 volts and the transistor would be destroyed.


This is because the classic single transistor source produces a constant current in the collector circuit - not the emitter - using a constant base-emitter voltage.The transistor is therefore the wrong type, i.e. you need a PNP not an NPN. You also need an emitter resistor to define the constant collector current required.



Ok, i see. Do you mean like this ?


 
You don't say what current you relay coil requires, but the 2N3904 has a maximum continuous collector current of 100mA according to most data sheets (200mA is absolute max rating). Therefore you only need a base current of 10mA to get good saturation. This will give an overdrive of 30mA at 12V but will only contribute about 30mW to the overall device power dissipation; it is unlikely to destroy the device. If you need to sink 200mA you should be using a bigger device.

With regard to the revised circuit, if you are running a simulation program you should be able to see that this is not quite right. The 1K from the 2.2V zener to the base is not required. Instead you need to calculate an emitter resistor for the PNP device to give you the required constant current for Q2. Remember that Q1 needs a fixed base voltage, so you need to take the zener voltage (2.2) less Vbe of Q2(say 0.8V) and divide by the required collector current (say 10mA), i.e. (2.2-0.8)/0.01 = 140R.

I have not done the maths but you probably don't need the 470R in series with Q1 collector unless its power dissipation starts to get too high - but you should have a base-emitter resistor for Q2 to make sure it turns off properly (don't forget to allow for this extra current in the total constant current calculation of Q1).
 
What about using a "logic level" N-channel mosfet? all you need is a resistor between the input and the gate. Simpler, smaller, tougher circuit.

 
Hi, the 1k resistor is in the wrong lead. It should be in the emitter lead, then it will give about 1.6 mA drive to the output transistor.
 

Appreciate the help very much.Ive yet again revised the schematic, is that what you mean ?

The resistance of the relay coil is 200 ohms. According to my calculations that should give a collector current of 12/200= 60 mA. What constant base current would be required for saturation at 3 volts?

I realize that Q2 and its inductive load is needed in this present design, but im mostly interested in the principle behind the constant current source. I was under the assumption that the zener was controlling base current rather than base voltage.Doesnt the base-emitter voltage remain constant at 0.7 volts or so ?

I dont have a simulator program. Someone ran one for my original circuit awhile back.

 
Hi again. Your circuit configuration is now correct but the 1K in Q1 emitter is too high in value to get enough drive for Q2. As I calulated in previous posts, you need a much lower value. 140 ohms gives about 10mA but you don't need quite this much if your coil requires about 60mA. You should assume a gain of 10 for Q2 to give good saturation, so 6mA base current is sufficient.
Your comment about the base-emitter voltage being 0.7V is not quite true in practice. All transistors exhibit a variation in base-emitter voltage with base current. Usually 0.7V is taken as the nominal forward diode drop when conduction just starts; for a higher base current you could find it could be 0.75V or even 0.8V. Don't forget this varies with temperature too. It's always best to look at the data sheet Vbe curves if you can. This means that the Q1 emitter resistor calculates out at between 250 and 270 ohms for the Q1 emitter resistor, depending on whether you use 0.7 or 0.8V (zener voltage tolerance not included).

Note that you may find that the base current into Q2 falls off below the intended current when the input is at 3V. This is because, at this input voltage, Q1 has such a small collector-emitter voltage differential it is operating right at the bottom end of its characteristic curves.

 
How it works!
The voltage from the input to the base of Q1 is set at 2.2 volts by the zener. This same voltage is across the input 1k resistor in series with the Vbe of Q1. If the Vbe of Q1 is 0.8 volts, that leaves (2.2-0.8=1.4) volts across the 1k emitter resistor of Q1. THe voltage between any two points is the same regardless of the path taken to get there.

Note that this is a constant voltage across a resistor and hence a constant current is forced through the resistor, giving a Q1 emitter current of 1.4v/1k = 1.4mA. Since the collector current is always less than the emitter current due to the base current reduction, the maximum collector current is slightly less than 1.4mA.

Now, if the Vbe of Q2 is 0.8 volts, then the voltage across the Q2 Emitter-Base resistor is also 0.8 volts, and the current through the resistor is 0.8/10k = 0.08mA, leaving a Q2 base current of (1.4-0.08)mA, or 1.32mA. This low current is not enough to saturate Q2 unless it is has a high gain.

Now, since you need 12v/200ohms = 60mA to drive the relay, you need to determine circuit values starting from there and working backwards from the relay.
Assume beta of Q2 is 10, so you need 6mA of base current. (The only purpose of the 10K base emitter of Q2 is to turn it off when there is no base current, and the turn off current is the collector-base leakage current. Change from 10K to 20K for that resistor.)

Select the Q1 emitter resistor to provide a collector current of 6mA (or more). Again, the voltage across the Q1 emitter resistor is (2.2 - 0.8)volts, the resistor will be (1.4/6mA)= 233 ohms. Choose the next lowest value standard resistor.

Assume the beta of Q1 is 10 so the base current is 6mA/10 = 0.6mA. With the input voltage of 3 volts, the current through the 10k base resistor of Q1 is 0.6mA + whatever current is needed to turn on the 2.2 zener, normally at least 5mA. Therefore the current through the first 10k is (5+0.6)mA. However the voltage is only (3-2.2 = 0.6) volts
so the Q1 base resistor will have to be 0.6v/(5+0.6mA)= 107 ohms. --TILT!!-- At 12 volts in, the current through the 107 ohm resistor is (12-2.2)/107 = 91.6mA!!!!. Now, that current flows through the 107 ohm resistor, and mostly through the 2.2 volt zener.

There you have your analysis/design, and a reason for not using that circuit for that input range.

My suggestion is that you either limit the low input voltage for turn on to 6 volts or less, or choose darlington transistors with a high gain at three volts and 60ma, or as was mentioned earlier, Use a low input voltage mosfet instead of Q2. You might also look at changeing to a lower current relay.

Follow my example and start with the current needed by the relay.

Good luck!
 
Thanks to everyone that replied, its bin enlighting.

Just one question, Where are you getting a beta of 10 ? According to the data sheets for the 2N3904 and 2N3906 the minimum beta at a collector current of 60mA is nearly 60 units. Wouldnt this greatly reduce the base current required for saturation ?

 
Yes, but if you supply more Ib, then your transistor is guarenteed to be saturated, right?! Ic=Betadc*Ib is no longer true....
 
The data sheet value you are referring to is for the typical transistor and at an ambient temperature of 25C (77F).

Gain decreases as temperature decreases, and a transistor in a production run can have a gain about half of the data sheet minimum.

Providing more base current than is necessary ensures that the transistor turns on hard (low VCEsat). See the Fairchild data sheet for info.

hint: I have found that Digikey is a good source for data sheets and Fairchild usually has a better data sheet than most other companies.

If you are only operating at room temperature, you can probably use a higher gain than 10. Those of us who have designed military and volume production have learned that designing for much lower gain than the "typical" spec sheet ensures that the circuit will work.

If you are only building one circuit, and not for production, then you can probably use a gain of 25 to 30 and be fairly confident that you will not have a problem.
Hope that helps explain the beta of 10.

 
Hi, using a gain of 10 is nonsence. I havent checked the the type specified but there are numerous 10cent transistors you could use instead that have gains of over 200 at 60ma.
 
To cbarn24050: I suggest you read a few more data sheets! As other posters have indicated, for guaranteed low Vce SAT use a gain of 10.
 

Thanks for the hint lcsjk. Ive checked with many data sheets but they all appear to give data on transistors @ a temporature of 25C. I'd like to know how much the Beta of a transistor changes with temporature. Do you know of any data sheets or info that show this ?
 
Hi brian, well ive looked out the data sheet. this transistor has a minimum gain of 60 at 1v vce @50ma. So it will perform very well with 1ma base drive. As far as saturating the transistor, why bother? it will only get you another 0.5v drive for the relay at the expence of much more power dissipation in the driver stage.
 
Here is what I found about the 2N3906 and 2N3904
2N3904 SI-N 60V 0.2A .35W 300MHz |
2N3906 SI-P 40V 0.2A .35W 250MHz
and here is an approach for the relay driver :

Start at the output, to determine what is required to activate the relay.
The relay "behaves" like a 200 ohm load, and draws 12V / 200 = 60mA current.

If 60mA is the worst case behavior, then the 2N3904 can handle the job as Q2,
as long as this is a latching relay. Q2 will have thermal problems if it has to conduct 60mA continuously for 20 min or 30 min.

To energize the relay, Q2 has to pull 60mA thru the windings of the relay.
This will not be 60mA (while Q2 is working as a linear device);
rather, this will be 60mA while Q2 is operating as a saturated transistor;
this means Q2 is on , HARD.
The linear BETA curves for Q2 go out the window, and what
remains is a rule of thumb. The saturated transistor Q2 has an available current gain
of 3; not a beta of 3. To saturate transistor Q2 , the Q1 transistor in the
1st stage of this circuit, has to provide 20mA to the base of Q2.

Now, the objective is to deliver a reliable 20mA to the base of Q2 whenever
the input drive voltage is between +3 Vdc to + 12 Vdc (Vin).

To start, let's not use a resistor in series with the emitter of Q1.
Let's not use a zener diode. Keep the circuit simple.
Use a 500 ohm resistor in place of the zener.
Use a 500 ohm resistor in place of the 10K (that is on the base of Q1 now)

This makes a nice, "easy to see" voltage divider.
If you apply Vin = 3Vdc, then approx 1.5 V hits the base of Q1, and
this causes Q1 to saturate, and (3 - .3Vsat) appear at the base of Q2.
Driving the base of Q2 with 2.7 volts, saturates Q2, and causes the required
drive current to activate the relay.

If you apply Vin = 12Vdc, then approx 6 V hits the base of Q1, and
this causes Q1 to saturate, and (12 - .3Vsat) appear at the base of Q2.
Driving the base of Q2 with 11.7 volts, saturates Q2, and causes the required
drive current to activate the relay.

The original circuit shows a 10K resistor between the base of Q2 and ground.
This could be changed to 1K. It is there to ensure a voltage appears at the base
of Q2. Since this is not a linear amplifier circuit, this 10K resistor was not intended
to provide negative resistance and prevent thermal run-away etc etc.

I don't know what circuit is going to deliver the Vin drive signal of 3 to 12 Volts.
The question that remains is :
Is the Vin source capable of delivering 30mA to the Q1 circuitry ?
(where 30mA is really 20mA + 10mA of safety / design margin)

I would be happy to receive some comments, and good luck with the circuit.
 
Well, cesarcesar made a couple of interesting points that could use some clarification.

First is power dissipation:
For the 2N3904: VCEsat at Ic=60ma and Ic/Ib=10 is VCE=0.33 volts from the data sheet (National semi-1982)
The VCE power dissipation is (.33V x 60ma) = 19.8mw
VBEsat it Ic=60ma and Ic/Ib = 10, is VBE = .95v
The VBE power dissipation is (.95v x (60/10)ma) = 5.7mw
Q2 total power for Ic=60ma and Ib=6ma is 19.8+5.7mw=25.5mw.

From the data sheet, Pd max for a TO-92 transistor is 600mw at an ambient temperature of 25C.
Pd is 0 for an ambient of 150C.
This gives a thermal resistance junction to case of
(150-25)C/600mw or 208C/watt.

Thus the junction temperature rise above ambient is 208C/watt times 25.5mw = 5.3C. Thus if the ambient is 100 degrees C the junction temperature will be 105.3C. Bottom line: If the transistor has a forced beta of 10, there will not be a temperature problem.

In the 1964 Transistor data book from GE, BETA is defined as the DC current gain, with symbol Hfe and is Ic/Ib for all conditions, including saturation.
Note however, as cesarcesar pointed out, that once the transistor is saturated, the collector current is limited by the 200 ohm relay resistance, and additional base current cannot increase the collector current. The VCE is only .33 volts, so the relay voltage is 12v-.33v and the relay current is (12-.33)v/200ohm = 58.35ma. If the .33 were decreased to zero, the collector current could only increase by 1.65ma, showing that an increase in Ib does not increase Ic. In fact, if the base current is increased, it can be greater than the collector current and the beta,Hfe,Current gain will be less than one. Cersarcersar refers to this as a rule of thumb, but is is just a real parameter. The disadvantage is that an increase in base current beyond what is needed adds to the VBExIb power dissipation.

What is the need for a base-emitter resistor? Bipolar transistors have a current known as collector base leakage measured with the emitter open (Icbo). This current increases with temperature, and flows from the collector to the base. If there is not a resistor from the base to the emitter, this current will flow back into the base as a base current, and will attempt to turn the transistor on. It can easily turn it partly on and this will put the transistor in the linear region where it cannot dissipate the power; destroying it.

Cesarcesar suggested you remove the Q1 emitter resistor. Doing that allows the input voltage to flow directly into the base of transistor Q2 and that will destroy it.

Now to fix the input circuit. First, I noted previously that the input circuit will cause too much current into the zener and maybe the Q1 base resistor.

Lets change the input to a common base stage:

1. Change the Q2 base emitter resistor to about 50k ohms.
2. Put a series resistor between Q1C and Q2B of 250 ohms.
3. Interchange the zener diode and resistor at the base of Q1.
4. Change the zener to a 5.1 volt device, .4watts or more.
5. Change the resistor to 350 ohms (nearest 5%).
4. Remove the resistor in the emitter of Q1.
5. Finally change Q1 to a 2N3904 with its emitter feeding out toward Q2.

Now hook it up and use it. This time you do not need luck.

 
Nuke, you wanted a current source to drive the transistor, and that is what I last gave you. However, I'll make one other entry here.
Let's simplify:
Keep the Q2 base-emitter resistor of about 50k ohms. I have not calculated this value but it must be no greater than VBE/Icbo.
Add an input resistor to the base of Q2. Throw away all the other input components around Q1, including Q1. You are left with a 2N3904 and 2 resistors.

As some of the comments have mentioned, why should you need a gain of 10? So let's use a gain of 12 for a base current of 5ma.
Assuming Vbe is .6 volts, the base series resistor is about 480 ohms when the input is 3 volts. (3-.6)v/5ma= 480 ohms.

When the input changes to 12 volts, the input current through the 480 ohms to the base is (12-.6)v/480 = 23.75ma. The transistor can handle this base current, the resistor power is 11.4^2/480 = 270mw so you need a 1/2 watt resistor.
Keep a base emitter of 50k ohms.
 

Sorry for the long delay in replying, ive bin out of town.

Thanks CC for replying. Yes the input can supply the 30mA, in fact as i said in an earlier post, the input can supply enough current to destroy the transistor. Also its a regular non-latcing relay.

lcsjk, thanks again your help and clerification is much appreciated. I will consider your sugestion for a non-zener transistor drive circuit, but im mostly interested in your original explanation with the zener-transistor constant current source driver. I will revise the circuit and post it again based on your suggested values just as soon as i get some free time.

I must appologize again for my rather lame replies, i only get time for this late at night and when i have the energy.:)

Nuke.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor