all | audio | badgelife | breakout | clocks | displays | experiments | feather | handhelds | home automation | howto | LED art | misc | props | robots | sewing | software | tools | no_category

Club Matrix

heavily inspired by the c-base matelight by jaseg, "just" shrunken down

Raspberry PI 3B+ powered LED matrix with the same resolution as the c-base matelight with 16x40 LEDs. Fun fact, when you buy a ten pack of 8x8 matrices, you get the same amount of LEDs = 640 of them.

Club Matrix | Power Wiring

2021-09-12 15:37:00

The PSU has three Terminal outputs for 5V. One is used for connecting directly to the Raspberry PI. The other two are each connected to a 6 position screw terminal adapter (https://www.amazon.de/gp/product/B076CGXKBY/) with a 14 gauge silicone cable (probably too big for use case). A pair of ground and voltage terminals can supply an 8x8 matrix directly. The data wires are then connected like shown in a previous log (https://hackaday.io/project/169093-club-matrix/log/172245-from-10-x-8x8-leds-to-40-x-16-leds). 

https://cdn.hackaday.io/images/1404211631454023918.jpeg

Club Matrix | Power Wiring

2021-09-12 15:37:00

The PSU has three Terminal outputs for 5V. One is used for connecting directly to the Raspberry PI. The other two are each connected to a 6 position screw terminal adapter (https://www.amazon.de/gp/product/B076CGXKBY/) with a 14 gauge silicone cable (probably too big for use case). A pair of ground and voltage terminals can supply an 8x8 matrix directly. The data wires are then connected like shown in a previous log (https://hackaday.io/project/169093-club-matrix/log/172245-from-10-x-8x8-leds-to-40-x-16-leds). 

https://cdn.hackaday.io/images/1404211631454023918.jpeg

Club Matrix | Not The Final Countdown

2020-02-17 11:55:42

We had an event with short talks at the xHain Hackerspace recently and we wanted to use the club matrix as a timer for the presenter. I have yet to write a font generator and a script to do that though and the only thing I can kind of reliably do is playing a video. The sane solution: search on youtube for a 15min countdown video, which kind of worked. 

But since we were at the hackerspace, one member wanted to try to let ffmpeg generate the countdown. The first version of the script by Niklas was almost perfect, but used a PNG as a background image. Then another member (danimo) took a look and removed the background image and let ffmpeg turn the background from green to red in the last minute.

All done in a filter for ffmpeg. Very nice.

https://gist.github.com/davedarko/956772590b413734c38af7f55b3eaa04

Club Matrix | Not The Final Countdown

2020-02-17 11:55:42

We had an event with short talks at the xHain Hackerspace recently and we wanted to use the club matrix as a timer for the presenter. I have yet to write a font generator and a script to do that though and the only thing I can kind of reliably do is playing a video. The sane solution: search on youtube for a 15min countdown video, which kind of worked. 

But since we were at the hackerspace, one member wanted to try to let ffmpeg generate the countdown. The first version of the script by Niklas was almost perfect, but used a PNG as a background image. Then another member (danimo) took a look and removed the background image and let ffmpeg turn the background from green to red in the last minute.

All done in a filter for ffmpeg. Very nice.

https://gist.github.com/davedarko/956772590b413734c38af7f55b3eaa04

Club Matrix | Showing the IP on startup

2019-12-27 15:16:12

Here at 36C3 congress the "bla.local" bonjour stuff doesn't work. Incase you see 127.0.1.1 as the IP, you have to edit that out in the following file:

sudo nano /etc/hosts

Club Matrix | Showing the IP on startup

2019-12-27 15:16:12

Here at 36C3 congress the "bla.local" bonjour stuff doesn't work. Incase you see 127.0.1.1 as the IP, you have to edit that out in the following file:

sudo nano /etc/hosts

Club Matrix | From 10 x 8x8 LEDs to 40 x 16 LEDs

2019-12-24 19:30:18

So this took me a while. The library that I'm using stores the matrix data in a one dimensional array with the length of 40 * 16. 

Each LED matrix is 8x8 and are connected in that order: 

0 - 1 - 2 - 3 - 4
                |
9 - 8 - 7 - 6 - 5

 And each LED matrix is wired like this:

0 - 1 - 2 - 3 - 4 - 5 - 6 - 7
8 - 9 - . . . . . . . . . . .
. . . . . . . . . . . . . . .
. . . . . . . . . . . . .  63

When I finally found the error in this function, I had already written a lookup table for all the 640 LEDs. This is fixed for my setup, but it should be possible to rearrange it for others.

int matrix_arrangement[] = { 0,1,2,3,4,9,8,7,6,5 };
void club_matrix_render(void)
{
    for (int i=0; i<led_count; i++)
    {
        int led_real_x = i % width; // 0 to 39
        int led_real_y = i / width; // 0 to 1

        int matrix_number_x = led_real_x / 8; // should be 0 to 4
        int matrix_number_y = led_real_y / 8; // should be 0 or 1

        int matrix_number = matrix_number_y * 5 + matrix_number_x; // 0 to 9

        int matrix_x = led_real_x % 8; // 0 to 7
        int matrix_y = led_real_y % 8; // 0 to 7

        ledstring.channel[0].leds[matrix_arrangement[matrix_number] * 64 + matrix_y * 8 + matrix_x] = matrix[i];
    }
}

Club Matrix | From 10 x 8x8 LEDs to 40 x 16 LEDs

2019-12-24 19:30:18

So this took me a while. The library that I'm using stores the matrix data in a one dimensional array with the length of 40 * 16. 

Each LED matrix is 8x8 and are connected in that order: 

0 - 1 - 2 - 3 - 4
                |
9 - 8 - 7 - 6 - 5

 And each LED matrix is wired like this:

0 - 1 - 2 - 3 - 4 - 5 - 6 - 7
8 - 9 - . . . . . . . . . . .
. . . . . . . . . . . . . . .
. . . . . . . . . . . . .  63

When I finally found the error in this function, I had already written a lookup table for all the 640 LEDs. This is fixed for my setup, but it should be possible to rearrange it for others.

int matrix_arrangement[] = { 0,1,2,3,4,9,8,7,6,5 };
void club_matrix_render(void)
{
    for (int i=0; i<led_count; i++)
    {
        int led_real_x = i % width; // 0 to 39
        int led_real_y = i / width; // 0 to 1

        int matrix_number_x = led_real_x / 8; // should be 0 to 4
        int matrix_number_y = led_real_y / 8; // should be 0 or 1

        int matrix_number = matrix_number_y * 5 + matrix_number_x; // 0 to 9

        int matrix_x = led_real_x % 8; // 0 to 7
        int matrix_y = led_real_y % 8; // 0 to 7

        ledstring.channel[0].leds[matrix_arrangement[matrix_number] * 64 + matrix_y * 8 + matrix_x] = matrix[i];
    }
}