# Calculating Size of Resistor needed?

• Wetmelon
In summary: You want to use the NPN transitor as a... driver.?You want to use the NPN transitor as a... driver.?A typical integrated power device is the 2N6282, which includes a switch-off resistor and has a current gain of 2400 at IC=10A.
Wetmelon
Hey again. I have a circuit that I've made and I was told I should put resistors in so that I don't blow out my transistors and buttons. Ok, I can do that... but I have no idea what size of resistor I need! Picture:

I'm using TIP41C Transistors:

http://www.drixsemi.com/TIP41C.PDF

I think what I needed from this sheet was the "Continuous base current" of 3A?

12V = 3A * R

R = 4ohm?

Does that sound right? Am I oversimplifying it?

#### Attachments

• Shifter PCB Design 004.png
5.7 KB · Views: 1,103
What current do these loads draw?

You want the transistors to saturate, which means Vbe > Vce.

Generally, the current gain at saturation is 10 or less.

.5 amp each, I think. Either that or 1.5A each

What current must flow in the solenoids? If you have a spec for these components please post. I don't think I_B = 3A is the relevant parameter, but I need to understand the load to consider how the transistors will work.

Sorry, I'm not sure exactly which solenoids we're using.

Assume the current draw for each solenoid is .5A each

Edit: Just got an email back from one of the guys. He says they're 1.5A each

Last edited:
So you need Ib > 150 mA.
That t'sistor on the right cannot be saturated as it is drawn.

?? why not? What is Ib? The current in b? and why does it have to be > 150mA?

Wetmelon said:
??
1 why not?
2 What is Ib? The current in b?
3 and why does it have to be > 150mA?
1 because Vbe can never go higher than Vce in this circuit
2 Ib is the current into or out of the base
3 because you want Ic to be at least 1.5A and the current gain at saturation is presumably 10x or less.

You've asked a simple question, but the design may call for a bit more complication. For example google the term "solenoid driver" and look for some images. The driver depends on the solenoid properties and application requirements.

Are the solenoids to be operated momentarily or latched? If momentarily you must ensure that a person holding their finger on the button does not overide the proper solenoid operation.

If latching the solenoids it is common to reduce the current in the latched state. Also, you need to understand how to bias the transistors. To do that, draw each transistor driving its load with 12V at the top and ground at the bottom, as if the other transistors and loads do not exist, if you wish.

whome9 said:
1 because Vbe can never go higher than Vce in this circuit
2 Ib is the current into or out of the base
3 because you want Ic to be at least 1.5A and the current gain at saturation is presumably 10x or less.

