Introduction: Half Square Triangles LED Art

The idea for this project came to ME during the mental synthesis of my previous project "Half Square Triangles Moving Artistry". The project was quite difficult to unmitigated, I succeeded, information technology's right, but I wanted to totally remake the project on other bases. That's how this concept of "HST LED Art" was born, significance I used LEDs to display half transparent triangles models. Interestingly, during the design, I revealed that the LED organisation I used can let other purposes: it can be a matrix display of 8x16 LEDs, it can constitute a video display of 8x8 LEDs with 2 LEDs all in every cellphone... And at that place are a lot of projects supported on matrix displays, my way of arranging LEDs can be applied to many of these projects, bringing a new border on... Few examples are here on instructables:

  • Arduino RGB Matrix Phrase Clock
  • Table Gadget With 8x8 LED RGB Matrix and Arduino Uno
  • VERBIS - Desktop 8x8 RGB LED Ground substance Word Clock
  • ROME Time

For example, in my Verbis WordClock project, a blend is made between two colours to emphasize the words of the hour. The blend is ready-made with a single LED, but with this project it could be done with ii LEDs, one LED for cardinal color, some other LED for the separate color and the 'blend' could be such more natural.

So in the end, the Half Square Triangles Energizing Art becomes the Half Square Triangles LED Fine art :)

Step 1: Designing the LED Matrix

In ordination to make a display as close every bit come-at-able to the real one, as in my first project, I was not satisfied to make only a direct display of the HST models, one afterward the other, I cherished to make an animation that would come along between these displays.

I started by superimposing the foursome feasible positions of the triangles, and I came aweigh with simulacrum,

and for some intermediate positions I divided the ensuant square in two. That's how I came up with this image.

This wish be unmatched of the 16 cells of the pretending. I deman 8 LEDs and the animation to exist the theatrical performance of a gradual change from a color of a LED to some other people of colour from a "slice" at the end of the triangle and the same colorise change (merely vice versa) correct close to the 'slice' at the other end of the triangle. I know information technology doesn't sound too clear but a word-painting of this animation will show everything better, so I added a gif below.

After this, I tried to see how I bathroom position the LEDs using the Light-emitting diode despoil.

I do not privation to eager you with whol the iterations I imagined, the record-breaking result in my opinion is in the picture below:

You can also discove how the LEDs positions are related to the LEDs separation reference grid.

There are a total of 128 LEDs, which I classified into four groups of 32 LEDs that I would connect to four digital outputs of an Arduino Nano. Only Sir Thomas More about the LED groups in the next steps.

Step 2: Components, Materials

I used the following for this project:

  • WS2812 LED strip, 60 leds/meter, 128 pieces;
  • Arduino Nano Microcontroller 1 pc;
  • Wooden exposure frame 1pc;
  • Smoked Plexiglas 200mmx200mm, 3mm thick
  • White colored paper,
  • 5.5x2.5mm DC Female Plug with Cable;
  • 5V/2A power supply with 5.5x2.5mm District of Columbia Male Plug;
  • Sir Henry Wood screws 10x2.5mm;
  • Wires for connections,
  • 3D printed parts: Light-emitting diode support, LED splitter control grid, support legs, grid lockup parts, fixing parts, choice divider grids.

You can download the STL files for the 3D printed parts from Tinkercad.

I ordered the wooden frame online from a company that are technical in photo framing, and some other frame accessories. The dimensions of the compose section are those in the reckon under.

Arsenic always, although I specified in the order the inner size I wanted (as close as possible to 200mm), the frame that was delivered to me had an internal size of about 204mmx203mm, that's why I needed some 1.5 - 1.6 mm thick plates to lock the grid.

I also designed 2 another divider grids, a simpler version of the divider higher up and an 8x8 cell power system for a standard LED matrix. You can find them on Tinkercad.

I printed them and used them in the videos, which you can spotter in the abuse 6 "how is it working".

Atomic number 3 for the rest of the materials, everything is standard, you derriere see them in the pictures above.

Step 3: Schematics

