Replacing PNP (3906) with NPN (3904)

Discussion in 'The Projects Forum' started by OldSkoolEffects, Apr 27, 2013.

  1. OldSkoolEffects

    Thread Starter Member

    Nov 18, 2009
    68
    1
    I know this is probably beating a dead horse, but transistors are one of those simple things that I always confuse myself with.

    I have a group of LEDs that are normally in an off state, and are turned on via an Arduino looking as switches and such. The initial design I have is using 2N3906s to switch on the positive side of the LED, such as this:

    [​IMG]

    The circuit works, but after looking at it, it seems like if the LEDs are normally off, having the Arduino constantly putting out a HIGH signal to keep the 2N3906 off seems like a waste of power, and I don't like the idea of having too much constant current through the Arduino board. Because of this, I'd like to replace the PNP with NPN. Would the following work? The emitter and collector are swapped from where they were as PNP and the signal on the base is inverted.

    [​IMG]

    I just wanted opinions before I break out the soldering iron. Because of physical limitations, the LEDs need to stay common ground.
     
  2. #12

    Expert

    Nov 30, 2010
    16,284
    6,797
    If you can see which resistor has a voltage across it when a PNP transistor is turned off, you should use the NPN configuration, but don't do the emitter follower mistake (that everybody else makes). Put the LED on the collector side of the transistor.
     
  3. OldSkoolEffects

    Thread Starter Member

    Nov 18, 2009
    68
    1
    So I would want
    [​IMG]
     
  4. patricktoday

    Member

    Feb 12, 2013
    157
    42
    That is incredibly cryptic.

    But I was just going to comment that, in your original circuit, when the output is HIGH the transistor is off and so there is actually no current flowing out of the pin. There should be a resistor though to the tune of 10k, though, to the base so you're not putting 5 volts between the base and emitter when the voltage is LOW. But the venerable 0x000C says to go with the NPN so I'm probably missing something :)
     
  5. Dodgydave

    Distinguished Member

    Jun 22, 2012
    4,986
    745
    That wont work , you need to connect the emitter to Gnd and the led to Vcc
     
  6. #12

    Expert

    Nov 30, 2010
    16,284
    6,797
    No, you would want the circuit I drew and gave to you here in post #2 of this thread.
     
  7. #12

    Expert

    Nov 30, 2010
    16,284
    6,797
    I think that if you look really closely at the drawing I posted, the places where there is a voltage difference across a resistor will become apparent.
    (Hint: There aren't any.)
     
  8. patricktoday

    Member

    Feb 12, 2013
    157
    42
    Right, I noticed that part and therein lied the crypticness. It seemed like a potential non sequitur that one should switch to NPNs under these conditions. :D
     
  9. WBahn

    Moderator

    Mar 31, 2012
    17,743
    4,795
    One thing I would recommend to the OP is to start drawing your schematics in a more conventional way, namely with high supplies at the top, low supplies at the bottom, and current generally flowing from top to bottom. Not only will you communicate better with other people (because most people use that convention) but you will probably find yourself understanding things better (because there's a reason most people use that convention).
     
    ErnieM, #12 and patricktoday like this.
  10. #12

    Expert

    Nov 30, 2010
    16,284
    6,797
    Must look up, "cryptic". (I seem to be missing something.)

    OK. I get it. My statement contains a hidden meaning. The hidden meaning was that there is no resistor with a voltage across it.

    Of course, I'm assuming that an MPU, presenting "high" on an output pin, will not only output Vcc, but it will not accept current from Vcc, even if it's available.
     
    Last edited: Apr 27, 2013
  11. WBahn

    Moderator

    Mar 31, 2012
    17,743
    4,795
    I found this confusing as well. I now understand what you are saying and why you said it this way, but it is easy to not catch the point being made and think that you are trying to make some other point entirely. It is that "other point" that appears cryptic, largely because there IS no other point to find (and hence why it is so hard to find it).
     
    #12 likes this.
  12. OldSkoolEffects

    Thread Starter Member

    Nov 18, 2009
    68
    1
    I just swapped 2N3904s in for 2N3906s and inverted the digital signals into the base and it works how I want it. I should have just done this first and I would have saved myself a boatload of time and effort.

    I could have done with "You can directly replace them, as long as you invert your signal."

    This thread can be locked.
     
  13. #12

    Expert

    Nov 30, 2010
    16,284
    6,797
    I'll put this in a direct form: The pnp configuration does not use any current. You can reverse the polarity of the transistor and the logic of the processor if you want to, but it will not improve "wasted" current. A "high" output connected to Vcc, whether with a resistor, a transistor, or a piece of wire, will not accept current from Vcc because, 1) there is no voltage difference and, 2) the current sink internal to the MPU is not available when the output is in the high state.

    I tried to provoke you to examine this yourself, to think and learn, but I failed. I apologize for wasting your time.

    ps, This site does not lock finished threads. They are left open indefinitely. Locking finished threads would have the beneficial result of stopping beginners from mistakenly posting to threads that are months or years old, but this site doesn't do that. No reason, just "policy".
     
  14. WBahn

    Moderator

    Mar 31, 2012
    17,743
    4,795
    Do you still not have a resistor between the Arduino output and the transistor base?

    It sounds like you may now be running your output in a emitter-follower configuration, which is generally undesireable in an application in which it is desired that it act as a switch.

    You will generally not get too many direct answers to questions that appear to be education-focused (whether it is an actual assignment or not) because most of the people here that respond to such posts are trying to help you find the solution largely on your own.
     
  15. DickCappels

    Moderator

    Aug 21, 2008
    2,653
    632
    The O/P found a solution. Of course in reality, its to use a diode instead of a transistor. He could do better by just omitting the transistor completely and shorting the 2N3904 base and collector pins together.

    I hope the current drawn by the LED is not enough to hurt his controller.
     
  16. #12

    Expert

    Nov 30, 2010
    16,284
    6,797
    Do you mean like this?
     
  17. WBahn

    Moderator

    Mar 31, 2012
    17,743
    4,795
    I don't follow. The OP's solution, as near as I can tell, is to use the alternative he posted in his original post. That is an emitter-follower configuration.

    Could you post a sketch or description of why you think is the solution that the OP found?

    Besides, how can he omit the transistor completely and short the base and collector pins together? Seems like you could do one or the other, but not both.
     
  18. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,387
    1,605
    In this case there is nothing wrong with an emitter follower configuration. In fact, as it dumps the base current into the LED load it is actually more efficient.

    The LED runs on a voltage lower then the power supply, so some voltage must get dumped somewhere. Doing so in both the BE junction and the series resistor, some here and the rest there, is fine.

    #12: I notice the PNP version differs from the NPN version in that you put a resistor B to E in the PNP. I would submit this resistor is not required with a logic drive such as this: the base resistor is there to capture any collector leakage current and remove it from the base.
     
    #12 likes this.
  19. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    657
    Very good points. I agree with both of them.
     
    ErnieM likes this.
  20. patricktoday

    Member

    Feb 12, 2013
    157
    42
    I think he was just illustrating there would be no voltage drop across this resistor if the PNP was switched off.
     
Loading...