Cirkit Designer Logo
Cirkit Designer
Your all-in-one circuit design IDE
Home / 
Project Documentation

Arduino UNO Controlled Multi-Matrix LED Display

Image of Arduino UNO Controlled Multi-Matrix LED Display

Circuit Documentation

Summary

This document provides a detailed overview of a circuit that controls multiple MAX7219 8x8 LED matrices using an Arduino UNO. The circuit is designed to turn on the top-left LED of each matrix one at a time. The document includes a component list, wiring details, and documented code.

Component List

  1. Arduino UNO

    • Description: A microcontroller board based on the ATmega328P.
    • Pins: UNUSED, IOREF, Reset, 3.3V, 5V, GND, Vin, A0, A1, A2, A3, A4, A5, SCL, SDA, AREF, D13, D12, D11, D10, D9, D8, D7, D6, D5, D4, D3, D2, D1, D0
  2. MAX7219 8x8 LED Matrix

    • Description: A display driver IC that controls an 8x8 LED matrix.
    • Pins: CS, CLK, DIN, GND, VCC, CS(OUT), CLK(OUT), DOUT, VCC(OUT)

Wiring Details

Arduino UNO

  • 5V: Connected to VCC of the first MAX7219 8x8 LED Matrix.
  • GND: Connected to GND of the first MAX7219 8x8 LED Matrix.
  • D12: Connected to CLK of the first MAX7219 8x8 LED Matrix.
  • D11: Connected to DIN of the first MAX7219 8x8 LED Matrix.
  • D10: Connected to CS of the first MAX7219 8x8 LED Matrix.

MAX7219 8x8 LED Matrix (First)

  • VCC: Connected to 5V of the Arduino UNO.
  • GND: Connected to GND of the Arduino UNO.
  • CLK: Connected to D12 of the Arduino UNO.
  • DIN: Connected to D11 of the Arduino UNO.
  • CS: Connected to D10 of the Arduino UNO.
  • CS(OUT): Connected to CS of the next MAX7219 8x8 LED Matrix.
  • CLK(OUT): Connected to CLK of the next MAX7219 8x8 LED Matrix.
  • DOUT: Connected to DIN of the next MAX7219 8x8 LED Matrix.
  • VCC(OUT): Connected to VCC of the next MAX7219 8x8 LED Matrix.
  • GND: Connected to GND of the next MAX7219 8x8 LED Matrix.

MAX7219 8x8 LED Matrix (Subsequent)

  • VCC: Connected to VCC(OUT) of the previous MAX7219 8x8 LED Matrix.
  • GND: Connected to GND of the previous MAX7219 8x8 LED Matrix.
  • CLK: Connected to CLK(OUT) of the previous MAX7219 8x8 LED Matrix.
  • DIN: Connected to DOUT of the previous MAX7219 8x8 LED Matrix.
  • CS: Connected to CS(OUT) of the previous MAX7219 8x8 LED Matrix.
  • CS(OUT): Connected to CS of the next MAX7219 8x8 LED Matrix.
  • CLK(OUT): Connected to CLK of the next MAX7219 8x8 LED Matrix.
  • DOUT: Connected to DIN of the next MAX7219 8x8 LED Matrix.
  • VCC(OUT): Connected to VCC of the next MAX7219 8x8 LED Matrix.
  • GND: Connected to GND of the next MAX7219 8x8 LED Matrix.

Note

The wiring pattern for the subsequent MAX7219 8x8 LED Matrices continues in the same manner as described above, forming a daisy chain.

Documented Code

/*
 * This Arduino sketch controls multiple MAX7219 8x8 LED matrices.
 * The code turns on the top-left LED of each matrix one at a time.
 */

#include <LedControl.h>

// Pin connections to the Arduino
const int DIN_PIN = 11; // Data In
const int CS_PIN = 10;  // Chip Select
const int CLK_PIN = 12; // Clock

// Number of MAX7219 devices
const int NUM_DEVICES = 8;

// Create a LedControl object
LedControl lc = LedControl(DIN_PIN, CLK_PIN, CS_PIN, NUM_DEVICES);

void setup() {
  // Initialize each MAX7219 device
  for (int i = 0; i < NUM_DEVICES; i++) {
    lc.shutdown(i, false);       // Wake up displays
    lc.setIntensity(i, 8);       // Set brightness level (0 is min, 15 is max)
    lc.clearDisplay(i);          // Clear display register
  }
}

void loop() {
  // Turn on the top-left LED of each matrix one at a time
  for (int i = 0; i < NUM_DEVICES; i++) {
    lc.setLed(i, 0, 0, true);    // Turn on the top-left LED
    delay(500);                  // Wait for 500 milliseconds
    lc.setLed(i, 0, 0, false);   // Turn off the top-left LED
  }
}

This code initializes and controls multiple MAX7219 8x8 LED matrices connected to an Arduino UNO. The LedControl library is used to manage the LED matrices. The setup function initializes each MAX7219 device, and the loop function turns on the top-left LED of each matrix one at a time with a delay of 500 milliseconds.