Here I present another project based on a addressable LEDs strip, based on WS2812b leds.
It consists of an 'electronic' candle, which lets you select set colors, adjust the intensity, and have different effects like rainbow, fade and fire. The project arose from the purchase of an IKEA lantern model BORBY ... the idea was to replace a candle of considerable size, for something more ... modern.
Christmas comes, and nothing more typical than riding a Christmas tree to give a bit of atmosphere. They come in many types, but this is intended for the most geeks, based on state of de art RGB LEDs and thought to 'planting' directly on an Arduino.
WARNING: In this part is used mains voltage, which can carry risks. If you do not have enough experience or not you think trained, best uses few leds low voltage and evitate a scare. The author is not responsible for any damage caused by not taking proper security measures.
For the power stage I used triacs of type BT137 controlled by optocouplers MOC3041. Depending on the power you need to control, you can change the type of TRIAC less powerful one (or more ...).
The optocouplers MOC3041 internally contain a control circuit for triggering the zero crossing, the triac is always close to zero voltage pass avoiding interference.
You can use other types of optocouplers respecting the circuit recommended by the manufacturer.
The scheme:
And this appearance when mounted (in my case the stage is 4 channels)
Note that a box is mounted on suitably isolated. The heatsinks are Triacs for high continuous loads (in this case support 8A, allowing about 1500W per channel).
As I mentioned in the previous post, in my case I am going to use a microphone as a signal source, this eliminates the need to connect directly and provides more freedom of movement.
I've used a Dealextreme module, the SKU: 135533, a sound detector module with digital output and analog. Here we use the latter.
As the level of the signal delivery is very small, I used an ancient u741 (but functional) that had a drawer, to adjust the input signal to the Arduino.
It is also possible to directly use an electret microphone, but we have to amplify it properly (you can find plenty of schemes on the internet), or use a module, and amplified as this
Those who have a few years as I, recall that back in the 1980s, in any disco or party was mandatory the psychedelics lights, i.e. those lights ranging to the rhythm of the music. It could be a single light or more, normally 3 that varied with bass, middle and treble of the music.
It could be achieved already made (very expensive for the time), on Kit (the mythical SalesKit) either make you them yourself.
Well because I was a fan of lights (and parties) and I built a couple of them, the first for more than 30 years (Yes, Yes,...) in a great box made of plywood, but Unfortunately a few months ago ended in the trash ..
The second of some 30 years ago... still alive and kicking...
Taken from the wonderful magazine Elektor March 1982
Well after this story chive Grandpa, let's see how to emulate those mythical lights with our beloved Arduino.
The idea is to use a sound source, in my case a microphone, bring it into line with the level of the entries of the Arduino, apply a FFT process to separate the different frequencies, grouping these into three channels (bass, mid and treble), and depending on which exceed a certain level, activate the outputs of the Arduino.
These outputs can attack some leds initially, but to make it more authentic then use a triac output stage with some bulbs