Minotor wiki · restored page
How to build a LED matrix
The first thing to do is to define your needs:
- Where will you use your matrix? (Home, bars, night club…)
- What will be the size of your matrix?
- What pixel density do you need?
Components
LED pixels
If you have a good idea of what you need, it's time to choose your pixels. We will only talk here about LED pixels that include a controller chip.
There are lots of kinds of LED pixels based on various chips. We use WS2801-based pixels: they are fast, very cheap and available in various form factors. You can also find strips based on the LPD8806, WS2811…
As we use the FastSPI library for this tutorial, you can check the supported chipsets in the FastSPI documentation.
Control board
To drive our pixels we need a controller board. Lots of platforms exist — Arduino, Raspberry Pi, Teensy… We will use the very popular Arduino Mega 2560 here. The board costs around €40: not the cheapest, but powerful enough to do what we want.
Wiring
Our LED pixels have four wires to connect:
- Blue: ground
- Red: 12 V
- Green: data
- Yellow: clock
Be careful: depending on the LED strip you bought, data and clock can be reversed. Some pixel strips use a 5 V power supply; ours use 12 V.
You must give 5 V or 12 V to your LEDs using a suitable power supply. For example, we will start by making an 8 × 8 matrix. Each pixel we use can consume up to 0.96 W (we will count 1 W). So 64 W at 12 V → 5.6 A max.
The cheapest way to power our LEDs is a standard computer power supply (ATX). You must check how many amperes your power supply can provide on each 12 V output. Most ATX power supplies can handle around 128 pixels without any problem (10–12 A). You can add more pixels, but you may get voltage variations resulting in glitches.
Preparing the ATX power supply
If you just plug in an ATX power supply you won't get any power: you need to make it turn on by itself. To do so, connect two pins of the ATX connector, as shown here.
You will still have a switch at the back of the power supply to turn it on and off.
We don't recommend cutting an output of the ATX power supply directly. You should use an adaptor like this one, and cut that.
For our 12 V pixels we use the black cable (ground) and the yellow cable (+12 V). The red cable can be used if you have 5 V pixels.
The current figure is on the generous side. 64 pixels × 0.96 W = 61.4 W, and 61.4 W ÷ 12 V = 5.1 A; even rounding every pixel up to 1 W gives 5.3 A, not 5.6 A. The larger number is a sensible margin, not a different calculation. The 128-pixel rule of thumb works out the same way: 128 × 0.96 W ÷ 12 V = 10.2 A.
Connect everything together
Now you're almost ready. Before connecting your LEDs, check the pixels' direction: there is an arrow to help you see which side is the input and which is the output.
First connect the power supply ground (black) to your pixels' ground input (blue) and to the Arduino ground (GND). Then plug the power supply's 12 V (yellow) into your pixels' power input (red). Now connect the data input of your LEDs (green cable) to the Arduino's SPI data pin 51, and the clock input (yellow cable) to the SPI clock pin 52.
Programming the controller board for tests
Everything is wired; now it's time to program the controller board. As we use an Arduino, you'll need to download the Arduino development environment from arduino.cc.
We also need to download the FastSPI library and install it. Once everything is running, try loading an example sketch that comes with FastSPI: File / Sketchbook / libraries / FastSPI_LED2 / RGBCalibrate.
Just uncomment the line that corresponds to your pixel type. For us it is:
FastLED.addLeds<WS2801, RGB>(leds, NUM_LEDS);
Our pixels' colours are not ordered RGB but BRG, so we change this line to:
FastLED.addLeds<WS2801, BRG>(leds, NUM_LEDS);
Compile and upload this sketch to your Arduino. Turn on the ATX power supply and reset the Arduino with its reset button.
You should now have LED 1 lit red, LEDs 2 and 3 green, and LEDs 4, 5 and 6 blue. If the colours are not in that order, change the colour order in the line above.
FastLED.addLeds lines above are already the FastLED syntax and are unchanged, and the sketch is now under File → Examples → FastLED → RGBCalibrate.
With no data and clock pins given,
addLeds<WS2801, …> uses the board's hardware SPI, which on a Mega 2560 is exactly pins 51 (MOSI) and 52 (SCK) — that is why the wiring step names them.Programming the controller board for Minotor
If you reached the previous point, you are almost able to run Minotor on your LED matrix! You just have to flash your Arduino with our firmware, LEDuino (github.com/minotor-org/leduino); then you can connect Minotor to your LED matrix and play :-)
Enjoy!
Original page: wiki.minotor.org/doku.php/building_your_led_matrix. Written by the Minotor team and licensed CC BY-SA 3.0. Changes: spelling corrected; dead links to Google Code and the old contact form removed; Arduino and LEDuino links updated; editor's notes added. This page is available under the same licence. Updated 2026-09.
