Thursday, February 13, 2025

New Big LED sign powered by Raspberry Pi

I have made another big LED sign, but this time it is powered by a Raspberry Pi.  At first I used the Adafruit Hat ,but I have upgraded to the three HUB75 Hat from ElectroDragon! This enalbes three chains of LED arrays. So far I have 5 32x32 panels in each chain but I will likely expand that.

This is a view of the back of the assembled panel. I am using metal brackets to hold the panels together as they have on inch spacing. 24mm is ideal as the one inch spacing leaves about a two mm space between the panels. I have a 3D printed version of the brackets on thingiverse and have used them in other designs.

Here is a couple of pictures of the panel being lit up. The text demo is limited to one line of panels.

There are several demo programs to check out the proper operation of the Raspbery Pi adapter.


Here is a link to the video of the demos;

https://youtu.be/44ykJb_ZB7A?si=ylKY5zBix4FU4i2X

Sunday, February 9, 2025

Testing LED panels for bad LED's

I have written two programs to test LED panels after someone sold me a pile of them with many bad LED's.  Some panels had over 30 LED's that were not working.  He also shipped them with no padding between the LED's!  This resulted in smashed LED's and some of the alignment nubs were broken off.  Fortunatly with some soldering I was able to reduce the number of bad LED's to 3 or 4 per panel.  Some LED's had broken runs but most of them just needed to be resoldered.

The first program tests the colors and leaves the panel white for quickly testing if the LED's just soldered are working.  This does not work on 16S panels for some reason.

// RGBcolors test for Adafruit RGBmatrixPanel library.

// For testeing LED arrays for bad bits.

#include <RGBmatrixPanel.h>

#define CLK  8   // USE THIS ON ARDUINO UNO, ADAFRUIT METRO M0, etc.

#define OE   9

#define LAT 10

#define A   A0

#define B   A1

#define C   A2

#define D   A3

// Does not work with 16S panels if you add "D" nothing happens!

RGBmatrixPanel matrix(A, B, C, CLK, LAT, OE, false);

void setup() {

  matrix.begin();

   // fill the screen with colors

  matrix.fillRect(0, 0, 32, 32, matrix.Color333(0, 7, 0));

  delay(1000);

  matrix.fillRect(0, 0, 32, 32, matrix.Color333(7, 0, 0));

  delay(1000);

  matrix.fillRect(0, 0, 32, 32, matrix.Color333(0, 0, 7));

  delay(1000);

  matrix.fillRect(0, 0, 32, 32, matrix.Color333(7, 7, 7));

  delay(1000);

}

void loop() {

}


The next program is for sorting LED panels by how they are internally wired.  There are 16S, 8S (There are many varieties of 8S) and 4S panels.  It scans all LED's one at a time.


I could not get this to work with the normal drivers so I wrote my own using "bit banging".  Its slow but works great!

// RGB bitbang test bits by scanning

#define CLK  8  

#define OE   9

#define LAT 10

#define A   A0

#define B   A1

#define C   A2

#define D   A3

#define R1  2

#define G1  3

#define BL1  4

#define R2  5

#define G2  6

#define B2  7

int tbit;

int row;

int col;

void setup() {

  pinMode(A, OUTPUT);

  pinMode(B, OUTPUT);

  pinMode(C, OUTPUT);

  pinMode(D, OUTPUT);

  pinMode(CLK, OUTPUT);

  pinMode(OE, OUTPUT);

  pinMode(LAT, OUTPUT);

  pinMode(R1, OUTPUT);

  pinMode(G1, OUTPUT);

  pinMode(BL1, OUTPUT);

  pinMode(R2, OUTPUT);

  pinMode(G2, OUTPUT);

  pinMode(B2, OUTPUT);

  }

void loop() {

  // Set sequential bits

  for (col=0; col<16; col++){

    for (row=0; row<32; row++){

      for (tbit=0; tbit<32; tbit++){

        digitalWrite(R1, LOW);  

        digitalWrite(G1, LOW);  

        digitalWrite(BL1, LOW);  

        if (tbit == row){

          digitalWrite(R1, HIGH); 

          digitalWrite(G1, HIGH); 

          digitalWrite(BL1, HIGH); 

        }

      digitalWrite(CLK, LOW);  //Clock data in

      digitalWrite(CLK, HIGH);  

      } 

    // latch and display results

    digitalWrite(OE, HIGH);  // disable output while latching data.

    digitalWrite(LAT, LOW);  

    // select next column if it has changed

    digitalWrite(A, LOW);

    digitalWrite(B, LOW);

    digitalWrite(C, LOW);

    digitalWrite(D, LOW);

    // update row selection

    if ((col & 0x0001)>0)digitalWrite(A, HIGH);  

    if ((col & 0x0002)>0)digitalWrite(B, HIGH);  

    if ((col & 0x0004)>0)digitalWrite(C, HIGH);  

    if ((col & 0x0008)>0)digitalWrite(D, HIGH);  

    digitalWrite(LAT, HIGH);  

    digitalWrite(OE, LOW);  

    delay(20);

    }

  }

}


Sunday, February 2, 2025

Explaining the different types of LED Arrays

Not all LED arrays are the same, there are many varieties within a set size and set amount of LED's.  There are the P numbers.  P10 means 10mm LED spacing.  P6 is 6mm spacing.  P3 is 3mm spacing.

Then there are the S or scan or row select numbers.  Typical S numbers are S4, S8, and S16.  But they even vary within these numbers!  Lets start with a 16S arrangement.  In a 32 by 32 LED array there are two 32 bit shift registers one for the top half and one for the bottom (As well as one for each color).  Then there are 16 row selectors that select what two rows are currently lit up.


Next there is an 8S LED array.  Withing a 32x32 array there are four 32 bit shift registers.  The top two and the bottom two are sequential. (This is for each of the three colors) Then there are 8 row selectons.  These select what four rows are currently lit up.


Now things get tricky.  Some arrays do not follow the normal pattern.  For instance the modified 8S panel depicted below.  These are not compatable with some controllers.  There are two 16 bit shift registers and a 32 bit shift register for the top half and the same for the bottom.  (This is for each of the three colors)  The shift register sequence is the top 16, then the middle 32, then the other top 16 bits.


So not only are you dealing with color differences between different batches you are dealing with scanning differences.  You cannot mix an 8S and a modified 8S in the same chain of LED arrays.