MAX7219 but without multiplexing?

Hej,

I am pretty new to the Arduino and am planing my first own project.

I want to make a BIG led cube in size and not in numbers of rows and columns and z-things. (4x4x4 but with more LEDs per element. In fact I want to make a ring of LEDs so that I have 64 rings with several LEDs each in the end.) It should be as brigth as possible for less money as possible. :slight_smile:

I was thinking about using the MAX7219 but I am unhappy with the fact that it uses multiplexing and since it is for a 8x8 matrix it takes 7/8 of the ligt away. Right? I figured I could give the LEDs more current since they are not constantly on but at the most I could make them twice as bright as they normaly are in which case I would still loose 3/4 of the light ... and I dont want to solder hundreds of LEDs only because of multiplexing. :frowning:

So ist there a way to circumvent the multiplexing part? Something like the MAX7219 but instead of 2x8 pins with 64 pins.

I would be happy if someone can give me a hint, clue, suggestion, ...

Cheers

Erik

You could use a bunch (8) 595 shiftregisters with suitable transistors on each output. BUT this would only give you on/off switching for each group of LED's, no fading or "in between levels"

The transistor should be chosen so i can handle the total current requirement of one of your groups of LED's.

EDIT: please remember that depending on how many LED's wil be one at the same time, you might end up needing a rather hefty powersupply . If you have 5 standard LED's in a group and all 64 groups are on at the same time you would need 6.4 Amps just for the LED's.

I think the ideal voltage would be about 3.3 - 3.7V DC @ 7+Amps

You could probably tap into the 3.3V line of an ATX universal power supply :slight_smile:

Computer PSUs are often much cheaper than similar regulated PSUs for lab use

:slight_smile:

If your using 595's you can code so only 8 LEDs are on at any given time. They turn on and off so fast the human eye can't see the flicker, so while large numbers of LEDs would typically imply a need for a massive power supply, its not necessary if you use code like this:-

  digitalWrite(latchPin, 0); // ground the latchpin
  shiftOut(dataPin, clockPin, 255); // 8 on
  shiftOut(dataPin, clockPin, 0);    // 8 off
  shiftOut(dataPin, clockPin, 0);    // 8 off
  shiftOut(dataPin, clockPin, 0);    // 8 off
  digitalWrite(latchPin, 1); // return the latch pin high

  digitalWrite(latchPin, 0); // ground the latchpin
  shiftOut(dataPin, clockPin, 0); // 8 off
  shiftOut(dataPin, clockPin, 255);    // 8 on
  shiftOut(dataPin, clockPin, 0);    // 8 off
  shiftOut(dataPin, clockPin, 0);    // 8 off
  digitalWrite(latchPin, 1); // return the latch pin high

  digitalWrite(latchPin, 0); // ground the latchpin
  shiftOut(dataPin, clockPin, 0); // 8 off
  shiftOut(dataPin, clockPin, 0);    // 8 off
  shiftOut(dataPin, clockPin, 255);    // 8 on
  shiftOut(dataPin, clockPin, 0);    // 8 off
  digitalWrite(latchPin, 1); // return the latch pin high

  digitalWrite(latchPin, 0); // ground the latchpin
  shiftOut(dataPin, clockPin, 0); // 8 off
  shiftOut(dataPin, clockPin, 0);    // 8 off
  shiftOut(dataPin, clockPin, 0);    // 8 off
  shiftOut(dataPin, clockPin, 255);    // 8 on
  digitalWrite(latchPin, 1); // return the latch pin high

You can downsize this code using variables and counters. I had 8 595's wired up to ultra high powered LEDs on a single NG and had no problems = )

PS: the above code turns all the LEDs on... as far as the human eye can tell.

@MikMo: Thanks. I looked up what the 595 is doingt here: http://www.arduino.cc/en/Tutorial/ShiftOut
It seems that this es exactly what I need.
And one more question to the fading: If I use the turn on/off strategy of multiplexing for dimming the LEDs wouldnt that work too? Of course only to some degree but there would be the possiblity to dim the LEDs in a certain spectrum.

Fort the current I calculated that I would need max 4 A. I want to use 5 LEDs in a row with a forward voltage of 2,3 V. They use 25 mA at 2,3 V. I want to use two parallel rows per element. This makes 50 mA per Element. 50mA*64 = 3200 mA. Please correct me if I am wrong. I have none experience with this ...

@John_Ryan: To use persistence of vision (turning on and off) is exactly what i do NOT want to do (at least not all the time since I am thinking about using it to dim the LEDs) since the whole thing will loose a lot of ligth (7/8).

@serik, good for you - but there is no loss of light if thats what your implying. I've tested the code using ultra high powered LEDs and I can assure you they were just as bright = )

since the whole thing will loose a lot of ligth (7/8).

Remember that the eye is non liner so that a 7/8 reduction in output does not mean it will look only 1/8 th as bright, it will actually look much brighter than that, try it and see. Most LEDs are too bright anyway when driven with the full current and if you only have them on 1/8 th of the time you can put much more current through them.

