Pages: [1] 2   Go Down
Author Topic: First Matrix Project wiring check & led choice?  (Read 2358 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Edison Member
*
Karma: 7
Posts: 1229
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi, I 'think' I am at the stage where I need to focus/order the leds for my project.

I am basically mod'ing a toy/prop..

it needed/needs a very close together led strip, where each led is addressable.
I searched around, and nothing was really cost effective, but more to the point nothing retail I found had the leds 'close' together.

So I decided I would read up on the matrix wiring, and use if for an 'led strip' (which is more of less what this will be....bent into a circle is probably more accurate..but anyways)  =)

upon reading and talking to the members here... I decided on using a couple MAX7221 chips, because they independently drive/control up to 64 individual leds.

so I got 2 of these chips.. (its going to be a long led 'strip'.. most likely the full 128 leds.


here is a quick image/diagram of the matrix wiring I'll be doing.. (the FULL image wont show as much..but wanted to make sure its all right)


Link because its a big image:
http://dmstudios.net/misc/matrix_wiring.jpg



I have a few questions..

here is my 'full' diagram (again not all leds are shown as it would be crazy long image)

http://dmstudios.net/misc/project_matrix_wiring.jpg

I plan on using 7.4v li-ion battery set-up..

*do I need use a resistor before going to each MAX chip? or a 5v regulator?


*when using more than 1 MAX chip (daisy chaining).. do the 'other' MAX chips needs caps attached as close to the chip as poss. like the initial/first MAX chip?


*LED choice..

I wanted to use 5050 leds (one color)..  it looks as if all 5050 leds have 6 leads? 3 for ground and 3 for positive (I think each 5050 led has 3 smd leds under the same dome)..

I like these 5050 leds as I can align and position them easier do to the size/package/housing...etc.
I could just bridge all 3 positive leads.. but still I read these leds need 60mA to be driven?

Which leads me to my question(s) on picking leds, and driving them correctly....

my goal is bright an tightly packed leds to make a nice seamless looking led strip (that can be animated)



(Yes I know my diagram does NOT have the second MAX7221 chip connected properly.. I just need to tap the 3 data line (Din Clk Load) and GND line..)


using 5050 RGB's would be nice.but I think its a bit over my head at this point... =)





Logged


Colorado
Offline Offline
Edison Member
*
Karma: 47
Posts: 1562
Reviving dead brain cells with Arduinos.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

While your approach is just fine, you could've also gone with the 5050RGB LEDs and paired with with a WS2801 (each).  The reason I like this particular IC is that I can have any length of chain that I want.  I'm not restricted to having a specific number because the IC is mandating that (though one can always connect less LEDs than the IC provides, but that's just a waste.)

So, take a bunch of 5050RGB LEDs, same amount of WS2801s, resistors, caps, and you can make your string as long as you want.  You need 2 wires from the uController, plus VCC and GND.  Run it through FastSPI and you're done.  Kinda like this, but as one single string:
Logged

0
Offline Offline
Edison Member
*
Karma: 7
Posts: 1229
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for the reply.

I am new to all this.. just a hobby guy/geek who likes to make fun stuff once in a while. (tinker)

I am not familiar with the WS2801...  but if I need one for every 5050 I use..  that would be 120+ of the WS2801's then...

I'd like to stick with what I posted, being this is my first.. and see it through to the end.

(theres actually another step including another MAX7221 (making 3 total) that I'd like to do after I get this set-up... but will be for a smaller 'string'.)



Anybody help 'coach' me on the how to 'power' these the best way? since there will be 120-128 leds on this 'string' total??
I read only 8 leds can be on at any given time (per MAX7221 chip).. but it multiplexing (switches leds on/off) so fast you dont see/tell a difference when all 128 leds are supposed to be lit up in the code....   correct?


if I go with regular SMD led of say 1206 or 1210 package..  with 3.0v - 3.3v vF and needs 20mA,  how do I calculate power & the iSet resistor (20mA x 8 total leds on at any given time? = 160mA ?)

what if I go with the 5050's?  thats 60mA per 5050 led (with all 3 positives soldered together/bridged)  60mA x 8 leds on at any given time = 480mA..  so calculate on that value?

what about if I only have 1 led on though?.. I mean the led strip will be animated with whatever sequence once can think of?   If I use an iSet resistor based on 8 leds on at any given time (which could happen.. hell 128 (all) on at most of the time).. but switch to where one led is on at a time.. will the led not be as bright then?



** also... I havent started with code yet...  but had planned on reading up on the shiftOut lib/tut....  but also read about the shiftPWM lib/tut as well...

in my current set-up above (or planned set-up)..  will I be able to PWM each led as well? or do I need extra hardware in 'addition' to what is above?

or does my current set-up above only allow for on/off type functionality for each, individually, addressable led?

(or is hardware of no concern.. its all handled in software/code for PWM stuff on this?)



thanks


« Last Edit: January 05, 2012, 09:05:31 pm by xl97 » Logged


Colorado
Offline Offline
Edison Member
*
Karma: 47
Posts: 1562
Reviving dead brain cells with Arduinos.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Correct, if you are driving 128 LEDs, then you'd need 128 WS2801 ICs as well.  I make them one piece, about 15mm x 11mm with the LED on one side, and the IC on the other side of the PCB.  Both items are fairly cheap, IF you get them from either the manufacturer or large distributor.  I get them for 12 cents on the RGB Led and 15 cents for the IC.  The three resistors are 2 cents a piece, the one cap is 4 cents.  So far you're looking at 37 cents.  Just need the PCB.

But, let's talk about what you want to do with your components since you are more comfortable with that.  There's no need to impose something different on you here. smiley

You need to regulate the voltage going into each MAX7221.  Typical voltage is 5V.  So get a 5V regulator and feed the output into both ICs.

All ICs need decoupling caps as close as possible to the IC itself.  So you can't put them all together in one area and the ICs in a different area, the cap goes with the IC.

Also, your diagram shows one single resistor supplying both IRef pins ... you need one resistor for each IC.

As for the LEDs ... if you can get white 5050s, then go for it.  I don't have a datasheet for a single color one so I couldn't tell you what pads they have.  However, if they're anything like the Cree ones that Mouser carries, then they are 3x3 connections (3 cathodes for 3 anodes.)  You can power one, two, or all three at the same time.  So if you want to connect all cathodes and anodes together, I suppose you could do that.  Add the current requirement for each channel up to come up with the total consumption for the LED you're using.  Cree LEDs take 3x 50mA so that's 150mA total.  Looks like the MAX7221 can sink 330mA TOTAL, so 330/8 = 41.25mA per pin.  So you'll have to look for something else that is around 40mA.  I'm sure there are other LED options that you can find.  If you find something in the 30mA range that's good enough.

Personally, if I was going to use something like the 5050 series, I would go for RGB ones and give myself the ability to play with colors as well.  But, that's a personal choice.

In your full schematic, you need to take the DOUT pin from one and connect it to the DIN pin on the other, and you need to connect the CLK pins together.  This is how you can daisy chain data from one to the other.

To calculate Iset, refer to table 11 on page 11.  If your LED forward voltage is 3.0, and you plan on driving it to 40mA, Iset needs to be 10.6 Ohms (or a value no smaller than that.)  Remember, that's per pin on the MAX7221.  If your LED requires more, you'll have to drive it different, like the example on page 12 which allows you to drive your LED at higher than 40mA currents.

And lastly, you asked about PWM.  I've never done it on anything but a TLC5940 or WS2801 - in fact, the WS2801 is specifically designed for that as it provides a PWM signal to the output channels.  So I can't give you an answer on that one.
Logged

0
Offline Offline
Edison Member
*
Karma: 7
Posts: 1229
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

hi-

I wanted to double check the datasheet on the MAX7221 chips..

to find out the TOTAL mA it outputs and the max mA it can do per pin..

http://pdfserv.maxim-ic.com/en/ds/MAX7219-MAX7221.pdf

is this what I am supposed to be looking for/at?

Current
DIG 0–DIG 7 Sink Current..............................................500mA
SEG A–G, DP Source Current........................................100mA


I saw these lines to:

Code:
PARAMETER                             SYMBOL         MIN            TYP         MAX         UNITS
Digit Drive Sink Current              IDIGIT         320                                     mA
Segment Drive Source Current          ISEG           -30           -40         -45           mA

Im a bit confused on what/how to read these.. and how to interpret it all for my project.

I suppose I could only use 2 of the 3 leads/legs on the 5050's? seems like a bit more work.. but I just keep going back to thinking the 5050 led 'package' fits best for this project.


thanks and noted:

1.) each MAX7221 chip needs a iSET resistor  (makes sense, like if you wanted 1 chip to do blue/greens and another to do reds..etc)
2.) each chip needs its OWN set of caps as close to it as possible.
3.) the Dout of main/previous MAX chip goes to Din of the next MAX chip
4.) remaining data lines need to be tapped too (Clk, Load..etc)
anything else I am missing?

