Using MAX72xx to drive a 9-digit display (Three 3-digit displays, ignoring DP)

I am designing a Gauge setup for my car, where I would like to read 3 inputs, and output the readings in the form XX.X.

The max72xx is well documented, so I figured I would go that route. If I fix the 3 decimal spots (one for each 3-digit display) that I need, then I only need to concern myself with the 7 segments on each digit (a-g). This would account for 7*9=63 LEDs total. and this can handle 8x8=64 LEDs...

Now my question is, I am pretty sure I understand that the MAX72xx utilizes the directional nature of a LED. and I assume the digit is decided by a "ground" signal on the corresponding pin, and the segment is decided by a "positive" signal on the corresponding pin. (which explains the 8x8 theory)

Is there any way to "reprogram" the segDP pin to be negative so that it acts like digit-8 (the 9th digit on the dig(0-8) scale)?

I can imagine a small relay, or similar (transistor? not to good with smaller "logic" electronics) could achieve this swap.

Now, if that would work, how about the programming side? is there a standard form for the MAX72xx chip? Or could I just take the swap into consideration while programming the arduino output to the MAX chip? For example If I want the 9thdigit, (f,e) segments to light up, just drive the f,e with positive, and the DP (which will be hardwired switched to negative).

Would this be an excessive effort over say getting two MAX72xx's to drive it all? or is this a reasonable task?

I ask because I will have to run the wires from the arduino pretty far (6+ feet) so if I can keep it to 3-4 wires I would be really happy. Due to space I might only be able to package the one MAX72xx in with all Three 3-digit displays.

I can try to clarify this more, but I think I got the general message down solid.

Hi, I’m not sure that could work and even if it did, it would certainly be a bit of a contortion, hardware and software wise! 2 x max7219 would be easier. Even using shift registers and so on sounds more practical.

When you say 3 wires does that include power?

Paul

When I saw 3 wires, I meant a few as possible. The display at the front of the car headliner up top, the wires will be run under the headliner. Fewest is best. I would prefer not to run another ribbon cable, it was a really painful process to source one custom made to my specs, and I would like the option to be able to produce as many of these things as I want (so I cannot use free samples to get what I want, and would be nice to run say only 4 wires or 5 or whatever).

Worst case, I will probably just drop the last digit, and think of something that only needs 2 digits displayed at a time.

Ideally this would be very “simple” if I could re-program the MAX72xx to make an 9x7 array to do this (0-8)x(a-g) or is there something out there which does this?

Attached is what I am envisioning.

This is my very first dabble into “multiplexing” if that is what this is called. Could a shift register be set up in a similar way? Do you know of any nice examples I could learn from?

MAX7219 controls a matrix of LEDs, 8 anodes & 8 cathodes. You have 9 cathodes & 7 anodes (or vice versa). Afaik, you can’t do it with a single chip.

However, you can daisy chain two (or more) MAX7219s and control them using only a few SPI lines.

I'm beginning to wonder if Gslenc's idea may be possible after all.

What if you used 8 common-cathode digits (could be a mix of single, double or triple digit displays) plus one common-anode digit?

The DP pin of the common-cathode digits would be left disconnected. The DP pin of the max would be connected to the common pin of the common-anode display, and its cathodes to 7 of the max's cathode pins.

Sending data to the 8 common-cathode digits would be straight-forward. The pattern for the 9th digit, the common-anode, would have to be controlled via the DP segments of 7 digits.

You are right, that should work. The only downside I can see is that you can't use three 3-digit displays as specified by the OP. Clever thinking, Paul!

How about this?

I attempted to light the DP segments of digits 2, 5 & 8 by connecting them to Vcc, but I’m not sure if their current would get limited. Might have to put resistors on them. This means they could not be dimmed by the sketch, unfortunately.

Man I thought I had a slick solution. Thanks for the reality check. I think I will just make one of them a 2 digit thing…

As far as programming goes, is there a library that takes care of the say a whole digit.

For example, say engine temp is 196 degrees, (instantaneous) boost pressure is 32 psi and the recent five-second recent peak was 36.5 psi

I have experience measuring voltages and resistances then converting them to whatever linear value I want. Say I take these measurements and I combine them (say first100000+second1000+third) into some larger number, and again, assume I hardwired the decimals.

The “number” I would get is 196 _32 36.5 separated into the three 3/2-digit numbers (again the actual raw number would be 19632365, but for ease on the eyes…)

Then in programming, is there a library where I can simply say I want:

Digit0 = 1
Digit1 = 9
Digit2 = 6
Digit3 = 3
etc… all the way down the line

And the library will take care of the multiplexing to MAX72?

I didn’t see much on this topic besides hardware, some half-baked sketch of code, and then this: http://playground.arduino.cc/Main/LedControl#NumberSeg7Control

Thanks for entertaining the main idea. I can sacrifice one digit I suppose. Unfortunately on cars, most values of interest are best left to 3 digits…

Hi. You need to think the opposite way. Instead of combining all 3 values into one many-digit number, you need to break down your 3 values to their individual digits. Then you give the max7219 the digit to display at each location.

The LedControl library is the one many people use with max7219. Personally, having used max7219 for the first time on a non-Arduino mcu where no libraries were available, I know its not that difficult at all to drive it without the library, especially if one one max7219 is used.

Got it. Thanks for the help. I think I know enough now to get me going. Ill be back if there is trouble.