The Most Face Rockingest Project Blog on the Entire Fucking Web
The Ambilight-Clone
Published: May 23, 2013
My google AD, I know most hackers and DIY'ers hate ads but it brings in around 5 bucks on a good month and I use it to subsidize my hosting fee's so you can get access to my code :)

It’s not just consumers that have to keep up with the Joneses, DIY’ers can succumb to envy, too. It seems like everyone is building those awesome Ambilight clones! Here’s mine :)

* For anyone wondering what the hell an Ambilight is, it’s an array of LED lights around the perimeter of a TV that copy the average colors at the edge of the screen. The effect can look as if light is bleeding from the edge of the television, giving it a more dramatic and faux, larger look.

Adafruit’s DIY Ambilight clone in particular, really caught my interest. The Amblight itself seems like a fun way to watch movies and I wondered if I could build a nice rig for the LED arrays on the television perimeter. What really made me break down and finally get on this project was the availability of cheap, individually controllable, RGB LED strings. I bought a few of them for my Cloud Lamp project and decided to buy enough to tackle Ambilight clone as well. Here’s how it went.

 

Shelf and TV Stand

Initially, the tv was sitting on a single shelf platform built into the wall.

This is where I put all the things that make my TV more interesting to watch.

This is where I put all the things that make my TV more interesting to watch.

This is what the TV shelf look like before I moved in.

This is what the TV shelf looked like before I moved in.

The shelf was just bare plaster and was badly damaged from the previous owners of the home. I decided to build a wood platform onto the top, with a decorative front plate and two shelves on the left side for components. Additionally, there’s a stand for the TV that also serves to hide wires and the hole that goes down through the shelf for the power cord.

The materials all came from Home Depot and the raw wood was fairly expensive, around 300 bucks. The decorative pieces were for chair rails and door lining, I think. The shelving brackets were reasonably priced and pretty nice looking. Hanging the shelves proved to be somewhat difficult, however. On the side furthest from the wall, standard wood screws worked great. On the closest side, however, there were no wood studs that I could find, so I used drywall screws. The shelves won’t hold as much weight as they would with all wood screws, but there’s not much on them, so it worked out OK.

Fancy!

Fancy!

After that the process of making a layer of wood over the bare, plaster shelf top was pretty straight forward. Remember to measure both the front and back of a cubby space. In other words, don’t assume that it’s a perfect rectangle, it probably won’t be. The decorative bezel on the front was fairly easy to mount with small wood screws, but here’s the important part. You need to drill a shallow pilot countersunk hole for the wood screws with a diameter just slightly larger than the head of the wood screw. (Please have a look at Bill Jackson’s comment regarding coutersunk holes, it’s really informative!) That way, they’ll sink into the wood a small amount and be hidden under the wood filler. Also, it won’t split and crack the wood. After that I just needed to fill in the holes where the wood screws went in and the cracks between boards with wood filler. I let it dry overnight, sanded down the wood filler and painted the whole thing with a dark wood stain.

This is probably the only semi-professional looking build I've ever done.

This is probably the only semi-professional looking build I’ve ever done.

‘Vesa Compatible’ LED holder

So many LEDs!

So many LEDs!

The LED rack was built out of two basic materials. A fake, wood-like L-shaped stick, whose actual purpose is a mystery to me, and flat pieces of cold rolled steel. The television has four screw holes on the back which, after a little bit of googling, is called a VESA mount, I think. Though, after some guess and checking, I found to be M6 thin thread instead M8 as I saw online. So if you’re replicating this project, don’t assume the thread type for your television mounts. After using a sharpie to closely approximate the placement of the steel, I welded the steel slats in a ‘Tic-Tac-Toe’ type formation. Then, I used a metal drill bit to make holes for the TV mount and to hold the LED brackets. Following that it was a fairly simple matter to measure out the spacing for the LED holes in the faux-wood.

The wires were just long enough to gap the side to top and bottom.

The wires were just long enough to gap the side to top and bottom.

For each side, I used this formula:  ( L+2 / I ) = S where L is the number of LEDS, I is total length of the bracket in inches and S is the space in inches between each LED. Adding two LED’s will allow you to start measuring from the very beginning of the bracket and your last mark should match up with the very end of the bracket. Basically, you can’t drill a hole on the very edge of either side so this will give you even spacing.

 

 

