Starting with column 1 (the nine
o’ clock position) and going clockwise,
push the columns through their
respective holes. Make sure that the
tree is vertical and not looking like the
“Leaning Tower of Pisa.” Solder the
columns, then solder the wire-wrap
wires to the hole labeled “W.” Push the
columns into their holes which are
numbered. Again, make sure the
columns are straight. Solder all the
columns. Place the wire-wrap wires into
their holes next to the column holes
marked W and solder. Trim off any
excess wires so it looks like Figure 8.
USING THE TREE
Put in three AA batteries, noting
their polarity. Turn on the slide switch.
The tree should light up, giving many
different patterns. There are actually
four different modes that can be
changed. If you just turn the unit on, it
will continuously run until turned off.
Hold down the momentary switch
while turning on the power. Then, when
the switch is released, the top LED will
turn blue, indicating that you are in microphone mode. By
pushing the momentary switch again, the top LED will
turn green, indicating you are in the PIR mode. Push the
switch again, and the top LED will turn red; all the LEDs
will remain lit. There is a built-in 2-3 second delay that
allows you to change settings. Keep in mind there may be
slight delays due to the capacitor charging before the PIR
and microphone start working.
PIR (GREEN LED)
When the PIR module detects a change such as body
heat, the tree will light for a period of
time, then shut off. It will continue to
cycle if there is any movement.
There are two adjustments on the
PIR module. When mounted (viewing
from the back), turn the left pot all the
way counter-clockwise. This is a delay
which holds the pulse high for a period
of time. Turn the right pot all the way
clockwise. This is the sensitivity. There
is a 2-4 second delay before the PIR
Place the tree next to a speaker or
on top of one. The light will change
color when sounds are detected. You
can also clap to activate the
microphone. The sensitivity can be
changed by varying R19; going counter-clockwise will increase the sensitivity.
The LEDs are being multiplexed and
appear to be on all the time (even
though they’re not).
HOW IT WORKS
The columns (anodes) are driven by port B of the
microcontroller; the ports can sink or source up to 35
milliamps. Port C connects each of its ports to eight NPN
transistors via 10K resistors, which pull the LED cathodes
to ground. A positive voltage on the NPN transistor will
cause it to conduct.
The patterns are generated by the microprocessor
mainly by rotating the bits of ports B and C right or left,
and turning the LEDs on and off for short periods of time.
The assembly files are available at the article link for those
interested. I have added a socket so you can create your
own programs and experiment around if you’d like.
The PIR and microphone are directed to the interrupt
vectors of the microprocessor. The microphone is
amplified 100 times by an operational amplifier (U2), and
when a voltage pulse is detected the microprocessor
jumps to the random generator. In the interrupt mode, the
microprocessor is put to sleep to save power.
Have a Merry Christmas and be the LED of
someone’s life! NV
36 December 2014
■ FIGURE 8.
■ FIGURE 7.