I have seen many times the project on Instructable, and I wanted to build mine.
NB: Last time I used a soldering Iron was when I was 14, so 10 years ago.
Let's go step by step.
Pix
Ikea Table, the chepest that you can find.
Led strip: WS2812b.
Usualy, power supply can give you 3A.
$\#LED = \frac{Power}{LED_{consumtion}}$
$\#LED = \frac{3 A}{30 \sim 60 mA/LED} = 50 \sim 100 LED$
As you may not want to light your room with your table, it is okay to not fully supply your LED. Led intensity can be turned from 0 (RGB(0, 0, 0)) to 100 (RGB(255, 255, 255)). We can choose to lower the power supply.
MaxPow = U × I = 5V * 3A = 15W
Looking at supermarket Light bulbs, power is in range of 13 to 26 W. So it is not so huge.
The table has a fixed size, 55 × 55, with 5 cm of borders on each side, leading to a working area of 45 × 45.
Led strip has multiple led spacing format:
As the strip has a width of 1cm, and that I expect regular spacing in both width and height, the strip of 144LED/m is discarded (plus, it would be uneasy to manipulate).
$NLED = Length LED/m
In 45 cm, I can put:
Total, using the same number of columns and rounding down:
Even with a margin of error, the last 2 options would need too much electrical engeneering for a starter project.
In informatic, it is easier to work with number that can be express as a power of 2, like 21 = 2, 22 = 4, 23 = 8, 24 = 16, ..., because of the writing in binary form and the possibility to use corresponding operator.
13 nor 12 is easily writable on a binary format. Let's drop this consideration, or choose your table to be 8 × 8.
From here, the programming part does not differ at all. The only thing that matter is: Do you want the symmetry to be centered on a point (Odd choice) or on a cross (Even choice). That is up to you.
I choose the Even choice, because I wanted a additional margin for my LEDs.
Pix
The goal is to obtain one pixel per led, not a mix. Each LED must have its compartment.
On the net, you would find 2 possibilities: cardboard and wood options. If you have a laser cutter, use it to go fast on this step, and take wood for solidity. If not, use cardboard and cut with hand cutter (takes a lot of time, be patient).
And test that it goes into the table without forcing.
Pix
Transform your LED strip into a LED matrix.
Cut every 12 (depend on your choice) LED the strip.
2 Options:
I choose first option, but it is up to you.
Check connection
Put lines where you will put the strips. Parallel, regulary spaced. Don't think that you are better than you are. Error propagation is very common.
I will put my Raspberry Pi BELLOW the table, as there isn't much space left above. Need a hole for the 3 cables (data / ground / 5V).
Strips usually have 3M sticker under it. It is not very performant for led. But as you will put the matrix above, this is not a big deal.
Be carefull: Zigzag the strip, else the connector won't fit.
As discussed in the introduction, the LED strip need a sufficient power supply. The Raspberry used is not strong enough for that.
You need to put an additional usb plug (or other, but it is easier to find a cable that match).
To simplify the scheme:
Nothing to say about. Connect the LEDs if not done before.
Put a sulfurized paper to opacify the glass. That allow to avoid direct light from the LEDs.
The basic LED strip library GitHub, where the basic command turn on pixel by giving a tuple (position, (r,g,b))
.
For the zigzag matrix, the only thing to do is to build a class of higher level which turn on/off pixels by taking a tuple ((row, col), (r,g,b))
that call the lower level API by converting (row, col)
into position
. The maths are easy ! Just draw on the paper.
The goal was to be able to test pattern without using the table, by displaying in my computer screen.
I tried to used Qt for that purpose. That worked initialy, but as the refresh rate was high, it quickly failed.