Skip to content

Repository files navigation

WiFi-Controlled 3×3 LED Matrix PCB Design

This project showcases a WiFi-controlled 3×3 LED matrix implemented on a custom-designed PCB using an ESP8266 (NodeMCU).
The PCB was designed using EasyEDA, fabricated using exported Gerber files, and tested on real hardware.

🔗 Project Files:
https://drive.google.com/drive/folders/1KRZmrC2UXTClxmYjrTLkqFTehNC_myn5?usp=drive_link


📖 About

This project demonstrates the complete journey of designing, fabricating, and programming a WiFi-controlled 3×3 LED Matrix from scratch. It combines hardware design, PCB fabrication, and IoT programming to create a functional wireless LED control system.

What Makes This Project Unique?

  • Custom PCB Design: Designed from ground up using EasyEDA, including schematic creation, component placement, and trace routing
  • Real Fabrication: The PCB was professionally manufactured using exported Gerber files, making this a real-world hardware project
  • IoT Integration: Leverages the ESP8266's built-in WiFi capabilities for wireless control, eliminating the need for physical connections
  • Scalable Architecture: The design principles can be extended to larger LED matrices (8×8, 16×16, etc.)
  • Educational Value: Perfect for learning about PCB design workflow, microcontroller programming, and IoT fundamentals

Technical Highlights

  • Microcontroller: ESP8266 (NodeMCU) with built-in WiFi module
  • Design Tool: EasyEDA for schematic and PCB layout
  • Programming: Arduino IDE with ESP8266 core
  • Power Supply: USB-powered (5V) for portability
  • Control Method: WiFi-based web interface for pattern selection

This project serves as a foundation for understanding how modern IoT devices are built—from circuit design to wireless communication. It's ideal for students, hobbyists, and anyone interested in learning embedded systems and PCB design.


📁 Project Structure

WiFi-Controlled 3×3 LED Matrix/
│
├── Code/
│   └── main.ino                           # Arduino code for ESP8266 (WiFi AP + Web Server)
│
├── Images/
│   ├── after final connections.jpg        # Final assembled PCB with components
│   ├── pcb after printing .jpg            # Fabricated PCB (bare board)
│   ├── Screenshot 2025-12-15 at 1.21.13 AM.png  # EasyEDA schematic design
│   ├── PCB_Design.png                     # EasyEDA PCB layout view
│   └── PCB_PCB_wled-project_2_2025-12-18.png    # Latest PCB design render
│
├── PCB_PCB_wled-project_2_2025-12-18.json # EasyEDA PCB design (JSON format)
├── PCB_wled-project_2_2025-12-18.dxf      # PCB design (DXF CAD format)
│
└── README.md                               # This file

File Descriptions

Code Files

  • main.ino: Complete Arduino sketch with WiFi AP setup, web server, and LED control logic

PCB Design Files

  • PCB_PCB_wled-project_2_2025-12-18.json: EasyEDA project file (can be imported back into EasyEDA for editing)
  • PCB_wled-project_2_2025-12-18.dxf: DXF CAD file for mechanical integration or PCB outline verification

Images & Documentation

  • after final connections.jpg: Completed project with all components soldered
  • pcb after printing .jpg: Fresh PCB from fabrication house
  • Schematic & Layout PNGs: Design screenshots from EasyEDA
  • PCB_PCB_wled-project_2_2025-12-18.png: Latest PCB design visualization

Features

  • Custom PCB design using EasyEDA
  • Wireless LED control via ESP8266
  • Compact and clean PCB routing
  • Real-time LED pattern switching
  • Scalable design for larger matrices

📷 Project Images

PCB After Final Connections View

PCB After Printing View

EasyEDA Schematic Design

PCB Layout Design


🛠 Hardware Used

  • ESP8266 (NodeMCU)
  • 9 × LEDs (3×3 Matrix)
  • Current limiting resistors
  • Custom fabricated PCB
  • USB / 5V power supply

