free web hosting | free website | Business Web Hosting | Free Website Submission | shopping cart | php hosting
affordable web hosting | Pets | web page hosting | web hosting | website hosting | web hosting service | web hosting | best web hosting


THL (The Holiday Light)

Computer Control
Main Page
+Info Section
+Repair Section
+Custom Controls Section <-- Selected!
+Programs Section
+Links Section
-Custom Controls Section
-+Stand Alone Flasher Controls
--[Computer Controls]
-+More Power Handling Addons
--Boxes For Circuits
--Non-Xmas Lights For Christmas


Maybe you have an old computer laying around?...you can use it
to control your Christmas Lights!
The most common way this is done is to use the printer (parallel)
port, 8 channels can be controlled with it, and a computer can have
up to 3 printer ports.
There are also (expensive) control cards that will give more channels
This page will focus on using the printer port.

Part 1 - Software
There are some commercial and freeware programs available
for controlling lights. In the future I will list some
of the freeware programs here:
[if you made a freeware control program, let me know
and it will be listed here]

If you want to make your own program, you can use a
number of programming languages; in any case, you need
to use your language's output control command.
this section gives a very brief overview of using the
output command in a few common languages...it does
not tell you how to program the whole thing (it's
assumed that you know the basics of whatever language
you choose to use.
To send something to the port:
in 'C' the command would be: outb(value, address);
in 'Basic' the command would be: OUT(value, address)
If you are using 'Visual Basic (VB)', it will not directly
support the 'OUT' command, you will need to get an add
on or DLL to use it...
...In my case I used 'Inpout16' by Jan Axelson (will
post a URL later when I find one). That one is for 16bit
(windows 3.1) apps, and it worked great!. The syntax for
VB with Inpout is: 'Out value, address'...
in all above cases 'address' is the actual hex address
of the printer port (usually 378). and 'value' is the
decimal value that controls the lights...
0 = all off
1 = ch 0 on
2 = ch 1 on
4 = ch 2 on
8 = ch 3 on
16 = ch 4 on
32 = ch 5 on
64 = ch 6 on
128 = ch 7 on
255 = all on

below is some examples of how to turn all channels on using
the standard port address:
VB (with Inpout16): OUT 255, &h378
standard Basic: OUT (255, 378h)
standard C: outb(255, 378h)
[Visual C, and C++ may use something different; consult
the the documtation or help that came with your language
Part 2 - Hardware
DISCLAIMER:
USE THE FOLLOWING INFO AT YOUR OWN RISK.
I CAN NOT BE HELD RESPONSIBLE FOR ANYTHING
THAT HAPPENS AS A RESULT OF USING THIS INFO

IF YOU DO NOT AGREE, LEAVE NOW

As with software to tell the computer what to do, you
need hardware to convert the computer's signals to
'lights on' or 'lights off'...
You can buy or build various parts of the control
circuit. This section will cover briefly how to make
your own control circuit:

WARNING:
If this is not done right you could do any
one or all of the following:
* CAUSE PROBLEMS WITH THE POWER IN YOUR HOUSE
* DESTROY YOUR COMPUTER AND EVERY DEVICE ATTACHED TO IT
* DESTROY ALL LIGHTS CONNECTED TO THE CONTROL
* SHOCK (OR EVEN KILL) YOURSELF
* CAUSE A FIRE
* THERE MAY BE OTHER DANGERS NOT LISTED HERE

To reduce the risk of any of the above happening,
* Always have someone double check your work
* NEVER do anything to the circuit while its plugged in
* Do not overload
* Never use your main computer for controlling lights
* Do not attempt to build a circuit if you do not know about electronics
* Follow all directions that came with your Christmas lights
* Do not try to control fluorescent lights (unless it is one that is
  designed to be flashed)  
* Do not try to control motors with this circuit
* Make sure that NO DEVICES (such as printers, tape drives, etc.) are
  CONNECTED to the parallel port (and this includes devices that have a
  'pass-through' type connection)! The only thing that should be connected
  is a light control circuit. Connecting anything other than a light
  control circuit will have an unknown result, and may seriously damage or
  destroy the device and computer.
* Make sure the control circuit NEVER GETS WET...
* See additional notes at the bottom of this section


The part that makes this circuit possible is called an opto-isolator;
it's basically a chip that contains a LED, and a PhotoSensor. This
allows the computer's low voltage to control standard 120 volt
devices with very little risk, because the two are completely
isolated from each other.
Basically it works like this: the computer lights the LED and the
light from it activates the Photo Sensor...along with a few other
parts you are basically making a solid state relay

[Schematic]
schematic [parts list]
R1 - R8: 180
R9 - R16: 330
IC1 - IC8: MOC3020
D1 - D8: Triac, 4a 200v
sockets for IC's
heatsinks for Triacs

[Info]
'outputs' is where the lights attach

nunbers with a 'p' before them are
the pins on the printerport that they
go to.

[triac]
triac

[Pin-Out For Printer Port]
Signal NamePinType
-Strobe 1Output
+Data Bit 0 2Output
+Data Bit 1 3Output
+Data Bit 2 4Output
+Data Bit 3 5Output
+Data Bit 4 6Output
+Data Bit 5 7Output
+Data Bit 6 8Output
+Data Bit 7 9Output
-Acknowledge10Input
+Busy 11Input
+Paper End 12Input
+Select In 13Input
-Auto Feed 14Output
-Error 15Input
-Initialize 16Output
-Select 17Output
Ground 18n/a
Ground 19n/a
Ground 20n/a
Ground 21n/a
Ground 22n/a
Ground 23n/a
Ground 24n/a
Ground 25n/a
[additional info]
Pins 2 through 9 are the outputs used for controlling lights. Pins 18
through 25 are grounds, any of them can be used to connect to. The rest
of the pins are not used for light control.

[control boxes]
this is really up to you on how to build this...
you can put all 8 channels in one box or split them between seperate
boxes.
what i did is make 2 boxes with 4 channels each & a adapter box (shown below):
use a standard 25pin cable to connect the computer to the adapter box, and
then cat5 network cables to go to 2 control boxes.
adapter box control box
[parts for this example]
(1) 25 pin connector (DB-25)
(4) cat5 jacks
(1) std 25 pin cable (not a printer cable)
(2) cat5 cables


Additional Notes:
  • If you know anyone who has epileptic seizures, keep them away from
    these circuits when on, as prolonged exposure to the flashing could
    trigger it.
  • Do not use C7 sized lights (C9's are ok though)
  • If you are controling a large amount of lights, you may notice
    dimming or flickering of lights in every room of the house -
    this is normal, but it may cause problems with electronics
  • There is no guarantee that this actually will work - build
    at your own risk.
  • If the circuit is going to be outside make sure the case is
    fully weatherprofed.
  • In some cases you may need to locate the computer on a separate
    circuit from the lights...if it tends to lock up or reboot for
    no apparent reason, try moving it to another circuit (this should
    only be a problem when controlling large loads)


This page and the images on it (c) 1999 - 2003 James K