5×5 rgb lpd6803-led matrix arduino controlled

RGB LED Matrix

a 5*5 rgb led matrix, made with arduino and lpd6803 based leds from adafruit.
with an pir sensor, it goes on if it detects movements and a ir distace sensor, 1 animation shows the distance you have from the sensor :).

because its beautiful and cool 😉

my spelling:
well, sorry if i make stupid spelling mistakes, i’m dyslectic and live in Holland

Step 1: How it works

how it works:
it uses an arduino uno that controls the lpd6803 chips in the rgb leds, so i can set each led individually. the arduino reads text files from an sd card, i’ve made a program(in c#) where you can make animations and store them so the arduino can read them.

RGB LED Matrix

Step 2: Materials needed

-arduino uno (other arduino’s probbably work, but i havent tested)
-25 rgb leds with lpd6803 controllers( the led’s i used arent being saled anymore 🙁 these are an newer version, but you will need to adapt the arduino code a bit)
-network shield(for sd card)(probably other shields with sd cards wil work)
-5v dc power supply min 1A

ir distance senso r (1 animation uses it)
pir senso r  (the matrix will go on if it detects motion(saves a bit of energy))
-2 pushbuttons

-soldering iron
-wire stripper
-some wires
-wooden board

Step 3: Part with wood

this is the part im bad at, but ill discribe what ive done:
iv’e put my led’s 5cm apart (horizontally and vertically) in a shiny wooden plate from an old kitchen.
the led’s from adafruit need 11mm holes(drill them carfully).

at the bottom ive place my arduino with double-sided thape, and left of it a big hole for the pir sensor, the ir distance sensor is placed on top(now it looks like it has eyes 😉 )

then put the led’s in the holes beginning top left(frot vieuw) going from left to right down(see picture)

Step 4: The electronics

for the leds 

led’s clock –> 6
led’s data –> 7
pir sensor –> A5 (if you have no pir sensor, connect it to the 5v+)
ir distance sensor –>A4 (if you don’t have a distance sensor juslt leave it open)

gnd –> Button 1 –> A0
gnd –> Button 2 –> A1

sd: (the default of the ethernet shield)
mosi –> 11
miso –> 12
clk –> 13
cs –> 4LED Matrix Circuit

ir distance senor +                       —–> all to arduino’s 5v+

ir distance sensor –
pir –                                                     —–> all to arduino’s gnd
negative from 5v power supply
led’s –
button –

led’s + —-> positive from 5v power supply

all black cables are soldered together as central gnd
all red cables(exept one) are soldered together as sensor 5v+ (from arduino)
all yellow cables are signal cables(watch it are 5 yellows so don’t mix them up!!)
you also find mine animations here, just put them on the sd card

[box color=”#985D00″ bg=”#FFF8CB” font=”verdana” fontsize=”14 ” radius=”20 ” border=”#985D12″ float=”right” head=”Major Components in Project” headbg=”#FFEB70″ headcolor=”#985D00″]-Arduino uno
-25 rgb leds with lpd6803 controllers
-network shield[/box]

Step 5: Arduino’s Program

well, im not the bast at programming, but it works 😉

this is the code i used, you can download it here, feel free to hack/mod.(and post nice pictures of it 😉 )

#include <TimerOne.h>
#include <SD.h>
#include “LPD6803.h”

int raw;
int dat[6];
int nr = -1;
int rgb = 1;
int digit = 0;
int kleur[100][3];
int beeld = 7;
int teller = 0;
int wachttijd = 1000;
int wachtuit = 0;
int talleur = 0;
int beweging = 1;
int beatdet = 0;

File dataFile;
const int chipSelect = 4;//sd stuff

LPD6803 strip = LPD6803(25, 7, 6);//starts the lpd strip

void setup()
Serial.print(“Initializing SD card…”);

strip.setCPUmax(60);//start de ledstrip

pinMode(10, OUTPUT);//for the sd

if (!SD.begin(chipSelect)) {
Serial.println(“Card failed, or not present”);
// don’t do anything more:
Serial.println(“card initialized.”);


Leave a Comment

Your email address will not be published. Required fields are marked *