# "Easy" Infinity Cube

37,832

303

23

## Introduction: "Easy" Infinity Cube

Infinity cubes and icosahedrons are things that have always caught my eye. They however always seemed quite hard to make, because of the relative complex frame. This infinity cube, however, has a frame that is printed in one piece. Making the build a lot stronger and easier than most other projects. The size of the cube is chosen so only 1M of LED strip is needed for the entire cube, keeping the cost low. I am very happy with how this project turned out and hope you like it as well!

### Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

## Step 1: Materials / Tools

### Tools:

• Soldering iron
• second glue
• hot glue (optional)
• wire strippers
• small pliers ( to help with soldering in tight corners)
• 3d printer (or someone willing to help you out with printing the frame)

## Step 2: The Frame

This is the most important part of this project. The part is printed on one of its corners so there is less difference in layer lines and because "theoretically" no support is needed when printed in this orientation. However, after this print failed once I decided to add supports anyway. The supports are actually drawn in the model because a slicer can not generate them efficiently for a model like this ("v3 v11.stl" has supports, v3 v12.stl" does not have supports).

Due to the orientation a 180*160*180 space is needed to print an 114*114*114 cube. It took me 10h to print and approximately 65g of filament is needed for the model.

## Step 3: LED Wiring

It is important to understand how the wires need to be soldered before actually soldering them since there is not a lot of space to work with. The drawing above (which represents the cube) should give you an idea of how everything is soldered.

5 Wires go through the hole into the cube. Two pairs of 5V and GND, one to power the beginning of the LED strip (on the bottom layer) and one to power the end (on the top layer). This is not just powering the strip on two ends, this is actually necessary to eliminate the need for more complex solder joints. The other wire that goes in is the Data line, this is the line that sends data to all LEDs to specify the color of them.

If you follow the green line you can see the order in which the strip sections of 12 LEDs are connected with each other (they are numbered in order on the image). In the parts where the green line runs next to a piece of LED strip, it means that it is running underneath the strip (The frame has space for these wires).

In the sketch, you can see that there are three parts, the center square, the outside square, and the middle 4 pieces that are in between the two squares. The middle 4 pieces get their 5V from the outside square and their GND from the center square.

Note that the wires that power the outside square come in on the bottom layer and go through the frame (behind a part of the LED strip) to the top layer.

## Step 4: Soldering Step 1

I am going to divide this section into sub-steps to explain everything better. I numbered the parts of the LED strip in the image above to explain everything better.

This is how I did this, if you have a better way, just use your own.

Make sure to pay attention to the direction of the LED strip pieces! Placing one piece incorrect can give you a lot of trouble.

Step 1: Since we need sections of 12 LEDs you should start by cutting the LED strip in 12 pieces of 12 LEDs each. Next, connect 3 wires to part 1, make sure to connect them on the Din side. Add 2 more wires to connect to the V5 and GND on part 12 to the Dout side, the wires for this side need to be at least 12cm longer since they need to run through the frame, the wires do not need to be soldered to part 12 yet. Run all the 5 wires that connect these pieces through the hole. Then remove the cover of the sticky tape and stick part 1 to the frame, don't worry, the tape does not stick very well, the parts will later be attached with glue.

## Step 5: Soldering Step 2

Make sure to pay attention to the direction of the LED strip pieces! Placing one piece incorrect can give you a lot of trouble.

Step 2: Now parts 2-3 will be added, the same process can be repeated for 4,5 and 6,7. First, a wire needs to be soldered to the Din of part 3, this wire needs to be 15 cm or longer and is the one that goes to the Dout of part 2 (blue line in image). This wire will be trimmed down later. After soldering the wire remove the sticky tape cover of this part and place it down.

Next, connect the Dout op part 1 with the Din of part 2, to do this, you might need to pull part 1 a bit of the frame. this needs to be a very short wire with a piece of insulation in the middle. Remove the tape from part 2 and place it in its position, make sure the blue wire runs behind it.

Now trim the wire connected to the Din of part 3 and solder it to the Dout of part 2. To solder this, it is very likely that you have to remove part 2 from the frame again to get some space. This is a very tight corner and the wire that is underneath part 2 will need to make a sharp 180-degree turn to connect to the Dout of part 2 (this can be seen in image 4).

Now connect the V5 of part 1 and part 3, a short wire might be needed to do this.

Finally, take a small piece of wire to connect the GND of parts 1,2 and 3 with each other. If the 5V pad of part 2 is in the way, you can just cut the corner of that part of diagonally to remove the solder pad.

Check for shorts if you think you might have made a mistake.

Now repeat for part 4,5 and 6,7 :)

