Turning off NPN Transistor, Frustration

Discussion in 'General Electronics Chat' started by poopscoop, Jun 9, 2013.

  1. poopscoop

    Thread Starter Member

    Dec 12, 2012
    139
    16
    I'm using Arduino to control a SPST N/O Relay. I want to run the relay coil on 12v, so I intend to use an NPN (2n4401) to use the 5v signal to switch the 12v source.

    I've set up the NPN on a breadboard to test. I can draw a schematic if necessary, but right now its a 7812 on the 12v line, leading to a resistor/LED and the collector. A 7805 provides the signal on the base of the transistor, and the emitter is connected directly to ground.

    Turning 12v on is no problem, but I can't turn it off. I have a resistor from base to ground, I've tried connecting the base directly to ground without the 5V supply connected. Nothing will turn off the LED, only dim it slightly.

    What am I doing wrong? Is there a better way to control the relay through the 5v signal?
     
  2. Papabravo

    Expert

    Feb 24, 2006
    10,144
    1,791
    Uhhh...a 7805 is a 5V regulator. It won't switch a transistor on and off. WTF are you thinking!!??
     
  3. tracecom

    AAC Fanatic!

    Apr 16, 2010
    3,869
    1,393
    Assuming you are using the 5V output from the 7805 simply to supply base current to the 2N4401 (through a 10k or so resistor), I would guess you have the circuit wired wrong.
     
  4. poopscoop

    Thread Starter Member

    Dec 12, 2012
    139
    16
    I'm obviously disconnecting the base from the 7805 (and touching it to ground) when I want it to turn off.

    I'll post a schematic soon.
     
  5. tracecom

    AAC Fanatic!

    Apr 16, 2010
    3,869
    1,393
    This works as shown. Connect R1 to the base of Q1 to light the LED. Disconnect it to turn it off; no touching to ground required.
     
    poopscoop likes this.
  6. Evil Lurker

    Member

    Aug 25, 2011
    117
    23
    If you are using an NPN transistor you should have a resistor in between VCC and the base to limit the current and voltage going into the base, not from the base to ground.

    If you hooked the base directly to +5v without a current limiting reistor, then there is a good possibility you smoked your transistor, thats why you can't turn it off.
     
  7. poopscoop

    Thread Starter Member

    Dec 12, 2012
    139
    16

    This is exactly what I have. I'm going to assume I smoked this transistor in a previous project and didn't toss it. I'll try with a fresh set.

    I appreciate the advice.
     
  8. tracecom

    AAC Fanatic!

    Apr 16, 2010
    3,869
    1,393
    Double check the pinout of Q1 BEFORE you connect it.
     
  9. poopscoop

    Thread Starter Member

    Dec 12, 2012
    139
    16
    Transistors tested fine, but when I connected the LED's to emitter and the collector to ground everything worked fine.

    I'm 99% sure I know how to read. There is some ambiguity on my pinout as to whether I'm looking at the transistor top-down or bottom-up. Evidently I misinterpreted.
     
  10. Papabravo

    Expert

    Feb 24, 2006
    10,144
    1,791
    When the base emitter junction of a transistor is "forward biased" it wants to be about 0.7 V above the emitter. The base resistor allows this to happen by dropping the voltage from whatever is on the other side (5.0V) in this case down to 0.7 volts which is where the transitor wants the base to be so the emitter can be at GND.

    It is not uncommon to add a resistor from the base to GND to make sure that if there is no driving source on the other side of the base resistor that the base will eventually return to GND (No cuurent flow <==> No voltage difference)

    <==> means each of those conditions implies the other one.

    In your example if you have a 10K base resistor then it should have:
    (5.0 -0.7) / 10K = 430 μA

    If the transistor has a β of 100 then the collector might supply a current of 100 * 430 μA = 43 mA

    This of course will be limited by the LED and the series resistor, but at least you have an idea of what current might be avalable.
     
  11. tracecom

    AAC Fanatic!

    Apr 16, 2010
    3,869
    1,393
  12. poopscoop

    Thread Starter Member

    Dec 12, 2012
    139
    16
    I misread the pinout drawing and had the collector and emitter mixed up. It is now wired correctly, with the emitter to ground and the collector attached to the load.
     
  13. tracecom

    AAC Fanatic!

    Apr 16, 2010
    3,869
    1,393
    Everyone has done it. Glad it works now.
     
  14. Shagas

    Active Member

    May 13, 2013
    802
    74
    Check your collector-emmiter with a multimeter for continuity .
    If it buzzez then use a new transistor :)
     
Loading...