would just bridging 2 of the 3 leds be OK to do?  will it pull the 40mA it needs that way by bridging them?
(sorry powering and driving tis correctly has always been a slow going learning curve for me)


remaining questions, are still:


A.) finding an LED to fit this.. or having someone convince me to stop being a sissy nd just use the 5050 led's but only use 2 of the leds and not all 3

B.) still un-clear on the PWM side of this...  so if anybody DOES have any experience with this, chime in please. smiley

C.) to be clear (again) I calculate the iSET resistor based on 1 led specs..not a section/total of 8?..right?
(a bit confused on when it says it can have up to 8 leds on at any given time.. and the multiplexing that makes it look like leds are on..when they are in fact only blinking/.witching very fast)...

**out of 128 leds.. I might have them ALL on..or maybe just 1.. depending on the animation/code. still just do iSet resistor based on the specs of 1 led right?


thanks!   appreciate the feedback...  


ps.  that video/project you made is SWEET!..  very cool project!
« Last Edit: January 09, 2012, 06:02:06 pm by xl97 » Logged


Colorado
Offline Offline
Edison Member
*
Karma: 47
Posts: 1562
Reviving dead brain cells with Arduinos.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

http://pdfserv.maxim-ic.com/en/ds/MAX7219-MAX7221.pdf

