WS2812B Ambient Light For TV Using Arduino

Nowadays, LED is a huge decoration factor in our daily life. It has not only made our life decorative but also reduced our electricity consumption. By keeping this factor in mind, here we are going to use a WS2812B RGB Addressable LED strip for our project Ambient Light for TV. RGB LED is a multifunctional light that can be used for various electronics projects, photography, filmmaking, gaming decoration, music VU meter and much more.

For this project, we are going to use the WS2812B RGB LED strip and an Arduino Nano to program and run the LED strip as the user’s choice. Here we use the Ambient Light Application to control the WS2812B LED strip for android TV.

Must Read DIY Ambient Light For Computer

Project

DIY Ambient Light

Circuit Diagram

Ambient Light Circuit Diagram

Components Required

  • Arduino Nano
  • WS2812B Addressable LED Strip
  • 5V/3A Decent Power Supply

About Parts for Ambient Light

Arduino

For the compact build, I choose Arduino Nano despite Arduino UNO. Arduino Nano is a small, flexible microcontroller board using an Atmega328p chip. It can also use as a substitute for UNO. All the functions are the same in these two boards. The size of its PCB is 18×45 mm. The clock speed is 16Mhz. Its input voltage is 5-12V. There are 30 pins including power pins, data pins, analog pins, and serial pins on this board.

WS2812B Addressable LED Strip

The WS2812B Addressable LED is a very cool LED light that contains a WS2812B LED controller IC and a 5050 RGB LED. The below image shows the WS2812B Addressable LED inner connection. It has four terminals inside the LED package i.e VDD, VSS, DIN and DOUT. VSS is used to power up the LED and VDD is connected to the ground. DIN control the inputted data signal as well as DOUT through the received data to the next WS2812B controller chip respectively.

Calculation of Current Required for Drive The LED Strip

To proceed with constructing the LED first, we need to know the voltage requirement of the single 5050 RGB LEDs. Each WS2812B LED pixel has three types of LEDs i.e Red (20 mA), Green (20 mA) and Blue (20 mA). So the total current requirement is 60mA. And if we individually take 50 LEDs then the current is 3A. This is more than an Arduino can supply.

So the best way to power up the whole system is an external 5V/3A pure DC power supply that can provide enough current.

Process of Setting Up Ambient Light On The TV

Now come to the LED strip part. There you need to attach the LED strip from the left-bottom side to the left-top side, then the right-top side to the right-bottom side. We do this pattern because in the application this is the default pattern. But you can change it as your wish. Just need to define the pattern in the application that’s it.

After that connect the data pin of the LED strip with the digital pin (D4) of the Arduino and as well as VCC And ground respectively.

Attaching ws2812b led strip behind the tv

Ambient Light Application Setup for TV

First, we need to download and install the “Ambient Light Application for Android” from the playstore. It costs around rupees 240 or 3 dollars. After installation, open the application on the TV and go to settings.

  • There you need to define the total number of horizontal LEDs (choose any one part i.e., top or bottom). Similarly, specify the total number of vertical LEDs.
  • Keep the bottom gap value to zero.
  • Set LED strip direction to CW (Clock Wise)
  • Define the first LED offset to (-) of the total number of vertical LEDs.

And leave the rest of the settings as it is. For my purpose, this is the setting.

settings page of ambient light setup

Lastly back to the homescreen and select “Screen Capturing Mode” out of three modes.

Arduino Code

To compile this code you need to install this library first “FastLED.h“.

2 thoughts on “WS2812B Ambient Light For TV Using Arduino”

Leave a Comment