Confused by basic transistor circuit

Discussion in 'The Projects Forum' started by skyjive, Jul 18, 2011.

  1. skyjive

    Thread Starter New Member

    Jul 9, 2011
    11
    0
    Hi all,

    I am trying to use a transistor (2N222A) to control a relay, but having trouble. To reduce the number of variables I have removed the relay (and other stuff) from the circuit to see if I could just get a bare bones transistor circuit to work, but I'm still confused. Below is the simple test circuit.

    [​IMG]

    I took a number of measurements of V3 across the resistor for different V1, V2, and R to see if I could figure out what was going on:

    [​IMG]

    It looks like the voltage across the resistor V3 is basically V2, the base input voltage, minus a little drop across the transistor. So it's basically acting as though I just had only V2 across the resistor and no transistor or V1 at all. I was under the impression that the function of a transistor was to act as a closed switch when a voltage was applied at the base, which should bring V1 into play. Why is this apparently not the case?
     
  2. MrChips

    Moderator

    Oct 2, 2009
    12,418
    3,355
    I am in the middle of explaining this in another thread. This circuit is called an "emitter follower". The transistor will be turned on only when the base-emitter drop exceeds a certain voltage. As the transistor turns on the current through R will rise and V3 will rise.
    This will therefore limit the base-emitter voltage = V2 - V3.
    Hence to keep the transistor on you will have to bring V2 up to V1.

    An "emitter follower" is a current amplifier, not a voltage amplifier.
    A close approximation is Ie = beta x Ib.

    Hope this helps
     
  3. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    Well, you need to realize that your resistor on the emitter is the only path for current from the base or the collector.

    Current through the base enables a much larger current flow through the collector.

    You have the transistor connected as an emitter follower; in this configuration the voltage on the emitter is usually (roughly) the voltage on the base less ~0.62v under a light load - as long as the voltage on the collector is high enough.

    When you want to use an NPN transistor as a saturated switch, you ground the emitter, and use a resistor to limit the base current; the collector sinks current from the load.

    To calculate the resistance needed to limit the base current:
    Rbase = (Vin - Vbe) / (Ic / 10) [keep this formula handy, it's pretty standard]
    where:
    Rbase = the resistance required to limit the base current.
    Vin = the voltage that will be applied to the resistor on the terminal away from the transistor's base, relative to the voltage on the emitter.
    Vbe = typically 0.7v for light to moderate loads; this goes up as the collector current increases towards the transistors' maximum rating.
    Ic = The desired collector current.

    For example, if your relay needs 100mA current, and you are using a 9v supply then you'd calculate:
    Rbase = (9v - 0.7v) / (100mA / 10) = 8.3v/10mA = 8.3/0.01= 830 Ohms.
    Consult a table of standard resistance values:
    http://www.logwell.com/tech/components/resistor_values.html (bookmark this page!)
    Use the E12 and E24 columns.
    830 is not a standard value of resistance, but 820 Ohms is.
    Then you need to calculate the power dissipation for the resistor.
    8.3v/820 Ohms = 10.1mA
    8.3v * 10.1mA = ~84mW
    For reliability's sake, you multiply that result by 1.6 = 134.6mW, and use a wattage rating >= to that result. 1/8 Watt is not quite enough, so you'd use a 1/4 Watt rated resistor.

    Something you need to know about inductive loads; when the current is suddenly turned off, the inductor will try to keep the current flowing. This results in very high voltage spikes, which will destroy transistors and other parts. Use a diode such as a 1N4004 across the inductive load to absorb this high voltage spike. You connect the diode with the cathode towards the more positive side of the inductive load.
     
  4. praondevou

    AAC Fanatic!

    Jul 9, 2011
    2,936
    488
    If you want to have it less confusing, put the relay from collector to power supply + instead from emitter to ground. (common emitter mode)

    Don't forget the reverse diode in parallel with the relay.

    Post the rest of the circuit as well to see if the base configuration / relay ratings are ok.
     
  5. praondevou

    AAC Fanatic!

    Jul 9, 2011
    2,936
    488
    I think SgtWookie will win the speed typing test. :)
     
  6. #12

    Expert

    Nov 30, 2010
    16,252
    6,749
    He probably uses both hands!
     
  7. skyjive

    Thread Starter New Member

    Jul 9, 2011
    11
    0
    Problem solved! Thanks everyone
     
Loading...