is this what I am supposed to be looking for/at?

Current
DIG 0–DIG 7 Sink Current..............................................500mA
SEG A–G, DP Source Current........................................100mA
No.  Those are the absolute maximum the IC can handle.  That's not the recommended, nor should it be used as the measuring stick.  You do that and the IC will blow before you know it.

I saw these lines to:
Code:
PARAMETER                             SYMBOL         MIN            TYP         MAX         UNITS
Digit Drive Sink Current              IDIGIT         320                                     mA
Segment Drive Source Current          ISEG           -30           -40         -45           mA
That's what you're after.  Not sure why there isn't any data in the typical or max columns but you want to stay within 320mA and the upper limit, which as you found out was 500mA.  Personally I would stay within 350-450mA, ideally just around 400mA.  At 8 segments, that's 50mA per segment, well above what most digit panels will do.

I suppose I could only use 2 of the 3 leads/legs on the 5050's? seems like a bit more work.. but I just keep going back to thinking the 5050 led 'package' fits best for this project.
You could always only use 2 out of 3, or even just one.  It just means you won't get as much light out of them, only 1/3 or 2/3 the max the LED can provide.

1.) each MAX7221 chip needs a iSET resistor  (makes sense, like if you wanted 1 chip to do blue/greens and another to do reds..etc)
2.) each chip needs its OWN set of caps as close to it as possible.
3.) the Dout of main/previous MAX chip goes to Din of the next MAX chip
4.) remaining data lines need to be tapped too (Clk, Load..etc)
anything else I am missing?
Yeah, you need pull-ups at the end of the line.  Meaning, your last IC in the chain needs to have its CLK and DATA lines pulled up to avoid reflections.

would just bridging 2 of the 3 leds be OK to do?  will it pull the 40mA it needs that way by bridging them?
(sorry powering and driving tis correctly has always been a slow going learning curve for me)
Think about that for a minute.  If you bridge the two legs, that one LED will be pulling 40mA.  Multiply that by the amount of LEDs per IC.  If you don't bridge the legs, you'll be using two pins on the IC per LED, so you can only connect 4 of them to the IC.  That's 4 LEDS x 2 legs x 20mA ...

A.) finding an LED to fit this.. or having someone convince me to stop being a sissy nd just use the 5050 led's but only use 2 of the leds and not all 3
There are single leg white LEDs, you just have to find something that works for you.

B.) still un-clear on the PWM side of this...  so if anybody DOES have any experience with this, chime in please. smiley
Someone else chime in please.

