# Arduino / Vixen Candles With Flick Out Sequence



## morrisdirector (Mar 15, 2015)

Hi Everyone, I've recently been messing around with Arduino powered candles. Made these with PVC, LEDs, hot glue and an Arduino.

I programmed it to have a flicker out sequence when a ghost appears in my doorway. Then when the ghost disappears lighting will return to normal in the room and the candles are supposed to flick back on:






Ultimately my plan is to have about 6 separately programmed candle "channels" in the vixen program. I plan on having about 20 candles total in jars, candelabras, candlesticks and more. Each candle will be tapped into one of the 6 flicker channels. Can't wait!


----------



## Hairazor (Mar 13, 2012)

What a great Eerie addition!


----------



## BillyVanpire (Apr 22, 2015)

that is a cool application, can the lights sense movements with pir sensors?

make each channel a zone or area to guide haunters to the scare, each channel on a pir maybe? 
a pathway/hall that lights up as you walk down to the last zone, and then all the candles go out..BOO!


----------



## morrisdirector (Mar 15, 2015)

Nice idea BillyVanpire! I like it!


----------



## BillyVanpire (Apr 22, 2015)

i aim to scare


----------



## RoxyBlue (Oct 6, 2008)

Very pretty


----------



## bobzilla (Nov 13, 2008)

Nice work!
Really cool!


----------



## The Halloween Lady (Aug 18, 2010)

What a beautiful and creepy effect.


----------



## discozombie (Jun 21, 2012)

Are you using the PWM pins on the Arduino? Would you mind sharing your code? Im curious to see how you got the effect.


----------



## MBrennan (Sep 22, 2008)

discozombie said:


> Are you using the PWM pins on the Arduino? Would you mind sharing your code? Im curious to see how you got the effect.


As I just recently began to learn about Arduinos (Huge thanks to Mikkojay and his 4 channel prop controller), I'm curious how this works. I don't know any coding (yet).

Are the individual candles flicker LEDs, and on different channels controlled by the Arduino, or some thing completely different.

It looks great!!!


----------



## Setarcos (Jul 4, 2015)

Looks great!

I am doing something very similar with our haunt's pathway candles, but will be driving RGB LEDs in the candles via FPP and a Falcon F16V2.


----------



## discozombie (Jun 21, 2012)

MBrennan said:


> As I just recently began to learn about Arduinos (Huge thanks to Mikkojay and his 4 channel prop controller), I'm curious how this works. I don't know any coding (yet).
> 
> Are the individual candles flicker LEDs, and on different channels controlled by the Arduino, or some thing completely different.
> 
> It looks great!!!


From watching a few videos on this, not sure for this particular case, the LED are normal LED and the PWM value variations is what creates the flicker effect. I imagine you could have different LED on different PWM pins and have them flickers at different rates.


----------



## morrisdirector (Mar 15, 2015)

MBrennan said:


> As I just recently began to learn about Arduinos (Huge thanks to Mikkojay and his 4 channel prop controller), I'm curious how this works. I don't know any coding (yet).
> 
> Are the individual candles flicker LEDs, and on different channels controlled by the Arduino, or some thing completely different.
> 
> It looks great!!!


Thanks all for your comments!

Each candle is just a PVC pipe with hot glue for the wax and two LEDs each (1 orange/amber LED and one warm white LED -- mixing the two makes almost perfect candle light brightness and color). You can get a pack of these leds for just a couple of bucks.

For the fading system, I built an Arduino Mega powered system in a wooden cabinet with N-Channel MOSFETs to drive high DC currents (that way I can have 50-100 candles around the display instead of just 5-6). Each channel has one MOSFET and the gate is controlled by the PWM pin on the Arduino Mega. The Arduino serial port (USB) is connected to my computer where I use a program called VIXEN to control the candle flicker effect. Vixen gives you incredible control over how you want your candles to flicker (you can control how quickly it flickers, how randomly, and to what brightness levels on the high and low end).

Originally I was going to just buy self flickering LEDs, but the more I learned about the Arduino and Vixen, I just had to go for the "more control" option (I'm a bit of a creative control freak). 

I would display the code, but the codes says nothing about the actual candle flicker. The code just reads commands from Vixen and there are many tutorials that explain the code (although let me know if you still want to see it).

All I can say is, with a little time and energy, electronics are a cheap hobby with China in our back pocket.


----------



## morrisdirector (Mar 15, 2015)

discozombie said:


> From watching a few videos on this, not sure for this particular case, the LED are normal LED and the PWM value variations is what creates the flicker effect. I imagine you could have different LED on different PWM pins and have them flickers at different rates.


Correct discozombie. I have about 5 PWM channels that give me 5 different flicker channels. That way something like this candelabra can look more real with each candle flickering independently (at least most of them are independent - as long as you space out candles on the same channel, the human eye doesn't seem to notice).


----------



## morrisdirector (Mar 15, 2015)

Setarcos said:


> Looks great!
> 
> I am doing something very similar with our haunt's pathway candles, but will be driving RGB LEDs in the candles via FPP and a Falcon F16V2.


I just checked out your project Setarcos! Great work! Looks super awesome!


----------



## Iniquity (Oct 13, 2015)

This is so cool and very creepy!


----------



## iowachap (Aug 19, 2015)

BillyVanpire said:


> that is a cool application, can the lights sense movements with pir sensors?
> 
> make each channel a zone or area to guide haunters to the scare, each channel on a pir maybe?
> a pathway/hall that lights up as you walk down to the last zone, and then all the candles go out..BOO!


great idea, and the candles look awesome! Great job


----------



## morrisdirector (Mar 15, 2015)

Hi All. Just posted my final haunt video in a separate post here: http://www.hauntforum.com/showthread.php?p=843814. Tell me what you think!


----------



## Spookie (Aug 26, 2008)

Morrisdirector, just watched the other video and then found this thread. Definitely showing hubby it. So if we want to learn more about vixen where do we go? Is this on one of the Arduino or Adafruit sites? We haven't done much with our boards since this summer and hubby said what ever we do for 2016 we need to start early. Something like this might be our next project. Thanks for the video and info. Very cool.


----------



## MBrennan (Sep 22, 2008)

Thanks for information on post #13!

As I mentioned earlier, still new to Arduino - and all I know about Vixen is that it exists.

If you have the time, I have a couple questions:

Which version of Vixen are you using?

Are you using all 14 (I think that's right) PWM pins on the Mega?

Like Spookie, I may have to try this for 2016!

Great Work!


----------



## scream1973 (Dec 23, 2007)

Would you mind sharing your Vixen program and Ardunio code.. I wouldnt mind something like this for normal around hte house use.


----------

