My project for the Internet of Holiday lights was based around our living room which was not very livable. It was a mess and with the upcoming holidays I wanted to set the living room in such a way that it would be suitable for entertaining guests. Additionally I wanted to accomplish the above mentioned in such a way that the holiday lighting becomes part of the living room and I don’t need to remove it after the holidays. Hence the concept of Dynamic Living-room Lighting.
In the previous posts, I have review the YUN and the infineon shield and have presented an overview of the project system. I also setup the place for the lighting with some homemade arts and crafts and give a preview of the system setup.
In this post I explain how to setup a room mood light with RGB LEDs and the Infineon RGB Shield and the Arduino YUN. It will be connected to the OpenHAB system via MQTT.
Setting up the LED Strips
The image below shows my living room setup before the build. The windows have curtains but we need a way to setup the LED Lights so the entire area is illuminated. I initially thought we would use lights behind the curtains but that did not work out since the curtains are too thick. Hence I turned to mounting the LED Strips above the curtains.
The Original BatCave Style living room
The first thing is to get a mount for the LEDS and for that I got a PVC U-Channel. I used a dremel to cut it into an L-Channel and then used double tape to stick the LED Strip all along the length. It was LONG! But I got it done. I also made cuts where we need to bend the strips. The images below show how I did that.
The next part is to hang it up along the curtain line. This is easier said than done. This can be done in many ways and IF I had a 3D printer…;)
Anyways, I took up some PVC Sheets and cut them up to make supports. For the lack of a better substitute, I used some tape to hang the whole thing up. The images below show the result of the experiment.
The controller can go behind the curtains and stay out of sight. The wifi capability of the YUN comes handy for this allowing connectivity without cables. Next we move to the controller.
Connecting the Shield – Infineon RGB Shield -The Static Element
In order to control the LED Strip, we use the [Infineon RGB LED Shield] 2452190 and the Arduino YUN. The shield does not come with headers and I don’t have any handy either so I had to improvise. I added a limited number of burg strips which I had in longer lengths and made a temporary mount. The image below shows the same.
I made a library and it is available on GitHub for you to use and it is available at https://github.com/inderpreet/infineonrgb_shield . Getting started is easy as using the LAMPTEST Example. I tested it out and the control works pretty nicely.
In Order to control these lights to produce a specific color, I used MQTT to send across the color. This can be done via the demo by kartben or via OpenHAB.
I did a post on this at [Dynamic Living-room Lights] . You can select the color but thats not enough. We need to make the lights dynamic light the title of my project. Hence I need to add a dynamic element.
The Dynamic Element – Audio Control
I wanted to add a Dynamic Element which made the lights stand out. There are lots of light color controllers out there and most LED strips come with these out of the box. The images below shows the ones I got with the Strips I ordered.
The area where the Infineon RGB LED Shield Shines is ‘flicker free’ dynamic control. Hence the idea is to use an Audio Signal to control the color at a fast rate. I searched online and came across a tutorial by @sciguy14 for the arduino. I don’t need two channels but just a single channel. And the circuit is simple and is shown below.
This circuit is a modified version of the one by @sciguy but works well for me. @mcb1 gave me another circuit and might be useful for a lot of people.
The final circuit is shown in the image below.
I have an Audio IN and Audio Out so I can chain devices if needed. The input buffer makes sure the devices are not loaded much and audio quality is not tampered with. The filtered signal is fed to the Arduino where I use a modified code to generate 12bit data for LED Control. @sciguy14 uses code for 8bit color control which is good for NeoPixel type of stuff. I did a small video clip to explain the circuit and code which I will include in the next post because it has two parts of the system explained in one. I did a teaser video which show how the circuit works according to music being played.
I am not posting the video for the finished build right now because there is still the matter of a few elements which will work harmoniously together and make the entire build more effective. I will link it here once I am done.
In the next post I will be doing a little something with the XMas Tree. I had to go through a few iterations but the tweaked system looks better than my original version. See ya next time…