Social:

$4 Computer Backlighting System

By Netopya on Thu Oct 8th 2015 2:18 PM

Computer monitor backlights are cool. Solutions such as Philips Ambilight are available, but many people opt to design their own system. I wanted to see just how much you can save and what you can get by making the cheapest backlighting system possible. By salvaging parts from previous projects and getting free samples, all I need to buy where some RGB LEDs for only $4.00. Join me as I experiment and create the most basic computer ambient light solution.

Parts

  • Arduino Uno (or equivalent)
  • Wires and breadboard
  • 10x RGB LEDs (eBay)
  • 2x TLC5940 PWM driver (Texas Instruments)

When saying that this system only costs four dollars, I am making some generous assumptions about the supplies you already have, namely an Arduino microcontroller and some wiring supplies. Nevertheless, cost can still be kept down with non-official Arduinos which are available for under $10. Wires can be obtained at low cost and the PWM driver chip used for this project, the TLC5940, has free samples available for educational use.

The Arduino was chosen for this project since it is easy to work with and communicates well with a computer. However, the Arduino Uno only has four PWM connections so the TLC5940 PWM driver was required in order to increase the number of PWM lines available. The TLC5940 provides an additional 16 PWM channels, however multiple chips can be chained together to increase this amount. Since I wanted to have 10 individually controlled RGB LEDs spaced out around the monitor, and each LED requires 3 PWM connections for each of the three colours, this would amount to 30 PWM channels which can be supplied by 2 TLC5940 chips. When selecting the RGB LEDs to buy, the main requirement was that they were common anode (the common connection is the voltage source) in order to work with the TLC5940 which can only sink current. Furthermore, I opted for larger 10mm and diffused LEDs to project out the light as much as possible and create more of a glowing effect.

With these parts I had enough LEDs to place around the back of my monitor. Since each LED is controlled by its own PWM drivers on the TLC5940, each LED can have a unique colour instead of the more basic approach where the back of the monitor is illuminated by the average colour of the entire screen. This should give a more colourful result has different colours on the edges of the monitor are projected outwards.

Wiring

Wiring diagram

All wiring for this project was performed on a bread board. Two TLC5940 where chained together and the first one was connected to the Arduino. The red, green, and blue components of the 10 RGB LEDs were each connected to the TLC5940s' channels 0 through 29. And that's it; all power was transmitted through the USB connection.

Programming

Red boxes indicate the areas sampled for their average colour

To determine the appropriate colour for each LED, a program written in C# ran on the host computer and determined the average colour of 10 locations around the screen where the LEDs were located, as seen in the above image. The upper and lower sample locations were moved away from the edge of the screen to better match a 16:9 aspect ratio on my 16:10 monitor. This prevented the black bars of letter boxed content from interfering with the projection of the actual content to the upper and lower locations behind the screen. The program transmitted the averaged RGB values for these sample locations to the Arduino using the Serial protocol over a USB connection. The Arduino's code read this Serial information and set the appropriate PWM signal for the channel controlling the LEDs color.

Conclusion

The final setup

So what does a $4 ambient light setup give you? I have to admit that I was a tad disappointed with the result. First off I had to limit the screen sampling rate to once per second. Since this program would be running on my PC at all times I wanted to keep its CPU usage low (below 10%), and this required me to reduce how often it read colour information from the screen. Secondly having the serial library running on the Arduino seems to effect the performance of the TLC5940, resulting in noticeably inaccurate colours, especially near white colours. In the end I found the setup to be a bit of a gimmick. The coolness factor of having colours bouncing around the back of your monitor wears off pretty quickly and doesn't account for the drawbacks.

For someone looking for a fun, programming and electronic learning experience, you can't go wrong for only four dollars. However if you want a fully featured ambient light PC setup, I would recommend spending a bit more money and investing in more specialized hardware, such as addressable RGB LED strips. I myself am no longer using this setup, but I do plan to revisit this project in the future, perhaps with a less ambitious, single-coloured RGB LED strip.

Code

GitHub

Videos

A video of the system displaying a Windows Media Player music visualizer

An early video testing the TLC5940s showing a rainbow pattern on the RGB LEDs

Comments

davood on Mon Mar 21st 3:37 PM said:

This is such a coool project. I want to meet the man who made it and give him a big slobbery kiss.

Andrew on Mon Jan 30th 11:37 AM said:

I do not know how to connect the wires from the Aurdino to the breadboard. The ones with the two wires going into two different places on the breadboard but the same spot on the Aurdino.

Noah Pearce on Mon Feb 6th 11:31 AM said:

There are two wires that go into the same spot on the aurdino and we do not know how to connect them both. Can you help us?

Netopya on Wed Feb 8th 7:13 PM said:

@Andrew and @Noah Pearce - The diagram above is solely for showing electrical conductivity. Connect the wires in which ever way suits your situation best! In this case the easiest route is probably to just connect one wire from the Arduino to the first TLC5940, and then with the breadboard connect another wire between the two TLC5940's.

Leave a comment:

Email is optional, will not be shown

Leaving your e-mail is optional and I will only use your e-mail to contact you if you ask for me to do so in your comment.

©netopyaplanet.com