MAX7219 and higher voltage LED displays - how?

mangustasz

Nov 30, 2011
5
Yes we set number of digits.
Iset resistor is 47k, but we tried a lot of different resistors.
What is long wires? its about 5cm
We made it in two ways, we put everything on breadboard, and second way we made PCB. in both ways it was the same maybe you can look ULN2803 and UDN2981 exact name. )

And one more thing pull-up resistors, what are they doing? maybe we need to change those? we tried to change iset resistor, but nothing changed, we were able to see ghosting without iset resistor

Last edited:

yesyes

Mar 9, 2011
15
One thing you can try is to use the small 7-segment displays with the high voltage circuit and see if you still get ghosting. Of course adjust your supply voltage to what the small display needs...

Other than that I really don't know what else to suggest.

mangustasz

Nov 30, 2011
5
we have ghosting with small display

yesyes

Mar 9, 2011
15
hmmmmmmm, then I don't know... sorry...

It does look like a timing problem. If you have a 2 channel oscilloscope, then you could check if there is any delay between input and output on the ULN and UDN chips.

Did you build it exactly like the diagram I posted? Noting added and nothing left out?

mangustasz

Nov 30, 2011
5
hmmmmmmm, then I don't know... sorry...

It does look like a timing problem. If you have a 2 channel oscilloscope, then you could check if there is any delay between input and output on the ULN and UDN chips.

Did you build it exactly like the diagram I posted? Noting added and nothing left out?

Everythinh is the same, just no resistors for segments, but we tried to put them Its our pcb picture, maybe, we made something wrong:
I dont know. its two weeks and we still can not solve this problem.

yesyes

Mar 9, 2011
15
No current limiting resistors for the LEDs? Why?

yesyes

Mar 9, 2011
15
As far as I can see the PCB looks OK.

Only one problem, but I think you realised that already... ;-)
The +15V input goes to GND in the top middle of the PCB.

mangustasz

Nov 30, 2011
5
As far as I can see the PCB looks OK.

Only one problem, but I think you realised that already... ;-)
The +15V input goes to GND in the top middle of the PCB.

There are no resistors becouse we using led strips for segments, and these have resitors inside. Now we are empty of ideas, we tried 1000 different things, and nothing helped

Bongo

Dec 9, 2011
9
Driving LED strips

I am planning to build an 8x8 array of led strips using a MAX7219 as the display controller. I want to use enough led strip that I have high current requirements: each of my 64 array "cells" will use ~200mA worth of led strip. Standalone, the led strips run on 12V and have built in current limiting resistors.

I have been prototyping using the circuit yesyes suggested, with shorter strips of led's so I don't exceed the current limits of the uln2803 and the udn2981. I am having the same ghosting problem identified by mangustasz. Did you ever solve this problem?

Also, when I scale this up, I think the uln2803 will still be OK as it will only be sinking one "cell" at a time (200mA). Any suggestions for how I handle the high side supply? I will potentially need to power an entire row at once = 8 * 200mA = 1.6A. Are there high side switches that behave like the udn2981 (logic input quickly switches supply of higher voltage) that can handle 12-15V and 1.6A?

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,508
Bongo, I initially moved your post to another thread because it appeared at first that you might be hijacking this thread.

In retrospect, you seem to be experiencing a problem as close to that of the original poster that I reconsidered.

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,508
OK, my guess, having seen the video that the OP posted is:

My guess is that in the code, you set the 8 segment bits, then you change the selected common pin.

This means that for a brief time, the wrong signals are being set for the previous display.

One way of correcting this is:

1) turn off *all* comon signals (deselect all diaplays)
2) change the segments
3) turn on the newly selected display.

If you were saving pins and using some form of decoder to do the selection of the current display (and where you could not easily deselect all of them) the alternative would be:

1) turn off all segments
2) select sext display
3) turn on required segments.

From looking at the video, if the digits are scanned left to right, then you are setting the segments before you change the selected digit. This produces a "leading" ghost, i.e. one where the preceeding digit ghosts the one foollowing it.

Bongo

Dec 9, 2011
9
Thanks Steve.

Both me and the other poster are using the Max7219 LED driver, which in theory is handling the correct timing of turning supply on/off to LED anodes and sinking current on/off from LED cathodes. In fact, when I simply use the 7219 to drive individual LEDs, it works fine with no ghosting.

