SBRGB
•
7
As shown, violet is created mostly by blue with some red. If you own a com-
puter, you can try these shades out by changing your display properties and
custom selecting a color. It will allow you to enter color values in Red, Green,
and Blue in a range of 0-255 just like the Super Blinky!
The timing charts only show a small percentage of the overall PWM wave-
form. To keep the LEDs from appearing to blink, we have to keep them flash-
ing at a rate faster than our eye can see (at least 30 times a second). Right
now we are flashing at a rate of 280 times a second so it’s more than fast
enough.
If we want to fade from white to blue, the trick is to fade at a reasonable rate of
speed according to our 280 times a second flash rate. To fade from white to
blue in one second, we need to start with 255 and then subtract one from both
red and green value once per cycle (skip a few cycles in between to stretch
the time a bit). At the end of 280 cycles, the red and green element drive rate
is at zero and blue is left completely on.
The Super Blinky actually gets a bit more complicated than this in order to
achieve the eye pleasing color changes in uneven sinusoidal steps (versus
the examples linear ones). This is accomplished with lookup data tables.
The rest of the circuit consists of the power supply and the LED itself. The
power supply is a simple 5V regulator that is required to keep the supply volt-
age to the micro-controller at +5V (it cannot handle more than that). Unfortu-
nately the Super Blinky will not operate at +3V with a lithium button cell
(though two cells will do) since the blue element of the LED requires at least
4.0V before it will even turn on. The circuit will run, but no blue LED!
Take a look at the following specification sheet on the provided LED. Notice
the forward voltages required to turn on the individual elements in the Vf = V
typ column and the relative intensity when looking straight into the LED in Iv =
mcd typ column (mcd is intensity in mili-candelas). Mili-candelas are deceiving
in that they only tell you how bright an LED is from a certain perspective. We
are using a diffused lens
so the number is much lower than with a water-clear
lens that would focus all the light in a narrower beam. Same LED, different
lens, higher numbers! Lens selection all depends on your application. The dif-
fused style is used here to ensure a maximum viewing radius.
Off
On
0
255
Time--->
Off
On
0
255
Time--->
Off
On
0
255
Time--->
0
255
Time--->
0
255
Time--->
0
255
Time--->
0
255
Time--->
0
255
Time--->
0
255
Time--->
0
255
Time--->
0
255
Time--->
0
255
Time--->
0
255
Time--->
0
255
Time--->
0
255
Time--->
0
255
Time--->
0
255
Time--->
0
255
Time--->