Question about MAX7219/7221

Hi!
I've got a problem with the Rset of the MAX7219 display driver.
The example circuit uses a 9.53k resistor. The table on page 11 of the datasheet doesn't mention anything about the "kilo".
I've got a display that runs with 20mA at 2.2V, according to the table a 27k resistor should be fine - Am I right?
Neither I want to destroy the MAX7219 nor the big (57mm) 7segment displays

Thank you for your help!

27K seems way too high for driving a 7SEG display. if you are using 5V, than 1K should give you 3mA also driving current, which is safe for 7SEG and certainly is fine with MAX7219. Since your display is rather large, it might still be a bit dim at 3mA and you can try using a 500 resistor if that is the case.

27K seems way too high for driving a 7SEG display. if you are using 5V, than 1K should give you 3mA also driving current, which is safe for 7SEG and certainly is fine with MAX7219. Since your display is rather large, it might still be a bit dim at 3mA and you can try using a 500 resistor if that is the case.

Unfortunately trying to answer this question without reading the datasheet in question is pointless :frowning:

Sebi: Yes, you've guessed right - there's a graph at the top right of page 4 that makes it clear that Rset takes values in the k-ohm range and corroborates the table on page 11.

Thank you!
I wasn't really sure about the kilo but with the diagram on page 4 everything should by fine now.
So, a 27k resistor should work and is easy to get.

I'll post my results when I finished the display :slight_smile:

Okay, as it seems doesn't the "20mA at 2.2" nothing to do with one segmet. This data is for one LED. There are 5 LEDs per segment in a row - damn!
On page 12 of the max7219 is a MAX394 used for this problem.
But would a ULN2803 work also with all the common cathodes? It's easier for me to get than the MAX394 and it doesn't need -5V

There are 5 LEDs per segment in a row - darn!

It depends on if the row is in parallel or in series. If it is in series then the current remains the same it is just that you have to supply more voltage to light them up.

On page 12 of the max7219 is a MAX394 used for this problem.
But would a ULN2803 work also with all the common cathodes? It's easier for me to get than the MAX394 and it doesn't need -5V

The trick is exactly to drive the Leds with the voltage difference between +5V and -5V. so it will not work with a ULN2803.

Eberhard

The MAX394 would work. Its just a switch (two switches in one chip). You could use a low-ohm MOSFET too.

All its doing is allowing the low-voltage output of the 7221 for multiplexing the displays to be "amplified" to whatever voltage/current your display needs.

As you noted, those big digit displays have multiple diodes in series. That keeps the power draw down, but increases the voltage needed to switch them on.

Hello,

I'm trying to do the same, and the MAX394 chip is indeed hard to find online. Would you have a reference for those low-ohm MOSFET we could use in such an application ? The datasheet uses IRF540 WITH the MAX394, that's why I don't understand what the MAX394 is for ? (I'm new to electronics, lots of blurry knowledge :-[)

Thanks,
Silly(c)One.

The IRF540 is a MOSFET and would work nicely.

However a lot of different manufacturers produce parts with that number, but not the exact specifications.

The specifications from Vishay say theirs has an ON resistance of 0.077 Ohms (or 77 mOhms). That is not very impressive. There are devices available for the same or less price that have ON resistances (Rdson) around 0.005 Ohms (or 5 mOhm). The lower the ON resistance the less power losses in the MOSFET (which are just a special type of transistor, by the way).

Which means, for example, if your running a light bulb (which takes a fair amount of current if its a bright one) a device with 77 mOhms ON resistance might need a heatsink or cooling fan. Whereas one with 5 mOhms won't even get warm!

I'm old enough to remember when these things (MOSFETs) first became widely available. They were a novelty at first, since a "good" power transistor could do the same job better. Now, these devices blow my socks off! We can do power-projects that not that long ago were either impossible or needed BIG cooling fans..

Enjoy!

Oops! I'm sorry "Silly(c)One", I did not actually answer your question. And its a good one.

The MAX394 is an INVERTER. Because the MOSFETS are non-inverting devices. You give them a voltage to turn ON and take it away for OFF.

But the MAX7219 digit driver pin is INVERTED. It goes to GROUND when ON and goes to +VCC when OFF. They are using the 394 to invert that signal I think.

This is important, because it means if you want to replace the MAX394 you have to replace it with something that will invert the signal's logic. Like an inverted digital gate, or a transistor, or something else.

That's very clear, thank you very much to have taken the time to explain the principles behind my problem !

So I could invert the signal before the MOSFET with something like an hex inverter ? (I have some spare 74HC04 from an old arcade joystick with led buttons that I built earlier)
Would that work ? It'd be nice coz 74HC04 are very cheap and easy to find in case I need more than 1.
The best would then be to use the 74HC04 together with an ULN2003A for my 4 digits... Crossing fingers :wink:

I would try the 74HC04 since you have plenty.

Assuming you are working on an experimenter's board where you just push wires into holes to make connections, its easy and fun to figure stuff like this out.

I can't recall off-hand if the 74HC04 series chips use voltage levels compatible with the MAX7219. I would try that first. That is, put DIG0 and DIG1 into the 74HC04 and a voltmeter or LED/resistor on the output and see if it goes on/off when you put large numbers into the 7219.

In fact, since I prefer to build upon what works, I would put a standard 2 or more digit LED display on the board and drive that with the 7219 ALONE first - since it is designed to drive a simple LED display.

AFTER you get that working, then you can move the wire from the DIG0/DIG1 pins to your 74HC04 to see if it drives it. Then makes sure it inverts the signal. then add the MOSFET or whatever output drive of you choice - with the standard LED.

If that works, then replace the standard LED display with your real one.

Wise advice, once again... Too bad I don't live in Canada, coz in a few hours with a teacher like you, electronics would loose all of its mystery for me :wink:

I'm warning you : if you don't stop soon, you're eventually going to send me the PCB for my project :wink:

I do believe the 74HC series is compatible with the MAX7219, both work in 5V and should interface nicely with the Arduino.

Seriously though, thanks a lot ! I now have all the elements to think further into my project, and even understood a few principles that will help me along. Like the "proverbe" : if you give a man a fish, he'll eat for one day, if you teach him to fish, he'll eat all his life.
(I was so afraid to be eaten alive by Grumpy Mike for my first posts ;D)

It is my pleasure to help those the same way I was once helped by others. Heck, the way I am STILL helped by others!

We live on a very small, round planet that spins in circles. Consequently we are dizzy all the time. We need to work harder on working together instead of working so hard to pull apart from each other.

I use Eagle for my board stuff. I recommend you get the free version, I certainly can post or send your schematics - time permitting.

Eagle is very easy to use, even a programmer can figure it out..... :wink:

Hi, regarding the Rset of 9.53kOhm you should reach the maximum current of the part. You also have to consider the peak current of around 40-50mA and the average current which is only ~5.5mA.

On point I want to add regarding the LEDs:
You need to check both currents in the datasheet Ipeak & Iavg. In most of the cases you only need to consider the average current since the LED cares more about heating than the current itself.
So you can easily drive a 10mA LED with 40mA peak if you time multiplex by 4, which gives you 10mA average current again.

You can see the Rset vs Current curve here on the compatible AS1106 datasheet (Page 7 is a curve & page 18 is a table)