Calculating resistor size and wattage — parallax forums grade 6 electricity unit


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.

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.

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.

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.

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).

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.

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 :

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 :

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.