Required Components

The size of the power supply is driven by the power needs of the circuit, combined with
the power requirements of your sketch. Each pixel can use as much as 60 mA. If all 64 LEDs
were made WHITE at the same time for an extended period of time, the array would draw nearly 4A!
Unsurprisingly, power supplies that provide more current cost more, and are generally
bigger and bulkier than weaker power supplies. If your sketch only lights up a few of them
for a small amount of time (e.g., if you are displaying a random collection of sparkling pixels),
then you may be able to get away with a correspondingly much power supply. A 2A power supply
seems like a good middle ground for many applications.

Layout of the Circuit

Cautions!

Inserting the capacitor correctly

Capacitors can be polarized or unpolarized. Both types have 2 leads, but the leads
are uneven for polarized capacitors. Just like LEDs, the longer lead goes to the
positive voltage source, and the negative (shorter) lead goes to GND.

A Polarized Capacitor

How to Turn ON/OFF the Circuit Safely

To protect the LED array from large swings in voltage: when you are powering up the
array, insert the power cable (the cable colored red in the diagram above) LAST, after
the other connections.

For the same reason, when you are disconnecting the array, remove the power cable
FIRST, before the other connections
.

Reverse Pin Labels

The DIN/DOUT labels on the back of some LEDs matrices from China (CJMCU-8😎
are actually the
opposite* of what’s printed on the circuit board. The correct and incorrect
labels are shown below:

Existing label Correct label Comment
GND GND OK
+5V +5V OK
DIN DOUT Backwards! Connect this to the real DIN pin on the 2nd array, if you use 2 or more arrays.
DOUT DIN Backwards! Connect the Arduino data pin to this matrix pin

The DOUT pin (i.e., if you are using CJMCU-88 boards, the DIN pin) is only* relevant if
you are using two LED matrices. In that case, you will probably need a second power
supply for the second matrix, and you will need to connect the DOUT pin on the first
matrix to the DIN pin on the second matrix.