Go Down

Topic: Pull downs, transistors and LED's (Read 1 time) previous topic - next topic

pYro_65

Jun 07, 2012, 02:39 pm Last Edit: Mar 08, 2013, 05:48 am by pYro_65 Reason: 1
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: http://www.rason.org/Projects/transwit/transwit.htm
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.


CrossRoads

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.
Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Docedison

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

--> WA7EMS <--
"The solution of every problem is another problem." -Johann Wolfgang von Goethe
I do answer technical questions PM'd to me with whatever is in my clipboard

Docedison

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
--> WA7EMS <--
"The solution of every problem is another problem." -Johann Wolfgang von Goethe
I do answer technical questions PM'd to me with whatever is in my clipboard

pYro_65

#4
Jun 08, 2012, 01:53 pm Last Edit: Mar 08, 2013, 05:50 am by pYro_65 Reason: 1
Thanks guys for some input.

Quote
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.

Quote
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?

Quote
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?


Go Up