Son of Arduino to Max7219 to light 256 LEDs

Thread Starter

allenpitts

Joined Feb 26, 2011
182
Hello ACC Forum,

Working on display that will control 292 LEDS in a curvilinear line like

This animated GIF shows half of the eight characters or 150 of the total 292
lights.

Using an Arduino UNO to control four PCBs with 7219 Maxim IC which controls 64 LEDS
each to make 256 lights and a fifth board with 36 LEDs to make 292. The display is activated
by a PIR sensor, motion detector.

Had problems with the design of a PCB which would allow the construction and connection
of a linear display using the 7219 which was designed to do a matrix or a seven
segment display. But after several false starts and a four level PCB I licked it.

Then there were problems with power: 292 LEDs drawing a max 20m amps each is almost 6 amps.
Solved that problem by running the Arduino, the five 7219s and a PIR circuit all from
a power distribution circuit driven by a five volt 10 amp power supply.

Thanks to ebeowolf17 and kjj for helping solve the power problem in this post.
https://forum.allaboutcircuits.com/threads/arduino-to-max7219-to-light-256-leds.148095/


I got it to work!

Started to put in the frame and ran into issues.
The test of the operation of the LEDs was previously been limited to seeing that the lights came
on and went off.

When I started connecting the LED wires from the PCBs to LEds in the frame
unpredictable results occurred.

