Sanity check on using a transistor as a switch...

phranzdan

Joined Aug 4, 2017
40
HI: BJT may load the RS232. Best bet is to use a logic level power Mosfet rated at 50 volts and 10 amps. don't forget to provide adequate heat sinking for the mosfet. The logic level mos will switch on fully at 5 volts.
 

Thread Starter

Non-Sequitur

Joined Oct 27, 2014
85
HI: BJT may load the RS232. Best bet is to use a logic level power Mosfet rated at 50 volts and 10 amps. don't forget to provide adequate heat sinking for the mosfet. The logic level mos will switch on fully at 5 volts.
Are you suggesting using a logic level power mosfet 50v/10a instead of the n23904?
 
Last edited:

AnalogKid

Joined Aug 1, 2013
12,146
There are two equations for calculating the power dissipated in a resistor, Joule's Law and Watt's Law. The two Laws are permutations of each other plus Ohm's Law. That is, if you start with Joule's Law and use a substitution based on Ohm's Law, you get Watt's Law. And vice versa.
P = power dissipated
E = voltage across the resistor
I = current through the resistor

Joule: P = I^2 x R
Watt: P = E x I

When the transistor is off, there is no current so power = 0.
When the transistor is on, it is essentially a short circuit, so E = 12 V, R = 10K, and P = 15 mW

As above, double that for reliability. It still is way below 1/4 or 1/8 W (through-hole), or 1/8 or 1/10 W (SMT).

ak
 

wayneh

Joined Sep 9, 2010
18,112
The resistors? What power rating do you prescribe for the two resistors? Is there a formula to determine that based on their position in the circuit? This is cool stuff. Nice break from endless hacking.
There are formulas as you've just seen. But there is also a useful rule-of thumb. I only worry about the resistor rating when there is power involved, for instance in series with the load. For information-level signals, currents should be low and therefore I^2•R heating is also tiny. You don't even need to bother with the calculations.

If you were switching the load with a BJT, then the distinction blurs and you also have to worry about the base current. It's both information and a little power also. The base current is no more than 1/10th the load current and thus the joule heating issue is 100-fold less than the load current, but that could still require a larger resistor rating.

In your circuit, the BJT is switching a MOSFET and that requires almost no current at all. R1 could be 10K and R2 set to 100K and it would make almost no difference.
 

AnalogKid

Joined Aug 1, 2013
12,146
There are formulas as you've just seen. But there is also a useful rule-of thumb. I only worry about the resistor rating when there is power involved, for instance in series with the load. For information-level signals, currents should be low and therefore I^2•R heating is also tiny. You don't even need to bother with the calculations.
Except when you do.

The original schematic has a 1K pull up to +12 V. When on, that is 0.144 W. This completely overpowers a 1/8 W or 1/10 W SMT part, and pushes a 1/4 W through hole part beyond a 50% derating safety margin.

ak
 

philba

Joined Aug 17, 2017
959
I saw that 1K pullup - thought it was was way too small. 10K would be sufficient in most cases. Unless the signal was particularly noisy, maybe it was sitting next to a motor or some such. This illustrates the problem of pulling random circuits off the internet, especially with no narrative on the reasoning behind it.

But to the point. I think it's a good idea to at least do a quick mental calculation on power for every component in your circuit. One or two minutes of thought can prevent a nasty surprise later. If you want to be thorough, have a spreadsheet with power calcs for every component.
 

Thread Starter

Non-Sequitur