yes and no.

yes that the reduction is not that bad as it sounds. to have 1/8 of the light can be seen as two f-stops which maybe says more about the loss of light ... when you dont have a direct comparsion (like testing both options seperatly in a dark room) I would not be suprised if noone sees a difference. but since there are other lights involved it is of more importence to me to get a lot of light out of my cube.

so no, I still do not want to loose that light. :slight_smile:

I see it also like that: if I am going to solder 640 LEDs togehter and loose 7/8 of the light because of multiplexing i could have soldered only 80 without multiplexing what would be less work. since i want as much light as psooible and can not afford time and money for 5120 LEDs I think I am better off to deal with some shift registers and higher current. dont you think?

This was taken about a year ago. I've got a video laying around somewhere as well with the whole rig set up. These LEDs were tested with and without 595's, there was no 7/8 loss.

So, what's the 7/8 loss assumption based on anyway?

The proper way to determine the loss would be a high-accuracy LUX meter

The human eye is not very good at that

I am no expert but it makes sense that when you are driving a large number of LEDs any kind of loss can add up to a very significant number

LED brightness depends on the Amps and volts you're pumping into them

http://www.molalla.net/~leeper/sp4vf2.png

:slight_smile:

@John_Ryan: The assumption ist that you loose light by using multiplexing.
It does not matter if you use the MAX7219 oder 595s because both can be used with multiplexing. The MAX7219 is doing multiplexing for a 8x8 matrix, because of this there is only one row on at one time. No matter how fast you switch them on and off and not matter if the eye is seeing the frequence or not there is only one row on. So at any given time only 8 of 64 LEDs are on which is 1/8 of all LEDs (also if you light up only one LED it is only on for 1/8 of the frequence you choos). If the LEDs are on only 1/8 of the time then they are not 7/8 of the time and are not emitting light.

If there is something wrong with this thought I would be very happy. So please, correct me if this does not make sense.

Wouldn't it make sense to use power transistors as MikMo suggested to turn them on and off?

:slight_smile:

You mean the 595s with transistors? Yes, I think thats what I am going to do. As I wrot earlier: "It seems that this es exactly what I need." And I still think it is.

So the original question seems to be answered (Hurray!) but not the question if and how much light is lost through multiplexing as there are several opinons.

Do you need to be able to control each row individually?

Have you made a schematic and conceptual drawings?

Do you have to use a MAX7219?

:slight_smile:

Do you need to be able to control each row individually?

I want to control every element (64) of the cube (4x4x4), each element consit of several LEDs (maybe 10). I want to control each individually using the shift registers.

Have you made a schematic and conceptual drawings?

Not yet. I downloaded the PSpice Student edition on the weekend but looked at it only briefly. Do you have any other recommendations for schematics-software?

Do you have to use a MAX7219?

No. The puprpose of this thread was to find something else and the answer was given ny MikMo to use shif registers.

There are several free and open source packages for electronics like..............

Alliance

gEDA

GspiceUI

KiCad

KTechLab

Piclab

XCircuit Schematic

and others

Most of these are easily installable on Fedora, Ubuntu and other Linux distributions

Cost $0 :slight_smile:

Some of these can run on BSD, maybe on Mac OS X and a few might also run on closed source operating systems

:slight_smile:

Doh. I should have paid closer attention to your nickname. :slight_smile:

But anyway I will search through the list and hope someone was so nice to port it for stupid Windows-Users like me. :slight_smile:

@serik

8 LEDs on at a time is 8 x 25 mA and that's well within the capacity of Arduino to supply.

It would be interesting to know how a LUX meter reads 8 LEDs on all at once, or one at a time in quick succession, and if there is a luminosity differential, what that is.

Logically you'd have to suspect that if your only ever drawing 25mA, there must be some kind of trade off - surely you couldn't illuminate an entire building and accomplish considerable savings simply by turning lamps on and off in quick succession.

So I think in that respect its worth further investigation and I'll see if I can't get my hands on a LUX meter and perform some tests. If there isn't a detectable loss of illumination then the benefit to the environment would be absolutely mind blowing - so surely it can't be that simple.

Anyway, good luck with your project regardless of what method you settle on = )

BTW - Eagle Schematic/PCB is worth a look. There's a free edition for mac, linux and windows, the only limitation is PCB real estate, but its enough to fit an NG.

@John_Ryan: The assumption ist that you loose light by using multiplexing.
It does not matter if you use the MAX7219 oder 595s because both can be used with multiplexing. The MAX7219 is doing multiplexing for a 8x8 matrix, because of this there is only one row on at one time. No matter how fast you switch them on and off and not matter if the eye is seeing the frequence or not there is only one row on. So at any given time only 8 of 64 LEDs are on which is 1/8 of all LEDs (also if you light up only one LED it is only on for 1/8 of the frequence you choos). If the LEDs are on only 1/8 of the time then they are not 7/8 of the time and are not emitting light.

If there is something wrong with this thought I would be very happy. So please, correct me if this does not make sense.