Lighting

From Noisebridge
(Difference between revisions)
Jump to: navigation, search
(General system requirements)
 
(6 intermediate revisions by 4 users not shown)
Line 1: Line 1:
 +
[[Category:Projects]]
 +
 
My intention is to replace the Noisebridge light switches with a computer controlled, triac, dimmable, and easily
 
My intention is to replace the Noisebridge light switches with a computer controlled, triac, dimmable, and easily
 
hackable system.
 
hackable system.
Line 5: Line 7:
  
 
* Damage the existing light switch panel as little as possible
 
* Damage the existing light switch panel as little as possible
* 4 10 amp outputs, expandable to 8
+
* 6 12 to 16 amp outputs
 
* Touch screen UI at the front door
 
* Touch screen UI at the front door
 
* Easy-to-access override switches for each circuit (force on and force off)  
 
* Easy-to-access override switches for each circuit (force on and force off)  
Line 33: Line 35:
 
of a catastrophic failure of the system, the power cable for a light can be manually connected to the power outlet.  
 
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
+
=== Analog Theory of Operation===
 +
Here is a simplified diagram of the Analog and high voltage part of the system:
 +
[[Image:lighting_block2.png]]
  
 +
The high current switching element in an AC dimmer is an optically coupled
 +
triac. These are commonly known as SSRs (Solid State Relays) SSRs will turn
 +
on when a voltage is applied across the control pins. Once an SSR is turned on,
 +
it will not turn off until no current flows through it.
 +
 +
AC dimmer circuits exploit this fact by turning the SSR on in phase with the
 +
AC waveform.  For example, to run a light at 25% intensity, you'd use a control
 +
voltage of 1.6 volts. The comparator would not turn the triac on until 75%
 +
of each sine wave. The comparator would automatically turn the SSR off at
 +
the end of the wave because the integrator would reset back to 4 volts.  A
 +
voltage above 4.0 volts or below 0.8 volts hold the output always on or
 +
always off.
 +
 +
 +
See [[Lightintg Analog Details]] for the full description of the analog circuitry.
 +
 +
The low pass filter on the input means that the lights can be controlled with
 +
a PWM circuit instead of an analog voltage. A PWM circuit controlling the
 +
lights should have a base freequency of between 2,000hz and 20,000hz for
 +
the best results.  In the example above, you'd use a PWM circuit set at
 +
36% duty cycle.  The input impedence is about 5K ohms.
  
Status: I've prototyped and successfully operator a single channel version of the ADCS.
 
 
==Computer Control System==
 
==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
+
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.
82c55 daughter card.
+
  
 
The CCS has three interfaces: A web page, a touch screen LCD panel, and a CGI/xml interface.  
 
The CCS has three interfaces: A web page, a touch screen LCD panel, and a CGI/xml interface.  
 
   
 
   
Status: I have the computer and have successfully interface with the 82c55 card. I don't yet have the DACs but I've
+
Status: The DAC interface is built and working. The four input channels arn't set up yetI don't have an LCD panel yet.  
implemented projects like this before and I don't expect much trouble.  I've not sourced or really thought about
+
the touch screen yet
+
 
+
IDEA: Maybe I can find a multichannel USB or RS232 DAC and save myself a lot of work.  
+
  
 
==Software Interface==
 
==Software Interface==
Line 56: Line 75:
 
query and set the state of the lights. Something like:
 
query and set the state of the lights. Something like:
 
   
 
   
http://lights/api/config?
+
http://lights/api/config.xml
 
  Fetches an XML document describing logical names and permissible values for the lights
 
  Fetches an XML document describing logical names and permissible values for the lights
 
    
 
    
Line 66: Line 85:
 
   Returns an XML document with the current value for light XXXX
 
   Returns an XML document with the current value for light XXXX
  
 +
http://lights/api/getinput?input=XXXX
 +
  Returns an XML document with the status of the input line XXXX
 +
 +
http://lights/api/status?
 +
  Returns an XML document with the status of every input and output. 
  
 
On top of that, we want a pretty web UI.
 
On top of that, we want a pretty web UI.
Line 84: Line 108:
 
* Add outputs than run to other lights
 
* Add outputs than run to other lights
 
* Add a remote control, for example the firefly.
 
* Add a remote control, for example the firefly.
 +
* Send a retro-looking physical lightswitch to NYC Resistor or to other hackspaces and with instructions to give it network control over one of our lights. Hope they do the same.
 +
 +
 +
==Links==
 +
* http://www.denninger.net/homedaemon.htm

Latest revision as of 22:39, 26 November 2011


My intention is to replace the Noisebridge light switches with a computer controlled, triac, dimmable, and easily hackable system.

Contents

[edit] 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. Lighting system.png

[edit] 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.

[edit] Analog Theory of Operation

Here is a simplified diagram of the Analog and high voltage part of the system: Lighting block2.png

The high current switching element in an AC dimmer is an optically coupled triac. These are commonly known as SSRs (Solid State Relays) SSRs will turn on when a voltage is applied across the control pins. Once an SSR is turned on, it will not turn off until no current flows through it.

AC dimmer circuits exploit this fact by turning the SSR on in phase with the AC waveform. For example, to run a light at 25% intensity, you'd use a control voltage of 1.6 volts. The comparator would not turn the triac on until 75% of each sine wave. The comparator would automatically turn the SSR off at the end of the wave because the integrator would reset back to 4 volts. A voltage above 4.0 volts or below 0.8 volts hold the output always on or always off.


See Lightintg Analog Details for the full description of the analog circuitry.

The low pass filter on the input means that the lights can be controlled with a PWM circuit instead of an analog voltage. A PWM circuit controlling the lights should have a base freequency of between 2,000hz and 20,000hz for the best results. In the example above, you'd use a PWM circuit set at 36% duty cycle. The input impedence is about 5K ohms.

[edit] 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.

[edit] Software Interface

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:

http://lights/api/config.xml

Fetches an XML document describing logical names and permissible values for the lights
 

http://lights/api/get?light=XXXX

 Returns an XML document with the current value for light XXXX
 

http://lights/api/set?light=XXXX&value=YYYY

 Sets light XXXX to value YYYY
  Returns an XML document with the current value for light XXXX

http://lights/api/getinput?input=XXXX

  Returns an XML document with the status of the input line XXXX

http://lights/api/status?

  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.

[edit] User Interface

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.

[edit] 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.
  • Send a retro-looking physical lightswitch to NYC Resistor or to other hackspaces and with instructions to give it network control over one of our lights. Hope they do the same.


[edit] Links

Personal tools