There's something about the way the circuit yesyes posted is itself switching on/off supply and sink through the UDN2981 and the ULN2803, resepctively, that I am guessing is causing the ghosting issue.

The interesting thing is that if I set the MAX7219 to turn on a single 'cell' in the array, I am still getting the ghosting in the adjacent cell. If I understand the way the 7219 works, it multiplexes, sourcing power to all the anodes in a row of LEDs one row at a time. It then sinks current only for any LED turned on in that row. In my example, if I only have a single cell turned on in my entire array, the 7219 should never be in a state to sink current for any column other than the one where the cell is turned on, and then only when it sources supply to the row in question.

The ghosting is happening for a cell in an adjacent column in the same row. This means that the ULN2803 is sinking current through one of it's other channels for a column that the 7219 should not be calling for current sink in any row. I'm puzzled...

Last edited:

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,508
Perhaps you can show me which post has the circuit diagram in it. I really don't know what you're using.

edit: OK I think I figured it out... It's the one using the UDN2981 to drive the segments.

I wonder if you are seeing issues caused by the spew rate limiting of the outputs...

You might try pull-down resistors on the UDN2981 inputs, and pull-ups on the ULN2803 inputs (the first one) Although I don't think that will help.

If the problem is caused by slew rate, and the pull downs on the UDN2981 help a little, then adding dome series resistance may help more (it will increase the voltage at which the segments are turned on, thus delaying it a little).

You should be able to play with just one segment and one digit until you find something which works. If it works for all digits, then it's what you've done to the segments, if it works for an entire digit, it's what you've done to the digit driver.

Last edited:

Bongo

Dec 9, 2011
9
Good suggestions steve, I will work with these and see what happens. If I cannot get it working right I may have to fall back to the recommendations made by the manufacturer of the Max7219 for driving higher voltage/current led arrays, which calls for multiple transistors and resistors for each row and column of the led array - see http://www.maxim-ic.com/app-notes/index.mvp/id/1196. This will make for a circuit not nearly as neat as one using 8-channel IC's like the UDN2981 and ULN2803, but if that's what is needed that is what I will do.

Again, thanks steve for taking the time to help. I really appreciate it!

Bongo

Dec 9, 2011
9
I have tried pull downs on the 2981s and and pull ups on the front of the first 2803s, separately and both, and still see the ghosting, with no visible difference to my eyes.

Again, I believe the issue is a slight current drain in an adjacent channel in the 2803s, even though the adjacent channel should be off. I have tested this by one cell in one row and one column, and I see ghosting in an adjacent column. The led strips have a common anode, receiving power from the same channel on the 2981. The 2803s are controlling whether that power is allowed to flow through the led strips. And in the static state of all channels of the 2803s not calling for current drain, except for the one , I still see the ghosting. Is there something about the way the two 2803s are connected that might be causing this? I thought the 8 channels of the 2803s should be isolated from one another.

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,508
If it were something about the way the 2803s were connected then I would have expected the resistors would have helped.

My best guess now is that the slew rate limiting is causing the digits to turn off too slowly (the common connection) causing the each digit to ghost the following one.

What might work is to introduce a voltage divider between the output of the 7219 and the input of the 2981. The same problem could be causing the segments to light too soon, and you may have to address the segments as well.

The specs of the 7219 say the outputs are slew rate limited, that means they turn on and off slowly (sort of ramping up and down).

In the normal configuration of the output this is not an issue because the anode must be significantly more positive than the cathode before conduction occurs.

However, when you are using drivers like these, only a little over 0.7V is required to turn it on. That means the driver turns on early (as the signal ramps up) and off later (as the signal ramps down). Because your actual switching voltages are now different, there is potentially some timing problems.

This is rather more tricky to resolve, so I hoped it was not an issue (the 7219 could also conceivably have some dead time so that this problem would not arise -- I think it's now likely it doesn't). Alas, the specs don't show examples of the points at which the various signals are switched...

A voltage divider will allow you to effectively control the level at which the driver turns on. I would suggest a 1k pot connected between the 7219's output and ground, with the wiper going to the 2803's input. Adjust this and see if the problem can be controlled. It may be worth doing this to a single segment as well.

If this works, measure the ratio of the resistors and use fixed resistors instead..

