*** Check out my blog for updated version of this project and more! ***

My obsession of LEDs has led me to this. Aurora 9x18 is a thing of beauty (if I can say so myself) - has 162 RGB-LEDs in a circular configuration. The color of each circle is controlled by a microcontroller using a twisted form of PWM.

The microcontroller (PIC24F08KA101) only has one PWM module, yet Aurora is capable of 27 (9xR,G,B) independent brightness control. This Instructable reveals the inner-working of Aurora 9x18 through the building process.

Step 1: Concept

A RGB LED is nothing more than a LED that actually encases 3 small LEDs of primary colors inside. RGB LEDs can create wide range of colors by combining 3 primary colors - Red, Green, and Blue. By changing the ratio between the 3 colors, you get many in-between colors. RGB LEDs are often called full-color LEDs.

Most of brightness controlling circuit utilizes the method called PWM. Many of microcontrollers today have a PWM controller or more built in, however there are usually less than 4 or 5 of them in a controller. So if I were to control 9 LEDs, I needed to use multiple controllers or external circuits. If those 9 LEDs were RGB LEDs, then there would be 27 PWM controllers needed.

I've gone through a few approaches - multiple microcontrollers working together in various configurations - some are complex and exotic. I was trying to solve more than just the number of LEDs that I can control - I wanted to make the fades in/out of brightness as smooth as possible. Turned out, 8 to 10 bit PWM resolution that most PIC microcontrollers provide was not good enough to create smooth transition in the darker/dimmer part of the brightness change. When the brightness is low, the transitions look more like steps than fading. Due to human eye's non-linear or exponential response to light intensity necessitates gamma correction of the brightness change curve, which requires at least 12 bits of PWM resolution to give smooth fades (in my conclusion).

If I simply design a circuit where each LED is controlled by it's own PWM controller having 12 bit or more resolution, I'd have to use a speciality LED controller IC. While this solves the problem, the added cost and size to the final product did not appeal to me. (Those LED controller IC are not very small or cheap.)

So I came up with an idea of combining PWM with multiplex drive. I further broke up each PWM cycle into multiple pulses, so that multiple LEDs were lit multiple times within one PWM cycle. (Kind of hybrid between PWM and PDM, I guess.) This way, the average output of LEDs are the sum of the many pulses within the short period. By combining more than one PWM pulses increases effective PWM resolution.
This technique also helpes reduce the perceived flicker of the light out of LEDs. Aurora 9x18's LED refresh rate is about 246 Hz, but LEDs blink a lot more often. This creates the illusion of much higher refresh rate.

Take a look at the timing chart. I picked 7 LEDs and R/G/B bus signals to present the concept.
As you can see, R/G/B buses go up momentarily, taking turns. These pulses control the actual duration that LEDs light up. Each common lead of the LEDs controls whether that LED will light during the period that R/G/B buses go high. The actual timing that LEDs light up are marked with the color on the chart.

The condition here is:
LED 1 is on level 1 red (the lowest brightness).
LED 2 is on level 2 green.
LED 3 is on level 3 blue.
LED 4 is on level 3 yellow (red + green).
LED 5 is on level 3 purple (red + blue).
LED 6 is on level 3 turquoise (green + blue).
LED 7 is on level 255 (maximum brightness) white.
* time scale is about 8.1 ms for the entire width of the chart.

Hope this explains the way Aurora controls the brightness/colors of LEDs.

- PWM on wiki
- PDM on wiki

LED refresh rate originally stated was wrong - it's 246 Hz not 123 Hz.

About This Instructable


457 favorites


Bio: I am an electronic artist living in Brooklyn, NY. I work with LEDs and microcontrollers to create beautiful objects.
More by ledartist: T962A SMD Reflow Oven Fix/Hack Color Organ Triple Deluxe II Aurora 48 - 48 RGB LED Sequencer
Add instructable to: