Go Down

Topic: Power supply questions for the Max7219 (Read 4582 times) previous topic - next topic

cstevenson

Hey, my goal is to create a 16x16 LED matrix with 4, 7-segment displays along the bottom. Im currently planning this and my issue was how to power it. The max7219 shematix specifies a 5v line in and the arduino says it needs 7-12 volts to operate. my plan was to split a 5v, 1.2 amp wall transformer to parrallel connect the arduino's usb port and the 5v inputs of the max7219's and then  power half of the max7219's with the arduinos power and half with just the transformer. my thinking was that this setup would split up the amperage so that both half of the max7219's and the aruino received 5v .6 amps. I would appreciate any help with this!

JChristensen

I'm not sure what it means to split a transformer. (I am aware of split windings but assume those would not be accessible in a wall wart even if they are present.)

You are aware that the Arduino can be powered directly from 5V by connecting it to the 5V pin? The single wall wart can do the whole job, assuming it has sufficient current capacity to run everything. The 7-12V input jack is convenient for higher voltage and/or unregulated supplies, but is not the only way to power it. In that scenario, I'm not sure I'd try to draw 600mA through the Arduino's on-board regulator, it would probably get quite warm and maybe even shut itself down.

cstevenson

My Leds will require almost 1 amp of power total, so how would I power them if not through the arduino? the arduino can only handle about .5 amps, right? so will i need two seperate transformers to send 5v .5 amps to the arduino and another transformer to power the Leds throught the 5v line on the max7219's? Id like to shy away from two transformer if possible. my question was since they both run on 5v, is there a way to divide the current up efficiently?

JChristensen

As long as everything runs on 5V, it can be supplied by one common supply and the current will flow as required. The LEDs are controlled, but not powered, by the Arduino. The MAX7219s actually supply all the current for the LEDs. The SPI interface by which the Arduino communicates to the 7219s consists strictly of logic signals involving very little current or power. So I would not expect the Arduino to consume more than 40mA or 50mA (assuming an Uno) if there are no additional loads connected to it.

Be sure the power supply is able to supply the total current required. It would be good engineering to have some headroom, so I might size the power supply so that it can deliver at least 125% to 150% of the maximum expected load.

Since the LEDs consume a relatively large amount of current, good bypassing is also called for. Check the MAX7219 datasheet, but IIRC, it recommends a 10µF electrolytic in parallel with a 100nF ceramic capacitor on each chip.

cstevenson

I understood the first two paragraphs, haha, but still, how should I supply the power? I know the arduino is just transmitting data, and shouldn't require a lot, but how do I power both the arduino and the led's, prefferably from the same transformer? or do I need two independent power supplies?

cstevenson

there is a 5v pin on the arduino between the GND and 3.3v pins, are you saying that I should connect the 5v pin on the max7219 to that pin? in that case , I would just need to supply all of my power through the arduino, correct? and am I also correct in assuming that I could use the power jack to provide 8v 1 amp of power to the arduino and it should all work? I am unaware of how many amps the 5v pin on the arduino can handle.

CrossRoads

What is being said is to split the 5VDC power cable into several parallel leads. One can go to the 5V header on the arduino, one can go the power pin on whatever the MAX7219s & LEDs are assembled onto. Connect all the grounds together.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

cstevenson

OK, and if I split a 1 amp supply parrallely to two circuits, they won't each get .5 amps? because if the current just divides itself equally, I will provide too much current to the arduino. I would need .5 amps to the arduino and about 1 amp to the LEDs. On an unrelated note, I used to live in Goodrich, just south of Grand blanc! small world haha!

CrossRoads

Each lead will draw whatever current it needs for the load that is attached to it.

Think of it like the power panel in your basement - 120V comes in from the street, and goes out in parallel to all the outlets in your house.
When the fridge runs, it uses more current than the LED light on your desk - yet both are connected to the same 120V source.
Same with the arduino  board and the mAX7219/LED board. Each will draw what it needs independent of the other.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

cstevenson


JChristensen

#10
Feb 16, 2013, 09:57 pm Last Edit: Feb 16, 2013, 09:59 pm by Jack Christensen Reason: 1

there is a 5v pin on the arduino between the GND and 3.3v pins, are you saying that I should connect the 5v pin on the max7219 to that pin? in that case , I would just need to supply all of my power through the arduino, correct? and am I also correct in assuming that I could use the power jack to provide 8v 1 amp of power to the arduino and it should all work? I am unaware of how many amps the 5v pin on the arduino can handle.


Here's the thing. The Arduino has a on-board voltage regulator whose input is connected to the power jack. It requires 7-12V as input, and reduces it to the 5V required by the board itself. The output of the regulator is connected to the 5V pin on the Arduino. (And the input from the power jack is connected to the Vin pin.)