Joined Oct 27, 2014
85
I gotta tell everyone, this is fun! Probably super-simple for you folks, but to a guy lost in the ether of middle ware all of the time it pretty slick!
Thanks to all, and please, if you feel the need or think of something else, keep up the inputs.
Now, to see how long it takes to get the USPS to deliver in a reasonable amount of time to Incirlik AB. :(

VR/JW
 

Wendy

Joined Mar 24, 2008
23,798
Just a thought Why are you fixated on the MOSFET?You could use the BJT by itself as a switch. A good power BJT can also work well. Mosfets do run cooler it is true, just asking the question.Want an idea schematic I do like to draw.?
 

Thread Starter

Non-Sequitur

Joined Oct 27, 2014
85
Just a thought Why are you fixated on the MOSFET?You could use the BJT by itself as a switch. A good power BJT can also work well. Mosfets do run cooler it is true, just asking the question.Want an idea schematic I do like to draw.?
Fire away, always looking for ideas to learn from. The power is 12vdc and 8 amps driven by the control leads of a microcontroller' rs232 serial port.
 
Last edited:

Wendy

Joined Mar 24, 2008
23,798
I am one of the Draftsmen on this site. I love to draw concept circuit an teach if I can. This drawing is something I whipped out on the spur of the moment.
motor.png
Wile a conventional transistor might work well in this configuration a darlington shown in Q1 requires vert little base current to tun on completely.It will run hoy,as they drop around. 0.6V fully saturated,so the powerfor 10Awould be 6W, If a conventional NPN were replace in this design there would be much less heating due to much lower drop

AAC has a resource to look up useful component and their spacs, such as current ratings...
Project Parts Reference

Wendy's Index

TThis points out other thread that might be of interest to people new to electronics. I am recovering from a stroke and am bored beyond description. So Anything I can do idea wise is somethhing to do. Consider me a resource wanting to help.

Introduction and PaintCAD

2N3055 might be ideal for Q1 ( heat sink required an a 1n4007 ( which is both common and cheap) for CR1. The resistors are 1/4 watt, also very common.
 
Last edited:

phranzdan

Joined Aug 4, 2017
40
Just a thought Why are you fixated on the MOSFET?You could use the BJT by itself as a switch. A good power BJT can also work well. Mosfets do run cooler it is true, just asking the question.Want an idea schematic I do like to draw.?
Hi: The Mosfet with it's high input impendence will not load the RS232 output. It requires 5 volts for the Logic Level device to be fully switched on with negligible current. Both devices have their uses however in this situation, the Mosfet makes more sense. Another good device for switching situations it the IGBT (Insulated Gate Bipolar Transistor). This device combines the best of BJT and MOS technology. It uses a Mos gate with a BJT body structure. Hope this helps.
 

phranzdan

Joined Aug 4, 2017
40
That is exactly it. R2 can be anything larger; I'd go with 10K. The 3904 is ultra-common in this type of application. For the p-channel FET, it mosly depends on where you ae located and what components you have access to. To go fishing, you want a FET with at least 30 V Vds and 20 A Id. These come from the standard rule of thumb for electronic components - for reliability, double everything. Need to withstand 12 V, use a 30 V part. Need to source 8 A, use a 20 A part.

To determine the heat generated in the FET when it is on, look at the Rds(on) spec. This is the minimum drain-source resistance, usually in milliohms for a power part. Joule's Law is power equals resistance times the square of the current, or p = i^2 x R. That power, plus the package and the ambient air conditions, determines if you need a heatsink. In very round numbers, you do if the device power is 1 W or more. If the size or weight of a heatsink is a problem, you can spend your way out of it. A FET with a higher current rating than you need and lower Rdson spec will cost more, but run cooler.

ak
f a t
Hi: The thermal characteristics of a device are specified in the data sheet. The one of interest is the Thermal Resistance Theta J/C or Theta J/A. The thermal resistance is expressed in degrees c /watt. I tells the rise in the die temperature for each unit of dissipation in the device. The J/C value is the rise in die temperature relative to the case. Whereas the J/A value is the rise relative to ambient temperature is numerically much higher than the J/C value. When dealing with a heat sink, we would be concerned with the J/C value. The J/A value would be used in the free air situation where no heat sink is used. For example, if the J/A value is specified as 80 deg/watt, a dissipation in the device of 1 watt would raise the die temperature by 80 deg c. Adding the nominal 25 deg c for ambient temperature, the die would be at 105 deg c. At 2 watts, the die would be 160+ 25 or 185 deg c. Most transistors are rated at 150 to 175 deg c maximum die temperature. The other value J/C is used for the heat sink situation. Heat sinks also have a Thermal Resistance specified and it is treated in the same way. The data sheets are available for most devices on Alldata. Limiting the die temperature is important since it has a very large effect on reliability. If you need more info let me know.
 

Thread Starter

Non-Sequitur

Joined Oct 27, 2014
85
All,

One thing I neglected, which really shouldn't make any difference, is that the micro-controller that will be controlling the signaling costs about $1800 a peice. So protecting the uController is obviously important. So a design which does as much as possible to negate any "feedback" into the uController's pins is a Big Plus. Duh, right?
 

ebeowulf17

Joined Aug 12, 2014
3,307
All,

One thing I neglected, which really shouldn't make any difference, is that the micro-controller that will be controlling the signaling costs about $1800 a peice. So protecting the uController is obviously important. So a design which does as much as possible to negate any "feedback" into the uController's pins is a Big Plus. Duh, right?
You might want to consider an opto-isolator. The circuit you're already looking at seems good to me, and I wouldn't generally worry about it being a threat to the microcontroller, but with that kind of money on the line, maybe better safe than sorry. Optos are about as safe as you can get.

Sorry, but no time to get to a computer and draw it up tonight. Besides, some of the other, more experienced members may have better ideas to throw in anyway.

Another, less draconian approach would be to add some of the basic, common protection components as close as possible to the uc output so that any noise on the line doesn't hit the uc. A pair of Schottky diodes (one to supply voltage and one to ground) and a small capacitor would provide good protection against induced/coupled transients, but might not provide complete protection in the event of a failed component downstream.
 
Last edited:

AnalogKid

Joined Aug 1, 2013
12,146
Even if the controller and the load share the same reference potential (ground), there still is the potential for load transients to go backwards into the controller output stage. An opto can help prevent this

What is the output of the controller? Hint - it might already be an opto-isolator.
How much voltage can it withstand?
How much current can it source and/or sink?
Manufacturer/part number/model number/website link?

ak
 
Top