Shop OBEX P1 Docs P2 Docs Learn Events
Output Pin to NPN transistor — Parallax Forums

Output Pin to NPN transistor

Bill M.Bill M. Posts: 4
edited 2005-05-31 18:08 in BASIC Stamp
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?

Comments

  • KenMKenM Posts: 657
    edited 2005-05-31 07:53
    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 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
    869 x 555 - 53K
  • Bill M.Bill M. Posts: 4
    edited 2005-05-31 10:41
    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.
  • BeanBean Posts: 8,129
    edited 2005-05-31 11:08
    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

    "It's not getting what you want, it's wanting what you've got."
    ·
  • Beau SchwabeBeau Schwabe Posts: 6,557
    edited 2005-05-31 14:08
    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"

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

    Beau Schwabe
    Parallax IC Layout Engineer
  • kb2hapkb2hap Posts: 218
    edited 2005-05-31 14:19
    Hey Beau Just wanted to say Congrats on the "Parallax" designation

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    DTQ
  • KenMKenM Posts: 657
    edited 2005-05-31 14:43
    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
  • BeanBean Posts: 8,129
    edited 2005-05-31 16:39
    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

    "It's not getting what you want, it's wanting what you've got."
    ·
  • Bill M.Bill M. Posts: 4
    edited 2005-05-31 18:08
    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.
Sign In or Register to comment.