Flashing Christmas Lights To Music

Flashing Christmas Lights To Music!!!!!!!!!! New to Arduino. Was wondering if anyone has done this?


Have a look:

:smiley: Now that’s what I like, a guy who plans ahead! Usually, these questions come up a week before Christmas. :smiley:

Sure, that can be done. I’ve done some “dance lighting”, but I it was a few years ago and I didn’t use a Microcontroller. (But, I am planning a new sound controlled lighting project with the Arduino.)

There are two issues (ignoring software for the moment)… First, you need to get a voltage that’s related to the beat or loudness. For that, you can use a peak detector circuit (see [u]this page[/u]). I modified the peak detector, replacing the switch with a resistor with a calculated RC time constant of 1/10th or 1/4 of a second.

Of course, you run that input into the ADC input of the Arduino. (And, you need to design your analog circuit so that it does not exced 5V.)

The 2nd issue is the AC power. You need to isolate the Audrino from the AC power you are controlling. For that you can use an optoisolators dirving triacs. There are special-purpose optoisolators designed to drive a triac, such as the MOC3011.

My past projects -

The 1st controller I built controls colored floodlights. There are 4 channels and I have 4 pairs of floodlights connected). It simply pops-up a random pattern every time it detects a beat. If it pops-up 4 “zeros” (all off), that’s “invalid” and it quickly latches another random pattern.

The other controller is a “chase light” or sequencer. Again, any random pattern can come-up and the pattern sequences or “shifts” with the speed controlled by the loudness. The direction can be reversed by the beat. The data is “looped” and there is an option of looping the direct data or the inverted data. With the data inverted, you get a [u]Johnson counter[/u]. With a Johnson counter, one channel comes-on at a time in sequence 'till they are all on. Then, they sequence-off one at a time, and the pattern repeats. It can do a standard loop in one direction and “Johnson” in the other direction, and this is all random with the speed & direction always controlled by the loudness and the beat.

My project that’s in the planning stages will be 20 channels (or maybe 20 channels for left plus 20 channels for the right) and it will be software controlled and will do LOTS of things. It’s only going to control LEDs, so there will be no AC voltage.