Argh. *googles current gain* Though, I think I understand what you mean. I just now have no clue what to do to fix my circuit :(

SystemTheory said:
You've asked a simple question, but the design may call for a bit more complication. For example google the term "solenoid driver" and look for some images. The driver depends on the solenoid properties and application requirements.

Are the solenoids to be operated momentarily or latched? If momentarily you must ensure that a person holding their finger on the button does not overide the proper solenoid operation.

If latching the solenoids it is common to reduce the current in the latched state. Also, you need to understand how to bias the transistors. To do that, draw each transistor driving its load with 12V at the top and ground at the bottom, as if the other transistors and loads do not exist, if you wish.

As for the solenoids, the actual shifting of the car takes milliseconds, but somebody holding the button down shouldn't affect anything, just vent CO2 to the atmosphere.

Found a good youtube lecture... maybe it will give me some ideas...Ooooh... wait a second. Can I use a darlington pair to further amplify the current output? Like this: ?

I'm thinking that's what was meant by the fact I didn't have enough current gain? After all, I thought about what I needed (higher current in the base), and thought I could use two transistors... then remembered that's exactly what a Darlington pair does :P

I get Ib > .625 mA in this configuration assuming " A typical integrated power device is the 2N6282, which includes a switch-off resistor and has a current gain of 2400 at IC=10A." <--- Wikipedia.

Note: I've never had an electronics class, so keep it simple, eh? Or at least link me to some literature that so I can understand what you mean if that's easier :P

#### Attachments

• Shifter PCB Design 005.png
5.6 KB · Views: 840
Last edited:
The attached gif (left side) is taken from this page on robot solenoid:

http://robots.freehostia.com/Solenoids/SolenoidsBody.html

You want to use the NPN transitor as a "low side switch" as shown on the right. The transistor should be fully on (saturated) when the pushbutton closes. Notice the Vce(sat) in the data sheet? That would be the transistor voltage Vce when biased to turn on all the way, so the solenoid would see 12V - Vce.

You may need a flywheel diode to protect the transistor from excess current surge when it turns off (the coil needs to discharge energy and the transistor could get zapped). It would help if you get a spec for the solenoid. I need to consider the bias conditions ...

#### Attachments

• solenoid.gif
2.4 KB · Views: 654
Got the spec sheets.

See attached.

Qty1 L01SS6594000060 (12VDC)
Qty1 NF1BAN524N00060 (12VDC)
Qty3 230-365 Electrical Din Plug Connector

#### Attachments

• lo1.pdf
646.1 KB · Views: 374
• poppet.pdf
1.5 MB · Views: 375
3.5w and 6w @ 12v comes to 300 mA and 500 mA for coil currents.

The second pdf offers an option to purchase with the surge suppression diode. I suggest purchasing with this option unless you plan to choose your own suppression diode:

17N = DC Solenoid W/Surge
Supression Diode

See if such an option is available for the other solenoid model, and try to find a sketch of the solenoid driver design in the numatics documentation.

whome9 said:
3.5w and 6w @ 12v comes to 300 mA and 500 mA for coil currents.
How does this help me? I don't have any clue what to do with these values.

SystemTheory said:
The second pdf offers an option to purchase with the surge suppression diode. I suggest purchasing with this option unless you plan to choose your own suppression diode:

17N = DC Solenoid W/Surge
Supression Diode

See if such an option is available for the other solenoid model, and try to find a sketch of the solenoid driver design in the numatics documentation.

Couldn't find a sketch of it, but I did come across this simple design in Google Images:

http://www.borntotinker.com/userfiles/etchesketch_solenoid_circuit.jpg

I suppose I could modify this for my purposes, but I don't know exactly what's going on. Why is there a ground AND both connections to the 12VDC?

Last edited by a moderator:
This is an obsolete part but you'll get an idea of how you would use it. Datasheet for a high current high side switch:

http://cds.linear.com/docs/Datasheet/1089fa.pdf

My sketch is a low side bipolar transistor switch and yours is a highside FET switch. It would be good if you can find a replacement similar to that LT 1089 part.

Last edited by a moderator:
Thanks for the ideas. Unfortunately, I believe the solenoids have already been ordered (or sponsored). As for the circuit, I am in the midst of getting packed to take a flight home for xmas, but I'll be able to take a look at it in more detail.

I've given it a quick look, however, and I'm a little confused about what's happening. Does that transistor on the right only get saturated when the solenoid is on/open? Is that a function of the internal makeup of the solenoid itself?

Have a good trip home. This page gives the bias circuited needed to use the TIP41 transistor as a low side switch (but the size of the flywheel diode is still uncertain):

http://www.rason.org/Projects/transwit/transwit.htm

We can go through the design, build, and test procedure when you're ready.

So, this system de-clutches for down-shifting only, and interrupts ignition for up-shifting?

No doubt you will laugh at my ignorance, but I dread to imagine what would happen if I drove my manual (stick-shift) car in this way. I would love to know what this is for - a motorbike?

Thanks, SystemTheory. I looked at your link, and suddenly it makes a lot more sense. Not sure why, but it suddenly came to me :) I can try to find values for the solenoids we're using.

I got confirmation from the pneumatics guys that they've already ordered the solenoids, sans suppression diode :(

I would prefer to use NPN transistors, as I know I can get them really easily from the school (the TIP41Cs that I think I mentioned earlier?). Unless it makes life THAT much harder, as I'm sure they carry PNPs as well...

