Glowing Cube Hack

One of the promotional things that Linden Lab gives away is a small colour changing, glowing cube. Last year, we attended a job fair were we gave several away. One of the people who received one decided to hack his cube and made a Gmail notifier.

I decided to copy the hack, bought myself an Arduino, and set about hacking the cube. I went for a slight improvement where I individually wired each LED. This means that using the PWM from the Arduino I was able to set the colour of the cube to whatever I chose. 

Arduino and Cube

Arduino and Cube

The main problem with this hack was the physical size of the Arduino. It’s too large to fit inside the cube. I could have attempted to use one of the smaller Arduino variants, but it would have been a bit pricey, costing about £30 for the Mini and the USB adapter.

I’d recently discovered AVR USB, which implements, USB in software, for any AVR microcontroller. USB needs two wires and I needed another 3 to control my LEDs, so even the smallest microcontroller would be enough and it doesn’t even need a crystal. AVR USB needs at least 2K of flash memory. There is an example project, EasyLogger, that uses ATTiny45 so that’s what I’ll use too.

ATTiny45

ATTiny45

The EasyLogger project is a good starting point, but I’m going to make some changes. First, I want to control the LEDs, so I replace the input voltage and start switch with a resistor LED pair. 

USB uses 2.8-3.6V for high on the data pair but provides 5V for power. Since I’m going to be powering the ATTiny from the USB I need a way to make the outputs deliver the lower voltage. The EasyLogger project uses Zener diodes to provide level conversion, but unfortunately, I don’t have any Zener diodes. 

The AVR USB provides an alternative suggestions of using a 3.3V voltage regulator for reducing the power (which again I don’t have any of) or a cheaper alternative, using a pair of normal diodes. Each diode has a drop of 0.7V so the pair drops the power voltage to 3.6V. 

Here is the first prototype circuit on my bread board. 

Breadboard prototype

Breadboard prototype

I’ll describe the code for the firmware and driver in later blog posts.

Advertisements
This entry was posted in Arduino, ATTiny45, Electronics, Prototyping and tagged , , , , , , , , . Bookmark the permalink.

7 Responses to Glowing Cube Hack

  1. Pingback: Cube follow up « Dave’s Blog

  2. Guido says:

    Hi,

    I want to rebuild this nice part, to trigger one single LED. It should show if my VDR is recording.

    I’ve on hand only SD101A and 1N4148, are they fine to use or should I buy a voltage regulator diodes like a BZX55-C3V3?

    Thanks,
    Guido

  3. Pingback: Other MoodLight Projects (or Related Work) | q-rai.de

  4. Pingback: Other MoodLight Projects (or Related Work) | Q-Rai's Realm

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s