Full Color RGB LED Matrix Driver Shield

Hi All,

I am reaching out to you for help with a couple of problems/requests, ill make two separate threads.

The issue I have is either a hardware supply. I am looking for an alternative to this product here in Europe. I can get these

direct from Sunfounder, but shipping takes an absolute age and im still waiting 20 days later.

The size at 60x60mm is about spot on but I could go smaller. I use this software with the Uno GitHub - simracer-cz/iFlag: Race marshalling light board for iRacing.com motorsport simulation.

So I am looking for an alternative to the above sunfounder shield, I can get the LED matrix no problem, the Shield is my issue and want to find an alternative if possible, please. I don’t mind using a different led, its just got to be able to run the program.

Any advice recommendations would be helpful
Regards

This is how you post links.

and pictures

Fortunately, there are much simpler & better alternatives available now. Based on ws2812 LEDs, like this for example this or this

Hi

Ok great thanks,

thos that you posted are great and are perfect, not sure if they would work with the program i use on the uno. the one i have in the picture has a shield that the led connects troo and then that connects to the uno. all the pins are used from this shield.

Do you have an idea how to connect them please.

The Arduino sketch would need to change, to replace the Colourduino library with, for example, the FastLED library. We can help you with those changes, but you will be the person who will need to test the changes, because you have the whole setup, I assume. It would be worthwhile googling to find if anyone else had already made a version of the sketch with the necessary changes.

You can use Uno, but with the ws2812 matrix you could alternatively use Nano or possibly other types of Arduino. Connection is easy, only one pin to connect, plus power and ground. You may need a resistor, unless the cable from the display to the Arduino is short. Also a large electrolytic capacitor is a good idea, e.g. 470 or 1000uF.

Powering the ws2812 matrix is the most important consideration. The Colourduino matrix runs on power from the Uno's USB or barrel socket. The ws2812 matrix is capable of being far brighter, at least 8 times brighter, and so could potentially use 8 times more current, which is more than Uno can provide from USB or barrel socket. Fortunately, the FastLED library has settings to limit the maximum brightness and power usage to what the Uno can provide. If you want that extra brightness, you could provide more power using an external 5V supply. A ws2812 matrix with 64 LEDs could use over 3.5A, which would be eye-wateringly bright!

Are you using the standard sketch from this page?

//
// iFLAG LED Matrix Firmware
// =========================
// https://github.com/simracer-cz/iFlag
//
// Hardware needed:
//   1. Arduino Uno R3 (http://www.arduino.cc/en/Main/ArduinoBoardUno)
//   2. Itead Colors Shield v1.1 (http://imall.iteadstudio.com/im120417002.html)
//   3. Itead 60mm Square 8x8 RGB LED Matrix module (http://imall.iteadstudio.com/im120601005.html)
//
// Software needed:
//   1. Arduino IDE (http://www.arduino.cc/en/Main/Software)
//   2. Colorduino Library for Arduino IDE (https://github.com/lincomatic/Colorduino)
//   3. iFLAG host software (https://github.com/simracer-cz/iFlag)
//
// (c) 2015-2020 Petr.Vostrel.cz

#include <Colorduino.h>
#include <EEPROM.h>

// Version
byte major = 0;
byte minor = 22;

// Communication
#define DEVICE_ID      0xD2
#define PACKET_BYTE    0xFF
#define COMMAND_BYTE   0xFF
#define DRAW_COMMAND   0xA0
#define BLINK_COMMAND  0xA1
#define LUMA_COMMAND   0xA2
#define RESET_COMMAND  0xA9
#define PING_COMMAND   0xB0
int dataX;
int dataY;
int dataP;
int pinger;

// Color palette
byte colors[ 16 ][ 3 ]=
{
    {   0,   0,   0 },   // 0x00 | black
    { 255, 255, 255 },   // 0x01 | white
    { 255,   0,   0 },   // 0x02 | red
    {   0, 255,   0 },   // 0x03 | green
    {   0,   0, 255 },   // 0x04 | blue
    { 255, 255,   0 },   // 0x05 | yellow
    {   0, 255, 255 },   // 0x06 | teal
    { 255,   0, 255 },   // 0x07 | purple
    { 255,  33,   0 },   // 0x08 | orange
    {  55,  55,  55 },   // 0x09 | dim white
    {  55,   0,   0 },   // 0x10 | dim red
    {   0,  55,   0 },   // 0x11 | dim green
    {   0,   0,  55 },   // 0x12 | dim blue
    {  55,  55,   0 },   // 0x13 | dim yellow
    {   0,  55,  55 },   // 0x14 | dim teal
    {  55,   0,  55 },   // 0x15 | dim purple
};
byte balance[ 3 ] = { 36, 45, 63 }; // 0-63 RGB
                                    // Red is toned down to half here to limit the effects of its inevitable light
                                    // strength dominance due to physical custruction differences between all three
                                    // color chips in the matrix LED

byte luma = 100;                    // 0-100 % Luminosity level 

unsigned int blinker;
byte blink_speed= 0;

// Software reset
void ( *resetFunc ) ( void ) = 0;