Another alternative is to place diodes in series with the output of the 7219. This will provide a voltage drop that will work in a similar manner. Even better, a low voltage zener (say 3v3) may do the trick (this may be easier to wire in, but it is harder to test as you need a series of different voltage zener diodes).

This is the sort of problem that would really benefit from having a dual trace oscilloscope applied to it. Watching the difference between the switching of the 7219 and the outputs of the drivers might be instructive. Also comparing the switching of the segments vs the common connections (both before and after the drivers) might reveal exactly what is going on.

Bongo

Dec 9, 2011
9
Thanks Steve. Your explanation ,as I understand it, makes perfect sense. The timing and ramp up/down of the 7219 segment and digit pins are designed for use with arrays of single led's, for which as you state "the anode must be significantly more positive than the cathode before conduction occurs."

And as you also describe, the switching voltages for the 2981's and 2803's are likely different from those for single led's, and those switching thresholds are being crossed at different points in time than that for which the MAX7219 multiplexing is designed.

Did I get that right?

I do not have access to an oscilloscope, though your thoughts about this brought me back to the last time I took an electrical engineering class... in 1979! I'll see if I can scare up a 1K potentiometer to test what you suggest. I know I have some 10K pot's lying around. Can I use those, or is there concern about current limiting with too much resistance?

And if I can get the needed voltage drop worked out using a voltage divider (potentiometer or resistors) can I then simply obtain the zener diodes with the needed voltage drop?

Thank you, thank you, thank you for all your help Steve.

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,508
You're driving transistors, so they need some base current. Using a pot as a potential divider will result in the "upper" resistor dropping more voltage due to the base current.

Also zener diodes have a soft knee (especially low voltage zeners) so the voltage drop across them may be well under their specified voltage at the base current.

For those reasons it's a bit tricky to try it with a pot then use a zener. The pot has the problem of adding series resistance which will limit base current whereas the zener has a non-linear relationship and will allow base current to rise much faster after the knee voltage is reached.

However the pot may well be the easier way of proving whether it works.

You could also try a string of normal diodes or a LED (different colour = different voltage). I'd go hunting in my junk box for something.

And I'd be keeping my fingers crossed

Bongo

Dec 9, 2011
9
No luck! Tried the potentiometer as divider between the 7219 digit "output" and ground, with the wiper connected to the input to the first 2803. As I understand the way the 7219 works, the digit pins go low to sink current when an led should be turned on and go high when the led should be off. If I turn the pot all the way to the ground side, this appears to my 2803s as on, and indeed my led strip is on at full brightness. If I turn my pot all the way the other way. I have my digit pin connected directly thru the pot to the 2803 input, and I see the ghosting.

If I followed your earlier reasoning, there must be a brief moment where the digit pin adjacent to the one that is actually supposed to be on dips to a low enough voltage that it trips the 2803, but that is not low enough that it would cause current to flow through a single led. It is not in this state for very long because my led strip showing the ghosting is a good bit dimmer than the strip that is fully on.

What stumps me is this: I am using a testing program on my PC that can selectively turn individual cells (i.e., a specific row and column) on or off. I am only turning on a single cell. That means that the 7219 should cycle thru and turn the segment pin high (+5V) for each row, one at a time, and then when a given row is powered it will drop the digit pin low (0V) for the one column that the "on" led is in. Since I only have one cell on when testing, the digit pins for all of the other columns should remain high no matter which row the 7219 is addressing. Yet, it appears that the digit pin for the adjacent column must dip low enough, at least momentarily, to trip the 2803 circuit and briefly light/ghost the adjacent led strip.

Last edited:

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,508
Yes, even with just one segment lit, it will still be scanning all the digits, so each column is activated.

If none of these thought experiments have been able to come up with an answer, then I suggest you'll have to get an oscilloscope (4 channel would be great) and look at timings of all the relevant signals (segment before and after driver, and column before and after driver).

You will be looking to determine both why the problem is occuring (delays vs switching levels, etc.) and the relative timing, and to verify a fix (if we can come up with one based on this information).

I wonder if the fat that this chip contains current drivers is important in determining a solution?

Replies
9
Views
524
Replies
2
Views
1K
Replies
2
Views
1K
Replies
0
Views
4K
Replies
3
Views
2K