4×3 LED Matrix with Arduino UNO — Running & Row/Column LED Effects
Project Title:
LED Matrix Control using Arduino UNO
(4×3 LED Array)
Objective:
To design and control a 4×3 LED
matrix using an Arduino UNO, implementing:
- Running LED effect
- Row-wise glow
- Column-wise glow
LED Matrix Design
Hardware Components:
|
Component |
Quantity |
|
Arduino UNO |
1 |
|
5mm LEDs |
12 |
|
220Ω Resistors |
4 |
|
Breadboard / Simulation |
1 |
|
Connecting Wires |
As required |
Circuit Description:
The LED matrix consists of:
- 4 rows (cathodes)
connected to pins 6, 7, 8, 9
- 3 columns (anodes)
connected to pins 10, 11, 12
Each LED is addressed by:
- Setting an anode HIGH
- Setting a cathode LOW
This way, a specific LED can be
turned ON while avoiding unwanted lighting .
Working Principle:
Controlling a large number of LEDs
directly is not practical. By using a matrix structure, we reduce the
number of pins needed from 12 to 7 (4 rows + 3 columns). LEDs are controlled by
multiplexing: turning on one LED at a time very fast to appear as if all
are lit.
Arduino Code Functionality
Features:
- Running LED
across the matrix one by one
- Row-wise full glow
- Column-wise full glow
const int cathodes[] = {6, 7, 8, 9}; //
4 rows
const int anodes[] = {10, 11, 12}; //
3 columns
void setup() {
for (int i = 0; i < 4; i++) pinMode(cathodes[i], OUTPUT);
for (int i = 0; i < 3; i++) pinMode(anodes[i], OUTPUT);
}
void loop() {
// 1. Running LED
across all LEDs
for (int row = 0; row < 4; row++) {
for (int col = 0; col < 3; col++) {
lightLED(row, col);
delay(200);
clearLEDs();
}
}
delay(500);
// 2. Glow entire
row at once
for (int row = 0; row < 4; row++) {
glowRow(row);
delay(500);
clearLEDs();
}
delay(10);
// 3. Glow entire
column at once
for (int col = 0; col < 3; col++) {
glowColumn(col);
delay(500);
clearLEDs();
}
delay(1000);
}
// Light a single LED
void lightLED(int row, int col) {
clearLEDs();
digitalWrite(anodes[col], HIGH); // Anode
ON
digitalWrite(cathodes[row], LOW); // Cathode
ON (sink)
}
// Glow all LEDs in one
row
void glowRow(int row) {
for (int i = 0; i < 3; i++)
digitalWrite(anodes[i], HIGH); // All
columns ON
digitalWrite(cathodes[row], LOW); // Single
row sinks current
}
// Glow all LEDs in one
column
void glowColumn(int col) {
digitalWrite(anodes[col], HIGH); // One
column ON
for (int i = 0; i < 4; i++)
digitalWrite(cathodes[i], LOW); // All rows
sink current
}
// Turn off all LEDs
void clearLEDs() {
for (int i = 0; i < 3; i++) digitalWrite(anodes[i], LOW);
for (int i = 0; i < 4; i++) digitalWrite(cathodes[i], HIGH);
}
Applications:
- LED Dot Matrix Displays
- LED Pattern Projects
- Multiplexed Lighting
- Educational Projects
Conclusion:
This project demonstrates how a
simple LED matrix can be controlled efficiently using row-column
multiplexing with Arduino. It’s a basic foundation for developing scrolling
text displays, animated icons, and digital signage boards.
Future Improvements:
- Add buttons to switch display modes.
- Add brightness control using PWM.
- Use shift registers to expand LED count.
- Implement character display (A-Z) using lookup
arrays.
I do not have exact reference sites, but I referred to
YouTube videos, books, and ChatGPT for
understanding and building this project.

Comments
Post a Comment