Does it make any difference that I need to power 2 solenoids at once? Can they simply be put in series?

Adjuster: Hehe. Yeah, it might not work so well for your car at home, but for an FSAE car, however, it works just fine. Our car is run by a Honda F4i 600cc motorcycle engine and associated (but customed) transmission. So yes, it's basically a motorcycle drivetrain.

In the attached circuit you calculate R1 to saturate the NPN transistor when the switch is closed. You set R2 = 10*R1 approximately to ground the transistor base when the switch is open and ensure the transistor turns completely off.

I would run two solenoid drivers in parallel from one push button switch, that way each solenoid sees rougly 10.5 volts rather than dividing the voltage (when put in series).

#### Attachments

• npn_switch.gif
1.8 KB · Views: 527
Ok, I've created this little... "gem" of a circuit (Schematic) and board in Eagle. From what I've learned over the past week or so talking with you is that this should work now. Will this circuit require a diode? I couldn't figure out where it would go based on getting reverse current from the collapsing field... It would just end up in the battery, right?

I guess I still need to know how much current each one of these solenoids draws before I can figure out what size resistor I need.

#### Attachments

• DriverBoard1.png
4.1 KB · Views: 474
• FSchematic001.png
2.3 KB · Views: 499
Yes, anti back-emf precautions are pretty much obligatory when driving such things as relays, or solenoids, from a transistor switch. Transistors can turn off very rapidly: a high rate of change of current induces a large voltage in an inductive component. [E=-Ldi/dt] This voltage may exceed the breakdown voltage of the transistor, possibly destroying it. You want this thing to be reliable, don't you, if it will ever be part of a vehicle carrying a live human being!

The simplest option is to use an ordinary silicon diode in parallel with the solenoid, connecting it so that it will not conduct in normal operation, ie cathode to positive. The diode must be rated for the coil current, and must have sufficient reverse voltage rating to cope with the working voltage plus (in automotive applications) a very healthy allowance for transients.

Unfortunately, some manufacturers of relays (and solenoids maybe?) discourage the simple diode method, because it retards the decay of current, delaying release and possibly encouraging sticking. The answer then is normally to use a combination of an ordinary diode and a Zener diode opposed in series, or possibly a dedicated transient voltage suppression device. Perhaps your solenoid supplier can advise you whether simple diode protection is OK.

Note that none of these simple protection methods seeks to return energy to the battery, but only to dissipate it in a safe and controlled way.

Last edited:
The link I inserted above mentions the 1N4001 which used to be available at Radio Shack. It can flow 1A and has reverse breakdown 50V.

http://www.fairchildsemi.com/ds/1N%2F1N4001.pdf

The 1N4002 has 100V reverse breakdown, and so on. I don't know how much inductive voltage spike you'll get from these coils.

whome9 gave you the coil current calculations from the wattage above:

3.5w and 6w @ 12v comes to 300 mA and 500 mA for coil currents.

so that means you use collector current iC = 300 mA for the smaller solenoid and iC = 500mA for the larger solenoid when finding the value of R1 using hFE minimum from the transistor specification (the link I posted above shows the calculation with a 1.3 safety factor to ensure saturation of the transistor).

You might want to break out the two parallel solenoid coils and run each through its own transistor. Just connect the base of two transistors each with R1 at its input to the pull down switch. That way each solenoid coil has its own flywheel diode and low side switch.

Last edited by a moderator:
Ok, did some redesigning (friggin board took me forever to get on one layer!) and some calculating.

Using 300mA and 500mA, I got

R1 = 12/(.3*1.5)
R1 = 26.6ohm
R2 = 10*R1 = 266ohm approx

R3 = 12/(.5*1.5)
R3 = 16ohm
R4 = 10*R3 = 160ohm approx

As for diodes, is it bad to go TOO high?

For the "Connect the Ignition to the Signal Ground", has what I've done doing to work?