## Step 6: Soldering Step 3

Make sure to pay attention to the direction of the LED strip pieces! Placing one piece incorrect can give you a lot of trouble.

step 3: Right now part 1 to 7 should be placed down, make sure to triple check everything because you can not easily test it because parts 2,4 and 6 do not have 5V yet. Connect the 5V and GND wires that run through the hole to part 12. Remove the sticky tape cover from part 12 and place it down. make sure the wires run nicely trough the gutter at the place of part 8 (which is not placed yet). You can pull the wires a bit more trough the hole to make them fit better. Next connect the Din of part 8 to the Dout of part 7, just as in the previous step. then connect the GND of part 7 with part 8.

(In the image above I have not yet added part 12, I did add it but do not have an image of it.)

## Step 7: Soldering Step 4

Make sure to pay attention to the direction of the LED strip pieces! Placing one piece incorrect can give you a lot of trouble.

Step 4: You are almost done, only part 9,10 and 11 need to be placed down. Soldering these should be straight forward, just make sure to solder the Dout of one piece to the Din of the next first, since it is difficult to access afterward. Do not forget the connect the 5V of this layer with the 5V of part 2,4,6 and 8.

To test if all the LEDs work, I used the following code. It will go through all LEDs one by one. If something does not work, you can use a multimeter to figure out what is wrong.

```<p>#include <br>#define LED_PIN     7
#define NUM_LEDS    144
CRGB leds[NUM_LEDS];
int counter;
void setup() {
counter=0;

}
void loop() {
counter=(counter+1)%144;
leds[counter] = CRGB(255, 0, 0);
FastLED.show();
delay(20);
leds[counter] = CRGB(0, 0, 0);
}</p>```

Since only one LED is powered at a time, this code can be powered through the Arduino. This means the external power supply is not needed to run this code, you can just connect the 5V and GND of the strip to the Arduino.

## Step 8: Gluing the LEDs to the Frame

As mentioned before, the sticky tape on the strip itself does not stick well to PLA. That is why I lifted all the LED strip pieces a bit and put some second glue underneath them and pressed them down afterward.

Be careful not to spill this glue. Besides sticking your hands together It will leave stains on the frame.

## Step 9: Cutting Acrylic Squares (If You Did Not Have Them Cut)

Instead of cutting the acrylic in squares of 91mm, I used a ruler and a knife to make lines in the acrylic at points where I wanted to break it. After making a line in the acrylic with the knife, I placed the line on the edge of a table to break the piece on the line. This is not super accurate and might result in a bit uneven edges, but there is room for a few mm error so it does not matter that much.

(I already applied film to two squares in the image)

## Step 10: Applying Mirror Film

Here is a link to someone explaining how to do this, to summarize it:

1. Clean acrylic, remove fibers or dust
2. Apply soapy water to acrylic
3. remove plastic from film
4. place the film on the acrylic
5. remove bubbles and soap from the center out with a plastic card
6. trim edges

Make sure to remove all particles before applying film, this makes a significant difference in how well it looks.

## Step 11: Placing Mirrors in Frame

Before placing any mirrors in the frame make sure the mirror side is cleaned well, this side will be placed inwards and can not be cleaned afterward.