Arduino controller and Boblight

Different types of setups will require different software chains. In my case, I’ve got a low-power Acer Revo HTPC, running XBMCBuntu and XBMC v12 [Frodo];  hooked up to a 46” 1080p LCD TV. So the software/hardware chain for driving the LED’s is, The Boblight daemon running, along with the Boblight XBMC plugin, which sends light information over the USB port to an Arduino with firmware from Lady Ada that uses 2-wire serial communication with WS2801 based LED‘s.

That’s the hardware and software, let’s break it down:

Boblight

To get the boblight program up and running under Ubuntu, first make sure you have an SVN client.

Next, you’ll go through a standard Linux install:

After that, you’ll need to create the boblight config file. First copy the duemilanove.conf to your /etc directory and rename the file to boblight.conf

Then, edit the file with your preferred editor:

Your global and three color sections will remain the same. Your ‘device’ section should look like the following block of code:

Possible exceptions will be:

  • output should be the USB port that your Arduino is connected to.
  • prefix will change depending on the number of LEDs you have in your setup.

To calculate the prefix, user ‘misake’ in the adafruit forms has written the following processing program, replace the number after ‘prefix’ in your boblight.conf file with it’s output.

The number of LED’s and their Orientation will decide what the [light] section looks like. There will be one [light] entry per LED. As an example of a 50 LED array (16 on top and bottom and 9 on the sides) here is a pastebin of my boblight.conf: http://paste.ubuntu.com/5688347/

Boblight XBMC Plugin

The process for downloading the Boblight XBMC plugin is fairly straight-forward. From the XBMC Wiki:

To install this add-on you must do so from the Add-on Manager from within XBMC by going to:

  1. Settings
  2. Add-ons
  3. Get add-ons
  4. XBMC.org Add-ons
  5. Services
  6. XBMC Boblight
  7. Install

Once you’ve installed the plugin, you can reach it’s settings by going to Services -> addons

Here you can set a constant background color for the LED’s in the XBMC menus, or change the settings for movies, music individually.

Arduino Firmware

Once you have your Arduino, plug it into a USB port on your desktop or laptop, then download the Arduino code editor. This part can be done on any PC with windows, mac or linux.

Once you’ve run the Editor, download Lady Ada’s LEDStream.pde firmware from github. Then load it up in the editor, make sure you have the proper board and port selected under the ‘Tools’ menu (It should be Arduino Duemilenove w/ATmega328 for the board; and the port will be different depending on your OS and which other USB devices are connected to your system, but the editor will give you choices) then press the right arrow in a circle icon to upload the sketch. If the upload is complete you will recieve a success message.

Wiring from your Arduino to your LED’s

Finally, to wire up your LED’s you’re going to need a 2-3 amp or higher, 5volt DC converter. The power from the Arduino will not be sufficient for most setups.  The good news is, the wiring diagram is incredibly simple and requires no discrete components.

Lady Ada’s Learning system site has a nice, graphical step-by-step diagram that’s worth looking at. But in a nut-shell, here’s the wiring diagram:

  • Find the ‘input’ end of your WS2801 LED string, it should have female pin connectors and two loose wires.
  • The red and blue loose wires should connect to your 5volt DC Converter, with Red being positive and Blue being negative.
  • The blue ground wire on the LED string should connect to a ground connection on your Arduino.
  • The green should connect to Pin 13 on your Arduino.
  • The yellow should connect to Pin 11 on your Arduino.

Conclusion

That’s it! At this point, you should have all the software installed and everything connected. Turn on your HTPC, the first thing you should notice is that the LEDs will go through a quick red, green, then blue test pattern. At that point you’ll know if the Arduino is working. Once you’ve booted into XBMC, you should get an onscreen toast saying that it was able to connect to the boblightd daemon. Then, if you’ve set a constant color for the background, in the boblight plugin, the LED’s should now all be at that color. Finally, play a movie and enjoy the fruits of your labor!

Please let me know if you have any questions about the process, I’d be happy to help if I can :)

--

Hey thanks for reading this far! Maybe you'll be interested in more of my projects? Check out my homepage :)
This entry was posted in Hardware and tagged , , , , , , . Bookmark the permalink. Follow any comments here with the RSS feed for this post. Post a comment or leave a trackback: Trackback URL.

