Press "Enter" to skip to content

Ambient Lighting for PC and Home Cinema

Henri Rantanen 0

LiveLight is an open source ambient lighting solution for PC. System consists of the controller, LED-strips and software called Ambibox.

Electronics hobbyists around the world have been building their own versions of the Philips Ambilight system for their home cinema, usually connected to a computer via USB or serial.

I developed my own light controller as my thesis while studying at a vocational school. After months of research, designing and testing, I was ready to publish my prototype: The LiveLight USB Interface.

The project soon got a lot of interest in forums and related websites. The LiveLight Project was born.

System in action

You are now reading projects official page in which you will find all the info you need to build a fully configurable ambient lighting system for your Home Cinema or PC!

Advantages

Dynamic back-lighting reduces eye strain, visibility of LCD back-light leaks of and it greatly enhances pictures color, contrast, and size appearance.

Larger illuminated-surface also creates more immerse viewing experience when viewing in other ways dark room.

Easy to build

LiveLight is designed to be built by the end-user, meaning you!

You will need basic tools, AVR-programmer, steady hand and little electronics know-how!

You can order circuit boards from me 5€ each + shipping, or you can make the boards yourself – the designs are available for free in the downloads section.

Open Source Ambient Lighting

When everyone has access to source materials, the product can easily be built to match someone’s personal tastes and specifications. This also enables software development as a community!

Hardware is easily programmed via ISP.

Get all the source-material free in the Downloads section

LiveLight in operation

LiveLight ambient lighting works well with most games

System Design

LiveLight is a discrete dynamic back-lighting system designed for panel TVs and PC monitors. Color and brightness of individual LED-strips change depending on what is currently displaying on the screen. When back-light adjusts directly to the screen, it won’t take your attention off the media like static lighting would.

LiveLight connects to your HTPC using USB and uses a program called AmbiBox or BobLight (discontinued) to calculate the average colors from areas of the screen.

Fully built LiveLight USB Interface

The system has been successfully tested to work with Windows XP, Vista, Windows 7 and Windows 10.

Note: AERO has to be disabled in Windows 7 and Vista for the software to function correctly.

LiveLight USB Interface

LiveLight USB Interface is the heart of the whole system. It is the little black box that controls all the LED strips mounted behind the screen.

LiveLight USB Interface mounted behind TV
LiveLight USB Interface mounted behind TV

LED’s are simply controlled with high-frequency pulse width modulation. The module is connected to PC with high-speed USB 2.0 which also power both chips of the device.

External power is used only to power the LED-strips thus allowing input voltage to vary from 2 to 20 volts.

Inner workings

Main chip, ATmega32 is clocked with 14.7456 MHz external crystal, which is the fastest oscillator supported by the chip that has 0% UART error rate on all common BAUD rates. This is critical for successful data transfer.

LiveLight USB Interface with cover removed
LiveLight USB Interface with cover removed

LiveLight USB Interface uses Mini-USB-B connectors to connect RGB LED strips, this because they are cheap, have five pins and can handle enough current for this application. They are quick and handy to use and especially nice add-on if you plan to do software development.

Note: You can accidentally connect your PC’s USB port to devices LED-output, probably destroying your motherboard.

My setup consists of approximately 43 W of 12 V RGB LED strip although the controller can handle much more power. I have attached my controller box behind the TV with pieces of Velcro-tape for easy removal and re-attachment. Makes re-programming a whole lot easier!

Software

On the computer, there is a software called Ambibox that captures the colors from the screen and outputs the information over the USB to the controller module.

AmbiBox works nicely on Windows 10 and Kodi with a plugin

With the software, you can easily map the areas you want to capture the images from and create DIY ambient lighting for PC.

LED-Strips

Good quality LED-strip is essential to get the desired effect. At first, I used cheap DealExtreme LED strip on my setup, but it was little bluish when it’s supposed to be white. This, of course, can be compensated from software but color resolution suffers quite a bit!

LiveLight USB Interface has an 8-bit output so it can produce 16777216 colors by default, but when you compensate green and blue component to 70% of maximum brightness, color resolution drops to 8220836 colors. This means 51% loss of color space, just by compensating the little difference.

Installation

There are 9 independent RGB-channels around the perimeter of the TV that can be driven separately.

Two channels on each side, except for 3 channels at the top. Channel orientation is labeled on the PCB, for example, TR means top right channel and BL means bottom left channel. These can be remapped from Ambibox.

Pin-out for the USB cable is the following:
Color to color an guess the rest. There is a 50% chance to get it right. If you don’t feel like guessing, you can check the correct pin-out from here.

