2016-05-20 14:46:43 +02:00
|
|
|
# IRlicht
|
|
|
|
|
|
|
|
A 4-channel (RGBW) controller for LED-lamps, based on Arduino and controlled
|
|
|
|
via infrared by a universal remote.
|
2014-05-03 00:54:24 +02:00
|
|
|
|
|
|
|
Copyright 2014 Ronald Schaten <http://www.schatenseite.de>
|
|
|
|
|
|
|
|
|
2016-05-20 14:46:43 +02:00
|
|
|
## Circuit
|
2014-05-03 00:54:24 +02:00
|
|
|
|
|
|
|
You can see how to connect your Arduino in the enclosed Fritzing files and
|
|
|
|
their rendered breadboard schematics. Basically, it's just the IR receiver
|
|
|
|
diode, and one MOSFET per output channel. The Arduino can live quite well with
|
|
|
|
the 12V on it's Vin, so no more voltage regulation is necessary.
|
|
|
|
|
|
|
|
The receiver doesn't necessarily have to be an TSOP31238. After frying two of
|
|
|
|
those, I dissected an old DVD player and desoldered the enclosed IR receiver
|
|
|
|
diode from that. Worked like a charm. :-)
|
|
|
|
|
|
|
|
|
2016-05-20 14:46:43 +02:00
|
|
|
## Software
|
2014-05-03 00:54:24 +02:00
|
|
|
|
|
|
|
After installing Ken Shirriff's IR receiver library in your Arduino
|
|
|
|
environment, everything you need is the enclosed sketch (irlicht.ino).
|
|
|
|
Depending on the setup of your hardware, you may have to adjust the pins your
|
|
|
|
receiver and your MOSFETs are connected to.
|
|
|
|
|
|
|
|
Use the examples that are shipped with the IR remote library to find the codes
|
|
|
|
that your remote is emitting, and set up the defines according to this.
|
|
|
|
|
|
|
|
With the initial brightness levels given in the sketch, you can select which
|
|
|
|
mode and colors should be active when the device is switched on.
|
|
|
|
|
|
|
|
|
2016-05-20 14:46:43 +02:00
|
|
|
## Usage
|
2014-05-03 00:54:24 +02:00
|
|
|
|
|
|
|
If your remote is set up like mine, you get the following functions:
|
|
|
|
|
|
|
|
Some keys for basic color selection:
|
|
|
|
|
2016-05-20 14:46:43 +02:00
|
|
|
* 1 -- red
|
|
|
|
* 2 -- green
|
|
|
|
* 3 -- blue
|
|
|
|
* 5 -- white
|
|
|
|
* 7 -- yellow (red and green)
|
|
|
|
* 8 -- cyan (green and blue)
|
|
|
|
* 9 -- magenta (blue and red)
|
2014-05-03 00:54:24 +02:00
|
|
|
|
|
|
|
On the first press, the channel is turned on to 1/5 of maximum. Repeating the
|
|
|
|
key enhances the brightness, after five levels the channel is turned off again.
|
|
|
|
|
2016-05-20 14:46:43 +02:00
|
|
|
* 4 -- all channels on
|
|
|
|
* 6 -- all channels off
|
2014-05-03 00:54:24 +02:00
|
|
|
|
|
|
|
This turns the whole setup on or off with one single press of a button.
|
|
|
|
|
2016-05-20 14:46:43 +02:00
|
|
|
* Flash -- Hard cycle through all colors (except white).
|
|
|
|
* Fade -- Soft cycle through all colors (except white).
|
|
|
|
* Strobe -- Turn the currently selected color on and off.
|
|
|
|
* Soft -- Fade the current color from dark to a certain level and back.
|
2014-05-03 00:54:24 +02:00
|
|
|
|
2016-05-20 14:46:43 +02:00
|
|
|
* Dim -- Decrease the maximum brightness of the lamp.
|
|
|
|
* Bright -- Increase the maximum brightness.
|
2014-05-03 00:54:24 +02:00
|
|
|
|
2016-05-20 14:46:43 +02:00
|
|
|
* AllLightsOn -- Misleading name: this speeds up the current animation.
|
|
|
|
* AllLightsOff -- Also misleading, although consistent: slows down the
|
|
|
|
animation.
|
2014-05-03 00:54:24 +02:00
|
|
|
|
|
|
|
|
2016-05-20 14:46:43 +02:00
|
|
|
## Comments
|
2014-05-03 00:54:24 +02:00
|
|
|
|
|
|
|
Feel free to drop me a line at <ronald@schatenseite.de>.
|