My intention is to replace the Noisebridge light switches with a computer controlled, triac, dimmable, and easily hackable system.
General system requirements
- Damage the existing light switch panel as little as possible
- 6 12 to 16 amp outputs
- Touch screen UI at the front door
- Easy-to-access override switches for each circuit (force on and force off)
- A programmatic CGI/XML interface
- A HTML interface
- Fully insulated, fused, and generally not-going-to-fall-apart-and-hurt-someone construction.
I want to split parts of the system that handles the AC switching from the computer and network interface stuff. We'll call the two parts the Computer Control System (CCS) and the Alternating Current Dimming System ACDS.
AC Dimming System
The ACDS will have four dimmable AC outlets and an analog input (using an RCA connector) for each one. The input voltage can vary from zero to five volts. Less than 0.8 volts turns a light completely off and more than 3.4 volts turns a light switch completely on. A voltage in between 0.8 and 3.4 volts runs the light at partial power. The inputs are filtered such that a digital device can use PWM from a TTL chip instead of a true analog output.
The ADCS unit will be inside a 10"x8"x4" NEMA enclosure. It will have a master switch and circuit breaker as well as a circuit breaker for each output. Each output will also have an externally accessible override switch that can force it on or off. The power input and outputs will be standard NEMA-15 sockets and plugs to enable easy bench testing and burn in.
I'll connect the ACDS to the light switch panel by replacing that panel with a single power outlet and four IEC power inlets. (Think the plug on the back of a computer.) For computer power cables will connect the ACDS to the lights. In the event of a catastrophic failure of the system, the power cable for a light can be manually connected to the power outlet.
--- TODO: schematic and theory of operation
Status: Implemented and working. A respin of the PCB two fix a routing error may be required.
Computer Control System
The CCS is basically a computer with a DAC (digital to analog converter) circuit attached. The computer has a digital I/O board based around an 82c55 that will connect to a TLC7226IN four channel DAC. The outputs of the DAC are buffered and connect to the inputs of the ADCS unit. My intention is to use a Transmetta-based PC-104 board with a solid state disk and a 82c55 daughter card.
The CCS has three interfaces: A web page, a touch screen LCD panel, and a CGI/xml interface.
Status: The DAC interface is built and working. The four input channels arn't set up yet. I don't have an LCD panel yet.
I imagine a three tired software system. A the lowest level, there's a simple program written in C that communicates with the DAC and keeps track of the state of each light. Built on top of that is a simple CGI/XML interface that can query and set the state of the lights. Something like:
Fetches an XML document describing logical names and permissible values for the lights
Returns an XML document with the current value for light XXXX
Sets light XXXX to value YYYY Returns an XML document with the current value for light XXXX
Returns an XML document with the status of the input line XXXX
Returns an XML document with the status of every input and output.
On top of that, we want a pretty web UI.
STATUS: Nothing written. Most of the UI code can be copied from the system I have at home.
The main user interface should be an LCD panel installed near the enterance. Then panel will be illuminated by a few LEDs so that its easy to find even with all the lights off and the screensaver on. I think it should just run X with some web browser 'stuck' on the web page for the lights. It should only one tap to turn the lights on.
--- TODO --- Include screenshot of my system.
Ideas for expansion
- Add other sensors such as a temperature sensor, motion sensor, door sensor.
- Perform automated actions, for example turning a light on when the door opens.
- Add outputs than run to other lights
- Add a remote control, for example the firefly.