Heres what happens. (For trouble shooting the PIR was disconnected and only the first
eight LEDs on the first PCB were tuened on in the Arduino sketch, LEDControl_180526B copied herewith below.

LED 0 Comes on and stays on even after it is programmed to stay off and all the other LEDs are off.
LEDs 2 & 3 come on simultaeously
LED 4 On
LED 5 On
LED 6 On
LED 7 and 1 On simultaeously
LED 2& 3 off
LED 4 off
LED 5 off
LED 6 off
LED 7 and 1 off simultaeously

So tried reversing the sequence starting w seven and going to zero
LED 6 On
LED 5 On
LED 4 On
LEDs 2 & 3 come on simultaeously
LED 7 and 1 On simultaeously
LED 2& 3 off
LED 4 off
LED 5 off
LED 6 off
LED 7 and 1 off simultaeously

So tried just turning the first LED on and off
It will come on but will not go off.

Stumped.
Cant figure it out.

Allen in Dallas

//+++++LEDControl_180526_b.ino++++++ turns on eight LEDS and turns them off
// beginning with LED 000 and going to LED 007
#include "LedControl.h"

LedControl lc=LedControl(12,11,10,1);

unsigned long delaytime=750;
unsigned long delaytime2=100;

void setup() {

lc.shutdown(0,false);
/* Set the brightness to a medium values */
lc.setIntensity(0,8);
/* and clear the display */
lc.clearDisplay(0);
}

void loop() {

lc.setLed(0,0,4,true);
delay(delaytime2);
lc.setLed(0,0,4,false);
//lc.setLed(0,0,1,true);
// delay(delaytime);
//lc.setLed(0,0,2,true);
// delay(delaytime);
//lc.setLed(0,0,3,true);
// delay(delaytime);
//lc.setLed(0,0,4,true);
// delay(delaytime);
//lc.setLed(0,0,5,true);
// delay(delaytime) ;
//lc.setLed(0,0,6,true);
// delay(delaytime);
//lc.setLed(0,0,7,true);
// delay(delaytime);


//lc.setLed(0,0,1,false);
//lc.setLed(0,0,2,false);
//lc.setLed(0,0,3,false);
//lc.setLed(0,0,4,false);
//lc.setLed(0,0,5,false);
//lc.setLed(0,0,6,false);
//lc.setLed(0,0,7,false);

}

//+++++LEDControl_180526_c.ino++++++ turns on eight LEDS and turns them off
// beginning with LED 007 and going to LED 000
#include "LedControl.h"

LedControl lc=LedControl(12,11,10,1);

unsigned long delaytime=750;
unsigned long delaytime2=100;

void setup() {

lc.shutdown(0,false);
/* Set the brightness to a medium values */
lc.setIntensity(0,8);
/* and clear the display */
lc.clearDisplay(0);
}

void loop() {

lc.setLed(0,0,7,true);
delay(delaytime);
lc.setLed(0,0,6,true);
delay(delaytime);
lc.setLed(0,0,5,true);
delay(delaytime);
lc.setLed(0,0,4,true);
delay(delaytime);
lc.setLed(0,0,3,true);
delay(delaytime);
lc.setLed(0,0,2,true);
delay(delaytime);
lc.setLed(0,0,1,true);
delay(delaytime);
lc.setLed(0,0,0,true);
delay(delaytime);

lc.setLed(0,0,0,false);
lc.setLed(0,0,1,false);
lc.setLed(0,0,2,false);
lc.setLed(0,0,3,false);
lc.setLed(0,0,4,false);
lc.setLed(0,0,5,false);
lc.setLed(0,0,6,false);
lc.setLed(0,0,7,false);
}
 

ebeowulf17

Joined Aug 12, 2014
3,307
Hello ACC Forum,

Working on display that will control 292 LEDS in a curvilinear line like

This animated GIF shows half of the eight characters or 150 of the total 292
lights.

Using an Arduino UNO to control four PCBs with 7219 Maxim IC which controls 64 LEDS
each to make 256 lights and a fifth board with 36 LEDs to make 292. The display is activated
by a PIR sensor, motion detector.

Had problems with the design of a PCB which would allow the construction and connection
of a linear display using the 7219 which was designed to do a matrix or a seven
segment display. But after several false starts and a four level PCB I licked it.

Then there were problems with power: 292 LEDs drawing a max 20m amps each is almost 6 amps.
Solved that problem by running the Arduino, the five 7219s and a PIR circuit all from
a power distribution circuit driven by a five volt 10 amp power supply.

Thanks to ebeowolf17 and kjj for helping solve the power problem in this post.
https://forum.allaboutcircuits.com/threads/arduino-to-max7219-to-light-256-leds.148095/


I got it to work!

Started to put in the frame and ran into issues.
The test of the operation of the LEDs was previously been limited to seeing that the lights came
on and went off.

When I started connecting the LED wires from the PCBs to LEds in the frame
unpredictable results occurred.

Heres what happens. (For trouble shooting the PIR was disconnected and only the first
eight LEDs on the first PCB were tuened on in the Arduino sketch, LEDControl_180526B copied herewith below.

LED 0 Comes on and stays on even after it is programmed to stay off and all the other LEDs are off.
LEDs 2 & 3 come on simultaeously
LED 4 On
LED 5 On
LED 6 On
LED 7 and 1 On simultaeously
LED 2& 3 off
LED 4 off
LED 5 off
LED 6 off
LED 7 and 1 off simultaeously

So tried reversing the sequence starting w seven and going to zero
LED 6 On
LED 5 On
LED 4 On
LEDs 2 & 3 come on simultaeously
LED 7 and 1 On simultaeously
LED 2& 3 off
LED 4 off
LED 5 off
LED 6 off
LED 7 and 1 off simultaeously

So tried just turning the first LED on and off
It will come on but will not go off.

Stumped.
Cant figure it out.

Allen in Dallas

//+++++LEDControl_180526_b.ino++++++ turns on eight LEDS and turns them off
// beginning with LED 000 and going to LED 007
#include "LedControl.h"

LedControl lc=LedControl(12,11,10,1);

unsigned long delaytime=750;
unsigned long delaytime2=100;

void setup() {

lc.shutdown(0,false);
/* Set the brightness to a medium values */
lc.setIntensity(0,8);
/* and clear the display */
lc.clearDisplay(0);
}

void loop() {

lc.setLed(0,0,4,true);
delay(delaytime2);
lc.setLed(0,0,4,false);
//lc.setLed(0,0,1,true);
// delay(delaytime);
//lc.setLed(0,0,2,true);
// delay(delaytime);
//lc.setLed(0,0,3,true);
// delay(delaytime);
//lc.setLed(0,0,4,true);
// delay(delaytime);
//lc.setLed(0,0,5,true);
// delay(delaytime) ;
//lc.setLed(0,0,6,true);
// delay(delaytime);
//lc.setLed(0,0,7,true);
// delay(delaytime);


//lc.setLed(0,0,1,false);
//lc.setLed(0,0,2,false);
//lc.setLed(0,0,3,false);
//lc.setLed(0,0,4,false);
//lc.setLed(0,0,5,false);
//lc.setLed(0,0,6,false);
//lc.setLed(0,0,7,false);

}

//+++++LEDControl_180526_c.ino++++++ turns on eight LEDS and turns them off
// beginning with LED 007 and going to LED 000
#include "LedControl.h"

LedControl lc=LedControl(12,11,10,1);

unsigned long delaytime=750;
unsigned long delaytime2=100;

void setup() {

lc.shutdown(0,false);
/* Set the brightness to a medium values */
lc.setIntensity(0,8);
/* and clear the display */
lc.clearDisplay(0);
}

void loop() {

lc.setLed(0,0,7,true);
delay(delaytime);
lc.setLed(0,0,6,true);
delay(delaytime);
lc.setLed(0,0,5,true);
delay(delaytime);
lc.setLed(0,0,4,true);
delay(delaytime);
lc.setLed(0,0,3,true);
delay(delaytime);
lc.setLed(0,0,2,true);
delay(delaytime);
lc.setLed(0,0,1,true);
delay(delaytime);
lc.setLed(0,0,0,true);
delay(delaytime);

lc.setLed(0,0,0,false);
lc.setLed(0,0,1,false);
lc.setLed(0,0,2,false);
lc.setLed(0,0,3,false);
lc.setLed(0,0,4,false);
lc.setLed(0,0,5,false);
lc.setLed(0,0,6,false);
lc.setLed(0,0,7,false);
}
It looks like you've got all your black and white LED wires connected to the PCB terminals, but the other ends (except for the first eight) are all dangling loose. Any chance that some of those wire ends are touching each other, making unintended connections?

You said you successfully tested the boards before beginning installation in the final fixture, right? If so, then the boards, drivers, and basic software should all be safe. In that case, it sounds to me like a wiring issue of some sort. There could be individual strands of wire bridging adjacent terminals together on the board side, simple wiring mistakes matching wires on board end correctly with wires on LED end, or shorts between unused wires in mid air.

First, I'd double check the wiring on the first 8, including looking very carefully for stray strands of wire near terminals. This will sound like an unreasonable amount of working backwards, but if all else fails, I'd disconnect all the wires that haven't been used so far to eliminate any possibility that they're interacting with each other.
 

Thread Starter

allenpitts

Joined Feb 26, 2011
182
Hello AAC Forum,
Still troubleshooting LED display.
Replaced Arduino with new unit.
Replaced 7219 ICs with two different units.
Get the same result.

Next: check voltage output of power supply

Not sure what to check after that.

Presently trying to get one LED to turn on and off
Expected result LED 0,0,0, turns on, LED 0,0,0, turns off
Actual result: LED 0,0,0, turns on

Started this reply before ebeowulf's excellent post received.

The stray wire theory sounds worthy of investigation. It is
some work but since I am dead in the water until I figure this out
will try it. The LED wires are not soldered. They are connected to the
PCB by terminal blocks
https://www.mouser.com/ProductDetail/651-1725711
so they are not hard to disconnect.
The only thing that worries me is there are five PCBs that were
daisy-chained and working.
They were separated to be attached to the frame.
That is when I began to have the unpredictable result.
So I removed the PIR and just hooked the Arduino, using Arduino
power.
Tried four out of the five PCBs as singles (no daisy-chain) and got
exactly the same result (as described in first post) for all four. So it is possible that they
all failed (a 7219 was fried when I reversed power
polarity by accident) but what are the chances of all of the
PCBs failing the exact same way or there being a stray wire
that would give the same wacked result for all four boards?

Have puchased more 7219s from Mouser byt won't get here
til TuesdaY

Back to project. Will advise.

Thank you for your time and courtesy.

Allen in Dallas
 

ebeowulf17

Joined Aug 12, 2014
3,307
Yeah, if you've had the exact same pattern of which things light in which order with several different boards, it's incredibly unlikely to have anything with those loose wires I mentioned earlier.

When you tested several different boards, were you always testing them with the same first eight LEDs that are mounted to the final assembly? If so, maybe try testing a board with a few different LEDs straight into the terminals. Eliminate any risk of wiring errors, legs shorting together, etc.

If it hasn't been the same wires and LEDs each time, I'd lean more towards failed chips like you've suggested.

I wish I had something solidly helpful to offer, but these are just speculation and guesses. Let us know if you try more experiments and gather more clues. I love a good mystery, but at the moment I'm stumped!
 

Thread Starter

allenpitts

Joined Feb 26, 2011
182
Hello ebeowulf17 and the AAC forum,

Got new Maxim 7219 chips from Mouser.
Put one in the test PCB.
Alas I get the same whacko if consistent result.
LED 0 on
pause
LED 2 and 3 on simultaneously
LED 4 on
LED 5 on
LED 6 on
LED 1 and 7 on simultaneously

New Arduino, new 7219s.
Same result for three different boards w new ICs

Beginning to think there is a flaw in the PCBs.
Will re-bread board the design this weekend.

The mystery continues.

Allen in Dallas
 

ebeowulf17

Joined Aug 12, 2014
3,307
Hello ebeowulf17 and the AAC forum,

Got new Maxim 7219 chips from Mouser.
Put one in the test PCB.
Alas I get the same whacko if consistent result.
LED 0 on
pause
LED 2 and 3 on simultaneously
LED 4 on
LED 5 on
LED 6 on
LED 1 and 7 on simultaneously

New Arduino, new 7219s.
Same result for three different boards w new ICs

Beginning to think there is a flaw in the PCBs.
Will re-bread board the design this weekend.

The mystery continues.

Allen in Dallas
I thought you said you had successfully tested the PCBs already. Am I remembering that wrong? If they've not worked for you yet, breadboard testing sounds wise.

Also, if the PCB design is a suspect, you could upload PCB info and I'd be happy to take a look at it. What did you design the PCBs with? Did you start with a schematic capture? Did you have software checks for net connectivity (comparing against digitized schematic,) design rule checks, etc? Anyway, if you've got schematics and PCB layouts in graphic or PDF form, I'd be happy to take a look so you've got a second set of eyes on them.
 

Thread Starter

allenpitts

Joined Feb 26, 2011
182
Hello Ebeowulf17 and the AAC forum,

The suggestion about stray wire connections from Ebeowulf got me to thinking:
1. I have a known good Arduino
2. The Maxim7129 chips are new.
3. The only other major component in the system are the PCBs
especially since all the boards fail in exactly the same way.

And you are right Ebeowulf, the schematics have been bread boarded and
proved correct.

It must be the boards.

So I looked at the PCBs which are four level. One level for V++, grnd, Clock
Load and DIN/DOUT. A level for cathode. And two levels for anode, the most complex.
And I found it: A trace for anodes going to anode 01 was crossing over one of
the pads for anode 07. And the same mistake for anodes 02 & 03. Which explains
the behavior described in the first part of this post.

Then using a simple continuity checker I connected between anode 00.01
and anode 05.01 (where in xx.yy xx is a group of cathodes and yy is the anode).
And got continuity as expected. Then I connected
00.01 and 05.07 and got a circuit through that path, a smoking gun. Then tried
the anode at 00.05 connected to 00.02 and got a negative result, that is
no continuity.

Also found the same mistake anodes 02 and 03. Which explains that anomaly.

So I think I proved that the flaw was in the PCBs which makes sense because
it is the most complex element of that system.

Have corrected the errors and am ordering new PCBs.

Before the PCBs were tested to make there was a path between, say all the 02
anodes. The new PCBs will also be tested to make sure there are no crossovers between groups of anodes.

Will advise and start a new thread.

Thanks.

Allen in Dallas
 

ebeowulf17

Joined Aug 12, 2014
3,307
Hello Ebeowulf17 and the AAC forum,

The suggestion about stray wire connections from Ebeowulf got me to thinking:
1. I have a known good Arduino
2. The Maxim7129 chips are new.
3. The only other major component in the system are the PCBs
especially since all the boards fail in exactly the same way.

And you are right Ebeowulf, the schematics have been bread boarded and
proved correct.

It must be the boards.

So I looked at the PCBs which are four level. One level for V++, grnd, Clock
Load and DIN/DOUT. A level for cathode. And two levels for anode, the most complex.
And I found it: A trace for anodes going to anode 01 was crossing over one of
the pads for anode 07. And the same mistake for anodes 02 & 03. Which explains
the behavior described in the first part of this post.

Then using a simple continuity checker I connected between anode 00.01
and anode 05.01 (where in xx.yy xx is a group of cathodes and yy is the anode).
And got continuity as expected. Then I connected
00.01 and 05.07 and got a circuit through that path, a smoking gun. Then tried
the anode at 00.05 connected to 00.02 and got a negative result, that is
no continuity.

Also found the same mistake anodes 02 and 03. Which explains that anomaly.

So I think I proved that the flaw was in the PCBs which makes sense because
it is the most complex element of that system.

Have corrected the errors and am ordering new PCBs.

Before the PCBs were tested to make there was a path between, say all the 02
anodes. The new PCBs will also be tested to make sure there are no crossovers between groups of anodes.

Will advise and start a new thread.

Thanks.

Allen in Dallas
Congrats! Good job finding the problem. Best of luck with the new boards.
 
Top