Overview
I've created a lot of simple RGB controllers during the last years. Although every single one was dedicated and therefore built from scratch, its not very challenging, so there was a need for a scalable, universal one.
Features
a set of predefined colours
LCD
rotary encoder
seperated control unit/driver
remote control
smooth fading (0.5s) between manual color select, non-blocking
autofader (~5s), using predefined colors
temperature control
manual RGB level mode
random colors
logarithmical brightness control for each mode/color
NO annoying flash/strobe effects
I think the main reason every commercial RGB unit has some sort of strobe mode is just because its easy to do, in my opinion this is completely useless. Does someone really want a multicolor LED strobe in his room?
Moreover, serious LED strobes are using over 500 LEDs, which are usually overdriven by a few 100%. The pulse duration has to be in the range of some µs (needed for the strobe effect), this also prevents the overdriven LEDs from beeing killed by overheating.
More Details
predefined colors
Instead of just fading through R->G->B, I am using a static set of colors, for both autofading and manual select.
seperated control unit/driver
No need for thick cables, just one cheap standard USB AB cable from the control unit to the driver.
fading
Switching between colors looks crappy. I implemented a fader with variable fading length, fast for
manual switching, slow for the auto fader. It does not block any interaction, it just adapts the current output setting to a given setting the whole time.
temperature control
The ambient air temperature is converted to 18 color levels from blue (~17°C) over green to red (~25°C)
logarithmical brightness control for each mode/color
The subjective perception of brightness is (nearly) logarithmical, you must pay attention to this if you want a linear scale.
Control Unit
Schematics still need to be drawn :)
source code
Note: this is an old beta with linear scale, the most recent version will follow soon.
The lcd lib works for hd44780 lcds.
Remote Control
The remote control is a cheap 4 channel module. It has 5 outputs: channel 1-4 (T/D-latch type) and
one called "VT" which is high as long as a button is pressed. Because the outputs are t-latches,
you have to XOR current and last state whenever VT goes high in order to get the pressed button.
Temperature Sensor
The sensor is a KTY81-120, wired this way:
+5V--R10k--ADCin--KTY--GND
Of course, not very accurate, but enough for this purpose.
Driver
The driver couldnt be any easier: 3x BD131 (NPN), 3x 470R (base) and plugs for the LED modules (molex), power supply (dc plug) and controller (usb).
|