Project
Figure 6
Figure 7
Tub
Construction
‘————————————————————-
‘ Generate the light
‘————————————————————-
pwm:
random 40,rnd
rnd = rnd + 5
‘This will determine how long
‘we stay with a color
‘With a minimum of five counts
‘To create the six PWM signals we turn all ports on
‘then turn them off as each color count is reached.
for cycle = 1 to rnd
configio 0,1,2,3,4,5
for curcount = 1 to maxcount
if curcount = bluecount then
gosub offblue
endif
if curcount = redcount then
gosub offred
endif
if curcount = greencount then
gosub offgreen
endif
next
next
return
The actual tub construction is very simple. Using a
Rubbermaid #5193 tub, simply set the battery and
circuit board assembly into
the tub with the LEDs facing
up, as shown in Figure 6.
This is a one pint container
and the battery holder centers pretty well without much
effort. If you use a different
size tub or battery layout,
you will have to make sure
the assembly is centered so that the tub does not tilt to
one side.
In order for the lights to illuminate the pool bottom,
you need to reflect the LEDs downward. I have used
several reflectors, such as compact mirrors or convex
mirrors. Out of all the tests, aluminum foil seems to work
the best at reflecting the light because all the little
crinkles tend to mix the colors more evenly. You can use
double-sided foam or tape to attach the foil to the inside
of the lid. Make sure the shiny side is down, as shown in
Figure 7.
That is pretty much it for the tub construction. You
can add some flowers or a rubber ducky to the top of the
tub, if you wish.
How Well Does It Work?
‘You may want to place this code directly in the if
‘statements. The KRcompression technology built into
‘the Athena engine is centered around modular code so
‘this particular way is more efficient than single if
‘ statements
My wife loves them and can’t wait for the long, hot
days of summer. My hard-to-impress daughter wants the
five units I made to be used at her next pool party.
I’m getting over 12 hours of use out of the lights, so
my next step is to add a small solar cell to charge the
batteries during the day.
Be sure to visit Kronos Robotics at www.kronos
robotics.com for project updates, as well as more light
patterns. NV
Sources
F
o
r
E
l
e
c
t
r
o
n
i
c
s
NUTS & VOLTS
E
v
e
r
y
t
h
i
n
g
‘Port Handlers
offblue:
input portblue2
input portblue1
return
offred:
input portred1
input portred2
return
offgreen:
input portgreen1
input portgreen2
return
AthenaHS
Athena carrier 1
20 MHz resonator
Four cell battery holder
Snapable 1 x 36 female header
Plastic Tub
Ultra bright LEDs
Blue LED
Red LED
Green LED
Kronos Robotics #16277
Kronos Robotics #16300
Kronos Robotics #16140
Kronos Robotics #16323
Kronos Robotics #16291
Rubbermaid # 5193
All Electronics #LED- 74
All Electronics #LED- 94
All Electronics #LED- 57
64
SEPTEMBER 2004