Now that you have a great little centerpiece for the
table, let’s think bigger — you are going to enter the
neighborhood lighting contest and you are driven to win!
Well, this little tree can be a great start. All that is needed
is to convert the drive signals from our little table-top tree
to 110 volts AC (please use extreme caution in doing
this!!). The easiest way is to use an SSR (solid-state relay).
There are a number of companies that make SSRs. You
can pick them up as surplus, make them yourself, or buy
them new off the shelf. I decided to make them myself.
I knew that each string would need four channels and
that there would be 16 strings. Photo 6 is a prototype of
the four-channel SSR, complete with heatsink and fuses.
This SSR module is good for 400 watts per channel or
1,600 watts total. With this much power, you can control
25,600 watts total for 16 strings of lights. I wanted to see
how big of a tree I could make but my power panel had
other ideas, so I am limited to about 100 watts per
channel and 400 watts per board, or 6,400 watts total.
The next step is to use the small junction board from
the tree and replace the 150 ohm resistors with solder
bridges across where the resistors go. Then, plug in one
SSR module to each plug and you now have a beacon to
guide an incoming sleigh and reindeer!
■ PHOTO 5.
HEY, WHAT ABOUT
Okay, so now that we have covered the hardware,
let’s talk software.
The first bits (or bytes) of knowledge you need is what
to get and where to get it. We can’t print the source code
for the entire project because of space limitations, so it’s
available on our website, along with all the workings of
the bigger 2a project which includes a 4x20 character
LCD and a 20-key keypad for controlling the tree while it’s
in operation. (The source code is also available at the
article link.) That’s way cool when running outdoors!
What can be done is a general
overview of the source code modules and
how to install them into your CPU board,
some in-depth examination of what is in
the functions that drive the project, and
several prime examples of the routines
that light the tree. The modules are not
that large, and are fairly well documented.
We’ll also talk more about the
programming environment that makes
ALEC® a really great RAD (Rapid
Application Development) tool.
To start, download the source code
and unzip it to a working directory. There
are three files that make up the Spectrum
Lite version in ALEC®:
The Small Tree application is only about 560 lines of
onboard, microcompiler-ready code after compacting
during the load-in using the Lexical Preprocessor in our
Spectrum PortMaster terminal interface (a free application
available on our website). The file, Small Tree.bas.lst
(~ 21 kb), along with a reference file, Small Tree.bas.ref
(~ 22 kb), are created during this load-in process, but are
supplied for those using other terminal software.
1. Small Tree.bas 4 Kb
2. Small TreeInit.inc 4 Kb
3. LightRoutines.inc 16 Kb
■ PHOTO 6.
October 2011 39