PDA

View Full Version : Output Pin to NPN transistor



Bill M.
05-31-2005, 02:46 PM
I am having a little problem with my project. It requires that one of the BS2 I/O pins output to switch an NPN transistor on. The transistor is driving a load with impedance 36 ohms and requires .333A of current. My present setup is a 220ohm resistor from the I/O pin to the Base of the transistor. The load (solenoid) is connected in series from Vcc (15V) to the Collector, and the Emitter is grounded. The problem is when I send the I/O pin high, nothing happens. When I simulated this circuit, assuming an input voltage of 5V, the Base current is less than 20mA (~18mA), and Ic is .333A as required. Is there something I am missing?

KenM
05-31-2005, 03:53 PM
Bill,

What transistor are you using? Is the hfe rating greater than 20 (probably).

A 2n3904 transistor does not have the current capability to handle a collector current of .333amps

A 2n2222A can handle the current, and your theory and choice of base resistor should work....connection problem?

For·a no brainer approach to drive your load (or any load of several amps), you might want to consider an IRL520.·A bit overkill but works flawlessly, and no messing around with calculating base resistors. Although a base resistor is not needed for this logic level mosfet, adding 220 ohms gives a level of protection for your $50 or more stamp.

Also some prefer 10k ohms from the gate to ground opposed to 100k as shown.

www.glitchbuster.com (http://www.glitchbuster.com) whom I have no affiliation......no minimums and $1.85 for shipping in the US, and good service.

Ken


▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Ken

Post Edited (KenM) : 7/24/2005 7:04:35 PM GMT

Bill M.
05-31-2005, 06:41 PM
The transistor is a general purpose switching transistor. Typical hfe given is 200, and the max Ic is 800mA. I picked them up from radioshack, and the only number I could find was 276-1617.

Bean
05-31-2005, 07:08 PM
There's the problem, that transistor is rated at only 0.6 Watts. You need 5 Watts for your load (0.333Amps @ 15 Volts).
You need a bigger transistor.
Bean.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"SX-Video·Module" Now available from Parallax for only $28.95 http://www.parallax.com/detail.asp?product_id=30012


Product web site: www.sxvm.com (http://www.sxvm.com)

"It's not getting what you want, it's wanting what you've got."
·

Beau Schwabe
05-31-2005, 10:08 PM
Don't forget the reverse biased diodes across your inductive load and transistor.

See an earlier attachment that I put together that should also apply to this application....

"Don't get HOT choosing the wrong transistor" (http://forums.parallax.com/attachment.php?attachmentid=37701)

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔

Beau Schwabe
Parallax IC Layout Engineer

kb2hap
05-31-2005, 10:19 PM
Hey Beau Just wanted to say Congrats on the "Parallax" designation

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
DTQ

KenM
05-31-2005, 10:43 PM
Bean,

Please educate me if my thinking is messed up.....how do you come up with 5 watts? Yes the load must dissipate 5 watts, but not the transistor, yes/no?
My thoughts are:
When the transistor is off, the power consumption is 0 watts. P = IE, I = 0, P = 0
Next case, when the transistor is on the power consumption would be at most 1 watt. This is assuming there is one volt across CE. when the transistor is configured as a switch...and working likely less, about 0.7 volts.
P = 0.7 * 0.333 = 0.233 watts.
Even a worst case 1 volt CE....yeilds 1.0volts*0.333amps = 0.333watts.
We can ignore the linear region....as the transitor turns on.


Bean (Hitt Consulting) said...
There's the problem, that transistor is rated at only 0.6 Watts. You need 5 Watts for your load (0.333Amps @ 15 Volts).
You need a bigger transistor.
Bean.


Post Edited (KenM) : 5/31/2005 2:56:53 PM GMT

Bean
06-01-2005, 12:39 AM
Oops,
Your right Ken. I was thinking power handling.
As long as the transistor is saturated, your right in your calculations.
Chaulk it up to the long weekend.
Bean.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"SX-Video·Module" Now available from Parallax for only $28.95 http://www.parallax.com/detail.asp?product_id=30012


Product web site: www.sxvm.com (http://www.sxvm.com)

"It's not getting what you want, it's wanting what you've got."
·

Bill M.
06-01-2005, 02:08 AM
Hey,

I found out what the problem was. Apparently I need a single point ground; I had been using the ground from the external power supply for the transistor, and the ground from the stamp for the stamp. It wasn't the transistor at all. Thanks anyway for your help.