It is a rattling dim-witted conventional and consists lone of the Arduino Nano module, LEDs and the 5V/2A power cater. I don't have much to add together :)

Gradation 4: Twist

After impression on the 3D printer the LED support and the LEDs separation control grid, I moved connected to perhaps the most important phase of the construction: fastening the pieces of LED strip to the support. I started aside cutting the necessary lengths from the LED strip, there are the longest pieces that contains 14 LEDs and the shortest one with 2 LEDs. Then, I unfolded the protective report of the self-adhesive endure in the midst of the strip and I fixed the midriff piece with some LEDs, taking concern to match the position of the LEDs as well as possible with the guide lines connected the support. Gradually, I removed the defensive paper to the edges of the pieces of strip and simultaneously I fixed the LED strip carefully. When I was shut down to the ends, I completely removed the protective paper, folded the ends of the landing strip and inserted them into the slots in the support. I thus fixed the pieces of LED strip from layer I (blue colouring) and so layer II (green color) according to the physique (see likewise photos above).

Tip: Avoid having soldered parts like this

in the LED strip pieces as much as realistic. In the case of such soldering, the space between the LEDs is never the compulsory one. In my case, it should be 1000/60 = 16.667mm (60 leds/m). Many times, even in the manufacturing plant, this outdistance is not respected, I had 60 leds/m strips where the distance between the LEDs was 16.4 - 16.2 millimeter, over long distances (many LEDs) this error accumulates more and more. It is utilitarian to measure the undress you are working with before, ie to measure if the outstrip between the LEDs is correct and choose a strip consequently.

Also be same careful when orienting the LED strips, Data OUT (Ut) always connects to Data IN (DI).

I so made the connections according to the electronic scheme. I strengthened the ties with a bit hot glue. I put the Arduino Nano in a slim 3D written case, I took the model from Thingiverse, I changed the dimensions a bit to fit the Nano clone I used. I also successful changes to the sized of the gap in which the connections entered. If you require to download my version, it's present on Tinkercad just you can of path use any Nano envelopment you like. The complete LEDs + electronics + support assembly can be seen in the photos preceding.

I and so put in the frame the man of plexiglass, the white paper cut to the size of 200mmx200mm and the separation grid. After adjusting the LED support, I marked the place where I will put the fixing pieces. I trained 2mm holes in the frame and screwed the pieces to the frame by pressing lightly on the LED support. I also marked the lay for my supporting feet, which I attached to the frame with woody screws.

Check the photos in a higher place.

The construction is finished!

Step 5: Software

The only library I used is the FastLED library!

Earlier I bring in you to the software part for the Half Square Triangles Light-emitting diode Art, I would like to show you some small demonstration codes so that you rump understand how versatile this LED array can personify.

Palette Exhibit

The code is based on Mark Kriegsman's inscribe here which displays several colouring material palettes from cpt-city, with a gradual modulation from one color in pallette to some other. The difference from the original code is that I used various semblance palettes just like in the code, from this youtube video recording. Course, the definition of LED strips is different, I used the definition of multiple strips, as in the FastLED software documentation hither, and it appears in the initialization cypher like this:

FastLED.addLeds<CHIPSET, 2, COLOR_ORDER>(leds, 0, 32).setCorrection( TypicalLEDStrip ); FastLED.addLeds<CHIPSET, 3, COLOR_ORDER>(leds, 32, 32).setCorrection( TypicalLEDStrip ); FastLED.addLeds<CHIPSET, 4, COLOR_ORDER>(leds, 64, 32).setCorrection( TypicalLEDStrip ); FastLED.addLeds<CHIPSET, 5, COLOR_ORDER>(leds, 96, 32).setCorrection( TypicalLEDStrip );

CHIPSET being WS2811 and COLOR_ORDER GRB

There are four groups of 32 LEDs all socially connected to the appendage outputs 2,3,4,5 of the Arduino Nano Otherwise, everything is as in the original code, you can download information technology on github and watch how it looks in action at law in the video from the next footmark.

Discharge Demo

