Zonnestroompanelen in Nederland

duurzaamheid achter de meter

(22) Three sided, 31-led Arduino pyramid – part two: construction of the tetrahedron and wiring


This is a two-part paper wherein the first part we have discussed the construction of an Arduino Nano powered ‘engine’ capable of controlling 32 leds. This second part describes the construction of a three-sided pyramid with edges of 110 mm length that features 31 leds. The ascending edges of this tetrahedron consist of thin copper bars that are soldered together at the apex. Four levels of horizontal bars are soldered to the edges to create the base edge, to strengthen the structure and to act as a support for all the leds. In addition the frame acts as common cathode (GND). The pyramid is designed as a module that sits on top of the Arduino ‘engine’.


Leds can be arranged in any fashion, with most popular the 8×8 square matrix MAX7219 shift register controlled grid configuration that is basic to newsreels and display-type of arrangements. Three-dimensional  arrangements are even more exciting, such as n x n x n led cubes, with ‘n’ mostly in the range of three to five. The challenge here was to build a 3D array in pyramid style. For the sake of economy I decided to concentrate on a three-sided pyramid equipped with four layers of leds. This pyramid should be powered by the Arduino ‘engine’ discussed and constructed in the first part of this paper, with four 74HC595 shift registers that perform the multiplexing.

Basics and schematic wiring

My three-sided pyramid has four layers of leds plus a single led proudly sitting on the pyramid’s apex. The total of leds that decorate the pyramid is 31 leds (figure 1). This is a very convenient number of leds to combine with the Arduino ‘engine’ because the latter is designed to control 32 leds. The 32nd led can be left out or can be applied as an extra led of some sorts, here as an indicator led. In the diagram of figure 1 the numbers of the leds are indicated. ‘A1’ stands for the first led receiving power from the shift register labeled ‘A”, A2 for the next, and so forth. Led nr D8 is the supernumerary indicator led.

Figure 1. A five-layer three-sided pyramid accommodates 31 leds.

As there will be 32 wires connecting all led anodes with the pin header on the engine (plus a 33rd wire: GND), some color-coding is necessary to assist the process of connecting all anode wires correctly to their corresponding pins on the engine. The frame of the pyramid, connected to the GND pin header of the engine, acts as common cathode for the leds.

As current limiting resistors and a decoupling capacitor are integrated in the engine we don’t have to include these in the design of the pyramid.

Necessary parts

2 mm transparent plastic base, 130 x 120 mm
45 cm of yellow brass rod 2.5 mm diameter (standing edges of the pyramid)
45 cm of  yellow brass rod 2.0 mm diameter (base edges and supporting bars)
32 red leds
32 Dupont wires with male pins, various colors
32 pieces of wire wraps (crimping sleeves) (in four different colors) to insulate the led anodes
4 x nylon spacers 25 mm long
4 x nylon spacers 15 mm long
nylon screws

Base of the pyramid

The base platform of the pyramid was cut out of 2 mm thick transparent copolyester sheet (Vivak, trade mark of Bayer, Germany). Dimensions are 130×120 mm. Copolyester sheet was selected instead of acrylic sheet because of its superior cutting and drilling properties. The base platform supports the pyramid while its main function is to be a plane to which the two mounting boards of the engine will be attached. These boards hold, respectively, the Nano and the engine (figure 2A). A rectangular window was cut in the base platform to allow wires to run from the pyramid to the pin headers on the engine board below (schematically indicated in figures 2A and B). Next a series of holes were drilled in the platform. In figure 2 these holes are indicated with letters: P:  holes to stick the edges of the pyramid in, N: holes to attach the Nano mounting board, E: holes to attach the engine mounting board, D8: a single hole for led D8.

Figure 2. Schematic drawings of the pyramid – base platform – engine assembly. A, front view; the Nano is in the same plane as the engine and for that matter not included in the drawing. B, top view of the transparent copolyester sheet with all functional holes, central pin header window and the base edges of the pyramid frame.

Construction of the pyramid

First the edges of the pyramid were cut from the 2.5 mm yellow brass supply rod. The three ascending edges join at the pyramid’s apex while below they stick into the holes marked ‘P’ of the transparent base platform. While the functional length of each edge is 110 mm, I cut 130 mm long rods, with a bend of 30 degrees at 20 mm from the base end (indicated in the side view in figure 2). The holes marked ‘P’ in the plastic base form the angles of a triangle 110x110x110 mm.

