

I chose to use Arduino pin 2 for control. For the 8x8 strip I’m using here, that means 64 LEDs. With an Arduino Uno, it works mostly without modification, you'll just need to change the LED_PIN value to whatever output you use to control the matrix, and LED_COUNT to the number of total LEDs. You can test this out on such a matrix with the strandtest example on the Adafruit_NeoPixel library, which can be installed via the library manager, on the Arduino IDE. It's possible you may not see these in the image, but it's probably a good idea. Note that it's generally recommended to use a 300 to 500 ohm resistor between the DIN and the controlling Arduino, and to use a 1000♟ or higher capacitor on the input to provide steady power. When hooked up this way, once programmed, the USB cable can be disconnected. While the power input may seem backwards with respect to DIN vs DOUT, the important thing is to get the data “flowing” in the right direction, and to not reverse 5V and GND. Data is fed to the DIN pin from the Arduino, and the DOUT pin can pass data along to yet another matrix. For this experimentation, I chose the Adafruit 1466 5V, 4A power supply, which supplies more than enough power for the 8x8 panel that I'm using, even in the brightest-case scenario.Īs shown below, I hooked up 5V power to the system via the 5V and GND pins next to the DOUT pin, supplying both the panel and the Arduino board via the 5V and GND pins next to the DIN pin. As per Adafruit’s NeoPixel Überguide, unless you're planning on an ultra-bright operation, as a rule-of-thumb, 1/3 of this theoretical maximum can be used.
#Arduino rgb led matrix tutorial full
In reality, it's rare that every LED is lit up to full brightness on both the R, G, and B channel. For an 8x8 matrix, that's 64 LEDs, or 3.84 amps, and for a 16x16 matrix/256 LEDs, it's a staggering 15.36 amps.

While not particularly power-hungry on their own, individual RGB LEDs can consume up to 60mA each.

If you arranged these strips so they snake back and forth, you'd then have a 2D RGB LED matrix that can be programmed to display any 2D image.īefore programming this type of LED matrix, you'll need a sufficient power supply. Input data is sent to the first LED, which passes this information (minus the data for itself) along to the second light in the chain, then to the third, and so on, until it reaches the last light. If you've ever used addressable LEDs, there's a good chance you began with WS2812B LEDs arranged in strips. LED strip matrix & LED matrix power supply It allows an Arduino Uno and other such boards to control hundreds of multi-colored RGB LEDs with a single output. For simplicity, if not raw performance, this configuration is hard to beat. The drawback here is that data must pass from one LED to another, and you may need to run additional power lines as the chain expands.
