home : electronics : Light sequencing module

Light Sequencing module



Introduction

In a discussion forum, there was a discussion about different methods to turn on and off a number of street and house lights in a programmed sequence. Since nobody could recommend any suitable ready-made device for this, I thought I could contribute with a do-it-yourself solution. I don't intend to use this myself, since I have all lights computer controlled on my layout, but I built one unit for another forum member , Peter Funck, and he has tested it.

Functional description

The module turns on or off eight different lights (or groups of lights) in a pre-programmed sequence. The sequence is started with a pulse from e.g. a k83 decoder or a manual push-button. The first pulse starts an "on" sequence, the second an "off" sequence and so on. The module has four different programs, selectable via jumpers. Each program has separate "on" and "off" sequences.

Building and programming the module

I built the module on a Veroboard. I do not think it is worth the effort to make a real circuit bord for just one or a few units. The design is based on a PIC processor, the PIC16C505. The program I developed for Peter Funck's module can be found here:

The sequences in this program are:

     Sequence 0 (RB5 and RB4 low). Total 20 s:
 
     On:  L0 (5s) L1 (2s) L2 (4s) L3 (1s) L4 (3s) L5 (4s) L6 (1s) L7
     Off: L4 (2s) L2 (5s) L6 (3s) L1 (2s) L7 (1s) L0 (5s) L5 (2s) L3
 
     Sequence 1 (RB5 low, RB4 high). Total 11 s on, 13 s off:
 
     On:  L0 (2s) L1 (1s) L2 (2s) L3 (1s) L4 (2s) L5 (2s) L6 (1s) L7
     Off: L4 (1s) L2 (3s) L6 (3s) L1 (1s) L7 (1s) L0 (3s) L5 (1s) L3
 
     Sequence 2 (RB5 high, RB4 low). Total 20 s:
 
     On:  L4 (2s) L2 (5s) L6 (3s) L1 (2s) L7 (1s) L0 (5s) L5 (2s) L3
     Off: L0 (5s) L1 (2s) L2 (4s) L3 (1s) L4 (3s) L5 (4s) L6 (1s) L7
 
     Sequence 3 (RB5 and RB4 high). Total 13 s on, 11 s off:
 
     On:  L4 (1s) L2 (3s) L6 (3s) L1 (1s) L7 (1s) L0 (3s) L5 (1s) L3
     Off: L0 (2s) L1 (1s) L2 (2s) L3 (1s) L4 (2s) L5 (2s) L6 (1s) L7
 
If you are familiar with PIC programming you can change the sequences in the source code, assemble it and get a new .hex file. To simplify the programming for those who are not familiar with PIC processors, I have written a DOS program hexgen.exe that generates a .hex file based on input from the keybord or from a text file.

Power supply

Power is supplied via the yellow and brown wire, see below. The module can operate with 10 - 20 V AC or DC.
Note that the power supply must be isolated from other equipment on the layout!

Control

A program sequence is started by a voltage pulse on the control inputs, blue and yellow wires, see below.
Blue is + and yellow is -. The voltage of the pulse should be 5-30 V and the duration minimum 20 ms.

Output

There are four 3-pole flat cable outputs, each carrying two outputs. The outputs are the outer wires, and the
center wire is a common return wire. The return wire is the positive end.
Each output can be loaded with 0.5 A at 25 C (derate with 4 mA/C at temperatures over 25 C).
The total load on all 8 outputs together must not exceed 3 A.

Program select

Four different programs can be selected via jumpers on two pin headers, see below.

Schematic:

Component placement and connections:

Seen from solder side.


home : electronics : Light sequencing module

Last edited September 2, 2012