Go Down

Topic: MAX7219 and higher voltage LED displays - how? (Read 8843 times) previous topic - next topic


Do you think you could drive DP directly from the MAX chip?
Most likely, if it is a common cathode display.


Dec 29, 2018, 05:59 pm Last Edit: Dec 29, 2018, 09:55 pm by amdkt7
Yon1237, sure you can drive the DP directly with the MAX. I was afraid that I would not have enough flexibility in controlling the relative brightness of the DP vs the segments, hence the double fet solution.

I'm attaching my scope plots, it makes it clear that my ghosting is coming from the the TPD62783 not pulling the output low, or not as well as the 2N7002K does. I do see significant ghosting on the segments when the room is very dark and the display brightness is set to zero (using the LedControl.h library). Since I intend for this to be used in the bedroom I want to resolve this problem. Now, should I keep looking for a different part that will fit my footprint, or should I add a big barnacle to my board? I don't really want to spin a new board, but I'm kind of perfectionist.

Plot 0 shows Yellow for the input for the DP driver, Blue is the output.
Plot 1 shows Yellow for the input for Seg B driver, Blue is the output, after the current limiting resistor.
Plot 2 shows Yellow is digit 0 (common cathode) Blue is the output of the TPD, Seg B
Plot 3 shows Yellow is digit 0 , Blue is the output of the 2N7002K driving the DP.

I don't really understand the timing of the digit line. It seems to fire when the Segments are off. How does that work? Edit: it doesn't. I was looking at a digit line that was not supposed to be on. See my later post.

I do see that the 2n7002 makes a nice clean signal, and that works.

having trouble with the attachments. I'll probably have to wait five minutes before I can add them... grrr


Soon I will be doing the exact same thing using the UDN2981A Source Driver

It will be interesting to see if we have the same problem.

I know its not convenient, but you might try a diode and resistor between the MAX and the Driver.

Diode in series with the line and the resistor pulling down.  Maybe the MAX pins are not fully turning off the source driver.  Try it without the diode also.  Just terminate the segment lines before feeding the source driver.



Dec 29, 2018, 08:07 pm Last Edit: Dec 29, 2018, 08:35 pm by amdkt7 Reason: adding more info
I just realized (some dummy was not thinking) that I should have been looking at a digit driver that was turning on. I was always using Digit 0, which was supposed to be blank, then expecting to see the digit driver come on at the same time as the segment driver. Duh.. I just captured what I expected to see. Now everything makes sense, except for why the TPD62783 is not taking the segments to ground. I'll take a harder look at that data sheet, maybe I'm not meeting some condition. Okay, I have looked at the TPD datasheet and I see why now. It's not a good choice for this task, as the output does not go to ground when turned off. The output is floating. I did try adding a 1K resistor onto the output, after the limiting resistor (I think). It made no difference. I could try it on the other side, next to the output and make it maybe 220 ohms, but that would really drive up my current load and generate more noise.

Greg, the Max7219 datasheet indicates that the segment lines do go to ground, but I don't know what the impedance might be. It would be difficult to lift a pin to insert a diode, but I might try adding a resistor. I do see the Max Segment line switching fully to ground quickly, so I don't see a problem on that side. I think that the UDN2981A is likely to have the same issue, the output will float when off.

File 0 shows the digit drive in yellow, the blue is an output of the TPD62783, after the current limiting resistor.

File 1 shows the digit drive in yellow, the blue is the output of the 2N7002K.

File 2 shows blue as the output of the TPD62783 before the current limiting resistor. Clearly it is not going to ground.

Note that the time base is not the same for each screen shot.


I had another thought...

Try lifting the 47k for iSet and put a 50k pot.  See if another value there quiets your ghosting.



Pretty sure that the Iset resister would have no impact on the ghosting issue. I have been searching for a driver that would also pull the output low, the same way that the MAX7219 does. I have not been able to find such a device. I tried making my own totem pole MOSFET circuit, but it failed miserably when testing it at the bench. I believe I need complementary paired P and N channel to pull that off, but I may have also had a wiring issue. I may try that again later. It can get very confusing wiring a point to point circuit when you have one of the transistors on the reverse side. For now, I am about to give up and accept the ghosting, as long as it is not effecting the decimal point.

I realized just how much power my double MOSFET circuit was wasting, when the output is low it is 25ma through the 470 ohm resistor. That adds up. I don't want to run all eight lines through that kind of circuit, so that is how I got to trying to make my own totem pole output.