I placed the mirrors in opposing pairs just to check that they were perfectly pacing the same way. This is actually very easy to achieve since the frame should take care of the aligning. I attached the mirrors with some second glue to the frame (Hot glue might be better for this, it does not stain the PLA). The mirror side facing inwards because that is the most fragile side and this way light does not have to travel through a layer of acrylic before being reflected again.

## Step 12: Electronics

I started with cleaning up the wires that were coming out of the cube, this just makes everything look a bit neater in my opinion. Since this project is just an Arduino with an LED strip everything is quite simple. 5V from the power supply should be connected to the 5V of the cube and to the 5V of the Arduino. The GND from the power supply needs to be connected to the GND of the cube and to the GND of the Arduino. Make sure you get the polarity right, check this with a multimeter if necessary before powering it on, otherwise you could fry your Arduino. To avoid this you could also power the Arduino trough the power connector, but you will need an extra connector to do this. Now the only thing left to do is to connect the Din of the cube to a pin on the Arduino, I ended up using pin 5, but this does not really matter. Simple right?!

note: the third image is just some scheme I found online, the resistor in there is not needed. You could decide to include it though,

## Step 13: Code :)

The code I used up til now was quite simple, I just took some code from the fast LED example library and changed a few numbers to run on this cube (the original code I used can be found here). Before connecting the Arduino to your PC using the USB port, make sure to unplug the 5V connection between the power supply and the Arduino.

I ended up writing code that has multiple animations, some of them can be seen in the video above.:

```Dont copy paste from this, it wont run due to the way instructables pastes code

<p>#include <br>#define LED_PIN     5
#define NUM_LEDS    144
CRGB leds[NUM_LEDS];</p><p>void setup() {
fill_solid(leds, NUM_LEDS, CRGB(0,0,0));         // fill all black
FastLED.show();
}
void loop() {
onesnake(10000);
fill_solid(leds, NUM_LEDS, CRGB(0,0,0));
fill_solid(leds, NUM_LEDS, CRGB(0,0,0));
//rainbow(5000);
fill_solid(leds, NUM_LEDS, CRGB(0,0,0));
sparkles(10000);
fill_solid(leds, NUM_LEDS, CRGB(0,0,0));
//loopThroughColors(5000);
fill_solid(leds, NUM_LEDS, CRGB(0,0,0));
}
void onesnake( int duration){
unsigned long startTime;
startTime=millis();
int location=1;
int nextpath =1;
int corners[8][3] = {{-7,8,1},{-1,2,3},{-3,4,5},{-5,6,7},{-8,-12,9},{-2,-9,10},{-4,-10,11},{-6,-11,12}};
int ledsInSnake[48];
int color=0;
for (int i=0;i<48;i++){
ledsInSnake[i]=0;
}
while(startTime+duration>millis()){
if (location>0){
for(int i=0;i<12;i++){
color=(color+5)%2550;
leds[ledsInSnake[0]]=CHSV(255, 255, 0);
for(int j = 0; j < 48; j++){
if (j!=0){
leds[ledsInSnake[j]]=CHSV(color/10,255, (j*255)/48);
ledsInSnake[j-1]=ledsInSnake[j];
}
}
ledsInSnake[47]=(location-1)*12+i;
leds[ledsInSnake[47]]=CHSV(color/10,255, 255);
FastLED.show();
delay(20);
}
}
if (location<0){
for(int i=0;i<12;i++){
color=(color+5)%2550;
leds[ledsInSnake[0]]=CHSV(255, 255, 0);
for(int j = 0; j < 48; j++){
if (j!=0){
leds[ledsInSnake[j]]=CHSV(color/10,255, (j*255)/48);
ledsInSnake[j-1]=ledsInSnake[j];
}
}
ledsInSnake[47]=(location+1)*-12+11-i;
leds[ledsInSnake[47]]=CHSV(color/10,255, 255);
FastLED.show();
delay(20);
}
}
nextpath=random(0,2);
for (int i=0; i<8;i++){//differen 8
if (corners[i][0]==-location || corners[i][1]==-location || corners[i][2]==-location){
if (corners[i][nextpath]!=-location){
location=corners[i][nextpath];
}else{
location=corners[i][nextpath+1];
}
break;
}
}</p><p>    FastLED.show();
delay(20);
}
}
unsigned long startTime;
startTime=millis();
int counter = 0;
while(startTime+duration>millis()){
counter=(counter+1)%255;
for (int i=0;i<12;i++){
for (int j=0;j<6;j++){
leds[i*12+j]=CHSV((counter+j*15)%255,255,255);
leds[i*12+11-j]=CHSV((counter+j*15)%255,255,255);
}
}
FastLED.show();
delay(20);
}
}
void loopThroughColors(int duration){
unsigned long startTime;
startTime=millis();
int counter = 0;
while(startTime+duration>millis()){
counter=(counter+1)%255;
for ( int i=0;i</p><p>void rainbow(int duration){
unsigned long startTime;
startTime=millis();
int counter = 0;
while(startTime+duration>millis()){
counter=(counter+1)%255;
for(int i = 0; i < NUM_LEDS; i++){
leds[i]=CHSV((i*5+counter)%255, 255, 255);
}
FastLED.show();
delay(20);
}
}
void sparkles(int duration){
unsigned long startTime;
startTime=millis();
int LENGTH = 40;
int color =0;
for (int i=0;imillis()){
color=(color+5)%2550;
for(int i = 0; i < LENGTH; i++){
if (i!=0){
}
}
FastLED.show();
delay(50);
}
}</p>```