BUT in doing its thing, the regulator dissipates (wastes) as heat the difference between 5V and the input voltage connected to the power jack. How hot it gets depends on (a) how large the voltage difference is, and (b) how much current is being drawn. The amount of power in watts that the regulator needs to dissipate is this voltage difference times the current. The regulator is small and does not have a large heat sink area. Trying to draw an amp through it with a differential of 3V means it will need to dissipate 3W, and that is going to make it very hot. It will likely shut itself down (most regulators have self-protection circuitry), or worst case it could be destroyed.

I thought you had a single 5V wall wart. In which case, as long as it is decently regulated, it can be fed in to the 5V pin, and the power jack left unconnected. And it can also power the 7219s (and hence the LEDs) simultaneously.

OTOH if you have two supplies, one which is 5V and one which is 8V, you could plug the 8V into the Arduino's power jack, and connect the 5v supply to the 7219s, just be sure to connect the grounds between the two. Earlier comment on bypassing still applies. This will require minimal current (~50mA) from the 8V supply, and the 5V supply will provide all the current for the LEDs.

Hope this helps.


OK, and if I split a 1 amp supply parrallely to two circuits, they won't each get .5 amps? because if the current just divides itself equally, I will provide too much current to the arduino. I would need .5 amps to the arduino and about 1 amp to the LEDs. On an unrelated note, I used to live in Goodrich, just south of Grand blanc! small world haha!


No, as CrossRoads said, each circuit will draw its required current. Current and voltage are not independent quantities, they are proportional to each other. The constant of proportionality is called resistance.

Goodrich! That makes you a Martian! Always loved that. When did you move away?

cstevenson

#11
Feb 16, 2013, 10:02 pm Last Edit: Feb 16, 2013, 10:05 pm by cstevenson Reason: 1
Alright, so the 5v from my wall wart can just be plugged into the Vin or the 5v port on my arduino Uno? I thought the 5v port was an output? and the same line from the wall wart can also be plugged into the max7219's? then that makes sense. and the arduino will only draw as much current as it needs since I will be using a 5v 1.2 amp transformer. the Led's will draw as much current as they need and the current that is not used will dissipate as heat, in the wall wart? OR thereabouts. OK. the max7219 schematic says that I need two capacitors also, and the internet cant seem to tell me a specific type of capacitor to get. Do I need a specific type? Thanks again! and I moved last July, but I'll always remember the martians!

JChristensen


Alright, so the 5v can just be plugged into the Vin port on my arduino Uno? and the same line can also be plugged into the max7219's? then that makes sense. and the arduino will only draw as much current as it needs since I will be using a 5v 1.2 amp transformer. the Led's will draw as much current as they need and the current that is not used will dissipate as heat, in the wall wart? OR thereabouts. OK. the max7219 schematic says that I need two capacitors also, and the internet cant seem to tell me a specific type of capacitor to get. Do I need a specific type? Thanks again! and I moved last July, but I'll always remember the martians!


You've got it now, except that the wall wart will not dissipate "unused" current, it just doesn't supply it. A "5V 1.2A" wall wart is rated to supply 5v at up to 1.2A, or less, depending on the requirements of whatever it is powering. Plugging the wall wart into the wall then leaving the 5V output unconnected will cause the minimum amount of heat to be dissipated. Odds are it's a switch mode supply, so it shouldn't get real hot even under maximum load, but the general tendency will be to heat up more as it supplies more current.

Capacitors are as the datasheet says, a 10µF electrolytic, and a 100nF ceramic. These are exceedingly common, just as a couple examples of a million variations, here are some that I've used, although better prices can probably be found elsewhere:
http://www.mouser.com/Search/ProductDetail.aspx?R=SS100M1ABK-0405Pvirtualkey21980000virtualkey140-SS100M1A0405P
http://www.mouser.com/Search/ProductDetail.aspx?R=K104K15X7RF53L2virtualkey59420000virtualkey594-K104K15X7RF53L2

cstevenson

#13
Feb 16, 2013, 10:25 pm Last Edit: Feb 16, 2013, 10:44 pm by cstevenson Reason: 1
Perfect! I had 2 small questions that should be easy to answer.

1) Is there an issue with connecting 7 max7219s together? I know that they are made to be daisy chained (i think that is the correct term) but i didn't know if there was a realistic limit. also, will the arduino be able to mulitplex them fast enough or should I upgrade to a arduino due with a clock of 84 mhz?

2) Do you know any good online electronics stores to get all of this stuff at? and do I need two of the same capacitor or will they need to be different?

CrossRoads

Each MAX7219 is like 8 shift registers that are individually addressable.
So what you is select a chip, send the regiter, send the data. It then updates the outputs to match.
Now, you can have 5 chip selects, one for each MAX7219 and select each one to update as something changes.
Or you can daisy chain them, with just 1 chip select. When you want to change a register in the first chip in the line, you do as I said above.
When you want to change a register in the 4th chip, you send the address/data, and then 6 NOP (No operation) bytes (all 0) to make the first 3 chips pass the data along.
taydaelectronics.com has good prices on MAX7219 ($1.25) and caps & resistors needed.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

Go Up