void setup() 
{
    // Setup the LED matrix
    Colorduino.Init();
    Colorduino.SetWhiteBal( balance );

    // Communications port
    Serial.begin( 9600 );
    Serial.println( "##### iFLAG v"+String(major)+"."+String(minor)+" Hello!" );

    // Color cycle the matrix to test out
    byte test[] = { 0x05, 0x06, 0x07, 0x01, 0x00 };
    for ( int i = 0; i < sizeof( test ); i++ )
    {
        Colorduino.ColorFill(
            colors[ test[i] ][ 0 ], // R
            colors[ test[i] ][ 1 ], // G
            colors[ test[i] ][ 2 ]  // B
        );
        delay( 1000 );
    }
} 

void loop() 
{
    // Beacon
    if ( !(pinger++) )
        serialCommand( PING_COMMAND, DEVICE_ID, 0x00 );

    // Blinking
    if ( blink_speed && !(blinker+= blink_speed) )
        Colorduino.FlipPage();
}

void serialEvent(){
    while ( Serial.available() && Serial.peek() != PACKET_BYTE ) Serial.read();
    if ( Serial.available() >= 8 && Serial.read() == PACKET_BYTE )
    {
        if ( Serial.peek() != COMMAND_BYTE ) // Stream
        {
            dataX = Serial.read();          // (00-07) LED X
            dataY = Serial.read();          // (00-07) LED Y

            for ( int i = 0; i < 4; i++ )
            {
                dataP = Serial.read();      // (00-FE) four color pixels

                Colorduino.SetPixel(
                    dataX + i,                           // X
                    dataY,                               // Y
                    luma * colors[ dataP ][ 0 ] / 100,   // R
                    luma * colors[ dataP ][ 1 ] / 100,   // G
                    luma * colors[ dataP ][ 2 ] / 100    // B
                );
            }
        }
        else                        // Command
        {
            byte command[ 4 ] =
            {
                Serial.read(),      // (FF) Command trigger byte
                Serial.read(),      // (00-FE) Command id
                Serial.read(),      // (00-FE) Command value
                Serial.read()       // (00-FE) Command extra value
            };
            switch ( command[ 1 ] )
            {
                case DRAW_COMMAND:
                    Colorduino.FlipPage();
                    break;

                case BLINK_COMMAND:
                    blink_speed = command[ 2 ];
                    blinker = 0;
                    break;

                case RESET_COMMAND:
                    resetFunc();
                    break;

                case LUMA_COMMAND:
                    luma = command[ 2 ];
                    break;
            }
        }
    }
}

void serialCommand( byte command, byte value, byte extra )
{
    byte payload[ 8 ] =
    {
      PACKET_BYTE,      // (FF) start byte
      COMMAND_BYTE,     // (FF) serial command trigger byte
      major,            // (00-FE) major firmware version
      minor,            // (00-FE) minor firmware version
      command,          // (00-FE) command id
      value,            // (00-FE) command value
      extra,            // (00-FE) optional extra value
      0x00
    };

    for( int i = 0; i < sizeof(payload) / sizeof(payload[ 0 ]); i++ )
        Serial.println( payload[ i ] );
}

Hi

Yes thats the sketch i am using.

I can also add an external power supply, thats not an issue.

Ive googled and googled and i cannot find an alternative.

I really not sure what to do, i seem to have bought every led matrix panel on the market and shields, from Spark fun, RS components and ebay. Im at a loss.

your help is appreciated, please understand that.

Well, I don't think it's going to be too difficult to change that sketch to use a ws2812 matrix. It's short and we only have to change the lines that use Colorduino functions, replacing them with FastLED functions. There aren't too many, and for most, there's a like-for-like replacement.

The only thing that there is no direct replacement for is the Colorduino.FlipPage() function. It can be replaced with FastLED functions, just need to think about the easiest way to do it.

So before we go any further, is this something you want to try? Can you get an 8x8 ws2812 matrix in reasonable cost/time? If so, find a suitable one and post a link to it here so we can check it's suitable before you buy.

1 Like

Hi,

i think i already have one of those, i bought so many.

Anything else you think i could try ?

Many thanks again,

Matrix looks fine. Not sure what use that shield will be.

I suggest connecting the matrix up to your Uno or whatever, download the FastLED library and test it using one of the example sketches from the library. But before you upload the sketch, check there is a setBrightness() in setup() and limit it to maybe 32.

1 Like

Hi,

I really dont know what i doing wrong, ive tried just about everything and i cant even get a demo to work and any of the matrix i have bought, Never mind the iflag program.

I really dont know what to do, youtube just gives me video with no relevance.

sorry for being negative, i simply have no experience and there is no guide anywhere.

i tried to post a picture, but its wants a url.......its my picture not a website.

To display an image, attach it as you have done and post it. Then right-click on the attachment, copy the address, modify the post, click insert image icon and paste in the address. Yes, it's clunky!


Hmmm.... I can see the ws2812 matrix, I can see the Uno. They are not connected to each other. That is why it's not working. What's the relavence of all the other components on the desk? Is this the picture you intended to post?

1 Like

Ah yes that one, it shows all the matrix and shields ive bought trying to get it to work. Even that big panel. that i think is DOA

Ok, well, just follow any tutorial for ws2812 strips. That's all your matrix is, a strip folded into a square. And it's only to test it to make sure that's not DOA too.

1 Like