Arduino to Max7219 to light 256 LEDs

Thread Starter

allenpitts

Joined Feb 26, 2011
182
Hello AAC Forum,

Most of the info on using the Arduino for controlling hundreds of LEDs is
about either shift registers (74HC595) or multiplexers like Maxim7219.
The number of 74HC595s needed to do 250 LEDS causes a space issue.
So the 7219 was chosen. But the research on the 7219 turned up a lot of
data on using that chip to control seven segment LEDs or matrices.

A PCB has been developed to control 256 LEDS in a more linear display like
a movie marquee.



Have strung four of these together and have it working but only for
eight groups of LEDs at a time. Would like to turn on all 256 at once
but the Arduino will only provide only half an amp of current.

The spec on the LEDs is
Emitting color: Green
Diameter: 3mm
Lens color:Water Clear
Wavelength: 515 - 520 nm
Forward voltage(V): 3.2 - 3.4 V
Current(mA): 20

If the LEDS each use 20 mA (i think this is a maximum and they actually
use about half that but will use 20mA for design purpose) then
256 would require 5120 mA or a little over five amps.

A five volt 10 amp power source has been acquired and should provide enough current
to drive the Arduino and the 256 LEDS but not sure how to connect
the power supply to the project. The project is based on the Maxin7219
such as that found at
http://www.planetarduino.org/?p=2861
which says if a separate power supply is used the grounds of power supply
and the Arduino ground should be connected.

A third system, a passive infrared detector, that turns the display
on also needs between 3 and 20 volts to send a signal to an input
pin on the Arduino

It has been suggested that the five volt, six amp power supply
be connected to 5 volt pin on the Arduino (not to the barrel jack as
shown in the schematic) and then, in serial to the
V++ post on the MAxim 7219 breakout and the PIR sensor PCBs.

Whats the best to provide power to the three systems?

Thanks.

Allen In Dallas
 

ebeowulf17

Joined Aug 12, 2014
3,307
Hello AAC Forum,

Most of the info on using the Arduino for controlling hundreds of LEDs is
about either shift registers (74HC595) or multiplexers like Maxim7219.
The number of 74HC595s needed to do 250 LEDS causes a space issue.
So the 7219 was chosen. But the research on the 7219 turned up a lot of
data on using that chip to control seven segment LEDs or matrices.

A PCB has been developed to control 256 LEDS in a more linear display like
a movie marquee.



Have strung four of these together and have it working but only for
eight groups of LEDs at a time. Would like to turn on all 256 at once
but the Arduino will only provide only half an amp of current.

The spec on the LEDs is
Emitting color: Green
Diameter: 3mm
Lens color:Water Clear
Wavelength: 515 - 520 nm
Forward voltage(V): 3.2 - 3.4 V
Current(mA): 20

If the LEDS each use 20 mA (i think this is a maximum and they actually
use about half that but will use 20mA for design purpose) then
256 would require 5120 mA or a little over five amps.

A five volt 10 amp power source has been acquired and should provide enough current
to drive the Arduino and the 256 LEDS but not sure how to connect
the power supply to the project. The project is based on the Maxin7219
such as that found at
http://www.planetarduino.org/?p=2861
which says if a separate power supply is used the grounds of power supply
and the Arduino ground should be connected.

A third system, a passive infrared detector, that turns the display
on also needs between 3 and 20 volts to send a signal to an input
pin on the Arduino

It has been suggested that the five volt, six amp power supply
be connected to 5 volt pin on the Arduino (not to the barrel jack as
shown in the schematic) and then, in serial to the
V++ post on the MAxim 7219 breakout and the PIR sensor PCBs.

Whats the best to provide power to the three systems?

Thanks.

Allen In Dallas
As long as you believe the 5V supply is reasonably trustworthy, wire it directly to the 5V pin on the Arduino. This bypasses the Arduino's built in regulator, which would otherwise require at least 7V supply at the barrel jack to work properly.

It's also perfectly fine to keep powering the Arduino with whatever power supply you currently feed it, as long as you tie all the ground (perhaps more accurately called DC common) connections together.

Just don't power the Arduino with both supplies at once (5V supply directly to 5V pin at the same time as >7V is at barrel jack) as this could cause problems for one or both of the regulators.

I wouldn't describe the shared power supply wiring as "serial." It should be parallel connections. I don't know how much it will matter, but it's probably better to run dedicated pairs of power supply wires back to the power supply for Arduino, in a star configuration as opposed to a linear power rail. It may not matter, but it might prevent issues with voltage sag, having your ground reference pushed around, etc.
 

kjj

Joined Mar 30, 2018
31
First of all, as ebeowulf17 said, the Arduino barrel jack is not connected to 5V, but rather the input of the linear regulator.

Powering everything should be easy, just connect everything to the 5V 10A power supply. Use the "5V pin" to power the Arduino, (and of course the "V+ pin" for MAX7219). As for the LEDs, just choose a properly selected resistor for each led to set the current, 100 ohm - 1k ohm is common for 5V supplies.

Just a little suggestion, since you already want individually controlled LEDs, why not check out Adafruits NeoPixel? Based on the WS2812 LED with onboard driver, and they are individually addressable using serial communication. And they run on 5 volts! Since it seems like you are making your own PCB, you could buy the individual LEDs and solder them yourself.
https://learn.adafruit.com/adafruit-neopixel-uberguide?view=all
 
Top