LED Cube

A forum where Flowcode v6 user created components can be shared, discussed and reviewed.

Moderator: Benj

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

LED Cube

Post by Benj »

Hello all,

I've been a bit inspired by my work on the Xmas tree project and it's tempted me to have a crack at an 8x8x8 RGB LED cube over the Xmas period.

I've created my own custom PCB to allow wiring to be a bit simplified and this basically allows me to statically control 8 RGB LEDs on the LED cube using 3 x octal buffer ICs. With 8 of these boards wired together in series using ribbon cable I can then maintain a static horizontal 2D 8x8 display. Using multiplexing techniques and mosfets I can then control the third dimension of LEDs to make 8x8x8. The multiple board approach is quite a flexible one and allows me to build different sized displays in future should I find the need.

I've ordered the 512 RGB diffused LEDs to drive the project from China on ebay so whether they arrive before Xmas is anyone's guess.

Here is the source code for the component so far if anyone wants to also have a play. I am going to add all the maths routines that I used on my PropClock so things like 3D objects can be displayed and rotated in real time. I also want to do animations like fireworks etc but that will all come later.
LEDCUBE.fcfx
(373.04 KiB) Downloaded 965 times
No embedded side code there yet but the simulation is currently working well.

Some inspiration for the project:

8 x 8 x 8 Mono LED Cube - Instructables Build Project - http://www.instructables.com/id/Led-Cube-8x8x8/
8 x 8 x 8 RGB - Hackaday Review - http://hackaday.com/2012/04/06/the-best ... weve-seen/
32 x 32 x 32 RGB - YouTube video - http://www.youtube.com/watch?v=f1YNyQqbiF0

User avatar
acestu
Posts: 1720
Joined: Thu Dec 01, 2011 9:36 pm
Location: Macclesfield UK
Has thanked: 783 times
Been thanked: 223 times
Contact:

Re: LED Cube

Post by acestu »

Great project Ben,

I am going to follow this one, so will have to get a chip pack, I have always loved these things, this is my 4 x 4 x 4 cube which is quite amazing so an 8 x 8 x 8 will be twice as much fun.... :D

https://www.youtube.com/watch?v=eYEGA_uMrtc

cheers
Acestu


P.S. Could you program something like this into it Ben :lol:

http://www.youtube.com/watch?v=dVHP7Nhsn4E
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.

User avatar
Steve001
Valued Contributor
Valued Contributor
Posts: 1189
Joined: Wed Dec 31, 2008 3:37 pm
Has thanked: 460 times
Been thanked: 523 times
Contact:

Re: LED Cube

Post by Steve001 »

amazing i could watch that for hours :D

Looks like good fun

steve
Success always occurs in private and failure in full view.

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: LED Cube

Post by Benj »

Hello,

Thanks for the video that's great, like the animations. Did you do it using FC?

I'm thinking of building mine into a table or other piece of furniture, not sure what yet but found these before and wondered if the cube could be put to create the same kind of effect, maybe in 3D? e.g. surrounding the cube with a cube of the two way mirrored material.
http://www.youtube.com/watch?v=VDZcTXSDsIk

I managed to buy a huge drinks cabinet on eBay before for £1 so a small table in need of some care and upgrading should be easy :?:

My hardware is going to have an SD card and a USB connection so I don't see why we can't rig up some cool things using the power of the FC6 simulation to generate the data. I did have a program that could parse a bitmap so if I can do this fast enough then I can create sim files with complex objects. Shame its only a 8x8x8 display as it starts to get a bit silly LED wise :wink:

8 x 8 x 8 = 512 LEDs = 1,536 Control Signals
32 x 32 x 32 = 32,768 LEDs = 98,304 Control Signals!!

I was tempted to stick to a single colour cube and using the same number of control signals but making it bigger but it only trebles the volume and not the size so I thought it probably was better to go down the RGB route.

Its not by any means finalised yet and may not happen but i'm hoping to get a new PIC16 based ECIO running at 70MIPs out soon in the new year, mainly so we have a nice platform to start showing off the DSP components. I have the prototype boards arriving next week.

Here's an updated component with a lot more of the main interface nailed down and simplified. Also added macros to clear the display, draw different types of cuboid and a macro to draw 3d lines. Still bits to do before it will run on a device but starting to look a bit more feature complete now.
LEDCUBE.fcfx
(392.82 KiB) Downloaded 720 times

User avatar
acestu
Posts: 1720
Joined: Thu Dec 01, 2011 9:36 pm
Location: Macclesfield UK
Has thanked: 783 times
Been thanked: 223 times
Contact:

Re: LED Cube

Post by acestu »

Hi Ben,

I used to make infinity mirrors for mobile discos years ago, its a great effect for little work and I think your idea of combining one of these with the LEDs for a coffee table would be brilliant as for every 1 led you get infinite reflections.......

EDIT: Sorry I forgot to say, I bought my cube ready made from china, so I didn't actually program anything, but there is a provision to program it with your own code, not sure how to though.


cheers
Acestu
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: LED Cube

Post by Benj »

Hi Stu,

That's great do you have any advise regarding sourcing and constructing the infinity mirror. Some people say to buy special mirrors but other say to use glass and add a car window reflective tint sheet.

Cool you can buy the LED cubes off the shelf, I thought they were confined to the world of hobby engineers with too much time on their hands :D

Do you know what micro has been used on your board. Is it something familiar or something random? e.g. can we reprogram it with Flowcode?

User avatar
acestu
Posts: 1720
Joined: Thu Dec 01, 2011 9:36 pm
Location: Macclesfield UK
Has thanked: 783 times
Been thanked: 223 times
Contact:

Re: LED Cube

Post by acestu »

Hi Ben,

The Infinity screens that we used to make were really basic, all we did was have a look in old second hand furniture shops for mirrors of a descent size preferably square because we used to use them as a center piece in front of the decks, once you had your mirror all you had to do was make a wooden box ie plywood back to support the mirror then 3" x 1" around the sides (square or shaped) with screwed on batten holders for the lamps, the wiring was concealed behind another piece of wood and connected in sets to bulgin plugs ie for a 4 channel light controller, and painted ply on the edges, and then the whole front was covered with perspex, the effect was amazing for such little effort really.

I found this pic of a really basic screen:
infinity.jpg
infinity.jpg (7.77 KiB) Viewed 35658 times
I bought my Cube from China or America off Ebay like this one:

http://www.ebay.co.uk/itm/Hypnocube-Hyp ... 23326e046b

and they have a website:

http://www.hypnocube.com

You might get some ideas from here as there is a download page with info and software including source code, also I can take some pictures of the pcb of my cube if you like, it looks quite in depth with 8 chips, I can't quite see what the main chip is because the LED's are in the way, but I will see if I can find a big magnifying glass and have a better look.... :shock:

Cheers
Acestu
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.

dazz
Posts: 1314
Joined: Sun Jan 15, 2012 3:15 pm
Has thanked: 474 times
Been thanked: 458 times
Contact:

Re: LED Cube

Post by dazz »

Hi Stu
dont get the magnifying glass out, the instructions on the page you linked to gives all the chip numbers,theres also a pdf for a soldering jig, might add this to the list of things to do, going to hav to teach wendy to solder as i shake too much at present ,did some solderingthe other day, the soldering iron spent more time attached to my fingeer than it did the board :lol: :(
To sign up to the V5 forum follow this link http://www.matrixmultimedia.com/forum_upgrades.php

User avatar
acestu
Posts: 1720
Joined: Thu Dec 01, 2011 9:36 pm
Location: Macclesfield UK
Has thanked: 783 times
Been thanked: 223 times
Contact:

Re: LED Cube

Post by acestu »

Hi Dazz,

That's good to know, the jig bit I mean not the soldering iron sticking to your fingers :lol: , yes it was getting late last night when I posted that so I didn't have much time to plough through it, should be an interesting project, I was dreaming about LED jigs and stuff last night ...

cheers
Acestu
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: LED Cube

Post by Benj »

I sometimes dream of code and protocols :D Not a good sign :wink:

I've been thinking about dipping the LEDs in some PVA glue or something similar to try and get them to glow more rather then emit light, lots of the example cubes you see on Youtube seem to spoil the effect a bit by partially lighting the higher LEDs. Needs to be something fast as there are a lot of LEDs to process. One worry with this is that the PVA won't dry uniform on all LEDs.

The LEDs are diffused already so may not need to do anything. When they arrive I will do some experimenting as I bought way more then I need for the project. Might be able to just place a small 3D printed lens on the top to cover the brightest part of the LED but this will be fairly time consuming. Maybe some crepe paper or something similar might be better?

Managed to stick a hot soldering iron to my arm once, I don't recommend it. Only just beaten by managing to stick my leg to my motorbike exhaust after riding several miles down the motorway and then attempting to squeeze between some bollards in shorts.

User avatar
acestu
Posts: 1720
Joined: Thu Dec 01, 2011 9:36 pm
Location: Macclesfield UK
Has thanked: 783 times
Been thanked: 223 times
Contact:

Re: LED Cube

Post by acestu »

Hi Ben,

Yes if you need any help with the monotonous LED dipping job I believe Dazz has a friend called Wendy who is good at that sort of thing :D

I will be dreaming about what to dip LEDS in tonight now......

P.S. I bet you haven't shot a 2" Barbed nail through your hand with an industrial pneumatic nail gun :cry:

cheers
Acestu
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: LED Cube

Post by Benj »

Ouch!! No I haven't done that just yet, sounds like that one was a trip to the hospital. Do love nail guns though :D screw guns are great too.

If you come up with any fancy ideas then I'm all ears. I've got some industrial PVA glue and some diffused LEDs I can try out tonight and see how I get on. Worth a quick go I feel. Maybe if I water down the PVA a bit it will go on thinly and reliably, might then need multiple layers for each LED to make it worthwhile.

kersing
Valued Contributor
Valued Contributor
Posts: 2045
Joined: Wed Aug 27, 2008 10:31 pm
Location: Netherlands
Has thanked: 553 times
Been thanked: 1081 times
Contact:

Re: LED Cube

Post by kersing »

Ben,

The simplest way to diffuse a led is using sandpaper on it... (instructable) The issue for you is the time involved. The instructable quotes 5 minutes for each led.

The author of this page has experimented with some different methods.

Regards,

Jac
“Integrity is doing the right thing, even when no one is watching.”

― C.S. Lewis

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: LED Cube

Post by Benj »

Hi Jac,

Some neat methods to try there. The sanding idea might be a good one if I can make a jig and use say my dremmel to spin the LED at high speed while sanding. Cutting off the top also looks like a possibility but probably wouldn't want to do this 512 times unless I could simplify or automate it somehow. My idea was to take a row of 64 LEDs and dip them all at once while still in the build template, but this approach is bound to be full of problems, e.g. unevenness between LEDs, unevenness of the LED surface, potential fumes off the coating.

This vid is quite cool but its actually dipping the LED electronics to create the lenses.
http://www.youtube.com/watch?v=OqpkgSzD1o8

Here's an example of diffusion using a glue gun, probably going to be near impossible to get this uniform on 512 LEDs.
http://www.instructables.com/id/Hot-Glue-LED-Diffusion/

This one uses spray foam, Hmm would be quick to do but might be hard to get uniform.
http://www.instructables.com/id/Diffusing-LEDs/

And this one uses drinking straw, doesn't solve the problem really but a neat idea.
http://www.instructables.com/id/Quick-T ... -Diffuser/

Or off the shelf diffuser caps are available which might work well but they are expensive - $200 for 512 caps!
http://www.raveready.com/LED-Diffusers-s/436.htm

As I say the LEDs I have bought do say they are already diffused but from seeing other projects on Youtube it looks like something may need to be done to improve the LEDs output without lighting up all the surrounding LEDs.

This vid for example looks great but could maybe be a bit improved. You don't know unless you try and I know I would be annoyed to build the whole thing and then find there is a simple way to make it look better.
http://hackaday.com/2012/04/06/the-best ... weve-seen/

Not seen any examples of a LED cube combined with the infinity mirror yet so I'm guessing it either looks rubbish or its not been done by anyone yet which is unlikely.

8x8 LED 2d infinity mirror project here.
http://www.youtube.com/watch?v=jZj-WyGOAOg

This is cool but again only simple.
http://www.youtube.com/watch?v=Gccej1kfHiY

This is the closest i have found where they use mirrors for 3 of the 6 sides of the cube.
http://www.youtube.com/watch?v=dMGLNU9OSjI

This guy seems to be onto a similar thought track, which is somewhat annoying :D
http://www.eetimes.com/author.asp?secti ... id=1320204

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: LED Cube

Post by Benj »

This is probably the best 2d infinity mirror I have seen so far. Simple to do too :D
http://www.youtube.com/watch?v=MXOoHLoy ... e=youtu.be

The colours around the edge and the clean black lines works well. Hmm.

Looking on Google shopping even simple infinity mirrors are worth a fortune so a great skill to have. The curved ones are cool, maybe the back mirror is flexible and bent into place.

User avatar
acestu
Posts: 1720
Joined: Thu Dec 01, 2011 9:36 pm
Location: Macclesfield UK
Has thanked: 783 times
Been thanked: 223 times
Contact:

Re: LED Cube

Post by acestu »

Hi Ben,

Here is an LED infinity coffee table on the ceiling !

http://www.youtube.com/watch?v=g7-hp_b5rwo

cheers
Acestu
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.

dazz
Posts: 1314
Joined: Sun Jan 15, 2012 3:15 pm
Has thanked: 474 times
Been thanked: 458 times
Contact:

Re: LED Cube

Post by dazz »

Benj wrote:
Managed to stick a hot soldering iron to my arm once, I don't recommend it. Only just beaten by managing to stick my leg to my motorbike exhaust after riding several miles down the motorway and then attempting to squeeze between some bollards in shorts.
sorry had to reply to that one hahaha , last chop i had was a z550 the frame was so skinny that most of the engine as outside the frame ,the seat height was 7 inches from the floor, the foot pegs 3 inches from the floor, you can see where this is going due to the riding position, the insides of my knees were forced against the outside cylinder at the cam cover which was polished, 7 years on and if i get the sun on my legs the inside of my knees tan in seconds, used to regularly embed the hot end of tig rods in my arm, also built a coffin tank for a bike once and somehow leak tested with parrafin, marked the leaks started to re tig the joins and whoosh, had a ton of fine swarf embedded in my face.

a good tip benj when painting bikes and plastic i used to use lighter fuel as a last wipe down you may want to give your leds a quick dip in lighter fuel then a quick wipe before dipping in pva, it might help adhesion


Regards
Dazz
To sign up to the V5 forum follow this link http://www.matrixmultimedia.com/forum_upgrades.php

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: LED Cube

Post by Benj »

The hypnocube website looks good and says the device is based on a PIC18F4620 and "hackable though difficult".

I would have to see how they have done the buffering to drive the display but it is likely that the component I am currently working on will be compatible in some form. I need to make sure I have options for serial output, parrallel output and active high and active low leds and that should pretty much cover all bases.

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: LED Cube

Post by Benj »

The z550 looks somewhat similar to the bike I had, Yamaha RXS100.

Good tip there with the lighter fluid.

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: LED Cube

Post by Benj »

Here's the latest component source. I've made a start on the functions to shift and rotate the display.

The shift function works in the zero and smear modes but not currently in the wrap mode. Having issues with this for now so thought I would move onto rotations.

The rotate function works but only the outer layer of LEDs on the Z axis. I'm working on the maths for this at the moment to make it smooth for all layers. Currently the function can only rotate around the center but I think this is ok.
Attachments
LEDCUBE.fcfx
(424.55 KiB) Downloaded 467 times

User avatar
acestu
Posts: 1720
Joined: Thu Dec 01, 2011 9:36 pm
Location: Macclesfield UK
Has thanked: 783 times
Been thanked: 223 times
Contact:

Re: LED Cube

Post by acestu »

Hi Ben,

I just wondered if you are doing a Text Mode, I have seen them where they display 3d text ?

It should be quite easy for you :wink:

cheers
Acestu
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: LED Cube

Post by Benj »

Hi Stu,

Yep that's on the list and should be easy enough to do. Just trying to get it clear in my head before I do it as it would be nice to be able to scroll text on and off the display from any position which is currently causing me headaches.

Thinking about it I may have a solution. Hmm. I'll have a crack at it tonight.

One other annoyance with text is that the ASCII data is currently 5 x 7 so it's impossible to centre it on the display. I'll have a look around for another font set just in case as a 6x6 or 6x8 or 8x8 font would probably look much nicer.

This looks pretty good.
http://www.youtube.com/watch?v=b3sWHtGp4iw

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: LED Cube

Post by Benj »

Added the text in single character form, works well but could do with some options to allow different orientations on each axis.
Attachments
LEDCUBE.fcfx
(457.68 KiB) Downloaded 476 times

User avatar
Steve001
Valued Contributor
Valued Contributor
Posts: 1189
Joined: Wed Dec 31, 2008 3:37 pm
Has thanked: 460 times
Been thanked: 523 times
Contact:

Re: LED Cube

Post by Steve001 »

just wondering , what kind of psu would you use for one of these ?...

512 led's not sure what forward current is 20 - 30 ma ? if you dont apply any diversity thats about 10.50 amps ish
would you use a redundant pc power supply ?

Even if you apply a 50% diversity that is still going to be in excess of 5 amps

Steve
Success always occurs in private and failure in full view.

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: LED Cube

Post by Benj »

Hi Steve,

Each LED is going to use around 60mA at full brightness, 20mA each for R, G and B.

As the LEDs are multiplexed on a 1:8 ratio I only actually have to drive 64 LEDs at a time i.e. only one of the x by y rows are lit at any one point in time.

64 * 0.06A = 3.84A

The 24x buffer ICs and Microcontroller will also each require a bit of current but this is pretty much negligible in this design.

I have a 40A bench supply (capable of burning the tracks right off a PCB!) but I wouldn't want to loose that to this project so either a second hand PC power supply from eBay (thats what I used to drive my underfloor heating rig) or a RepRap style 5V or 12V switch mode powersupply from eBay as these seem to be common and cheap now a-days. Another idea I'm toying with is to use a lead acid battery and then trying to find a green yet practical way of keeping it charged.

If we are converting down from DC 12V to DC 5V to run the circuitry then we will have to use a switch mode voltage regulator to handle the current a standard linear LDO regulator will get far too hot at these kinds of currents. The best option is therefore to make sure there is a 5V output and this way you can probably wire straight onto your power supply rails. A 5V 5A power supply and maybe 20A FETs are probably going to be more then enough for what we need and allow everything to run cool.

20mA per LED is generally really, really bright, far too bright to look at directly for any period of time so hopefully the Max current we're ever likely to see is more like somewhere between 1A and 2A. I found this out on my first propeller display project board, while running at full brightness and displaying 360 segments the brightness wasn't too bad but stop the display from spinning and boy you regret it. So if we design the system for the worst possible case then we should end up with a good and reliable system long term :D

As I'm going to embed this into a piece of furniture I probably don't want wires running all over the place and I'm sure Vikki doesn't so need to have a think on the best way to do this (we also have rabbits which like to eat any wires they come across which makes things like this harder and put me onto the lead acid idea).

By the way mentioning green tech, I have just acquired an old widescreen CRT tv off a mate. If you can get one or have one already they are fantastic for making a solar collector lens capable of running a fairly hefty sterling engine. I'm currently keeping the TV outside through the winter as I only need the lens and dont have the storage space but maybe a good project for next summer. There's a great vid on youtube where a guy uses one of these to go camping, electricity via sterling engine, cooking via solar heat, firelighting etc all from a single lens. If anyone is interested I will try and dig it out. Warning - Don't go opening CRT TVs unless you know what your doing, they have caps which can retain voltage for a long time and can potentially give you a nasty shock.

Post Reply