C.) to be clear (again) I calculate the iSET resistor based on 1 led specs..not a section/total of 8?..right?
You calculate Iset based on one single output.  So if the LED pulls 20mA, then that's what you're computing.  HOWEVER, if you plan on bridging the legs of a 5050 like you mentioned above, then you need to account for the current capacity when you do that since you essentially have 2 LEDs on one output pin.

(a bit confused on when it says it can have up to 8 leds on at any given time.. and the multiplexing that makes it look like leds are on..when they are in fact only blinking/.witching very fast)...
If you put your finger on a hot plate (that's on), how long do you think you can hold it there?  Now, if you tap the hot plate really fast with your finger, how long do you think you can keep doing that?

It's the same thing.  If you turn on an LED, you start drawing current, and the part starts to heat up.  Now, if you flash the LED, not only are you not constantly drawing current and heating up the part, but you're also giving it a chance to cool down when the LED is off, even if it's for a millisecond.  The thing is, our eyes can't keep up.  Try it for yourself.  Write a sketch that blinks an LED, and start at 1 millisecond on, 1 millisecond off.  Can you tell when it's on and when it's off?  How about 2 millisecond on, 2 millisecond off.  How about 5?  And 10?  At some point you will notice it, but it won't be anywhere near how fast one could flash an LED without you noticing it.  So PWM takes advantage of that to keep both the LED as well as the driver cool and not drawing a constant current.

Now, think back to where you saw the 500mA current draw on the MAX.  That's peak current, NOT constant current.  That means, for a very brief moment, you can pulse 500mA out of the thing without any (minimal) damage.  Is it recommended?  No because you start to diminish the part's useful life.  So with PWM, you could potentially peak it at 500mA ... it's just not recommended.

**out of 128 leds.. I might have them ALL on..or maybe just 1.. depending on the animation/code. still just do iSet resistor based on the specs of 1 led right?
Iset gets calculated based on the max current load you'll be putting on a single leg, yes.  And you best be pulling the same amount out of all of them too.

By the way, it's Iset, not iSet ... (it's not an Apple device. smiley )  I = current
Logged

Colorado
Offline Offline
Edison Member
*
Karma: 47
Posts: 1562
Reviving dead brain cells with Arduinos.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Oh, and the window "curtain" of LEDs I made, they're individually driven by a single WS2801 on each LED.  No shifters were harmed in that process.  Each "pixel" is 15mm x 11mm and has the WS2801 on one side, and a 5050RGB LED equivalent on the other side (they're actually Cree RGB LEDs, which I prefer.)  Each string is driven through SPI, which meant only 2 pins from an Arduino clone, Serial Data and Serial Clock ... VCC/GND were provided externally.
Logged

0
Offline Offline
Edison Member
*
Karma: 7
Posts: 1229
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

ok.. here is my (next?) dumb question.


When looking at how much (total) mA I can get out of the MAX7221 chip..


I look here (again)

Code:
PARAMETER                             SYMBOL         MIN            TYP         MAX         UNITS
Digit Drive Sink Current              IDIGIT         320                                     mA
Segment Drive Source Current          ISEG           -30           -40         -45           mA


I know you said youre not sure why the TYP and MAX fields are empty..

but we know that MAX = 500mA... correct?

and as we discussed, I want to stay around 350-450 or so...

my question, being the noob I am, is 'how' does one control this?

Im thinking if I could squeeze a bit more otu of the chip.. and stay at around 450-460+ mA (or so ).....

I could give the 5050 led's  around 56.25 - 57.50 mA each.. which is darn close to the to 60mA it says on the datasheet each 5050 led wants.

But Im unclear on what directly relates to keeping the MAX7221 chip giving out 450+mA vs the min 320mA or whatever..or even getting the to the MAX of 500mA?? (I know were not supposed to go that high though.. just saying how do you 'control' the total mA output of the MAX7221 chip?)

if I can stay around 450mA..  and use an Iset resistor that give each led around 19ma x 3 leds = 57mA

plan to do:

bridge all 3 GND's on the 5050 led together.. same with all the positive leads..,
use an Iset resistor of about 26k or so (something to get me a bit under the 20mA of what a 24k resistor will do)

and the rest is as you have helped me outline above.
 
smiley

Any problems with my current strategy/approach then?  (still not sure about the how to maintain higher than the 320mA min the chip outputs.. or will the leds just draw what they need automatically?.. up to the max current provided?..just need to plan out that we wont grab/draw any more than 500mA on our own?)


