A cool design as the background lights change with the content of the monitor and makes the audience feel more immersed.
About the Project
There is a similar project called “Adalight Project Pack”. It provides some kits to DIY a Ambilight. It means my project was doable. However, the Adafruit kit uses lots of individual LED bulbs mounting behind the monitor, which is costly and messy. Using LED strips may be a better choice.
Circuit Design
Each LED will consume about 20mA. I have 40 LEDs in my design so 800mA is needed. The maximum current to draw from an Arduino pin is 500mA (without external power) and 1A (with external power). To simplify the circuit I decided to connect LED strips directly to Arduino pins, so I have to use the external power to feed the Arduino. Make sure to set a common ground properly.
Wire the LED strips and connect them to Arduino. I found a useful software called Prismatik. It will divide the edge of the screen into several small blocks according to the LED layout, measure the average RGB value, and send it to Arduino through the USB port. Arduino will control each LED accordingly by serial communication with the help of the FastLED library.
Code
The LEDs are controlled by FastLED library.
“FastLED is a fast, efficient, easy-to-use Arduino library for programming addressable LED strips and pixels such as WS2810, WS2811, LPD8806, Neopixel and more. FastLED is used by thousands of developers, in countless art and hobby projects, and in numerous commercial products” –From http://fastled.io/
This is a sample code for Arduino from the Internet. There is also a similar code from Adafruit on Github.
uint8_t colorIndex = startIndex; for( int i = 0; i < NUM_LEDS; i++) { leds[i] = ColorFromPalette(currentPalette, colorIndex, BRIGHTNESS, currentBlending); colorIndex += 3; }
FastLED.delay(1000 / UPDATES_PER_SECOND);
if (Serial.available() > 0) { mode = MODE_AMBILIGHT; }
Prismatik
Prismatik samples the screen at a certain rate and send the data to Arduino through USB port. It also provides a friendly setup wizard to set the layout of the LEDs.
Setting the Prismatik
1 Selecting the correct LED type, serial communication port, and the Baud rate.
2 Setting the correct LED layout according to the wiring.