8 Comments

  1. Posted May 23 at 10:06 pm | Permalink

    Nice job, it looks really smooth! :) I built one a while back using shiftbrites, megabrites and fun3’s arduino atmolight source code with VideoLan/VLC video player with the Atmolight support in it.

    It’s nice that yours fires right up when you start the media center. I never messed around with the atmo on a *nix machine.

  2. Bill Jackson
    Posted May 29 at 10:08 am | Permalink

    Comment about pilot holes and a countersunk hole.
    A pilot hole is a small hole that removes some wood and should be a little smaller than the inside diameter of the screw. The outside diameter is the max diameter of the threads. The wood removed prevents splitting of hard dense woods that have no way to accommodate the extra bulk of the screw by compressing the wood around the hole. Often the pros use a little wood glue down the pilot hole that eases the task and prevents loosening over time.Pine and spruce will tolerate screw insertion without a pilot hole.
    A countersunk hole is what you call a pilot hole, it is slightly larger than the top diameter of the screw and it is deep enough that the screw will come to rest just below the surface so you can plug the hole with a piece of wood that matches the wood grain. This is then bedded in after the screw and sanded flush and finished. Properly done it is hard to detect, especially if the plug is a tight fit.
    http://www.engineershandbook.com/Tables/woodscrewpilotholes.htm

    http://www.newwoodworker.com/cutingplugs.html

    • Posted May 29 at 10:16 am | Permalink

      This is a really helpful comment. Thank you for the correction and the information! I’ll make a note of it in my article.

  3. Posted Jun 05 at 7:55 pm | Permalink

    Amazing !!!!

  4. thomas
    Posted Jul 13 at 12:54 pm | Permalink

    Is the effect worth the DIY/cost? How is it when actually watching a movie in a dark room? Do you always have it on or sometimes/always prefer without?

    • Posted Jul 13 at 1:17 pm | Permalink

      Great questions! I’ll answer them in order.

      Totally subjective, but for me, most definitely. If I weren’t a DIY’er I would have purchased a kit or a TV with it built in just because I thought it was neat. Check out a bunch of different Ambilight setups on youtube to see the different styles and examples to get a better idea for yourself. If you’re looking to get as cheap as possible, I successfully ordered my LED strings from Mr. Ray wu’s Alibaba Express store http://www.aliexpress.com/store/701799
      He was polite and responsive over email and I got the LED’s pretty quickly. (Just be careful ordering from that site. I read many reviews saying that the site can be a dangerous place to order from. http://www.sitejabber.com/reviews/www.aliexpress.com)

      It is, without a doubt, much better in the dark.

      I have it running for everything, I really enjoy the effect.

7 Trackbacks

  1. [...] we need to tackle (right below that POV display we’ve been putting off for years). [Falldeaf] built the colored light augmentation system using a set of WS2801 controlled LED pixels. There are a lot of them, and this results in the [...]

  2. [...] we need to tackle (right below that POV display we’ve been putting off for years). [Falldeaf] built the colored light augmentation system using a set of WS2801 controlled LED pixels. There are a lot of them, and this results in the [...]

  3. [...] we need to tackle (right below that POV display we’ve been putting off for years). [Falldeaf] built the colored light augmentation system using a set of WS2801 controlled LED pixels. There are a lot of them, and this results in the [...]

  4. [...] we need to tackle (right below that POV display we’ve been putting off for years). [Falldeaf] built the colored light augmentation system using a set of WS2801 controlled LED pixels. There are a lot of them, and this results in the [...]

  5. [...] we need to tackle (right below that POV display we’ve been putting off for years). [Falldeaf] built the colored light augmentation system using a set of WS2801 controlled LED pixels. There are a lot of them, and this results in the [...]

  6. [...] outfit (valid downstairs that POV array we’ve been putting eccentric for years). [Falldeaf] built the colored light augmentation system using a set of WS2801 controlled LED pixels. There are a lot of them, and this results in the [...]

  7. [...] frente a la derecha (debajo de la pantalla POV hemos estado posponiendo durante años). [Falldeaf] construyeron el sistema de aumento de la luz de color con un conjunto de WS2801 controlado LED píxeles. Hay un montón de ellos, y esto se traduce en la [...]

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">