Seattle, WA
Offline
Full Member
Karma: 1
Posts: 225
|
 |
« on: March 19, 2012, 10:51:52 pm » |
I am doing a multiplexing project, big 12 by 24 table with rgb leds. I need 50 outputs and was thinking about using the 74HC574, i even already made a protoboard with the circuit (i would love to provide pics, but, no camera) I am now having second thoughts. I saw the 4051 a while back on the playground and i think it would be a better solution. Now, the 6.3 million dollar question, which is better*?
*by better i mean ease of programming, circuit design, all that nonsense. (the other circuit i already built is an absolute monster and a bitch to debug, i was very meticulous about design and layout and not getting any shorts, tested as i went along and such, but still who knows?) Im just trying to make life simpler for myself as i dont think i am at the level of anything this complex.
Questions? Comments? thanks for your time!
|
|
|
|
« Last Edit: March 20, 2012, 12:56:40 am by Paranemertes »
|
Logged
|
"It's Dr. Evil. I didn't spend six years in Evil Medical School to be called 'mister,' thank you very much."
|
|
|
|
Global Moderator
Boston area, metrowest
Offline
Brattain Member
Karma: 248
Posts: 16535
Available for Design & Build services
|
 |
« Reply #1 on: March 20, 2012, 12:50:00 am » |
Just 50 outputs? Sounds light. Say you had 24 rows, with 12 RGB LEDs in each row (or equivalently, 36 standard LEDs) that would work out to 60 outputs. Or 12 rows, with 24 RGB LEDs ((or equivalently, 72 standard LEDs), that would work out to 84 outputs.
Neither one provides the current sink or source capability needed. With 24 rows and 36 LEDs drawing 20mA each, thats 720mA of current if each RGB LED was on. You're going to need discrete transistors. P-channel MOSFET for current source, and N-channel MOSFET for current sink. You could have 8 shift registers to drive them, a string of 3 for the 24 anodes and a string of 5 for the 36 cathodes. Use SPI.transfer on both for fast updates.
|
|
|
|
|
Logged
|
|
|
|
|
Manchester (England England)
Offline
Brattain Member
Karma: 277
Posts: 25506
Solder is electric glue
|
 |
« Reply #2 on: March 20, 2012, 03:51:09 am » |
Never ever, ever use a 4051 to drive LEDs, it is the wrong thing to do. It's multiplexing for no reason at all.
|
|
|
|
|
Logged
|
|
|
|
|
Seattle, WA
Offline
Full Member
Karma: 1
Posts: 225
|
 |
« Reply #3 on: March 20, 2012, 02:05:38 pm » |
sorry typo and math error on my part, 60 outputs, 36 for leds and 24 for grounding each column. you are correct CrossRoads. I was going to use a npn transistor like the 2222 for the grounding, but i am open if you think there is something better out there.
@Grumpy_Mike, could you possible elaborate on why one should NEVER use the 4051 to drive leds? Do you have another solution that is easy to program and would be good for a beginner/novice to work with?
|
|
|
|
|
Logged
|
"It's Dr. Evil. I didn't spend six years in Evil Medical School to be called 'mister,' thank you very much."
|
|
|
|
Global Moderator
Boston area, metrowest
Offline
Brattain Member
Karma: 248
Posts: 16535
Available for Design & Build services
|
 |
« Reply #4 on: March 20, 2012, 02:37:41 pm » |
I would go with 74AC574, can source 24mA to drive the anode, use 5 of them daisy chained, wrap Q0 output to Q1 input, 1 to 2,2 to 3, etc so it acts like a shift register for you. http://www.ti.com/lit/ds/symlink/sn74ac574.pdfThen a hefty enough transistor to sink 24 * 20mA of current (480mA) on the outputs of a shift register, or arduino pins assuming a bigger chip like '1284 or a '2560. http://www.fairchildsemi.com/ds/PN/PN2222A.pdf2N2222 needs lot of base current to pass 500mA of collector current IC = 500mA, IB = 50mA I'd find a better part, like an N-channel MOSFET, will also run cooler and last longer. Could also look into 3 high current shift registers such as tpic6b595 http://www.ti.com/lit/ds/symlink/tpic6b595.pdfif you can follow these limitations so you don't burn it up: Pulsed source-to-drain diode anode current (see Note 3) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 A Pulsed drain current, each output, all outputs on, ID, TC = 25°C (see Note 3) . . . . . . . . . . . . . . . . . . . 500 mA Continuous drain current, each output, all outputs on, ID, TC = 25°C . . . . . . . . . . . . . . . . . . . . . . . . . . . 150 mA Peak drain current single output, IDM,TC = 25°C (see Note 3) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 500 mA Note 3. Pulse duration ≤ 100 μs and duty cycle ≤ 2%.
|
|
|
|
|
Logged
|
|
|
|
|
Manchester (England England)
Offline
Brattain Member
Karma: 277
Posts: 25506
Solder is electric glue
|
 |
« Reply #5 on: March 20, 2012, 03:40:21 pm » |
I did say It's multiplexing for no reason at all. Only an electronic moron would do this. You require constant CPU cycles just to keep things lit. The on / off ratio makes the LEDs dimmer and the cross talk of the device is appalling. How many other reasons do you need? Just use shift registers.
|
|
|
|
|
Logged
|
|
|
|
|
Seattle, WA
Offline
Full Member
Karma: 1
Posts: 225
|
 |
« Reply #6 on: March 20, 2012, 04:12:57 pm » |
Well mr. not-enough-fiber I see your point, I think shift registers are a good alternative.
@CrossRoads, I looked at your website and what not, what's your opinion of shift registers? How would I hook up enough of these for my purpose, from my few minutes of research I am guessing I need 8 8 bit registers, 5 for driving the LEDs, then 3 for grounding. Would it take only 8 pins in the arduino to run this? Thanks for the help.
|
|
|
|
|
Logged
|
"It's Dr. Evil. I didn't spend six years in Evil Medical School to be called 'mister,' thank you very much."
|
|
|
|
Manchester (England England)
Offline
Brattain Member
Karma: 277
Posts: 25506
Solder is electric glue
|
 |
« Reply #7 on: March 20, 2012, 04:21:50 pm » |
You only need three arduino pins no matter how many shift registers you use. They are simply chained together with the output of one going into the input of the next.
|
|
|
|
|
Logged
|
|
|
|
|
Seattle, WA
Offline
Full Member
Karma: 1
Posts: 225
|
 |
« Reply #8 on: March 20, 2012, 06:13:13 pm » |
Interesting, do you have a diagram of something like this?
|
|
|
|
|
Logged
|
"It's Dr. Evil. I didn't spend six years in Evil Medical School to be called 'mister,' thank you very much."
|
|
|
|
29445
Offline
Newbie
Karma: 0
Posts: 9
|
 |
« Reply #9 on: March 20, 2012, 07:27:17 pm » |
I want to move to Seattle... if single.
Would be nice to see a simple how to on shift registers...
|
|
|
|
|
Logged
|
Jj
|
|
|
|
|
|
Global Moderator
Boston area, metrowest
Offline
Brattain Member
Karma: 248
Posts: 16535
Available for Design & Build services
|
 |
« Reply #11 on: March 20, 2012, 11:11:14 pm » |
Here's the start of the matrix. The anodes would be driven by a '574 wired as I discussed, the cathode by transistors. This diagram used '374s (had them on hand) and the SPI pins to drive them.
|
|
|
|
|
Logged
|
|
|
|
|
ਪੰਜਾਬ
Offline
Edison Member
Karma: 4
Posts: 1224
WANTED! A Girl with LOVE for me and Arduino!
|
 |
« Reply #12 on: March 20, 2012, 11:16:30 pm » |
What MM of LED are you using?
|
|
|
|
|
Logged
|
"Real Men can Accomplish Anything" - Website - skype : nishants5 ਫ਼ਤੇਹ ਕਰੂਂ !
|
|
|
|
Seattle, WA
Offline
Full Member
Karma: 1
Posts: 225
|
 |
« Reply #13 on: March 21, 2012, 02:22:50 am » |
@NI$HANT, they are 5mm rgb common ground LEDs.
@CrossRoads, those pics are helpful, never would have thought to use a flip flop like that. What are your thoughts on the 595 for my purposes?
|
|
|
|
|
Logged
|
"It's Dr. Evil. I didn't spend six years in Evil Medical School to be called 'mister,' thank you very much."
|
|
|
|
Global Moderator
Boston area, metrowest
Offline
Brattain Member
Karma: 248
Posts: 16535
Available for Design & Build services
|
 |
« Reply #14 on: March 21, 2012, 11:11:29 am » |
My thoughts are: they are rated as 6mA output. LEDs typically require a current of 20mA to achieve rated brightness. Use a part that is rated to provide 20mA, vs one that has a protection circuit that may allow 20mA. 74AC574 will do that that.
|
|
|
|
|
Logged
|
|
|
|
|
|