Hi. Control 24V LED strip by Multiplexing. HELP Please!!

ok well i'm going to make all of my separate 28 LED strips run dictly of a 24V power supply, just like having 4 common anode displays.

then how would I use 4 TPIC6B596 to control the ground pins of each LED strip

You have to decide if you want a multiplexed display other not.
If you are then you don’t need a shift register.

If you are not you need one.

Most single colour LEDs strips can be treated as a common anode with the direct connection to the positive voltage and you can switch them with an NPN transistor. That is switch the ground.

I Want to go for the most simple option which ever that is. I guess that's the none multiplexed option using shift registers?

I trying doing this before with a multiplexed method but i believe this too be all wrong and didn't work.

So how would I then control the NPN transistor from the arduino using a shift register, specifically the TPIC6B596.

With TPIC6B595 chips you don't need anything else (except for a 100n decoupling capacitor on the power pin).
Each chip can directly drive eight 15cm 24volt strips (~60mA each).

If you want it easier (and more expensive), then buy the chip on a breakout board.
Example code on the same site.
Leo..

what am i doing wrong here, the shift register is working. it will light up the LED's me sequence. however it will not light up the LED strip. it just always has a slight glow.

the is Using a 74HC595 Shift Register

i am using PNP transistors.

int latchPin = 8;
int clockPin = 6;
int dataPin = 10;
byte leds = 0;
int currentLED = 0;

void setup()
{
    pinMode(latchPin, OUTPUT);
    pinMode(dataPin, OUTPUT);
    pinMode(clockPin, OUTPUT);

    leds = 0;
}

void loop()
{
    leds = 0;

    if (currentLED == 7)
    {
        currentLED = 0;
    }
    else
    {
        currentLED++;
    }

    bitSet(leds, currentLED);

    digitalWrite(latchPin, LOW);
    shiftOut(dataPin, clockPin, LSBFIRST, leds);
    digitalWrite(latchPin, HIGH);

    delay(250);
}

I don't see any base current limiting resistors.
Without that you will fry the 595 chip and/or the transistors.

Post a diagram.
Leo..

what is the best software for drawing diagram?

Bigtimer:
what is the best software for drawing diagram?

Pencil & paper.

You seem to be lacking a lot of fundamental information that you need for your project. I fear this is going to severely hamper you getting going without damaging things.

That photograph ( which is useless for trying to communicate circuits by the way ) you say you are using PNP transistors. That points to the fact that you don't know how transistors work. Please study this page:- Transistor Circuits | Electronics Club
Please ask if there is anything you don't understand, especially about the different ways PNP and NPN transistors word. First get your head around the NPN transistor, then try and think of a PNP transistor as an "upside down" transistor.

sorry i meant to say NPN transistor

thanks for the article i've read through it and had ago at some of the equations. according to my math it should be working i just don't understand why its not.

transistor data sheet

Vs = 24V
RL = 606 ohms (i think, that's all the 6 Resistors on each 15cm strip) "101 ohms each"
Ic = 0.039

Maximum out put from IC from data sheet = 50mA

Vc = 24v :confused:

Vc = IC supply voltage (usually this is Vs but it will be different if the IC and load have separate supplies).

mine have separate supplits I think... so what is IC?

Ic(max) > 0.039

hFE = 24/3.5 = 6.85

hFE > 5 x 0.039/0.050

hFE > 3.9

RB = 0.2 x 606 x3.9

RB = 32.88? :confused:

or is it !

RB = (24 x 3.9)/(5 x 0.039)

RB = 480 ? :confused:

@Bigtimer, you do realise that while all this transistor stuff is interesting and educational, you won't need it when your tpic chips arrive?

yeah i understand that. i'm working on that circuit now, trying to figure it out. do you have a circuit in mind that i could copy possibly?

i'm using fritzing, never used it before

i'm using fritzing, never used it before

Never use it again. The results are useless unless you know how to drive it correctly and most people, and all beginners don't know how.

Just carry on with the pencil & paper. That last diagram was better. What you failed to do was to have positive at the top and negitave at the bottom. To anyone trying to read it, it looks upside down.

As to a base resistor you need to make the base current about one tenth of the collector current to ensure it turns on fully. This is called getting the transistor to saturate.

The integrated circuit in the middle however, is not how you draw things like that. Yes use a rectangle, but don't lay it out as if it were a physical chip. Draw the connections at a location on the box that makes the wiring as simple as possible and then label the pin number and the name of the pin. The object is to minimise the number of wires that cross each other.

The circuit from the Instructables page is not too bad as a place to start:


Corrections to that:

  • 0.1uF ceramic bypass caps for each chip (between 5V and ground, physically close to the chip)

  • Don't chain the grounds as shown, connect each ground pin directly to ground

  • You won't need the series resistors as they are already built-in to your strips.

  • The connections between the series resistors and the tpic pins have been drawn badly. It looks as though 4 led/resistor pairs are connected together and connected to 4 tpic pins. But in practice each resistor/led pair should be connected to a separate tpic pin. In your case, each strip is connected to a separate tpic pin.

  • You don't have to use the Arduino pins used above, you can use any you like and use the shiftOut() function. The advantage to using the pins shown is that the Arduiino's hardware SPI function can be used. But that's not really important for a 4-digit display which only needs updating once per second. If the display had 400 digits or needed to be updated 400 times per second, then using the hardware SPI would be a significant advantage.

  • If you do not need to dim the display, you can connect the OE pins directly to ground, saving an Arduino pin.

Ok guys, here we go.

I have changed the Circuit slightly to do what I think I need. does this look like it would work?

i have missed out a few things that i am unsure of

0.1uF ceramic bypass caps for each chip (between 5V and ground, physically close to the chip)

not really sure where i need to put it

If you do not need to dim the display, you can connect the OE pins directly to ground, saving an Arduino pin.

this will be connected to ground on the next drawing. i don't need to dim it for the moment

not really sure where i need to put it

You were told:-

between 5V and ground, physically close to the chip

What do you not understand about that?

i don't need to dim it for the moment

When you do need to dim then all LEDs will dim at the same rate, you do not have individual control over the brightness of the LEDs.

Your Circuit:-

You need capacitors on both sides of the regulator. User a 47uF and 0.1 uF ceramic in parallel on each side.

You need to connect all the grounds on the shift register chips.

A Mega is gross overkill for this. A Nano would be more practical.

Yes i know the Mega is a little overkill but it's all i have on hand at the moment.

I've amended the circuit dose this look right?

Now I just need help with the Code that will run this bad boy.

i'm looking to make just simple timer. counting down in minutes and seconds. I had it working with a multiplexed display. but now i've switched over to this shift register system i don't know how to change it

had it working with a multiplexed display. but now i've switched over to this shift register system i don't know how to change it

I think you already have the ingredients. You have the timer sketch for the multiplexed display, and you have that sketch from post #24 that uses shiftOut().

Have a go at updating your timer sketch to use shiftOut() and post the sketch if you get stuck. The resulting sketch should be simpler than before because it does not need to multiplex the display.

With the multiplexed display, the sketch has to send out data for the display 100+ times per second, one digit at a time, so that the whole display gets updated 25+ times per second so the eye does not see flickering.

With a non-multiplexed display, the sketch simply needs to send the data for all 4 digits out, just once, and only when the data has changed. With 4 chained tpic chips, your sketch will need 4 X shiftOut() before it triggers the latch pin.