It looks like this project is turning into a fail. Such large digits, even when at minimum brightness lights up the whole room in the dark. My wife is not likely to enjoy that. The ghosting is annoying to me, but how much do I want to spend trying to fix it.

But, I have learned a lot while doing this project. This was my first personal board layout and I have not found a mistake on the board yet. My mistake was to not build a prototype to test the display driver circuit. I did not want to deal with the difficulty of point to point wiring of SMT driver IC's. That would have been tough.

Bottom line, I think using the TPD62783 is a valid option, provided that you are working at higher brightness levels.

I may redo the entire project, this time using smaller displays. I also wanted to add some more indicator leds, I did not think about all the difficulties of interfacing with the clock in order to set an alarm for different days of the week.


Jan 02, 2019, 10:39 pm Last Edit: Jan 02, 2019, 10:43 pm by amdkt7
Success seems to be mine!

I have redesigned the circuit to drain off the stray capacitance when the output goes low. Q6 pretty much shorts out the output of the high side driver (the same way the Max7219 does with it's segment drivers). It knocks about 7 volts off of the voltage before the MAX7219 turns on it's sink line. I cannot see any ghosting on the decimal points now. I will have to build a barnacle board that does the same for all eight lines next to see if it works equally well the segments. R33 could be safely lowered to 40 ohms, but I don't think I need that much.
This answers the question about wither the turn off delay of the TPD62783 was the reason for the ghosting, or if it was due to the fact that the output is high impedance when turned off. I still have a turn off delay of about .8uS, but until the MAX7219 drives the sink line low no current flows and the LED does not glow.

Again, this modification is not required if a dim display is not required. I would try decreasing the drive resistors and then reducing the brightness in software as that should increase the timing a bit. I am not sure if that would work.


Jan 06, 2019, 08:02 pm Last Edit: Jan 17, 2019, 02:20 pm by amdkt7 Reason: linked image
I have learned a lot. I have finalized with a simpler solution now that I better understand what is going on. First I learned how the TPD (high side driver) floats when it turns off. Compare that to the way that the MAX7219 takes it's output to ground. This is required because the capacitance of the displays holds enough charge that when one of the other digits fires there still is enough voltage to dimly light up the wrong segment. Simple solution for that is to add some 10K resistors to all the segment drives. I put them after the current limiting resistor. This solves the ghosting on the segments.

But, there still is ghosting on the Decimal Point. Why? Because the Max7219 takes it's digit drives to 5volt when it is off. The DP highside is at 12V. So the DP sees 12 volts on the top side, and 5 volts on the cathode side. That causes the DP to light up, just enough voltage to fire. So, I added about 6 volts worth of diodes in series with the DP, and changed the current limiting resistor to match. No more ghosting DP either.

Then I happened to play around with the 12 volt supply, I turned it up to about 12.3 volts and my ghosting came back (everywhere). It turns out that with 12.3 volts it is just enough to start current flow through the LEDS. 12.6V - 5v = 7.6volts across the LEDs. So I added a 1n4007 (what I had at home) which added a .3volt voltage drop, reducing my 12.3 back down to 12V.

This circuit is not too complicated if you can make a printed circuit board. It would be hairy to wire point to point. Maybe not so bad if you can get the TDP in a DIP package. I'm not sure you can.

I know there are other ways to do it. I do like the MAX7219 because it takes so much of the load off of the Arduino, but doing a large display like I just did is a bit tricky.  I hope this helps someone else. It took me about two weeks to work through. I learned a lot!

Note, I did place the zener diode D4 in the schematic backwards. I actually used two white leds instead, as that is all that I had.


Jan 07, 2019, 04:37 pm Last Edit: Jan 11, 2019, 07:39 pm by amdkt7
Hum, it appears that it can be simplified even more. Just drop the 12volt supply down to around 9-10 volts. Still need the 5.6v zener on the Decimal Point. No need for the pull down resistors it seems. I need to test in a dark room, but it appears to be working.

Edit: I finally got time to test it in a dark room. The pull down resistors are required after all. Sure adds to the complexity, but looks so much better. I will also be dropping the 12v supply to 9 volts which still provides me with plenty of brightness. If I want more brightness I could reduce my current limiting resistors instead, though I probably will quickly bump into an upper limit to brightness.

Go Up