thanks  (off to order those white, 5050 leds now)






Logged


Colorado
Offline Offline
Edison Member
*
Karma: 47
Posts: 1562
Reviving dead brain cells with Arduinos.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

ok.. here is my (next?) dumb question.
There are no dumb question, just dumb people who don't ask questions. smiley

When looking at how much (total) mA I can get out of the MAX7221 chip..
I look here (again)

Code:
PARAMETER                             SYMBOL         MIN            TYP         MAX         UNITS
Digit Drive Sink Current              IDIGIT         320                                     mA
Segment Drive Source Current          ISEG           -30           -40         -45           mA

but we know that MAX = 500mA... correct?
The max and absolute max on any IC are two different things.  The 500mA is absolute max, meaning it can hold a very short burst of that, but then will likely fail fantastically.   So you you want to stay below that.  The higher the current you're pulling, the hotter things get, and the shorter the life expectancy gets.  Keeps things low and cool, and you'll get to enjoy it for quite some time.  So up and around 350mA to 450mA should be your window.


and as we discussed, I want to stay around 350-450 or so...
my question, being the noob I am, is 'how' does one control this?
With the Iset resistor.  Remember the Iset controls the output for each pin on the MAX, so if you have it to provide 40mA per pin, multiply that by 8 pins, and you get 320mA total current that the MAX would be handling should you decide to turn all 8 pins on at 100% duty cycle (meaning it's on all the time, no PWM, no flickering, nothing.)  If you calculate Iset for say 50mA per pin, that's 400mA total.  At 60mA, you're starting to hit the upper limit of the MAX IC at 480mA ... consider the current rush that happens when you first turn things on, or when you first flash all the LEDS at once (NOT PWM) ... you need to leave yourself some overhead.

Im thinking if I could squeeze a bit more otu of the chip.. and stay at around 450-460+ mA (or so ).....
I could give the 5050 led's  around 56.25 - 57.50 mA each.. which is darn close to the to 60mA it says on the datasheet each 5050 led wants.
This is certainly doable.  Personally I would breadboard it first, and run it for a good week or so, at full capacity that you would be running them in the end.  If it survives the first 12 hours and things aren't hot, keep it going.  After 24 hours, swap out two LEDs and compare their brightness with the other 6.  If they're the same, keep it running.  After 48 hours, swap out the MAX itself, and see if the brightness on the LEDs has changed.  If it does, then you know you're slowly frying the MAX and you need to lower the current consumption.  If you don't notice a difference, then let it burn in for the remainder of the week.

But Im unclear on what directly relates to keeping the MAX7221 chip giving out 450+mA vs the min 320mA or whatever..or even getting the to the MAX of 500mA?? (I know were not supposed to go that high though.. just saying how do you 'control' the total mA output of the MAX7221 chip?)
That Iset resistor is your friend (or fiend) ...

plan to do:
bridge all 3 GND's on the 5050 led together.. same with all the positive leads..,
use an Iset resistor of about 26k or so (something to get me a bit under the 20mA of what a 24k resistor will do)
No, if you're bridging the LEDs pins, you're also multiplying the amount of current needed.  Each channel on the LED requires 20mA, so if you bridge all three, that's 20mA x 3 = 60mA.  If you connect this to a single pin on the MAX, you'll be pulling 60mA (or thereabouts) from that single pin.  Your Iset resistor needs to be calculated for that, not the 20mA which is a single, UNBRIDGED channel.

Any problems with my current strategy/approach then?  (still not sure about the how to maintain higher than the 320mA min the chip outputs.. or will the leds just draw what they need automatically?.. up to the max current provided?..just need to plan out that we wont grab/draw any more than 500mA on our own?)
Now you're getting it.  They will draw what they need, up to whatever you specify.

thanks  (off to order those white, 5050 leds now)
Yup.  I just received my order of 5050RGB LEDs yesterday, 5 reels worth (1,000 each) ...  This is going to be fun. smiley
Logged

0
Offline Offline
Edison Member
*
Karma: 7
Posts: 1229
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

wow! 5000!  lol.. I ordered 50 RGB's to go along with the 150 whites I got. haha

thanks for clarifying lots of that for me. smiley

I think I am confused again though..hahaha

my bridged approach.

as you mentioned I would need to calculate that based on '60mA' ( or close...54mA is what I was shooting for to be exact)

I want one 5050 led to be treated as one whole 'led' (meaning all GND's bridged and all POS's bridged)

heres where Im confusing myself again.. smiley-razz

I was under the impression that I could only draw 40mA typ / 45mA max per pin..
based on...im not sure where I picked that up, ...the Iset chart only going to 40mA..and this:

Segment Drive Source Current ISEG -30 -40 -45 mA

from the datasheet.

so,... can I even pull 54mA out? for that 1, bridged 5050 led for the 3 smd leds under the dome to split/share?...or am I back to only bridging 2 of the 3? and basing the Iset off 40mA?.. or can I really pull 54+mA out of each pin? totaling 432mA (which is under the TOTAL 'max' limit)   Im thinking I cant? or why is the MAX Iset source current say -45mA?    smiley-evil smiley-eek

what is this line telling me (from datasheet)
SEG A–G, DP Source Current........................................100mA

(I enjoy coding much more than hardware!)  haha smiley-grin
Logged


Colorado
Offline Offline
Edison Member
*
Karma: 47
Posts: 1562
Reviving dead brain cells with Arduinos.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

as you mentioned I would need to calculate that based on '60mA' ( or close...54mA is what I was shooting for to be exact)
I want one 5050 led to be treated as one whole 'led' (meaning all GND's bridged and all POS's bridged)

heres where Im confusing myself again.. smiley-razz

I was under the impression that I could only draw 40mA typ / 45mA max per pin..
based on...im not sure where I picked that up, ...the Iset chart only going to 40mA..and this:

Hrm, need to rethink for a second here, what I said earlier isn't entirely correct ... I missed the scanning that the MAX does.  Think of an actual digit display, 7 segments plus a period (SEG-A through G, plus SEG-DP).  The MAX has the 8 SEGMENT pins, and it has 8 DIGIT pins.  This means, you can drive up to 8 digits displays with it.

So, in the Electrical Characteristics of the datasheet, these two go hand in hand:
Code:
Digit Drive Sink Current     | I-digit |       320 mA       |
Segment Drive Source Current | I-SEG   | -30 | -40 | -45 mA |
Since there are 7 segments + a period per digit, 8 x 40mA = 320mA.  It also says this configuration requires Iset to be 9.53KOhms.

So you're right, you can only pull about 40mA for each segment pin (nominally) which would total to 320mA per digit pin.  You can certainly push it to 45mA (and recalculate Iset for that), you'll just enter the "we won't guarantee proper function or longevity" territory at that point.

So for the LEDs, if you want to drive them at full 20mA per channel, then you're only going to be able to drive two of them.  Or, you can settle for 13.33 per channel.  With all three lit, you may be surprised at how bright it is.  (Or, again, push to 45mA, or 15mA per LED channel.)

Now, those calculations are done for ONE DIGIT pin ...  The MAX will scan through all 8 DIGIT pins and turn them on-off in rapid succession so you'll never notice it (unless your eyes can see 800Hz flicker ... most people "lose" it after about 72Hz).  So, it's total amount of current won't ever go much higher than what a single digit (all 8 segments) will pull.  There's a small amount of overhead needed, about 10mA ...but that's not part of the calculations you need to make.  However, it is a number you need to keep in mind, the Operational Current, which the datasheet says is 330mA.  So whatever regulator you end up using must provide AT LEAST 330mA.  This means you won't be pulling VCC directly from an Arduino's 5V pin ... you'll kill it.  You need to provide it separately.  If you have 5V RAW input, split it, one side goes to the Arduino, and the other side to power the MAX IC.  Link GND together.  Then only pull the signal lines from the Arduino to the MAX IC.

So basically you're going to take 8 LEDs, and connect their anodes on the segment pins, one per pin, then you're going to connect all the cathodes together on ONE digit pin.  The digit pin sinks current, the segment pin sources it.  This is now your first group of LEDs.  The next group gets wired to the segment pins again, and all cathodes wired together on to the next DIGIT pin.  This is now group 2.  So you will end up with 8 groups, one per DIGIT pin.  Within each group, there are 8 LEDs wired individually to each SEGMENT pin.  (when I say individually, I'm referring to the LED as one unit, whether you're bridging all three channels, or just two, or just one, it's one unit.)

8 groups of 8 LEDs each = 64 LEDs per MAX IC.

Does that make more sense?  My apologies for screwing up earlier, I didn't spend a whole lot of time reading the full datasheet.  But the numbers are correct, on a per digit pin, and segment pin since the thing scans through the digit pins.  For some reason I thought it was lighting all digit pins up simultaneously ... it doesn't.  You just won't ever notice it.
Logged

Colorado
Offline Offline
Edison Member
*
Karma: 47
Posts: 1562
Reviving dead brain cells with Arduinos.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Basically you're looking at the following wiring scheme.  Since we can't upload anything to the server, I have to link it externally: http://www.thekirchners.net/matrix.png

This is assuming your bridging all three channels on each LED.  For each COLUMN, all the LEDs anodes go to a single segment pin, and for each ROW, all the LEDs cathodes go to one digit pin.  The 9.53k resistor is assuming 40mA (total) per LED (as per datasheet, I didn't calculate this.)
Logged

Colorado
Offline Offline
Edison Member
*
Karma: 47
Posts: 1562
Reviving dead brain cells with Arduinos.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

By the way, the only "PWM" function on the MAX72xx is it's brightness control:
Quote
Digital control of display brightness is provided by an internal pulse-width modulator, which is controlled by the lower nibble of the intensity register. The modulator scales the average segment current in 16 steps from a maximum of 31/32 down to 1/32 of the peak current set by RSET (15/16 to 1/16 on MAX7221).
RSET is the resistor that goes on the ISET pin.  So you get 32 (or 16) steps of intensity, but it doesn't completely turn things off.

If you want true PWM control, you'll have to find something else, like the TLC5940 for example.  That has a 4096-step grayscale PWM brightness control.
Logged

0
Offline Offline
Edison Member
*
Karma: 7
Posts: 1229
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks..

(and also for reminding me I cant power it from the 5v of the Arduino too.. I though I had read I could..but if I used more than 1, which I am anyways, i needed to use external 5v..)

I think/thought I had the wiring already 'correct'?  (outside of daisey chaining the other MAX7221 in there)

http://dmstudios.net/misc/project_matrix_wiring.jpg

but here is just my 'matrix' wiring:
http://dmstudios.net/misc/matrix_wiring.jpg

I know it looks a bit odd.. but its really just an led string/strip..  not really a matrix 'CUBE'..

so I believe it is still correct?.

when the 5050 led's come in, I'll check to see if giving each led only 15mA x 3 leds is better than doing only 2 x leds @ 20mA each..



RE: PWM..

ok, so I get 'somewhat' PWM control?  just a not a very re-fined 'stepping' motion?  ie: the stages will be jerky and not fade smoothly?

I havent read up on the shiftOUT and shiftPWM tuts yet.. (or what hardware they used.. .maybe should have done that first?)   haha smiley-cry
Logged


Colorado
Offline Offline
Edison Member
*
Karma: 47
Posts: 1562
Reviving dead brain cells with Arduinos.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

(and also for reminding me I cant power it from the 5v of the Arduino too.. I though I had read I could..but if I used more than 1, which I am anyways, i needed to use external 5v..)
Yeah, even with one, if you light up a full digit (meaning 8 segments), it will be drawing 320mA, plus the operational current, another 10mA, and you're looking at a total of 330mA.  You might be able to pull that out of the Arduino Vin, but I never do that.  I power stuff like that externally.

I think/thought I had the wiring already 'correct'?  (outside of daisey chaining the other MAX7221 in there)
http://dmstudios.net/misc/project_matrix_wiring.jpg
but here is just my 'matrix' wiring:
http://dmstudios.net/misc/matrix_wiring.jpg
Yep, if you stack them 8 LEDs at a time (instead of drawing them in one long line), you get the same thing I drew.

RE: PWM..
ok, so I get 'somewhat' PWM control?  just a not a very re-fined 'stepping' motion?  ie: the stages will be jerky and not fade smoothly?
That would depend on how fast you're doing it.  For example, DycoLEDs have 32 steps and when I drive them with no more than 5 millisecond delay, it's a smooth transition.  However, if I go much slower, you will definitely notice the stepping.

I havent read up on the shiftOUT and shiftPWM tuts yet.. (or what hardware they used.. .maybe should have done that first?)   haha smiley-cry
You need shift registers for that, such as the 74HC595.
Logged

Pages: [1] 2   Go Up
Jump to: