Catch up on stories from the past week (and beyond) at the Slashdot story archive

 



Forgot your password?
typodupeerror
×
User Journal

Journal AceJohnny's Journal: LED Rubik's Cube 1

I've been wanting to get back into hobby electronics for a while. I particularly wanted to make something with multicolored leds, mainly because of the "Ooh Shiny!" factor, and my love for smooth ambient lighting.
A slashdot comment recently gave me the idea of making a LED Rubik's Cube: a cube where each facet on a face is illuminated from the inside by a LED giving that facet its color.
It's immediately obvious that I couldn't build myself a functional Rubik's Cube: getting the wiring to work while the pieces move around is a problem that might not even be solvable. So the next idea is to have multi-colored LEDs for each facet, which change color to emulate the movement of the faces.
But that's just the ideal goal. I would already be very happy if I managed to make a not-too-large cube where each face is an array of 3x3 RGB LEDs, all independantly controlled.
Note that the center facet of each face does not change color.
The number of RGB leds necessary to make this is 3x3x6 = 54 leds. As we have three control wires for each LED, that gives us 162 wires to control!!
That's unimplementable if we want to be able to drive each LED directly, but through Charlieplexing, we can use a controller with 14 pins to control all that. (actually, you can control 182 leds with 14 pins).
The problem with Charliplexing is that one can only turn on a single LED at a time. To give the illusion of multiple leds, we exploit human persistence of vision and turn each LED rapidly in sequence. Problem is, the more LEDs we have, the less time each spends turned on, and thus seems dimmer. To complicate things, we already have to play with the RGB LED's duty cycle to manage the color!
An alternative to Charlieplexing the entire cube from one controller is to 'plex each face separately, under control of a minimal microntroller connected to a master through a serial port such as I2C. (how about cellular automata reacting automatically to their neighbours!? OK I'll stop). In this case, each face only has to 'plex 27 leds (9 RGB leds), which is manageable with 6 free pins, plus 2 for I2C, plus two for power => 10 pins. However, the PIC and (AFAICS) AVRTiny come in either 8 or 14 pin variants, so 14 pins will have to do...

Another possible trade would be to remove the bottom face from the cube.

It looks like some people like to play around as well:
James Clar

This discussion has been archived. No new comments can be posted.

LED Rubik's Cube

Comments Filter:
  • Actually, I later realized that I'll need more pins to contorl the RGB LEDs, because as each LED has a common cathode (or anode), this constrains the type of wiring that's possible.

No man is an island if he's on at least one mailing list.

Working...