Quick Transitor Question

Discussion in 'The Projects Forum' started by davaughn, Jun 25, 2013.

  1. davaughn

    Thread Starter New Member

    Jan 10, 2011
    4
    0
    Hi!

    I have several sets of RGB strips that will all be the same color, but that I want to turn on independently w an arduino. The strips require 12V in and then there is an R a G and a B out that turn on if you ground them so 12V drops across that color's LEDs. I have all the R's controlled by one transistor switch, all the G's by another etc and it works great- I can turn on any combination on all the strips.

    What I can't figure out is the last step: how to control the full on/off for each strip. I want to control the 12V in to each strip so I can turn the whole thing off/on. But the schematic, as I attached it, doesn't work because the load is below the transistor so the transistor steals ~6volts.

    If I put these transistors immediately below the LED strips (connect all to the FET drain), I'll loose control of each color. I don't want to have 4 transistors for each strip (R,G,B and 12) since I'm going to have like 6.

    http://donvaughn.com/download/IMG_5654.JPG

    Ideas?

    I'm doing more research... should the resistor controlling each switch be PNP? Is it that NPN don't "Pull-to-power", they're better at "pulling-to-ground"? Seems like that might be it since my voltage is kinda floating up there.
     
    Last edited: Jun 25, 2013
  2. WBahn

    Moderator

    Mar 31, 2012
    17,755
    4,799
    Does it REALLY require a 3MB image file to convey your schematic? Some of us have very slow (as in dial-up-slow) internet connections.

    What kind of transistors are you using? BJT or MOSFET?

    What are the voltage/current capabilities of the Arduino outputs you are using?

    What is the maximum combined current of all three LED strings in a single RGB strip?

    What do you mean by "the resistor controlling each switch be PNP"? What is a PNP resistor?

    I would recommend using an NFET or NPN inverter to control a PFET or PNP switching transistor for each strip.
     
  3. wayneh

    Expert

    Sep 9, 2010
    12,137
    3,054
    Why do you need redundant control of the positive line in when you already have control of the individual colors? Off is off.

    But suppose you put one MOSFET below the entire circuit, to control the path to ground for all your parallel strips. This would switch the entire device on or off.
     
  4. WBahn

    Moderator

    Mar 31, 2012
    17,755
    4,799
    The control he's looking for is not redundant, it is orthogonal. Think of it like a keypad matrix. The rows are the individual strips and the columns are the individual columns. So if he has N strips, he needs N+3 transistors and control signals to be able to turn on any one 3N individual strings.
     
  5. davaughn

    Thread Starter New Member

    Jan 10, 2011
    4
    0
    Yeah WBahn has it right.

    I think https://www.sparkfun.com/products/10349 that's the right product, but I don't want to wait for delivery to finish this circuit board.

    What kind of transistors are you using? BJT or MOSFET? Mosfet

    What are the voltage/current capabilities of the Arduino outputs you are using?
    Arduino has +/- 5V pins at like 50mA.

    What is the maximum combined current of all three LED strings in a single RGB strip?
    I'm going to run 7 (for each of my drums), so ~4Amps

    What do you mean by "the resistor controlling each switch be PNP"? What is a PNP resistor?
    Good catch- I meant transistor.

    I would recommend using an NFET or NPN inverter to control a PFET or PNP switching transistor for each strip.

    I mean, I must be missing something... I just want to turn the +12V into the RGB strip on and off without dropping any volts across it, w/ a 5V TTL base input
     
  6. Gaudeamos

    New Member

    Jun 24, 2013
    15
    2
    To dis/enable all 3 of your switches with one signal: use one more npn transistor...

    1. Connect the emitters of all 3 controlling transistors to the collector of the master transistor (instead of ground).

    2. Connect the emitter of the master transistor to ground. The collectors of the 3 controlling transistors should be within about 0.2V of ground when on, depending on the C-E voltage drop for the transistors you're using.

    The master transistor (when turned off) will block any current from flowing thru any of the controlling resistors.

    I haven't actually breadboarded the above solution, but that would be my approach.

    hope this helps
     
  7. WBahn

    Moderator

    Mar 31, 2012
    17,755
    4,799
    And how would this approach achieve what the OP is trying to achieve?

    He has 7 strips and each strip has three LED strings, R, G, and B. So there are 21 individual strings that we can name using the strip number and the string color. Hence 5R is the red string in the 5th strip.

    He want to be able to turn on any one particular string, say string 5R, using the outputs of an arduino. Since he has 21 strings, he could do it with 21 outputs and 21 transistors. He wants to do it with significantly fewer.

    What he has done so far is to tie one end (the "bottom") of ALL of the R strings to one transistor, ALL of the G strings to another, and ALL of the B strings to a third. With these three transistors he can turn on all seven of the R strings, or all seven of the G strings, or all seven of the B strings (and combinations of these).

    The problem is that if 1 R string is on, then all 7 R strings must be on -- it is all or nothing. He wants to be able to turn on just the 5R and none of the others.

    So at the other end of the string (the "top") he needs to put another transistor. For these, he will group the 21 strings into 7 sets, namely the 7 strips.

    He can then choose one of the 7 "top" transistors to enable a particular strip (say strip 5) and then choose one of the 3 "bottom" to enable a particular color (say red). In order for a string to light up, BOTH the strip that it is in and the color that it is must be enabled.
     
  8. Gaudeamos

    New Member

    Jun 24, 2013
    15
    2
    Yes, on reviewing his original post I've solved a problem he didn't have :(

    OK let's try again:

    davaughn, if you want to control each strip independently as in your schematic, you'll need to use pnp transistors between the + supply rail and the load. That will make the controlling signals for each strip active low (unlike the signals for the colors). As well, the controlling signal's high (OFF) level must be the same voltage level as the positive rail. If this is a problem, you'll need to use an additional npn transistor for each of your strips to invert/level shift the respective controlling signals.

    An alternative: you could use an npn transistor for each strip between the loads and the transistors controlling each color:

    For each strip: 1. connect the - end of the strip to the collector of a npn transistor. 2. connect the emitter of this transistor to the collectors of EACH of the color-controlling transistors. This will result in an active high signal controlling the strips, just like the signals controlling the colors. This signal will need to be at least TWICE the B-E voltage drop for the transistors you're using (about 2 x 0.7V), since you'll be cascading switching transistors. Also, you'll get any required level shifting, as you do with the color signals.

    I've taken a breath... hope I got it right this time.
    cheers
     
  9. Gaudeamos

    New Member

    Jun 24, 2013
    15
    2
    re that 2nd alternative... I forgot about the LEDs: they would have to be connected between the cascaded transistors. This increases the required high/ON voltage level to (2 x Vbe) + Vled; about 3.4V for R&G, more for B. That's most likely higher than your signal source can do.

    I haven't thought of any problem (yet ;) ) with plan A (using the high-side pnp transistors with level shifting).
     
  10. davaughn

    Thread Starter New Member

    Jan 10, 2011
    4
    0
    Shouldn't I use a PNP transistor above a load, not a NPN?

    I didn't know about the control signal needing to be +12V at least, as well. Is that true with these transistors though, that are specifically designed for TTL?
    https://www.sparkfun.com/products/10349
     
  11. WBahn

    Moderator

    Mar 31, 2012
    17,755
    4,799
    Which is specifically what I recommended in Post #2

    It's not the voltage at the base/gate that matters. It is the voltage DIFFERENCE between the base/emitter or gate/source that matters.

    [​IMG]

    Here is an approach using BJT transistors.

    The NPN at the bottom of the load works just like you currently imagine.

    The PNP at the top of the load works the same way, except that the base voltage will be about 11.3V (12V-0.7V) when it is turned on. The resistor R1 is there to pull the base of the PNP up toward 12V to cutoff the transistor when it is not turned on. It can be pretty large -- 10kΩ to 100kΩ is a decent rule of thumb.

    It sounds like you have a total of ~4A for 7 strips, so roughly 0.5A per strip. You would want a base current of about 10% of this, so about 50mA. When the NPN is on, Node A will be, as previously stated, at about 11.3V. Node B will be at about 0.2V. So call the voltage across R2 11V (or just use 12V). That means that R2 would need to be about 11V/50mA = 220Ω (which happens to be a standard resistor size). To saturate the right hand NPN when it is on, you want it's base current to be about 10% of 50mA, so 5mA. Node F will be at about 0.7V and V2 will be around 5V, so call it 4V across R3 to get 5mA, making R3=4V/5mA=800Ω. You will probably be more than fine using a 1kΩ resistor there.

    But on the other side, you want the bottom transistor to sink about 4A/3=1333mA. Let's call it 1500mA. That means that you would want the base current to be about 150mA and your arduino can only supply 50mA. In all honesty, 50mA would probably be enough, but I would recommend adding another NPN transistor in a Darlington configuration to get you down into the 15mA range. You would then have about 3.5V across R4 to deliver that with, so R4=3.5V/15mA=233Ω, so use a 220Ω resistor there, two.

    If you are using MOSFETs, then the same basic topology applies. You have different Vgs voltages to take into account and you don't have the base current considerations so the only resistor you really need is R1.
     
  12. davaughn

    Thread Starter New Member

    Jan 10, 2011
    4
    0
    Thank you so much WBahn for taking the time to help me with this project- you rock!
     
Loading...