#### Attachments

• FSAEBoard003.png
6.6 KB · Views: 450
• FSAESchematic003.png
4.2 KB · Views: 513
Last edited:
The good news is that you do not have to worry about how high the coil spikes would have been, as they will be suppressed. The diode voltage rating is for normal operation, allowing for the fact that vehicle supplies tend to be full of nasty transients. Yes, higher rating is better.

The bad news is that the base drive currents appear to have been set equal to the collector currents. This seems excessive, and would result in large dissipations in R1 and R3. R1 would run about 9Watts! You would therefore need to use physically big resistors.

Can't you assume a more reasonable current gain of say 10? I note the transistor you have chosen is an RF power type which may not work well as a saturated switch. Don't panic though, it is in the popular T0-220 case with the usual pin-out, so could easily be changed.

Last edited:
I'm actually going to use TIP41C transistors, but they didn't have a vertical version of it in Eagle, so I just used a TO-220 case NPN transistor for kicks.

P.s. You're talking way over my head. :) I thought we did assume 10* current gain? I don't know anything about calculating this stuff though. How did you get 9W, and what's this about base current = collector current and how is that bad?

You can suppress a coil transient with a resistor, believe it or not.

For a 12v coil the suppressor diode PIV needs to be 12v or slightly more.

Whome9
Yes, thanks for pointing that out. A suitably chosen resistor overcomes the slow turn-off, and is probably cheaper than a Zener. Probably it's still better to put the resistor in series with a diode to avoid wasting current while the coil is on.

That said, I do not agree that it is safe to use a diode with barely sufficient PIV to sustain the normal supply voltage (up to roughly 14.5V for a "12V" lead-acid battery on charge). This is especially true in an automotive environment where there can be large transient voltages on the supply. You can get 100V devices cheaply enough, so why risk it?

Wetmelon
Good, TIP41 would be a more typical choice. To get sensible resistor values though, you must use a reasonable current gain value. At present you have R3=16 ohms, so it passes roughly 700mA, most of which gets into the base. I believe someone said that the collector current Ic is 500mA for the bigger solenoid. Where is the factor of 10?

This really isn't rocket science, but I appreciate that it may be confusing if you have not studied these things before. Possibly you might do better to ask for help from someone closer to hand. Could you ask a lecturer, or perhaps another student who is studying Electronics as a major subject?

DOH! how did I manage to bung up such a simple calculation?

R1 = Supply Voltage / ( Maximum Current Required / Minimum HFE * 1.3 )
R1 = 12V / (.3/10?*1.3) = ~310ohm
R2 = 310*10 = ~3100ohm

R3 = Supply Voltage / ( Maximum Current Required / Minimum HFE * 1.3 )
R3 = 12V / (.5/10?*1.3) = ~185ohm
R4 = 185*10 = ~1850 ohm

SOOO using 185ohm, V = IR = 12V/185 = 65mA. * 10 / 1.3 = 500mA on the head.

Fail. If you check the calculations that I did earlier in the thread, I completely missed the Minimum hFE. Don't know where it went, but it went! (And it seems that hFE is the forward current gain in a transistor?)

As for people near me, I'm currently at home 800 miles away from people in my program... My dad has an electronics degree from Algonquin from 1972... and hasn't used it since, so he's not much help. Though he did teach me how to solder.

Edit: I checked on the standard resistor values. Looks like there's decade multiples of 18 and 20. What would be more appropriate? Going up to 200 (a 7.5% deviation) or down to 180 (a -2.7% deviation)?

Last edited:
So far you're on track. I would insert three R1's and three R2's, one for each transistor, and run two of the R1 inputs to a single push button switch input. This might even make the board layout simpler. Your design might work as is, but I haven't thought about it.

Direct current power dissipation is P = V*I. Each resistor must be rated to dissipate enough power in the design, and the transistor must be rated to dissipate power when it is turned on. For example, the spec sheet says saturation voltage V = Vce(SAT) = 1.5V and you plan to pass collector current of iC = 0.5 amps. So the transitor without a heat sink must safely dissipate 0.75 watts. Check the spec sheet for the power dissipation rating at various temperatures. Then run a similar calculation to verify power ratings for each resistor.