## Step 14: Enjoy Your Awesome Infinity Cube!!

I hope you liked this instructable. If so, please vote for me in the contest and give me some feedback, I'd like to hear your ideas for projects or improvements on this build. Thanks for reading!

This is an entry in the
Make it Glow Contest

81 14K
54 7.3K
54 9.3K

## 23 Discussions

The code on step 7 contains HTML tags and incorrectly formatted code. Try this instead:
#include FastLED
#define LED_PIN 7
#define NUM_LEDS 144
CRGB leds[NUM_LEDS];
int counter;
void setup() {
counter=0;

}
void loop() {
counter=(counter+1)%144;
leds[counter] = CRGB(255, 0, 0);
FastLED.show();
delay(20);
leds[counter] = CRGB(0, 0, 0);
}

And for the last step:
#include FastLED#define LED_PIN 5
#define NUM_LEDS 144
CRGB leds[NUM_LEDS];

void setup() {
fill_solid(leds, NUM_LEDS, CRGB(0,0,0)); // fill all black
FastLED.show();
}
void loop() {
onesnake(10000);
fill_solid(leds, NUM_LEDS, CRGB(0,0,0));
fill_solid(leds, NUM_LEDS, CRGB(0,0,0));
//rainbow(5000);
fill_solid(leds, NUM_LEDS, CRGB(0,0,0));
sparkles(10000);
fill_solid(leds, NUM_LEDS, CRGB(0,0,0));
//loopThroughColors(5000);
fill_solid(leds, NUM_LEDS, CRGB(0,0,0));
}
void onesnake( int duration){
unsigned long startTime;
startTime=millis();
int location=1;
int nextpath =1;
int corners[8][3] = {{-7,8,1},{-1,2,3},{-3,4,5},{-5,6,7},{-8,-12,9},{-2,-9,10},{-4,-10,11},{-6,-11,12}};
int ledsInSnake[48];
int color=0;
for (int i=0;i<48;i++){
ledsInSnake[i]=0;
}
while(startTime+duration>millis()){
if (location>0){
for(int i=0;i<12;i++){
color=(color+5)%2550;
leds[ledsInSnake[0]]=CHSV(255, 255, 0);
for(int j = 0; j < 48; j++){
if (j!=0){
leds[ledsInSnake[j]]=CHSV(color/10,255, (j*255)/48);
ledsInSnake[j-1]=ledsInSnake[j];
}
}
ledsInSnake[47]=(location-1)*12+i;
leds[ledsInSnake[47]]=CHSV(color/10,255, 255);
FastLED.show();
delay(20);
}
}
if (location<0){
for(int i=0;i<12;i++){
color=(color+5)%2550;
leds[ledsInSnake[0]]=CHSV(255, 255, 0);
for(int j = 0; j < 48; j++){
if (j!=0){
leds[ledsInSnake[j]]=CHSV(color/10,255, (j*255)/48);
ledsInSnake[j-1]=ledsInSnake[j];
}
}
ledsInSnake[47]=(location+1)*-12+11-i;
leds[ledsInSnake[47]]=CHSV(color/10,255, 255);
FastLED.show();
delay(20);
}
}
nextpath=random(0,2);
for (int i=0; i<8;i++){//differen 8
if (corners[i][0]==-location || corners[i][1]==-location || corners[i][2]==-location){
if (corners[i][nextpath]!=-location){
location=corners[i][nextpath];
}else{
location=corners[i][nextpath+1];
}
break;
}
}

FastLED.show();
delay(20);
}
}
unsigned long startTime;
startTime=millis();
int counter = 0;
while(startTime+duration>millis()){
counter=(counter+1)%255;
for (int i=0;i<12;i++){
for (int j=0;j<6;j++){
leds[i*12+j]=CHSV((counter+j*15)%255,255,255);
leds[i*12+11-j]=CHSV((counter+j*15)%255,255,255);
}
}
FastLED.show();
delay(20);
}
}
void loopThroughColors(int duration){
unsigned long startTime;
startTime=millis();
int counter = 0;
while(startTime+duration>millis()){
counter=(counter+1)%255;
for ( int i=0;i

void rainbow(int duration){
unsigned long startTime;
startTime=millis();
int counter = 0;
while(startTime+duration>millis()){
counter=(counter+1)%255;
for(int i = 0; i < NUM_LEDS; i++){
leds[i]=CHSV((i*5+counter)%255, 255, 255);
}
FastLED.show();
delay(20);
}
}
void sparkles(int duration){
unsigned long startTime;
startTime=millis();
int LENGTH = 40;
int color =0;
for (int i=0;imillis()){
color=(color+5)%2550;
for(int i = 0; i < LENGTH; i++){
if (i!=0){
}
}
FastLED.show();
delay(50);
}
}

Not tested, let me know if it works

Your right, the code in the code section does not work. This is due to Instructables not formatting it properly. The .ino file provided should be used instead. That one should not have errors

very nice build, i'm in the electronics shop at my trade school and i plan on building this, my only question is where you got the Plexiglas. i was going to go on amazon and look around but with the specific dimensions you requested in the materials list is a bit out there. i was wondering if you could provide a link to where you got the Plexiglas?

I ordered mine from tapplastics.com, but the shipping cost as much as the pieces (\$12 for 12 cut squares, \$12 to ship) (12 in case I wanted to make another, and \$10 was the minimum). But I was thinking that any place that makes picture frames or frames posters could probably do it. Or maybe you have a plastics company around you to avoid shipping.

I actually bought some leftover plexiglass from eBay (worst decision ever, it was bad quality and resulted in a poor build). You should just buy a 3mm thick sheet and cut the squares in the correct size (sawing is probably better than breaking (which I did)). This can be done roughly since there is room for a few mm error. The size of the plexiglass I mentioned in the instructions might be a bit off, I just measured the frame and that size seemed to fit well. I advise you to print the frame first and then measure the size that the panels need to be just to be sure. Also, the cube is built around the 1M LED strip and due to this the size of the plexiglass is a bit weird.

Nice project, but I have some problems... cannot compile and load the sketch.
I already tried several versions of the Arduino IDE, wilthout succes.
Please let me know the IDE version you used, and please can you unclose the source of the libraries used?
Regards, Wim

This is not your fault, Instructables had some bug that resulted in me not being able to upload the Arduino files, I'll try to upload them again right now.
I added the file n this comment, ill add it to the instructable as well.
Apologies for forgetting to update it, good luck with your project!

I tried to compile with the new version, unfortunately it did not work
error file is attached

this does not seem like a compilation error to me, but I don't know too much about that stuff. just make sure to use the Arduino ide, and install the fastled library. Does other code that uses the fast led library work?

i now used the simplest sketch possible (pls refer to attached file test.ino) and arduino ide 1.8.10 and got error messages as in err_1_8_10.txt.
It says "Arduion versions 1.5.7 and later not yet supported by FastLED for AVR".
I tried earlier versions of the ide, before 1.5.7 and these won't even start compilation.
Pls help

I use arduino IDE 1.8.6 and FastLED version 3.001.007
I think that you do not have the most recent FastLED version, you might want to try updating it.
If you keep having problems with compilation, I advise you to ask somewhere else, since I also just use google to try and fix this kind of problems.

Thanks for your tip.... I now used FastLED 3.3.2 and Arduino IDE 1.8.10 and it compiles ad loads..

Wow! This is awesome, I really love the effect. The only thing I can think that would make it any better would be some way to mount it on a corner so that I could spin, but really that would just be the icing on the cake. This would be an awesome desk display any way, and the application of a 3D infinity mirror is extremely well presented. Great job all around.

There are only three wires going to the Cube, 5v, ground and data.
A small stereo jack socket could be mounted in the corner of the cube and a plug mounted on the base.
The jack plug would work as a (Possibly terrible) comutator and allow the cube to be rotated.
I would protect the power in the cube with diode.
I would put something in place to prevent the cube being unplugged to stop the power and data lines being reversed as the plug slides past the contacts on the jack socket.
That could lead to "Infinity Smoke"
:-)

Yes, that's a great technique for inexpensive slip-rings. I won a High School science fair in the 80's with a working model of an amusement ride (Scrambler) using those plug/jacks for powering lights as it rotated. Although initially tight, RCA plug/sockets work well for 2-conductor applications.

My suggestion, however, is to use the rule "if it provides power, use female, if it requires power, use male" (Think of wall outlets and appliance plugs, and the sort of drama resulting from live prongs if it was the opposite was true).

Basically, put the plug on the cube and use the receptacle in the base, it will prevent shorting the power supply as the three plug rings pass over the metal parts of the socket as it's inserted.

Oh... another method for off-the-shelf slip-rings I've used are those phone cord "untanglers". They have 4-contacts in a swivel capsule with a telephone-handset plug on one end and the female socket on the other. Easy to replace if needed.

The current-carrying ability must be considered with these ideas, but the 3-ring plug/socket is probably the best choice here. There are some nice, high-current slip-ring capsules available from eBay under \$20 - for future reference.

Hi! What is the fill density (100% to be completely solid) for the frame? You mentioned you used 65 grams and it took you 10 hours. I am sending a print request to a local library that has 2 3D printers - Lulzbot Taz 6 & Lulzbot Mini. I am unsure what to choose for fill density (options are 10-100%). Thank you!

Even at 0% infill it uses 10g more than that, so I'm curious too.

I looked at the slicer profile I used:
I had 2 perimeters/top/bottom, not 3
fill holes between gaps turned off
infill density 20% cubic

But an extra perimeter wall will improve this print, so I do advise you to use that. Infill doesnt actually matter that much

I used 50% infill and 3 wall/ top/ bottom layers.

Well very nice project that i'm going to have to do soon :) I think it would be easy to make the frame with wood and make a base for it to sit on a corner (but not spin :( ) Thanks for sharing a great idea... Btw , does the leds get very hot inside a closed cube ?