Calculating Resistor Size and Wattage
eagletalontim
Posts: 1,399
I am having a little difficulty understanding some mathematical equations for determining resistor size and wattage. I understand that :
Resistor = (Input Voltage - Needed Voltage) / Needed Current
But.... If I have a 12 volt rail with 10 Amps current and need 4 volts, 100mA, how would I plug in the input amperage? Does that make a difference? I figure it would since 10A to 100mA is a HUGE drop and would cause heat.
Resistor = (Input Voltage - Needed Voltage) / Needed Current
But.... If I have a 12 volt rail with 10 Amps current and need 4 volts, 100mA, how would I plug in the input amperage? Does that make a difference? I figure it would since 10A to 100mA is a HUGE drop and would cause heat.
Comments
If your device is a 4 volt device requiring 100 mA and the power supply is 10 volt then we need to drop the unwanted 6 volt across a resistor.
So now we have the two out of the three values needed to calculate the third.
6 volts divided by 100 mA = a 60 ohm resistor.
These are the three equations of Ohms Law
V/R=A
V/A=R
R*A=V
The wattage is the dropped voltage * the current
W=6*0.1=0.6 (600 mW)
Jeff T.
http://www.touchofaroma.com/tims/resistorcalc.php
Can you or someone test it and see if it is accurate? Another thing I am confused on is this MOSFET :
https://www.jameco.com/Jameco/Products/ProdDS/1563690.pdf
From what I gather, it will take 9.5V DC, 250mA to fully activate the Gate allowing full current through. Sorry for all the questions, MOSFETS confuse me
http://forums.parallax.com/showthread.php?136575-Going-Surface-Mount-from-Through-Hole/page2
I was hoping to convert my transistor circuit to a mosfet which would save space and money. Without fully understanding the base / gate voltage and current requirements for full activation, I will not know what size resistor to use to go to a surface mount design.
1 Vdss is the maximum drain to source voltage. Personally I would not use this transistor for more than 24V.
2 & 3 Rds(on) is the on resistance of the transistor at the specified gate voltage ( 0.098 ohms at -10V & 0.165 ohms at -4.5V).
The voltages are shown as negative because they are measured using the source as the reference. If you are going to connect this transistor the same way as you did the TIP42 in your previous thread the source will be connected to the +12V. That means the gate would be at +12V to turn the transistor off and at 2V to be on (+12V 10V). You could drive it with the NPN transistor in your previous curcuit but you would not need the 1K resistor on the collector.
If the source is connected to +12V as in your previous design you will need a drive circuit similar to the npn transistor you had there. You really need to post a schematic of how the load is to be connected to the fet to avoid any misunderstandings.
PS - a 5V signal on the fet gate should be enough. A 3.3V signal might not. It would probably be enough to turn the load on but might cause the fet to dissipate more power.
PPS - No it is not right. You will not need a 28 ohm 2 watt resistor.
Switching to the FET should reduce total power dissipation from slightly more than 1 Watt to less than 0.4 Watts.
In the attached diagram the circuit on the left represents the circuit you have now. For the fet or pnp transistor to be turned off the gate or base must be at or very close to +12V. The microcontroller output can only go to +3.3 or +5 volts depending on the micro. This means that the fet or pnp transistor could never be turned off, and with the pnp the micro could be damaged by having 12V on the I/O pin. That is why you need the block labelled LTC. The small npn transistor and resistors are the level translation circuit that convert the 3.3 or 5V signals to a level suitable for driving the fet or pnp driver. BTW this is called a high side driver and there are chips available to do this.
The circuit on the right can be driven directly (through a resistor for the npn) by a micro's I/O pin provided the npn gain is high enough or the fet can be driven by a logic level. The fet source or npn emitter are connected to ground or 0V so the 3.3 or 5V level is enough to turn them on.
****** This is a simplified block diagram so resistors are not shown.
Looks like you need to design a simple voltage divider to give you a 4 volt level at 100mA. Assuming that the device really does consume 100mA @4v, it will have a resistance of 40 ohms. Now the easy part, take the 12V source and subtract the 4 volts across the "device" and now you know you need to drop 8V across the series resistor. 8V/100mA = 80 ohms. To determine the power, I^2*R= 100mA^2 *80ohms = 800mW, nearest up would be 1 watt resistor.
No matter how much current a power supply can source, the voltage (potential) it what drives the electrons through a material and the resistance, well resists the flow. E/R will give you the current.
Some good sites are these: op-amp electronics, U.S. Navy electronics and electricity courses..google there is a bunch of stuff ... some sell stuff, some don't. If you really use the material gained from say op-amp electronics, throw them some business. The MIT open courseware site has some electronics lectures online.. Lots of resources for whatever level you are at...
Frank
I cannot run the circuit like you have on the right since the device is naturally grounded to the chassis. It has one wire from it which is the power in connector. It would be nice if I could control the negative side since it would be much simpler.
@Mr. Freedman
Thanks for clarifying that for me! I have been doing a bunch of research on resistance and wattage since I never really learned the entire ins and outs about it. I know the basics and that is about all. Since I am wanting to go surface mount, I really need to understand as much as possible. From what I have found so far, surface mount components have a much smaller current capability and basic through hole components are easier to find. I simply cannot find a direct replacement surface mount resistor for the through hole components I am already using.
Currently, I am trying to locate surface mount voltage regulators (7805 or 2940), 470 ohm - 100k resistors, NPN and PNP switching transistors, PNP transistors that can handle 12V @ >2A or a MOSFET that can replace the PNP transistor.
One question I have is how to determine pull up or pull down resistors for the transistors. For example, the TIP42 which I am currently using :
http://www.jameco.com/webapp/wcs/stores/servlet/Product_10001_10001_139580_-1
On the spec sheet, I don't understand what current the base needs to activate or does it matter since the base is negative? Since I need to pull up the base to prevent false activation, I put a 10k 1/2W resistor from the collector to the base. The collector always has 12V on it so with the 10k in place, so the power on the base pin is .12 volts? In order to activate the transistor, I need to pull down the transistor to ground so I use a switching NPN transistor. The switching transistor cannot handle much current so I put a 1k 1/2W between the emitter and the base of the TIP42. Not 100% sure how it all calculates out, but there is no heat produced and the TIP42 is turned on and off reliably.
The power dissipated by the MPSA06 and all the resistors is less than 0.15W.
For the TIP42 it would be 0.7V x 0.5A = 0.35W
For the IRLML5203 mosfet it would be 0.098 (Vgs) x 0.25 (Current squared) = 0.049W
Personally I would go with the mosfet and an smd version of the MPSA06 or 2N2222.
BTW if you measured the resistance of the 13 ohm coil I would bet that it is close to 130 ohms. Both 30 and 130 ohms are common relay coil resistances.
The TIP42 has a typical current gain of 40 so if you want to get 0.5 amps through the transistor you need to put 0.0125 amps (12.5mA) into the base. The base current (0.0125A) times the transistor gain (40) = 0.5A.
In your case you also have a 30 ohm coil between the collector of the TIP42 and ground which will limit the current to a bit less ( 0.38A in theory ) than that. For a switching application like yours putting a bit more than the required current into the base to make sure the transistor is fully on (saturated) is ok.
In reality all components vary from the ideal so compensating for that is a good idea. That's what the extra bit of drive current does.
For calculating required currents, watts, resistors, etc. start at the high powered end of the circuit.
We know the coil is rated for 12V, draws less than 0.5A, and has a resistance of 30 ohms. All that is required for this is a transistor to switch the full voltage to the coil on or off. With no current through the transistor the power dissipation is 0W, and with 0.5A the power dissipation would be approximately 0.35W (0.5A x 0.7V across transistor).
I like to have some safety margin in my designs so I would select a transistor with minimum ratings of 24V, 1A, and 1W. The TIP42 exceeds that.
The npn transistor that provides current to the base of the TIP42 has to have a minimum current rating of 12.5mA and voltage rating of 12V. For a safety margin I would select a transistor with at least twice those ratings. Most small signal transistors will have ratings four times that minimum or more.
To calculate the value of the resistor between the base of the TIP42 and the collector we need to know the base current we want for the TIP42 (12.5mA) and the voltage remaining after subtracting the TIP42 base-emitter voltage drop (~0.6V) and the npn collector-emitter voltage drop (~0.6V), which would be about 10.8V (12V – 1.2V). That works out to 864 ohms (10.8/0.0125). Closest 5% resistor would be 910 ohms.
*** The fact that your circuit worked with a1K resistor tells me that the coil draws less than 0.5A, or the 12V is a bit more than 12V, or the transistor gain is more than 40, or some combination of those things. A 1K should work here as well.
The final resistor is the one from the micro pin to the base of the npn. Pretty much every small signal transistor made today has a gain considerably higher than 20 so less than 1mA is required. After subtracting the npn's base-emitter voltage drop from the I/O pin voltage we are left with either 2.7V (for a 3.3V micro) or 4.4V (for a 5V micro). For a 1mA base current we would need a 2.7K (2.7 / 0.001) for 3.3V and 4.4K for 5.0V. I use a 2.7K for both.
To calculate the wattage multiply the current through the resistor by the voltage across it. Worst case here would be the 864 ohm resistor. It would dissipate 10.8 x 0.0125 = 0.135W.
Using a 1K instead reduces that to 0.11664W. Still close to the 1/8W max rating. You could use 2 470 ohm resistors in series instead, or use a higher gain transistor like the TIP125 or the BCV26 if you want to go surface mount.
Hope this helps.
VCE = -4V, IC = -0.3A - MIN 30
VCE = -4V, IC = -3A - MIN 15, MAX 75
I am assuming you take the MIN and MAX, add them together, then divide by 2 to get the average? It comes out to 45. If that is correct, I would need to use (Current needed for load (.05A) / Average current gain(45)) which comes out to .0111
I am not quite sure how you got .38A for the current through the transistor. I know there will be a drop in current since there is some sort of load that is not a direct short or 0 ohms.
I am also not quite sure how you got .35W of power dissipation. I do understand that .5A is going into the base and the transistor has to use it. I guess that is considered power dissipation. Then there will also be some sort of resistance from the collector to the emitter which will cause a voltage difference. I did not see anything about that in the spec sheet.
I do understand about Ohm's law but plugging the correct numbers into the formula and getting correct results from it scare me I am really thinking about switching the TIP42 out for a SM Mosfet since if I am not mistaken, a mosfet is either on or off and they can handle the amperage I am requiring in a smaller component which will save me some space on my board. I order 95% of my parts from Jameco and since they have a minimum order on surface mount components, I need to make sure I get this right the first time.
By using Ohm's Law to calculate voltage and amperage, I feel I put the wrong values in the wrong spots... For example : If I have a pin on the chip putting out 4.5v @ 20mA and I put a 1k resistor on it, I would use the following formula to calculate the voltage and amperage on the open side of the resistor :
Voltage = Current (.02A) * Resistance (1000ohms) = 20V. That cannot be right at all since only 4.5V was coming out of the pin.
Current = Voltage (4.5V) / Resistance (1000ohms) = 0.0045A. So now there is only 4.5mA of current available? This sounds about right to me.
Now if I use a different formula I found, this is what I get :
Watts = Voltage (4.5) * Current (.02A) = 0.09W
Voltage = (Watts (0.09) * Resistance (1000ohms)) * 2 = 180V This is really different than the first formula and WAY higher than 4.5v
What am I doing wrong? I feel like I am back in pre-algebra before everything finally clicked and it was so simple from there.
I think you may have missed the point of what gives you the actual current. Go to plumbing 101. City water main 50 psi. pipe diameter from the street say two inch diameter. you will get a certain flow rate. At no time assuming the other end of the pipe is open you will never have > 50 psi across the pipe. If you squeeze the pipe with a vise grip (yeah, cheap thinwall copper), you will cause an increase resistance to the flow because of the decreased diameter. Result is lower flow from the pipe. Your city main will still only ever give you 50 psi across the same section of pipe.
Same holds true for the current in a resistive circuit. The chip assuming 5V supply and maybe a junction loss or so internally will give you about 4.5 V at the pin. The supply will never increase, it is regulated. Just as the city is (hopefully) not going to jump the pumps up to regulate 80 psi (thus identifying all of the remaining Quest pipe installations in that city in a rapid if not very cost effective manner) nor will your power source suddenly increase. Just putting in a given value of resistance will not give you an increase in power beyond that available.
As to crunching, stop short-cutting until you can get the following cold. E=I*R P=I*E. There are charts on the net for this. Break it down and do a bit of substitution.
P=E*I = I*R*I = I^2*R P=E*E/R = E^2/R ..........
It does not matter what the chip is capable of supplying. What matters is what your circuit can draw. You've stated the capacity of your chip now, Go figure.....
4.5V (given) / 1k ohm = 4.5mA Less than 20mA rating, safe to use. 4.5V (given) / 10 ohm = 450mA ---- loss of magic smoke event.....
P=E^2/R 4.5V^2/1k ohm = 20.3mW P=I^2*R 450mA^2*10 ohm = 2.03W
g'night
Frank
Go to Home Despot of bLowes and get a copy of Uglys Electrical Reference. First few pages has it all ......