Working Principle

The ESP8266 controls the LED matrix using GPIO pins with multiplexing logic.
LED patterns are updated wirelessly over WiFi using a simple control interface.


💻 Code Implementation

Circuit Design

This project uses a single-pin control design where all 9 LEDs are connected through current-limiting resistors to a common GPIO pin:

  • Control Pin: D13 (GPIO13 on NodeMCU)
  • Control Method: PWM-based brightness modulation
  • Pattern Simulation: Brightness varies based on number of LEDs in pattern

WiFi Configuration

SSID: LED_Matrix
Password: 12345678
IP Address: 192.168.4.1

The ESP8266 creates a WiFi Access Point that you can connect to from any device (phone, tablet, laptop).

Web Interface Features

  • Visual LED Grid: Real-time display of LED states with glowing effects
  • Individual Control: Click any LED in the grid to toggle it
  • Preset Patterns:
    • Cross Pattern
    • Corners Pattern
    • Border Pattern
    • Diagonal Pattern
  • Animation Mode: Sequential LED animation with fade effects
  • All ON/OFF: Quick controls for full matrix state
  • Auto-Sync: Interface updates every 500ms to show current state

How PWM Control Works

Since all LEDs share a common pin, the code uses PWM to simulate patterns:

  • More LEDs in pattern = Higher brightness
  • Fewer LEDs in pattern = Lower brightness
  • Animations use timing and fade effects for visual appeal

🚀 Software Setup

Prerequisites

  1. Arduino IDE installed (version 1.8.x or newer)
  2. ESP8266 Board Support installed
    • Go to: File → Preferences
    • Add to "Additional Board Manager URLs":
      http://arduino.esp8266.com/stable/package_esp8266com_index.json
      
    • Open: Tools → Board → Boards Manager
    • Search for "ESP8266" and install

Upload Instructions

  1. Open Code/main.ino in Arduino IDE
  2. Select Tools → Board → NodeMCU 1.0 (ESP-12E Module)
  3. Select your COM Port (Tools → Port)
  4. Click Upload (or press Ctrl+U)
  5. Wait for compilation and upload to complete

First Time Setup

  1. Power the NodeMCU via USB (5V supply)
  2. Open WiFi settings on your phone/laptop
  3. Connect to WiFi network: LED_Matrix
  4. Enter password: 12345678
  5. Open web browser and navigate to: http://192.168.4.1
  6. The LED control interface will load automatically

Testing

  • Click individual LEDs in the web interface
  • Try preset patterns to see brightness variations
  • Use "Animate" to see the welcome sequence
  • Monitor Serial output (115200 baud) for debugging

📝 Code Structure

main.ino
├── WiFi Access Point Setup
├── Web Server Configuration
├── HTML/CSS/JS Interface (embedded)
├── Pattern Control Functions
│   ├── Cross, Corners, Border, Diagonal
│   └── Animation sequences
├── PWM Brightness Control
└── Serial Debugging Output

🔧 Customization

Change WiFi Credentials

const char* ssid = "YOUR_NETWORK_NAME";
const char* password = "YOUR_PASSWORD";

Adjust Control Pin

const int CONTROL_PIN = D13;  // Change if using different GPIO

Modify Patterns

Edit pattern arrays in handleCommand() function:

bool pattern[] = {1, 0, 1, 0, 1, 0, 1, 0, 1};  // Custom pattern

Future Improvements

  • Expansion to 8×8 LED matrix
  • Mobile application control
  • PWM-based brightness control
  • WebSocket-based real-time animations

Author

Ankit Kumar Tiwari
B.Tech – Electronics & Communication Engineering

About

WiFi-controlled 3×3 LED Matrix PCB project using ESP8266 (NodeMCU). Features custom PCB design in EasyEDA, professional fabrication from Gerber files, and wireless control via WiFi. A complete hardware project demonstrating IoT integration, embedded programming, and PCB design workflow—perfect for students and hobbyists.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages