[SOLVED] : LightPack + Hyperion + Raspberry Pi: Ambilight on your TV! Part two.


So what do we need to make our AmbilightTV?

  • Obviously a Raspberry Pi (A or B)
  • An SD card with Xbian or RaspBMC or OpenElec or even Raspbian: the choice is wide, the important thing is to be able to serve as apt-get …
  • A TV or a screen that you can plug into the Raspberry Pi and that you want to light up (obviously …)
  • A separate 5V power supply: it is never good to draw current from the Raspberry Pi regulator in order to optimize its lifespan … I put 40 LEDs on the back of my TV, (I personally use one of the ports USB from my TV like this when I turn it off or it goes to sleep, the LEDs go out and come back on automatically …)
  • An Ethernet cable or a wifi key connected to the Raspberry Pi to retrieve files from the internet.
  • A keyboard unless you control your Raspberry Pi via ssh …
  • Cardboard and strong glue or very good scotch tape (you will see why later …) ?
  • Finally LEDs, but not just any type… Indeed, it is not possible to use very simple LEDs or RGB LEDs with a common anode or cathode… We will need LEDs which each have a driver and which are of course recognized by our program… You can use the following protocols to connect your LEDs: SPI, USB, GPIO, UART. Well the simplest is still to go through the SPI which are easily found on ebay or from the USB with kits from Adafruit for example… The GPIO and UART work, but in an unstable way according to the author of the soft, that’s why I won’t talk about it anymore …

For the SPI the following LED drivers are recognized:

