| LightStack - a simple programming language to generate any light sequence | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
![]() | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Overview | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Schattenbild "LightGyro" 13 RGB-LEDs controlled by "LightStack" | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
![]() |
![]() |
![]() | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Typical applications | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Dimming circuits Dynamic color changes User-specific light controls Loadable light sequences DMX control units Light controls of every description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Advantage over usual applications: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Quick and easy generation of simple or complex light controls Fast prototyping, generation and modification of light sequences in few seconds Easy portability by hardware independence | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
| Schattenbild "Ballon", controlled by "LightStack" | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Object "Clavilux" four 1 W LEDs, controlled with "LightStack" | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Implementation | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
LightStack implements a time based light control. Base frequency is open, in general we use 100 Hz (10 mSec.). At every clock tick, the virtual machine is called. This virtual machine either executes the actual instruction or fetches the next instruction by a callback function. In general, LightStack instructions contain two time values, a minimum and a maximum time for the instruction, and two brightness values, a minimum and a maximum brightness value. LightStack always uses a random value between minimum and maximum. To provide fix values, simlpy set both values to the same data. Times are 16 bit values, time base is the provided frequency (typically 100 Hz), hence maximum time value is 655,35 seconds. For standard instructions,16 virtual brightness ranges (4 bit) are supported, to provide efficient programming codes and to allow hardware independence. These values for the brightness are also selected between a minimum and a maximum value, so the brightness value per light is fully coded in only one byte. In typical light controls, more than 16 brightness levels are supported, by example 4096 ranges with 12 bit PWM control. LightStack internally calculates brightness values with 16 bit resolution. So the 4 bit brightness values are first expanded to the 16 bit values, and the different values between 2 instructions are computed by interpolation based on the selected base frequency. Then the so calculated values may be converted by a user supplied function or table to the hardware supported brightness values, including the transformation of non-linearity of the LED-brightness according to the control, and also the non-linearity of the eye-sensitivity. If the 16 virtual brightness levels are not sufficent, the user may also select the up to 65635 real brightness levels by (not so efficient) extended LightStack instructions. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Sample Implementation of LightStack with 4 Moonstone RGB-LEDs | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
![]() | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
![]() | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| "Colors" | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
![]() | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| "Fire" | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Michael Fitzek Rothspitzstr. 9a 81476 München info@lightstack.com | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| "drops" | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||