Wednesday, January 6, 2016

LED cubes

i guess i will start this blog with the project that i spend most of my time on. actually it is not even just one project, it is a set of projects, and all of them are led cubes. some of them were successful, some weren't. some were cool, some were lame, some are done, and some are still waiting in the box to rise and shine when i will have time and wish for it. so:






LED Cube 8x8x8

it all started as a project in the Foothill College Engineering club during winter of 2015. the club just finished working on the Physics Show and needed new projects to work on. i suggested an led cube as one of the projects. the club supported me and we started by ordering a cheap kit from ebay. something like this http://goo.gl/fnE31M .

When it was delivered, a small team of 5-6 people started to assemble it. honestly, i didn't have much free time back then, and i didn't know how to get that many people involved in the process.

after a few weeks of "team working one hour every friday" i realized that with this approach, the project wouldn't go anywhere so i took it over.
in the picture you can see the result of a few weeks of team work on the left and my one hour of work on the right. so after a few days of soldering the cube we somehow got it to work

unfortunately it was showing only what you can see in the picture above, no motion. after another week of debugging and re-soldering some connections on the board, we got it to work.


and so it works, it's done. you can sometimes see it glowing in the machine shop at foothill college. but we had a problem with that cube: the animation is preset. the code was preset on the chip from the kit, and i had no idea how to rewrite it. so i decided to make my own led cube from scratch with blackjack and hookers with a 3x3x3 size and an arduino,

LED CUBE 3x3x3

so i soldered a small size led cube.
google helped me understand how to connect it to an arduino using a few resistors and transistors. i spent a few hours trying to come up with the right algorithm to control separate led's and voi la - it's working. i spent a few more hours writing some custom animation, and here it is.
not sure if i should talk about all the concepts and algorithms behind it. for now i won't. maybe i will do it later. unfortunately, at this step the project was looking something like that (don't have the exact picture from back then): led cube on a board and connected to the arduino uno(not in the picture)
so i decided to make it smaller, using arduino nano instead and combining all the resistors/transistors on one small board.
calculating the cost and time i am spending to assemble one of these, we decided to make a few more, since it takes at most 2 hours to make one under $5 if you know where to buy parts. later with the club we decided to make a few colored ones with 3d printed boxes for the advisers of our club and this is what we got.

sweet.

raspberry pi led cube

after the success of the small 3x3x3 led cubes with arduino i decided to try to make one using .... you guessed right, rapberry pi. unfortunately no pictures left from back then. I just plugged my first 3x3x3 cube to the bread board, connected it to raspberypi's gpio, rewrote my arduino code from C to Python and made it shine. pros: cube is connected to the network and can be controlled remotely. cons: gpio responses are much slower than on arduino and the image was not very good. so i decided to not tinker in that direction anymore.

LED CUBE 11x11x11

so, after making a few small led cubes from scratch, learning how to use shift registers and putting in hours of soldering led's together, i decided it is time to scale the led cube to the new level. daria suggested to make the size odd, so the cube will have a middle pixel, and the animation will be much more interesting, since we can have symmetry and stuff. so i started. first i spent maybe 2 weeks on soldering all the layers. each layer has 121 led's, so total of 1331 led.
then i made a board for it. nothing special: sockets for shift registers, resistors, transistors. for the brain i decided to use arduino mega, since it has enough gpio to control it all. in total i needed at least 16 gpios for the columns and at least 2 more for the rows, but since arduino mega has enough gpios for everyone and i needed faster response on the rows i decided to not use shift registers for rows and connect them all directly instead.  

unfortunately that is where the project stopped being successful.
the cube wasn't able to properly show any image. the number of led's on each row that were on was less than half. after weeks of debugging, trying to use different transistors, mosfets instead of transistors, connecting led cube to an independent power supply, nothing gave any result. my final verdict: cheap chinese leds can't stand that much power and were leaking current both ways. sad, but there was nothing i could do to fix it, so i gave up.

result:

it was an interesting project, that took about half a year of my life. i learned a lot about the electronics i was using, raspberry pi and different kinds of arduinos. i think it was even my first time working with python. i think at least 10 different people helped me on different steps of all this. a few people were inspired by it for their own projects and a few people soldered something for the first time in their life. also, now we have a foothill college machine shop that has a very fancy lamp:
thanks for readings.

No comments:

Post a Comment