Max7219 problems

Hi all,

I'm having trouble with the max7219 led controller.

For some reason, I can't display a 0, 8 or 9 on my 7 segment displays.

Everytime I try to display an 0, 8 or 9 the screen doesn't display anything at all. I thought the displays were broken but I already got new ones and it's still not fixed.

I already tried another max7219 (I have a couple of them) but they all have the same issue.

The displays used are kingbright SC08-11GWA GREEN.

Thanks!

Jens

My code:

#include "LedControl.h"

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

void setup() {
  lc.shutdown(0,false);
  /* Set the brightness to a medium values */
  lc.setIntensity(0,15);
  /* and clear the display */
  lc.clearDisplay(0);
}
void loop() { 
lc.setDigit(0,0,0, false);
delay(1000);
lc.setDigit(0,0,1, false);
delay(1000);
lc.setDigit(0,0,2, false);
delay(1000);
lc.setDigit(0,0,3, false);
delay(1000);
lc.setDigit(0,0,4, false);
delay(1000);
lc.setDigit(0,0,5, false);
delay(1000);
lc.setDigit(0,0,6, false);
delay(1000);
lc.setDigit(0,0,7, false);
delay(1000);
lc.setDigit(0,0,8, false);
delay(1000);
lc.setDigit(0,0,9, false);
delay(1000);
}

There is nothing wrong with your code. I tried it and it works fine.

So it must be your wiring or a faulty device.

My wiring is OK, if I test a red display from the same series, it works.

But these greens don't. But they do work with a 74hc595 shift register, I can turn each individual led on.

This is driving me crazy, the displays work when you turn each led on individually, but they don't work with a max7219...

Any ideas?

if I test a red display from the same series, it works.

But these greens don't.

This is the first about red and green, what are you not telling us about your setup?

Sounds like - as in fact is de rigeur here - we need the evidence.

Is the green display definitely common-cathode?

Hi,
We need the part numbers of the RED and GREEN arrays, thanks.

Tom...... :slight_smile:

And the pictures.

Okay

I uploaded a video on youtube, here it is: - YouTube

The green displays are the ones that don't work. The red ones work just fine.

Red part number: KINGBRIGHT SC08-11SURKWA
Green part number: KINGBRIGHT SC08-11GWA

They both have the same pinout.

In the video I tested 5 of the green ones, they all don't work good. The red displays however work just fine...

Jens

Never, never plug stuff in to a circuit when it is powered up.

This is rather a long way off your original question. How did you think that code could detect the colour of the LED and work differently.

If I had to put money on it I would say that your problems are caused by your bread board not making good enough contact with all the pins of the display.

I cannot tell if you have a .1uF de-coupling cap on the 7219 pin 19 to GND ( as close to the pin as you can get ).

@Grumpy_Mike
The code doesn't need to detect the color of the LED? I never asked for that.

All I wanted is to use these green displays.

Also, if my bread board isn't making good enough contact why does the red display work at the beginning and the end of the video?

@LarryD
No I haven't. Is that required? In the tutorial I used that wasn't mentioned.

Yes you need the capacitor.
In fact, I try to have one for every chip in the circuit.
.1uF (100nF) ceramic is the usual value/type recommended.

@Grumpy_Mike
The code doesn't need to detect the color of the LED? I never asked for that.

No and it is impossible, I was trying to point out subtly that you were making a nonsensical assumption thinking your code could be the trouble. Especially now we know the proper question you should have asked.

Also, if my bread board isn't making good enough contact why does the red display work at the beginning and the end of the video?

Because red LEDs take a much lower voltage to light up than green ones

Hi,
Are you using the 5V from the arduino to power the display?
Have you tried lowering the current limit resistor value because of the higher voltage drop across the green led?

Tom.... :slight_smile:

No Tom, the chip has constant current drivers so there is no need to lower anything.
It could also be that the green displays have different diameter wires or they are bent making bread board as unreliable as it often is.

Should have a 0.1uf and a 10uF on the MAX7219 VCC pin:

Supply Bypassing and Wiring
To minimize power-supply ripple due to the peak digit
driver currents, connect a 10µF electrolytic and a 0.1µF
ceramic capacitor between V+ and GND as close to
the device as possible. The MAX7219/MAX7221 should
be placed in close proximity to the LED display, and
connections should be kept as short as possible to
minimize the effects of wiring inductance and electromagnetic
interference. Also, both GND pins must be
connected to ground.

Hi

http://datasheets.maximintegrated.com/en/ds/MAX7219-MAX7221.pdf

Page 11, Table 11, different Rset for each volt drop and current requirement.
The resistor I think just compensates for small differences in segment characteristics.

Tom.... :slight_smile:

Thanks for these informations.

etui galaxy s6 coque galaxy s6

The thing is that the digits "0" and "2" show, so all segments are functioning, so it is not a matter of poor connections.

Interestingly, the digit "7" does not show either, suggesting that something is happening with the fourth code bit - but it works for red LEDs.

So it is altogether puzzling.

And it is interesting that the "current set" resistor does not guarantee a constant current but is dependent on the voltage drop of the LEDs - it effectively sets the resistance of the drivers.