"Easy" Infinity Cube: Instructables

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 19

instructables

"Easy" Infinity Cube

by thomasj152

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

https://youtu.be/QPtmzVDRJec

"Easy" Infinity Cube: Page 1


Step 1: Materials / Tools

Materials:
1meter ws2812b 144LED/m IP30 $8.69
microcontroller (Arduino) $2.58
6 plexiglass squares (91*91*3mm)
mirror film $2.19 (Product arrived in bad quality, I can't recommend ordering it on Ali)
wire (to connect LED strip pieces) $1.61
3D printed frame
soapy water (is this even a material?)
5V power supply $4.86 (10 A if you want all LEDs to be white, but 5A should be fine in most cases)

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 supports, v3 v12.stl" does not have supports).
part is printed on one of its corners so there is less
difference in layer lines and because "theoretically" Due to the orientation a 180*160*180 space is
no support is needed when printed in this orientation. needed to print an 114*114*114 cube. It took me 10h
However, after this print failed once I decided to add to print and approximately 65g of filament is needed
supports anyway. The supports are actually drawn in for the model.
the model because a slicer can not generate them
efficiently for a model like this ("v3 v11.stl" has

"Easy" Infinity Cube: Page 2


"Easy" Infinity Cube: Page 3
https://www.instructables.com/ORIG/FPG/EKOS/K4E8ZRGE/FPGEKOSK4E8ZRGE.stl
… Download

Download
https://www.instructables.com/ORIG/F7B/977O/K4E8ZS4R/F7B977OK4E8ZS4R.stl

Step 3: LED Wiring

It is important to understand how the wires need to be which the strip sections of 12 LEDs are connected
soldered before actually soldering them since there is with each other (they are numbered in order on the
not a lot of space to work with. The drawing above image). In the parts where the green line runs next to
(which represents the cube) should give you an idea a piece of LED strip, it means that it is running
of how everything is soldered. underneath the strip (The frame has space for these
wires).
5 Wires go through the hole into the cube. Two pairs
of 5V and GND, one to power the beginning of the In the sketch, you can see that there are three parts,
LED strip (on the bottom layer) and one to power the the center square, the outside square, and the middle
end (on the top layer). This is not just powering the 4 pieces that are in between the two squares. The
strip on two ends, this is actually necessary to middle 4 pieces get their 5V from the outside square
eliminate the need for more complex solder joints. and their GND from the center square.
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 Note that the wires that power the outside square
them. come in on the bottom layer and go through the frame
(behind a part of the LED strip) to the top layer.
If you follow the green line you can see the order in

"Easy" Infinity Cube: Page 4


Step 4: Soldering Step 1

"Easy" Infinity Cube: Page 5


I am going to divide this section into sub-steps to should start by cutting the LED strip in 12 pieces of
explain everything better. I numbered the parts of the 12 LEDs each. Next, connect 3 wires to part 1, make
LED strip in the image above to explain everything sure to connect them on the Din side. Add 2 more
better. 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
This is how I did this, if you have a better way, just 12cm longer since they need to run through the
use your own. frame, the wires do not need to be soldered to part 12
yet. Run all the 5 wires that connect these pieces
Make sure to pay attention to the direction of the through the hole. Then remove the cover of the sticky
LED strip pieces! Placing one piece incorrect can tape and stick part 1 to the frame, don't worry, the
give you a lot of trouble. tape does not stick very well, the parts will later be
attached with glue.
Step 1: Since we need sections of 12 LEDs you

Step 5: Soldering Step 2

"Easy" Infinity Cube: Page 6


Make sure to pay attention to the direction of the likely that you have to remove part 2 from the frame
LED strip pieces! Placing one piece incorrect can again to get some space. This is a very tight corner
give you a lot of trouble. and the wire that is underneath part 2 will need to
make a sharp 180-degree turn to connect to the Dout
Step 2: Now parts 2-3 will be added, the same of part 2 (this can be seen in image 4).
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 Now connect the V5 of part 1 and part 3, a short wire
needs to be 15 cm or longer and is the one that goes might be needed to do this.
to the Dout of part 2 (blue line in image). This wire will
be trimmed down later. After soldering the wire Finally, take a small piece of wire to connect the GND
remove the sticky tape cover of this part and place it of parts 1,2 and 3 with each other. If the 5V pad of
down. part 2 is in the way, you can just cut the corner of that
part of diagonally to remove the solder pad.
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 Check for shorts if you think you might have made a
frame. this needs to be a very short wire with a piece mistake.
of insulation in the middle. Remove the tape from part
2 and place it in its position, make sure the blue wire Now repeat for part 4,5 and 6,7 :)
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

"Easy" Infinity Cube: Page 7


Step 6: Soldering Step 3

Make sure to pay attention to the direction of the wires run nicely trough the gutter at the place of part 8
LED strip pieces! Placing one piece incorrect can (which is not placed yet). You can pull the wires a bit
give you a lot of trouble. more trough the hole to make them fit better. Next
connect the Din of part 8 to the Dout of part 7, just as
step 3: Right now part 1 to 7 should be placed down, in the previous step. then connect the GND of part 7
make sure to triple check everything because you can with part 8.
not easily test it because parts 2,4 and 6 do not have
5V yet. Connect the 5V and GND wires that run (In the image above I have not yet added part 12, I
through the hole to part 12. Remove the sticky tape did add it but do not have an image of it.)
cover from part 12 and place it down. make sure the

"Easy" Infinity Cube: Page 8


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.

"Easy" Infinity Cube: Page 9


<p>#include <br>#define LED_PIN 7
#define NUM_LEDS 144
CRGB leds[NUM_LEDS];
int counter;
void setup() {
FastLED.addLeds(leds, NUM_LEDS);
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.

"Easy" Infinity Cube: Page 10


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

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

"Easy" Infinity Cube: Page 11


Step 10: Applying Mirror Film

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


"Easy" Infinity Cube: Page 12
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

"Easy" Infinity Cube: Page 13


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

Step 12: Electronics

"Easy" Infinity Cube: Page 14


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

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() {
FastLED.addLeds(leds, NUM_LEDS);
fill_solid(leds, NUM_LEDS, CRGB(0,0,0)); // fill all black
"Easy" Infinity Cube: Page 15
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));
fadeFromCenter(10000);
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);
}
}
void fadeFromCenter( int duration){
unsigned long startTime;
startTime=millis();

"Easy" Infinity Cube: Page 16


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 blink[LENGTH];
int color =0;
for (int i=0;imillis()){
color=(color+5)%2550;
leds[blink[0]]=CHSV(255, 255, 0);
for(int i = 0; i < LENGTH; i++){
if (i!=0){
leds[blink[i]]=CHSV(color/10,255, (i*255)/LENGTH);
blink[i-1]=blink[i];
}
}
blink[LENGTH-1]=random(0,NUM_LEDS);
FastLED.show();
delay(50);
}
}</p>

https://youtu.be/QPtmzVDRJec

Download
https://www.instructables.com/ORIG/FC4/R08X/K54G067G/FC4R08XK54G067G.ino

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!

"Easy" Infinity Cube: Page 17


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).

"Easy" Infinity Cube: Page 18


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.
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 ?
Nice build, the compact size is a plus. Not sure I would list "3D printed frame" in materials as you
can't go and buy it off the shelf. Should have 3D printer listed in tools instead.
Your right, I listed it also material, because I used to go to maker spaces or print services to get
stuff peinted before I had my own printer, I'll add it to the tool list.
Wow....!!!

"Easy" Infinity Cube: Page 19

You might also like