Main|Contact|Hardware|Bits'n'Bytes|Legal|Personal|Insiders

Line Voltage Switch-Box with Console and RS232 Interface

Country Specific Regulations!

In Switzerland this device may be used only if the power outlet is equipped with a GFCI (ground fault circuit interrupter / Fehlerstromschutzschalter = FI). The device does not take care of any standards / regulations (IEC, IEEE, SEV, CISPR, ...), most are probably violated. Especially the triac outputs might be a source of electromagnetic compatiblity problems. Such problems were not directly observed during a year of operation, except that the device is not robust against EMI... see below.

Functional Description

A PIC16F74 from Microchip is the heart of this thing. The 10 wires from the detached console are directly wired to input pins of the uP. This rises problems regarding radiated EMI (electromagnetic interference). Because no filters are used at the input of the uP and the software does not check the duration of the key presses yet, presses are sometimes detected even though no key is activated. Interestingly only the keys related to the triac outputs are affected.

The input voltage is sensed at the secondary side of the supply transformer to detect the zero crossing. The phase control uses an internal discretisation of about 240 steps per 10ms. Externally 32 steps can be chosen. These are translated to obtain the same power increase for each step, assuming resistive load. That way, lamps can be dimmed linearly.
Galvanic isolation is provided by four MOC3022 opto triacs.

PCs can communicate over an RS232 with 5V logic levels at 9600 baud / 8N1. An external level shifter is required. A description of the very simple protocol can be found in the source code files. I2C communication could be implemented with minor modifications in the firmware and PCB layout.

the pcbs

Relatively High Currents...

Instead of using pcb material with 70um copper and very wide tracks, I used standard 35um material. The tracks are a lot narrower than neccessary. Thus they have to be covered with solder. Some tracks even have a thick copper wire soldered onto them.

I did neither calculate nor measure whether the cooling of the triacs is sufficient or not. I'll start calculating when I need to control a lamp which draws more than 500 W... or some other sort of heating equippment.

Software / Downloads

There's no GUI yet. Well, the GUI is designed but there's no fully working program. I probably won't finish the GUI because the existing command line tools are sufficient for my needs.

downloadswitch-box-files-20060311.tar.bz2 [127 KB, 2006-03-11]