# Pixel Table # Pixel Table Goal: create a table with an `12 x 12` LED grid. # Material - Led Strip `WS2812b`, 5 meters, 30 LED / m (Total: 150 LED on it, we will use `144 = 12 x 12` LEDs). - Ikea table (the one who cost 10€, `55 x 55 cm`) - Plexiglass 50 x 50, 3mm or around, depending on if you want to put stuff on your table or not. Thinner: cheaper, but not that solid, Thicker: expensive, increase oppacity. - Carboard (high density, the one used for moving box) - Raspberry Pi (zero is fine, but slow) - Gray cooking paper (sulfurized paper) - Tools (cutter, glue, solder iron) - 2 Power supply: - One for the Pi (5V, small amp) (USB micro B) - One for the LED strip - Breadbord for testing and small wires # Steps Need to test to make small images to load. 12 strips of 12 RGB LEDs. ![12 strips of 12 RGB LEDs](/images/PixTable/001_small.jpg) [![](/images/PixTable/002_small.jpg)](/images/PixTable/002.jpg) Basic soldering station. [![](/images/PixTable/003_small.jpg)](/images/PixTable/003.jpg) First add some tin on the led strip. [![](/images/PixTable/004_small.jpg)](/images/PixTable/004.jpg) Then, attach the wires. [![](/images/PixTable/005_small.jpg)](/images/PixTable/005.jpg) Wires with clip will facilitate the full assembly / replacement if any issue. *Pros*: - If one sub LED strip fail, you can replace it easily by disconnecting it from its neighborhood - Easier soldering (as you manipulate 12 LEDs at a time) - Possibility to test the welding of each strip separatedly *Cons*: - Connector take a non-negligeable space on the border of the table. [![](/images/PixTable/006_small.jpg)](/images/PixTable/006.jpg) Test that the welding are okay and the strip work correctly. [![](/images/PixTable/007_small.jpg)](/images/PixTable/007.jpg) Protect the wire. [![](/images/PixTable/008_small.jpg)](/images/PixTable/008.jpg) ## Destroying the Ikea table Cut a middle square to keep the border table and avoid the table legs. 5cm from the edge, so you get a square of size `45 x 45 cm`. (Above the table legs, there is hardwood that cannot be cut with a cutter). ![](/images/PixTable/009_small.jpg) ![](/images/PixTable/010_small.jpg) ![](/images/PixTable/011_small.jpg) Remove all the cardboard within the table. ![](/images/PixTable/012_small.jpg) Then, cut strip of cardboard that are of the size of the removed square. ![](/images/PixTable/013_small.jpg) Cut the cardboard to create notches. If you have a laser cutting available, this would save you time ! You can use wood in that case. ![](/images/PixTable/014_small.jpg) Assemble the matrix. ![](/images/PixTable/015_small.jpg) Try to put it in the square and adjust the edges if necessary. ![](/images/PixTable/016_small.jpg) ## Adding the LEDs Draw parallel lines on the wood. As we have 30 LED / m, two LEDs are spaced by 3.3 cm. So are the lines. ![](/images/PixTable/017_small.jpg) Fix the LEDs with glue or use the rubber of the LED if available. Be careful to alternate the LED strip direction, so you get male connected to a female connector. You need to drill a hole to take out the first connector to supply with current and data. ![](/images/PixTable/018_small.jpg) Cut the plexiglas a little bit larger than the square. Drill one hole on each edge to fix it on the table corner. Cut the cooking paper. Use scotch to join to pieces as it is very likely that you will not have the correct width. It changes the opacity of the box, avoiding to see directly the LED light. ![](/images/PixTable/019_small.jpg) Fix everything. ![](/images/PixTable/020_small.jpg) The Pi is scotched bellow the table. # Coding You need to configure a raspy (an Arduino Mega is okay, but you cannot add very large fancy programs or add controllers). ## Electrical connection You need to connect correctly the wires. The Pi cannot supply everything. For the connections: | What | White / Ground | Green / Data | Red / 5V | |------|----------------|--------------|----------| | Pi | x | x | | | External Supply | x | | x | 144 LED, each requiring between 30-60mA. Traditional power supply are 3A and 5V $$144 \times 30\text{mA} = 4320 = 4.3 \text{A}$$ This is when LED have their maximal brightness. So you can accept to have a lower supply. ## Working with matrix The basic LED strip library [GitHub](https://github.com/rpi-ws281x/rpi-ws281x-python), 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. ## Exemples ![](/images/PixTable/021_small.jpg) ![](/images/PixTable/022_small.jpg) ![](/images/PixTable/023_small.jpg) ![](/images/PixTable/024_small.jpg) # Final result ![Final animated result.](/images/PixTable/Table_gif.gif) # Other informations If you want help to reproduce the project, I can help by giving you the specific dimensions. A point to consider is for power supply. You cannot supply 144 LEDs with the Pi (or Arduino). You need to use an external supply for the LEDs and connect the data and ground to the Pi (by memory, please check). More LEDs per meter are not recommended (larger power supply, more cardboard, ...)