I adapted Stefan Petrick's code from github. Here I used Light-emitting diode mapping to a LED array that is easier to manage in code. You byword that I in use four groups of 32 LEDs that are fixed to the support in the rank that is in the figure under.

If I want to treat LEDs A belonging to a matrix, it is very difficult to find a procedure for their proper mapping. Sol I used a cowcatcher align - m_leds - that simulates a criterion matrix (not serpentine). This cushion array helps me call a certain LED in the array untold easier. See the figure below:

Frankincense the sixth Light-emitting diode in wrangle 2 can be represented A

              leds[m_leds [2 * 8 + 6]]

and that's LED number 22 from m_leds buffer raiment and LED add up 50 in the leds main array - practice not forget the numbering of arrays elements starts with 0! :).

I did the same in this code, which you can buoy also uncovering on github. In the video I recorded the force with 2 grid variants. You can make water a variant even without a grid, simply the support should be at a distance from the diffuser theme (using a printed systema skeletale with a stature of 12mm, without compartments) then the effect could be wish on Youtube present.

StopWatch Demo

In this small demo I wanted to see how the numbers look on this array of LEDs.

Quatern Symmetry Exhibit

I displayed in the 4x8 dial happening the superior-left a random number of LEDs with unselected colors and I mirrored them horizontally, vertically and in both directions. The result was an interesting kaleidoscope upshot. I hope you will enjoy it.

Half Angular Triangles LED Nontextual matter

For this program I used the definition of multiple LED strips exactly like in the previous monstrance examples and I besides victimised the m_leds buffer storage array as in the burn, stopwatch and four balance examples.
But I would like to clarify a little how I arrived at the values in the hst_cell_origin and hst_cell_offset arrays.

const byte hst_cell_origin[] = {0, 2, 4, 6, 32, 34, 36, 38, 64, 66, 68, 70, 96, 98, 100, 102}; const byte hst_cell_offset[] = {0, 1, 9, 17, 25, 24, 16, 8, 0, 1, 9, 17, 25, 24, 16, 8};

In the second step, when I talked active the design of the LED matrix, I explained how a cell will look up to when the animation takes place, i.e. the simulation of the triangles rotation. In the ikon below you can see what the first cellular telephone (upmost left) would depend like on with the order of the numbers that correspond to the LEDs in the cadre.

Because the zero LED will personify the unitary with which the animation will start, information technology will be the origin of the cell and the other cells will have the origins corresponding to each "null LED" , from the four, horizontally and vertically, 16 cells with 16 origins. These numbers are in the hst_cell_origin array. You can check if it's ok by comparing the LED numbers racket on the expose (the figure to a higher place with red numbers) with the Numbers in the array.

In the hst_cell_offset array are Numbers that represent the difference of opinion betwixt the Book of Numbers of the LEDs in the cell (according to the image supra) and the number of the blood line LED. These differences are the assonant regardless of the act of the inception LED. The order of the numbers in the array is exactly the "direction of motion" of the animation. Doubled values are needed because the animation is done between two "ends" of the triangles and I wanted to avoid some extra conditions, and then I went on roughly simple "for-next" loops, I'm non a very good computer programmer. Other than, I tried to gloss on the code so that it is easy to translate. Anyway, if you have any questions near the code, I will be happy to answer.

All codes are downloadable from github.

Step 6: How Is It Working?

I made ii videos for this project, one in which I filmed the 4 demonstration programs and another with the intense syllabu "HST LED Art". In each video, I used the two dividing grids I mentioned in step 2, the standard one with 8x8 cells for Palette Demo and Fire Demo and the simplified one for the main program.

Maltreat 7: Closing

The LED matrix came out exactly as I imagined and I honestly like it a great deal, I am very satisfied with the issue. Some the demo programs and the main syllabu work perfectly and by exploitation the three division variants, I obtained interesting results. I genuinely want to emphasize that by using the simple version of the divider, for me it seems that the principal program looks way better.

I am looking headlong to your opinions and I am also ready and waiting for your questions.

2 People Made This Project!

Recommendations