Shop OBEX P1 Docs P2 Docs Learn Events
resistor back — Parallax Forums

resistor back

rrrr Posts: 63
edited 2005-08-15 19:59 in BASIC Stamp
how do i know how big of a resistor back to use with a npn switching transistor circuit??? i usually use 2n2222 transistors with a 2200 ohms resistor back. but i saw in a nuts and volts(steroids for stamps) it said to use 390ohms. i usually use the transistors to switch multipul leds in series...


thanks for the help

Comments

  • Beau SchwabeBeau Schwabe Posts: 6,557
    edited 2005-08-10 14:24
    Assuming you are refering to the current limiting resistor that you use between the I/O pin and the BASE of the transistor...
     
    [b]Ibe = Ice / hfe[/b]
    [b]Rbase = ( Vsource - Vbe ) / Ibe[/b]
    
    [b]Where:[/b]
    Ibe     is the current you want to apply across the BASE-EMITTER junction of the transistor.
    Ice     is the current you require to be "switched" by the transistor assuming this does not exceed the transistor specifications.
    hfe     is the amount of amplification the transistor is rated for. (located in the transistors datasheet)
    Rbase   is the current limiting resistor value in Ohms needed at the BASE of the transistor.
    Vsource is your supply voltage to the transistor BASE. ( from a Stamp I/O pin this is 5V )
    Vbe     is the junction voltage across the BASE-EMITTER of the transistor. ( usually 0.6V )
    
    EXAMPLE:
    Assume you want to drive a 250mA load from your transistor...
    
                17.6 Ohms
    5V+ >--------/\/\/----------CBE------< GND
                 250mA
    
    ...and your transistor has a [b]minimum[/b] hfe of 50 ( find this in the data sheet for your particular transistor )
     
    [b]Ibe = Ice / hfe[/b]
    [b]Ibe = 250mA / 50[/b]
    [b]Ibe = 5mA[/b]
    
    ...So from the Stamp, you are only required to supply 5mA to the BASE of the transistor.
    
    [b]Rbase = ( Vsource - Vbe ) / Ibe[/b]
    [b]Rbase = ( 5V - 0.6V ) / 5mA[/b]
    [b]Rbase = 4.4V / 5mA[/b]
    [b]Rbase = 880 Ohms [/b]
    
    ...In this case you should only need an 880 Ohm resistor from the Stamp I/O pin to the tarnsistors BASE,
    however it is common practice to bump up or down this value to the closest standard resistor value.
     
     
                17.6 Ohms
    5V+ >--------/\/\/----------CBE-----------< GND
                 250mA           |
                                 |
                                 o---/\/\/----< Stamp I/O 
                                    880 Ohms
     
    [b]Note:[/b]
     
    The 17.6 Ohm resistor is simply a 250mA load at 4.4V
     
    [b]R = V / I[/b]
    [b][/b] 
    [b]R = ( 5 - 0.6 ) / 250mA[/b]
    [b][/b] 
    [b]R = 4.4 / 250mA [/b]
    [b][/b] 
    [b]R = 17.6 Ohms[/b]
     
     
     
                                 
    

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Beau Schwabe

    IC Layout Engineer
    Parallax, Inc.
  • rrrr Posts: 63
    edited 2005-08-10 18:16
    thanks...
    i figured there must be a formula.
  • rrrr Posts: 63
    edited 2005-08-10 18:32
    according to my calculations driving a smaller load through the transistor reqires a larger resistor back???

    the load i want to drive is about 100ma and the hfe of the transistor is 200 so...

    Ibe = Ice / hfe
    ibe = 100/200

    Rbase = ( Vsource - Vbe ) / Ibe
    rbase= 4.4/.5

    rbase = 8.8k resistor


    right????
  • Beau SchwabeBeau Schwabe Posts: 6,557
    edited 2005-08-10 18:59
    You said...
    according to my calculations driving a smaller load through the transistor reqires a larger resistor back???
    This is correct,· the·smaller the current the larger the resistor.



    Just wanted to clarify....

    100mA is .100 not 100

    .100 / 200 = .0005

    4.4 / .0005 = 8800 Ohms = 8.8K


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Beau Schwabe

    IC Layout Engineer
    Parallax, Inc.

    Post Edited (Beau Schwabe (Parallax)) : 8/10/2005 7:05:01 PM GMT
  • rrrr Posts: 63
    edited 2005-08-10 19:33
    thanks for all the help.
  • YanroyYanroy Posts: 96
    edited 2005-08-10 19:59
    As long as you don't harm the stamp by drawing too much current, I don't think there will be a problem in using a smaller resistor... the transistor should just operate in saturation mode.
  • TorquewrenchTorquewrench Posts: 28
    edited 2005-08-14 17:00
    Beau,

    How would the calculation above apply to a MOSFET? I have an IRF7488, I'm driving 2W@9V (220mA) using a BS2 on the gate (Vsource = 5.0V).

    Ids = 220 mA
    Vsource = 5.0 V
    Vgs = ?
    hfe = ?

    I've attached the data sheet for the mosfet, I'd really appreciate your help in understanding the MOSFET application to protect the BS2.

    Thank you,

    Phil
  • Beau SchwabeBeau Schwabe Posts: 6,557
    edited 2005-08-14 23:23
    Phil,
     
    You can't really apply the above formula to a MOSFET.  
    First of all the relationship between the Gate and the Source/Drain of a MOSFET is more like a capacitor.  Initially you must consider the "surge"
    that happens between a charge and discharge.  Once the "Gate-capacitor" is charged it requires almost zero current to keep it there.
    The charge/discharge rate of the "Gate-capacitor" mostly affects the rise and fall time the MOSFET has to react.  What can happen, and thus why
    MOSFETS are static sensitive, is that if you apply too much voltage you can "punch through" the gate capacitor and cause it to arc.  This tiny
    arc can damage the operation of the MOSFET.
     
    With a bipolar transistor, the relationship between the Base and Emitter is more like a diode, independent of the transistor being "on" or "off".
    Because of this there is always "current" that you need to deal with, thus the formulas above.  If you exceed these ratings you can dammage the
    operation of the bipolar transistor.
     
    When a MOSFET is "on" it acts like a resistor between the Source and Drain with a resistance value determined by the Rds(on).  In your case this
    is 24 milliOhms.
     
    When a bipolar transistor is on it acts like a diode between the Collector and the Emitter similar to the Base and the Emitter.  In most cases
    the diode drop is about 0.6V
     
    Take for example the following circuits.
     
    Bipolar(NPN - Assume transistor is "ON"):
                 Collector    Emitter
    +5V >--/\/\------------>|-------------< GND
           Load           0.6V
     
    MOSFET:
                    Drain      Source
    +5V >--/\/\-----------/\/\------------< GND
           Load           .024 Ohms
     
     
    In the Bipolar circuit you are always going to loose about 0.6 Volts across the C-E junction, so with a 5V supply your Load will only
    "see" 4.4 Volts (5V - 0.6V).  To obtain a current of 220mA your load must be at 20 Ohms ( R = V / I ).
     
    For the MOSFET, voltage loss across the Source and Drain is going to be much less for the same amount of current required... 
    about 0.0053V ( V = I * R )
    ...So the load resistance must be 22.7 Ohms for both circuits to have the same amount of current through them.
    
    Why is this important?
    For the Bipolar in this example, the amount of wasted energy is 132mW ( P = I * V )
    For the Mosfet in this example, the amount of wasted energy is 1.2mW ( P = I * V ) or ( P = I^2 *R )
     
    To be wasting small amounts such as milli Watts might seem trivial, but you application also only requires 220mA.  
    What if you needed to drive 20Amps or 200Amps?
    

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Beau Schwabe

    IC Layout Engineer
    Parallax, Inc.
  • TorquewrenchTorquewrench Posts: 28
    edited 2005-08-15 10:31
    Thank you for the excellent explanation with regards to MOSFETS. Given that I am using a MOSFET, is there a need for any sort of protection circuitry analogous to the resistor in the case of the bipolar?
  • Beau SchwabeBeau Schwabe Posts: 6,557
    edited 2005-08-15 19:59
    The RG value is usually selected to control the dv/dt or "slew rate". The capacitance from Gate to Source in combination with RG form an RC filter
    which effects the overall response time of the MOSFET. Usually on this front, I take the recommendation from the application note on the MOSFET
    since this would mainly apply to high speed switching and I personally don't do much of that.

    By googleing, I did find a way to calculate RGS for use as protection circuitry" (towards the middle of the document)

    http://focus.ti.com/lit/ml/slup170/slup170.pdf

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Beau Schwabe

    IC Layout Engineer
    Parallax, Inc.
Sign In or Register to comment.