Pull downs, transistors and LED's

Hi all,
I have recently been working on a small project involving RGB LED's and multiplexing.
It is based on two videos I found on youtube:

How to multiplex with LEDs
How to Multiplex/ Part II

I have made some changes and additions to the design, but I'm not completly sure it is correct. I intend to drive it using SPI so I have used two 74HC595N shift registers to essentially control the multiplex. I have a few queries about the pull up/down resistors:

I want the system to be disabled till I'm ready so I have pulled up the OE pin to disable the register outputs. On the anode multiplex of 2n3904 transistors I have a 10K pulling the bases LOW,

when the register is active and outputing a high, will the connection go through the 100K transistor base or to the 10K pull down?

I'm pretty sure the pull down resistors need to be something like 200K or 1M, I just didn't notice this until I did up the schematic.

And the same question for the cathodes, just inverted.

My other concern involves the base resistors on the anode transistors: Will the current limiting resistors on the LED's further limit the current set by the base resistors causing a voltage drop too low?

Or do the base reisitors only set a maximum current flow, and if so, do I actually need the limiting resistors, or inversly keep the limiting resistors and remove the base resistors?

I used this page to work out the base resistors: SECARS Homepage - SECARS
Hopefully my calculations were correct, It worked out near 96k, so I used 100k resistors that I had handy.
I also replaced the videos NPN transistors on the cathodes with PNP using this page.

And to get 20mA at the LED's I calculated my current limiting resistors using 5v. Is this correct or do I need to use resistors for 3.3v supply?

My LED info:
Common cathode
Forward Voltage ( @ 20mA )
R = 2.1v
G = 3.0v
B = 3.0v

I calculated:
R = 145 Ohms ( using 150 )
G & B = 100 Ohms

Any advice would be greatly appreciated, the LED's were mildly expensive so I'm quite reluctant to turn it on without some input from a knowledgeable few.

Your connections don't make sense to me.
You need to drive the anodes High and the cathodes Low to turn on an LED.
You transistors don't appear to be set to do that.
I would think you'd have PNPs controlling current from +5 into the anodes, and NPN's sinking current to ground for the cathodes.
You have 6 RGB common cathode LEDs?
From the shift register, connect 3 current limit resistors to all the Rs connected in parallel, same for the Bs, same for the Gs.
From the shift register, connect 6 base current limit resistors to 6 NPN transistors. Connec the emitters to ground. Connect 1 collector to each of the LEDs.
Drive the anodes high/low as desired, drive 1 cathode low. drive same cathode high.
Repeat for the next 5.
Do it quickly for flicker free operation.

The pull-down is common to all the transistors for a given type of driver... it is likely very ok but I question the 100K resistor as the resistor would limit the base current (remember transistors are current operated devices) to 50uA Ib X Beta ~ 80 @ 20 ma Ic would only allow 4 ma of collector current to flow (.00005A X Hfe = 80@ 20 ma Ic = .004 A (assuming a 5V drive signal) 10K would be a more representative value for a 50 - 60 mA max current. base resistors of that size will pretty much eliminate any possible damage to the LED's but would make the display rather dim according to the math involved. The 80 figure for Beta or Hfe comes from an interpolation from the Fairchild data sheet and is typical of the device family regardless of MFR.

Doc

Actually it is some more crappy engineering as the High side transistors are emitter followers and they as a class have one issue , the emitter voltage MUST be .6 - .7 volts below the base voltage in order to turn the transistor on. So 5V (base) = 4.3 - 4.4 V emitter). The only really useful part of that 'scheme'... is that it needs positive logic through out to make it work. Nothing needs to be inverted.

Doc

Thanks guys for some input.

You have 6 RGB common cathode LEDs?

No, sorry. I left that information out accidentally.
I have 72 RGB LED's connected in a 6x12 grid giving 18 anode pins and 12 cathode pins.

Your connections don't make sense to me.
You need to drive the anodes High and the cathodes Low to turn on an LED.
You transistors don't appear to be set to do that.

My intention was to use HIGH for the anodes and LOW for the cathodes. And it appears I have placed my 2n3904 transistors backwards, now the emitters go to the anodes.

Was this what you where pointing out?

I would think you'd have PNPs controlling current from +5 into the anodes, and NPN's sinking current to ground for the cathodes.

Is this a better combination for say: NPN vs PNP performance, or more for a different active logic?

I found this comment on the youtube remarks: "for the Anode transistors...don't need base resistors (emitter follows the base just 0.6V lower)."

Is this correct? From what I have read it seems a base resistor is required.

I have also recalculated the base resistors at 37869 so I put in 40K, I am still unsure about the 10K pull up/down resistors and weather they must be more than the 40K base resistor.

Are there any guidelines for using pull up/down resistors?

I'd say you need to get the right tools for the task, in this case the right chips.
I'd suggest a uC with more IO, and a current sink chip that will be way less tedious to wire up than all those transistors.

I'd go with a chip in the 40 pin '1284 series, with 32 usable IO pins. Keep D0, D1 free for messages from a PC, or sketch downloading, or use as input switches.
Wire your anodes in parallel as columns, and wire the cathodes in parallel as rows.
Store your pattern to display in an 18x12 array.
(1284 has 16K SRAM too, can store several)
Write a simple loop to multiplex thru the LED array:

void loop(){
if ( millis() - next_udpate) >=on_duration){
next_udpate = next_update + on_duration;
turn off current cathode
next_row = next_row+1;
if next row == 12, next row = 0;  //reset back to top
read next array row, write the anodes, drive next cathode low
}
and while waiting for next refresh time to occur, can be checking for serial message, change the array, read buttons, etc
}

Make sense?

Hi CrossRoads,

My initial non rgb prototype was done on a mega, but in an effort to understand EE concepts more than my current level I set my self a challenge. I also have little need for ram as the patterns I wish to display can be generated quickly at run time. However as I add more peripherals I many need more ram to work with, and my mega is still an option. But for now I would like to stick with some variation of my original design. Next year I hopefully can get into a uni course, and I would like to have a bit of practical experience under my belt.

And at the moment the led grid is only half the size I intend to work with. I might also put an order in for a 1284 just to check it out.

Knock off Chinese 2560's are about $20.00 - $25.00 now... on Ebay. The ones with 8U USB devices... Just a thought. mine was a freebie from a friend there, even says Arduino on it, that's why it was a freebie. Name copyright violation. Seems to work ok, once everyone here held my hand so's I could get it working (USB Driver issues and my stupidity. For as long as I have been working with PC's I should not have been fooled that way). Bought a $15.00 Uno for the same reason... They (Ebay pulled it) Right after mine was shipped, Go Figure.

Doc

Ok, fine, you want a challenge, I can accept that.
You still need to wire up things correctly so current can flow.
I think you need something like this, and then have your 2nd layer of transistors controlling the multiplexing of the transistors.
Low turns on the PNP transistors, High turns on the NPN transistors.

The end result would be something like this where transistors controlled the muxing of a 5x5x5 cube.
You are changing the control with the addition of the PNP transistors.