[SOLVED] :  LightPack + Hyperion + Raspberry Pi: Ambilight on your TV!  Part two
  • LPD6803
  • LPD8806
  • WS2801 (I took these for my installation: http://www.ebay.fr/itm/281202617623)

For USB, these are more manufacturers’ packs (a little google search with just these names will give you the correct answers):

  • AdaLight
  • Lightpack
  • Paintpack
  • SEDU

When you plug everything in USB, there is not really any configuration and connection to do … In general everything is explained on the manufacturer’s website … Hence the price difference between a DIY method and a manufacturer’s pack … I necessarily embarked on DIY, harder (although …) and more rewarding to succeed …

[SOLVED] :  LightPack + Hyperion + Raspberry Pi: Ambilight on your TV!  Part two

Here is the connection diagram I used for LEDs in SPI:

original by adafruit.com

[SOLVED] :  LightPack + Hyperion + Raspberry Pi: Ambilight on your TV!  Part two

For the installation, I used a cardboard with a little strong glue… But beware really strong: it is cyanuric glue. I also had to cut a clip on each LED to have a flat surface on one side… Then I simply put 4 or 5 pieces of stock to hold my box behind my TV… Simple and efficient… Otherwise, you can tape the LEDs directly to the TV, but in the long run I’m afraid the tape won’t hold up …


[SOLVED] :  LightPack + Hyperion + Raspberry Pi: Ambilight on your TV!  Part two

Now let’s move on to configuring our OS:
There is not much difficult, log in ssh and enter the following command lines

sudo apt-get update sudo apt-get install libqtcore4 libqtgui4 libqt4-network libusb-1.0-0libprotobuf7 ca-certificates

This allows us to install the dependencies required for Hyperion to work … Before going any further if you are using Boblight stopped on:

[SOLVED] :  LightPack + Hyperion + Raspberry Pi: Ambilight on your TV!  Part two

sudo / sbin / initctl stop boblight

If you are on Xbian like me, you have to activate the SPI by doing:

sudo nano /etc/modprobe.d/raspi-blacklist.conf

[SOLVED] :  LightPack + Hyperion + Raspberry Pi: Ambilight on your TV!  Part two

And we add a # in front of the line:

blacklist spi-bcm2708

Which give :

# blacklist spi and i2c by default (many users don’t need them) #blacklist spi-bcm2708 blacklist i2c-bcm2708

[SOLVED] :  LightPack + Hyperion + Raspberry Pi: Ambilight on your TV!  Part two

Note that you must use the same technique to activate I2C on Xbian. It all depends on the distribution, sometimes these protocols are activated sometimes not …

The good thing about Hyperion is that the installation is automatic, we will download a .sh script on github which will do the following tasks:

  • Installation of hyperiond and hyperion-remote (installed in / usr / bin).
  • Configure the json configuration file in /etc/hyperion.config.json.
  • Added hyperiond as an OS service (default: hyperion.conf in /etc/init/).
  • Starts the hyperion service using: initctl start hyperion

Super practical, isn’t it? To get this script and run it:

[SOLVED] :  LightPack + Hyperion + Raspberry Pi: Ambilight on your TV!  Part two

wget -N https://raw.github.com/tvdzwan/hyperion/master/bin/install_hyperion.sh sudo sh ./install_hyperion.sh

Here we have finished the installation, hyperion and that remote will start automatically with your Raspberry Pi now.


And this is where the difference between Boblight and Hyperion struck me the most:

  • The configuration file is actually a big text file with lots of entries that are not always easy to understand and long to edit… So I won’t detail anything here…
  • It is also a configuration file, but we generate it thanks to a Java application that works under Linux / Os X / Windows… Then we just have to send the new file generated in /, etc / on the Raspberry Pi…

Then inevitably you have to restart the services, regardless of whether it is Hyperion or Boblight in order to have the new configuration file taken into account …

For Hyperion it’s very simple:

sudo stop hyperion sudo start hyperion

For Boblight (I believe):

sudo / sbin / initctl stop boblight sudo / sbin / initctl start boblight

[SOLVED] :  LightPack + Hyperion + Raspberry Pi: Ambilight on your TV!  Part two

To create your own configuration file, you just need to download a small program called Hypercon. Well nobody is perfect it is in java, but it is very well done and available here:


With just 3 tabs, you can set everything. I will give you a bit of detail:

The first tab (Hardware) will allow us to adjust the type of driver, the port, the refresh rate and the configuration of the LEDs: position, numbers etc …

[SOLVED] :  LightPack + Hyperion + Raspberry Pi: Ambilight on your TV!  Part two

The second tab (Process), will allow you to adjust the colors of the LEDs and the size of the color capture portions … Basically the size and position of the square which will recover the color in your image or video …

The last tab (External) is used to adjust the external services ;-D such as activating the LEDs in the XBMC menus. You can also choose to start different types of server:

  • JSON (the one that works with hyperion free on android store)
  • Proto
  • Boblight

Then you just have to click on “Create Hyperion Configuration” at the bottom and the program automatically generates the json file that you just have to throw in / etc / to replace the old one …

If you want to simplify your life you can copy my settings present in the screenshots which work very well with 40 LEDs WS2801 ?

Finally I would like to thank the author (tvdzwan) of the Hyperion program, he really did a huge job … All sources and even more info on his github page:


Ambilight for Apple Macbook Retina (ADALIGHT)

During this “Smart Objects” class, I designed an “Ambilight” frame for my Apple MacBook 15 ″ retina. In this instructable I will guide you how to build one for yourself. But first check the photos / video clips to see whatsup!

Step 1: You will need?

To follow this Instructable I advice to use the same materials that I did, what will you need?

  • Arduino Uno (using the USB cable)
  • Arduino connection wires
  • WS2801 Digital RGB LED pixel (25x12mm)
  • DC jack female connection block
  • DC-USB cable (5V)
  • Piece of plywood
  • Double sided tape

Step 2: Cut the weft

After we’ve told al about the parts we need, it’s time to start building! To cut the frame I used a laser cutter. You can download the template for Adobe Illustrator that I used. With two bolts you can secure the Arduino to the frame. I had to press hard to assemble the parts, but after that it was rock solid and didn’t need to use glue. See the photos for the trial!

Step 3: Connect upwards!

Finally, it’s time to tie it all together! I started with pressing 25 LEDs in the holes, I have tips to start at the lower end of the Arduino. One of the connectors of the LED chain must be connected with the Arduino. (Blue–> GND, green–> 13 and yellow–> 11). The other connectors must be connected with the DC terminal block and will be powered by the domain controller through a USB cable. The next step is to program the Arduino and run the software! See the photos for the trial!

Step 4: Download & Install

The installation process can be the hardest part of this tutorial. You will need to download th Arduino software. First you need to install the Arduino IDE software on your macbook. Copy the contents of the “ARDUINO” and “Transformation” folders to the IDEs software folders created in your home folder. After that you will need to launch the IDEs software to load these codes to your Arduino. If it went correctly, the LED should blink red-green-blue for once. If not, something must be wrong with the wires.

Now you will be able to run my code in the process, which you can download in this step. Make sure you place my code in the “Transformation” folder you created when installing the Arduino IDEs software. You may need to change the USB port in this code. To do this search for the line “myPort = new serial (ce, Serial.list (), 115200); And change the 0 to 1, 2, 3, etc. in order to find the right one. Run the code and you should see a window that shows your LED in blocks and the LEDs on your MacBook should light up in the same colors! ENJOY YOUR AMBILIGHT HOME!