Figure 3. Construction of the pyramid on a plywood copy of the base platform. The standing edges are soldered together at the apex of the pyramid while its integrity is reinforced by the soldering of four levels of the horizontal bars on which the cathodes of leds are soldered. Thus, the edges and bars of the pyramid act as GND. A sleeve on the anodes (arrow) prevents shorting against the frame. The color of the sleeve codes for a particular shift register of the engine (here only yellow sleeves are visible: leds planned to be powered by shift register A).

Before actually assembling the pyramid I made a copy of the platform in 3 mm plywood. This was done to have a scaffold available to work with without the danger to damage, scratch or scorch the actual platform. All further construction work on the pyramid was done with the plywood copy as base platform (visible in figure 3).

The pyramid consists of a yellow brass rod frame whose components are the three ascending edges and horizontal bars at four levels. On each side of the pyramid the lowermost of the hoizontal bars (length 110 mm) acts as the lower edge of the tetrahedron structure. After the edges of the pyramid had been set up, aligned and soldered at the apex the horizontal bars were cut from the 2.0 mm yellow brass supply rod, polished at their ends and soldered onto the pyramid’s edges. The next step was to mount the 31 leds according the scheme outlined in figure 1. The cathode of each led was bent 60 degrees and soldered to an edge or a bar of the pyramid’s frame. As the anodes of the leds must be electrically insulated from the pyramid’s frame I cut for each led a Dupont wire to the correct length and moved a crimp sleeve over the wire. Then the wire was soldered to the led’s anode and the sleeve carefully moved over the joint (arrow in figure 3). Finally a Dupont wire with black insulation and a male pin was soldered to the frame. This is the GND wire connection to the GND pin header of the engine. Color codes for wires leading to the leds are as follows:

Shift register color coding

Leds connected with shift register A: yellow sleeve; shift register B: brown sleeve; shift register C: green sleeve; shift register D, black sleeve.

 Wire insulation coding (identical for each shift register)

Led 1: green; led 2: blue; led 3: purple; led 4: dark grey; led 5: light grey; led 6: brown; led 7: orange; led 8: yellow. Led D13 was connected with a yellow wire. Note that wires with black or red insulation colors were not used since these colors are normally used to indicate GND or power, respectively and should be reserved for these purposes.

Final assembly of the engine

Figure 4. Details after final assembly. The transparent base platform carries the pyramid while the engine and the Arduino Uno are suspended under the platform. Wires from all leds have been connected to the engine while led D8 has been mounted on the platform (arrow).The moment had arrived to double-check all wire connections and start final testing.

Before attaching the pyramid to the base platform the boards containing the engine and the Arduino Nano were mounted under the platform with nylon spacers and nylon screws. With the engine and platform ready to receive the pyramid time was reserved to test proper functioning of all leds ‘in dry-dock’, that is on the plywood platform. For this purpose an Arduino was programmed with the ‘blink’ example and each individual led was blink-tested.

After all leds had been tested and found OK final assembly was started. The edges were aligned in their holes in the base platform and secured with screws in hollow copper blocks recovered from electrical connectors. Next all Dupont wires were connected one by one with their pin header on the engine board.

A picture of the final assembled platform with pyramid on top and the engine below is shown in figure 5.

Figure 5. Completed and fully working pyramid, seen from two different viewpoints.


With the successful construction of an 31-led tetrahedron and the montage of this pyramid on a transparent base platform that stands on top of the Arduino ‘engine’ a nice desktop gadget has been created that fulfills the goal of powering leds with multiple 74C595 shift registers in daisy chain configuration.

The modular design makes it possible to separate the engine from the pyramid with little effort and to mount another 31-led device, for instance a led strip, led circle or exotic things like a led- Christmas tree, flower or sphere.


 There are three sketches, packed in a zipped file named ‘four_74HC595_arduino_pyramid‘ – please extract before opening with the Arduino IDE:

  • four_74HC595_daisy_test.ino
  • blink_32_led_test.ino
  • randomblink_four_94HC595.ino