The best practice is to test the circuit performance before soldering it up to a board. In this case some meter measurements of voltage and current, and verify the transistor saturates with the actual loads. You can defer the board design until after the circuit is tested, unless you wish to keep revising the board layout as you go along.

300mA Solenoid:
P = IV = .3 * 1.5 = .45W

From the TIP41C Datasheet:
Collector Dissipation (TC=25°C) 65W
Collector Dissipation (Ta=25°C) 2W

So it can handle it bare with no problem.

Resistors:

For R1 (300mA solenoid)
VBE(sat) = 2.0V
P = 2.0V * .065A = .13W

For R2
10V = I * 1850ohm
P = 10V * .0055A = .055W

For R3 (500mA solenoid)
VBE(sat) = 2.0V
P = 2.0V * .039A = .078W

For R4
10V = I * 3100ohm
P = 10V * .00325A = .0325W

But I need someone to double check these to make sure I have any clue what I'm doing. I'm pretty sure I have R1 and R3 right, but I am really unsure of R2 and R4.

Well done, you're getting the hang of it now... Except for some resistor ratings!

Noting that a bit less than the full supply voltage is across R1 and R3, you might like to round them down to the next preferred value. Use the preferred values when making the resistor wattage checks.

As for the resistor dissipations, please note that for the circuit in your diagram, most of the supply falls across R1 and R3. It's the other resistors that get VBE! Let's do a sanity check: The 500mA IC transistor has about 65mA base current, so if we have about 10V across R3 it would dissipate roughly 650mW.

Actually, you should assume the maximum possible battery voltage. If you are using a lead-acid battery, this could reach about 14.5V on charge. For R1 and R3 dissipation, don't assume the absolute maximum VBE. Something more like 1V VBE may be more appropriate. Thus you could have about 13.5V on a 180 ohm R3, giving a shade over 1W. Remember P=V2/R

Don't forget the anti back-emf diodes, and you might think to add series resistors if space permits.

Now I have to go and try to fix the lights on my Christmas tree, so that's all for now.

You need to take into account the Safe Operating Area of the transistor. National Semiconductor has application notes on this subject.

Sorry I forgot you're not EE so my instructions did not explain how to find the voltage across each component. But you have the right idea.

Instead of building and testing the circuit (or before doing so) you could build it in a free student version of SPICE. Depends on whether you want to handle the learning curve.

I've never used 5spice, but it appears to be free and easy to use:

The TIP41 is a special part so you'd need to import a device model.

Result: http://www.onsemi.com/PowerSolutions/supportDoc.do?type=models&part=TIP41

I'm not sure how to model the solenoid coils however, you may need an inductor value and a resistor value which are unknown ...

The point of simulation would be to study the circuit performance in terms of voltage, current, power ratings, and transistor saturation before building anything in hardware.

Attachment shows the rough equivalent circuit in the base-emitter loop when the button is pushed. The base-emitter (internal) diode turns on and has a small voltage of 0.7 volts in small transistors, it shouldn't be much more in the TIP41, but I don't know how much. Anyway each R1 may see significantly more voltage than in your calculation.

#### Attachments

• npn_on.gif
1.4 KB · Views: 487
Last edited by a moderator:

• Electrical Engineering
Replies
5
Views
2K
• Electrical Engineering
Replies
3
Views
1K
• Electrical Engineering
Replies
8
Views
978
• Electrical Engineering
Replies
3
Views
2K
• Electrical Engineering
Replies
14
Views
1K
• Electrical Engineering
Replies
3
Views
916
• Electrical Engineering
Replies
2
Views
2K
• Electrical Engineering
Replies
11
Views
4K
• Electrical Engineering
Replies
41
Views
4K
• Electrical Engineering
Replies
5
Views
1K