home : electronics : Lamp control module

Lamp Control Module

This lamp control module is designed to control layout lamps (street lights etc.) directly from the PC via a 9.6 kbaud serial port. Each module can control eight groups of lamps, with a maximum current of 0.5 Ampere per group. The lamps are connected to 3-pole female connectors mounted on ribbon cable. Each connector has two lamp outputs (  ) and one common return (+).

The unit should be powered with 15-16 V DC. The power and the serial signal is connected via the connectors X5 and X6. I use 6-pin headers and wire them symmetrically. In this way I can use standard ribbon cable and ribbon cable contacts without thinking of polarization. I mount two identical contacts to allow daisy chain connection. The serial input is protected with a resistor and clamped with a zener diode. This allows direct operation from the PC serial port, but standard TTL levels can also be used.


Figure 1. Lamp control module schematic.

Circuit board

I build the modules on Veroboard. I need too few to justify the manufacturing of a real circuit board. Below is a picture of the wiring and component placement, seen from the solder side:

Figure 2. Component placement and wiring, seen from the solder side.

Here are pictures of the module from the component and solder side. Note the violet wire going over the outgoing wires. This is used to fix the outgoing wires to the board.


Figure 3. The component and solder sides of the module.

Serial communication protocol

The serial communication is 9.6 kbaud, 8 bits, no parity. A command sequence to a module consists of an address byte followed by one command byte. The "set intensity" command also has one data byte. The intensity can be changed individually for each port with the "set intensity" command. The change takes effect after the next "on" command to the port. Default is full intensity.

Figure 4. Serial command protocol.

PIC program

The PIC processor program for the decoder can be found here:

The device address must be changed for each module to be built. The program given here has device address 0x00. If you use the .asm file, the address is defined in the beginning of the program. In the .hex file, you find 0x0C00 at position 0x003C and position 0x0045 in the code. The two lower hex digits is the device address. The values can be changed directly in the hex code with e.g. IC-Prog. Note that bit 7 in the device address must be 0.

The module described here is designed to control groups of lamps. If you want to control every single lamp individually, you can use the PIC program for this module, and the general hardware design of the signal control module.

home : electronics : Lamp control module
Last edited September 2, 2012