The Christmas Lights Project!

Day 1:

During last year’s holidays, I was watching Christmas song videos on Youtube and this video of Christmas lights flashing according to the music caught my eye. I decided to make one like that at that moment itself :p but I searched how he did it. I found out how he did it from his channel but it required some special controllers and software which were expensive. So I had to make it with some non expensive things. The first thing that came into my mind was an Arduino. But how would I control the timing of the lights according to a song and even if I could control it with delay(), how will I write a flashing lights program with so many lights!!

But today, something else came into my mind. While I was making a song in a DAW software (sound editing), I thought of making use of a MIDI channel to control the Arduino! The MIDI signals could be read with an Arduino, and the MIDI signal is in sync with a song file. I have played around with MIDI signals some years ago when I made an electric drum kit with piezo sensors and that is how I got this idea suddenly.

So my plan was to program the Arduino to control specific lights according to the notes received via MIDI. The midi could be sequenced according to the song. For instance, if I wanted to turn ON light 1, I would send a ‘C’ note via MIDI and ‘D’ for light 2, and so on.

I made the setup to test this and after a few tries, it worked. I had to use an extra serial port with software serial for debugging. The main serial port was not available to monitor while it communicated to the MIDI in the DAW software.
IMG_20161205_222731.jpgThis was the setup that I used. I even recorded a sample and played back and it worked as expected. The LED on pin13 blinked according to the MIDI signals according to the code. My next day’s task wass to find out how to extent the output pins because I need many more pins.

Day 2:

I successfully added many output pins with a shift register (74HC595). It was easy to program and I attached a total of 3 shift registers to the Arduino, so I got 24 output pins. Then I hooked up three 8-channel (24 relay channels in total) relay boards to those outputs. I programmed to Arduino to turn on the first relay for the note C3, second relay for D3 and so on all the way up to E6 (I did not use sharp notes). I wrote a test MIDI song using StudioOne free version. I used loopMIDI for a virtual MIDI port for StudioOne to transmit to, and used Hairless MIDI to Serial Bridge for sending the MIDI signals to the Arduino. It just worked! 🙂Untitled.pngSo, everything was fine and all I had to do was to create the MIDI file for the song and move everything from breadboard to line PCB.

Day 3:

Made the Christmas Lights controller on the line PCB and attached berg strips so it was nice and clean. I also made some connection cables for connecting it to the relay boards and the Arduino. All that was left was to attach the real lights to the relay boards and make a MIDI track for the song. This was the final board that I used:IMG_20161224_115946.jpg

Day 4:

Made the MIDI track for the song and attached the lights to the relay board.
Here is the video of the output: https://www.youtube.com/watch?v=UYB8DvlqYI8

This project was inspired from a YouTube video by John Storms from his channel ListenToOurLights (http://www.youtube.com/user/listentoourlights). Thank you.

Tutorial of this project: techmusician.wordpress.com/2017/01/01/the-arduino-lights-project/

Advertisements

One thought on “The Christmas Lights Project!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s