Installing the LED-strip itself is a breeze, just peel off the backing and stick it where you like. Please note that if you need to re-position the LED-strip, it is usually possible for a couple of days after installation. After the strip heats up in use, the tape behind it activates and its stuck for good.

How it works

LiveLight System Flow Chart
LiveLight System Flow Chart

Processing

  1. Average color is calculated from specific sections of the screen by Ambibox or BobLight.
  2. Data is sent to LiveLight USB Interface via a virtual serial port.
  3. FT232RL chip then receives data from USB bus and outputs it to the RX-pin of devices main chip, ATmega32.
  4. ATmega32 then checks arrived data for errors.
  5. If the header byte is intact it accepts new data and drives 27 different MOSFETs via 8-bit PWM (PDM) accordingly.
  6. MOSFETs control the current coming from LEDs to the ground, switching them ON and OFF.
  7. 3 channels go to a single output connector driving red, green and blue LEDs giving us 9 unique RGB channels, each capable of displaying over 16,7 million colors.

ATmega32

Atmel ATmega32
Atmel ATmega32

The most important single item for LiveLight USB Interface to work is its software.
The one is running in ATmega32 microcontroller. Firmware will be updated sometimes as bugs are found and fixed. The current version is available in the downloads page.

Programming the microcontroller

Once your light controller is built, you need to program or ‘flash’ it.

This is done with AVR In system programmer. In my example, I’m using AVR Studio 5 and AVRISP MKII programmer which is affordable and robust.

Before plugging in the controller, check your USB voltage lines with multi-meter to ensure they are not shorted. Connect your ISP programmer to the ISP header of the LiveLight USB Interface.

Connect your USB Interface to your computer’s USB port to power it. The red light on the programmer should turn green. Your device is ready to go!

Open AVR Studio, go to ‘AVR Programming’ under Tools menu. Select your programmer and device (ATmega32) and click apply. Click ‘Read’ to confirm your setup is correct if so, your device ID should turn up.

Go to ‘Fuses’ and set them like specified in the picture below. Be extra careful when selecting clock source, if you set it wrong, your chip might be rendered useless.

Hit ‘Program’ when ready. Then go to ‘Memories’, select HEX file for the chip and click ‘Program’. If it fails, try decreasing ISP clock under ‘Interface settings’. If it still won’t work, check your soldering!

All done! Your controller has been programmed! Now you are ready to connect it to AmbiBox and LED strips.

Check the pictures above for the correct settings for flashing the HEX file and fuse-bits into ATmega32.

FTDI Chip

FT232RL is a USB to UART converter chip manufactured by Future Technology Devices International Limited. It provides the fast and easy way to connect micro-controller based projects to USB.

FT232RL, USB to UART converter chip

When connected, VCP drivers will make the device show up as ‘USB Serial Converter’ in device management. The computer also assigns it a port number, which you have to configure to AmbiBox.

When you write something to this “COM port” it will end up coming out of chip’s TX-pin at the set BAUD rate. If you write something to chips RX-pin, it can be received to a program like hyper-terminal on PC.

Output and input voltages of FT232RL can be configured to work with CMOS logic, 1.8-3.3V or Ye’olde TTL level which is 5V. Because of this, you can directly connect your micro-controller to the chip without any external components.

The chip also carries some EEPROM memory, editable through USB. It is used to store USB Vendor ID (VID), Product ID (PID), device serial number and product description string. Chip setting are also stored there. Everything can be edited with FTDI’s utility, FT Prog. It’s easy to use but you must know what you are doing, other ways you might render your FTDI chip useless.

Programming the FT232

This is not necessary for the operation of the device, this step just makes it appear a bit more professional.

Download FTDI drivers and FT Prog. Install drivers and open FT Prog. Click ‘Scan and Parse’ from devices menu and list of your FTDI devices should come up.

Select ‘USB String Descriptors’ and write your name on ‘manufacturer’ field and ‘LiveLight USB Interface’ to ‘Product description’.

RX LED is connected to C0 pin, you can configure its behavior from ‘IO Controls’ submenu. The default is ‘TXLED#’. When you’re done, click ‘Program’ and EEPROM will be rewritten. Replug your device and it’s done!

Renaming the device with FT Prog. If you want RX led to blink when data is sent from controller to PC, set C0 to TX & RXLED.


2018 update: LiveLight + Kickstarter

What do you think of this post?
  • Surprising (100%)
  • Like (0%)
  • Dislike (0%)
  • Awesome (0%)
  • Interesting (0%)
  • Useful (0%)
  • Boring (0%)
  • Sucks (0%)

Leave a Reply

Your email address will not be published. Required fields are marked *