This project was inspired by the Philips Ambilight TVs. Ambilight is essentially the inclusion of a LED array around the side of a television, which projects color onto the wall behind the TV.
Projected colors correspond to the nuances that appear in the onscreen content, which increases your perception of contrast and creates an immersive light display that seems to erase the contours of the screen.
The idea is to make the same kind of display for computer screens. But with every screen being different sizes, we have to create an object unattached to the PC, that would suit with every device and would be more esthetic than a Led strip stick on the PC back.
Here is everything you will need.
- A 3D printer (or any other device you could use to create a case for your lighting)
- A soldering iron
- Plastic glue
- 7 LED bars (Found on AliExpress and suitable for the 3D file : TENSTAR ROBOT 8 channel WS2812 5050 RGB LED lights built-in full color-driven development board)
- An Arduino-type card (We here used an Arduino uno but the housing is made for Arduino Nano)
- A switch button
- 5 V power supply for the leds
- USB cable
Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.
Step 1: the Lighting Housing
The housing was designed so that it can be hidden behind the screen. The LEDs were given a 45° angle and positioned in an octogonal shape to illuminate all around the screen. A case at the base of the object was created to receive the electronics.
The design was made with Fusion 360 and then 3D printed in PLA with an Ultimaker.
You will find each part in the Fusion 360 file.
Step 2: The Electronic and Assembly
The electronic was the easy part of this project, you basically just have to solder the 2 GND and the 5V from each Led to the next one.
You could also connect each DOUT to the DIN of the next led stripe but as we wanted fewer latency while controlling it with arduino, I made 3 groups, one of two strips, one of three strips and a last one of two strips. I connected the first to pin 2 of the Arduino, the second to pin 3 and the third group to pin 7.
Once this is done you should glue each Led in place so the soldering doesn't move. You can use any type of plastic glue.
The last step was to connect the 5V power supply to the Leds, for this we used a basic connector.
The 5V of the power supply must be connected to the 5V of the Leds and the GND to the GNDs of the Leds as well as to Arduino GND.
The Arduino is powered via the USB cable.
One thing you could add is a switch on the power supply connector so if you want to turn off the lamp you don't have to unplug the all thing.
The housing was made for an Arduino Nano but here an Arduino Uno is used so it doesn't fit the box.
Step 3: The Code
The aim was to make the code as simple as possible. What we did is a python script that communicates with Arduino via the USB port.
We use the PIL librairy to get a screenshot of what is actually on the computer screen and we downsize it to a 16*16 image to make it easier to process. Once this is done, the first column of this image correspond to what the colors of the left side of the screen so what we will send to the Leds on the left. Same for the last column and the right side as well as the first line that correspond to the top of the screen. Having this array of colors we send it to the Arduino the following way: Red(Led1), Green(Led1), Blue(Led1), Red(Led2), Green(Led2), Blue(Led2), Red(Led3), Green(Led3), Blue(Led3)..... So we send 3 times 2 bytes (color coded on two bytes) for each one of the 56 Leds. The arduino should receive 336 bytes.
Once the Arduino receive these data, it sends it to the Leds with the library FastLed.h that can send data to WS2812 type of Leds.
The python program will be runing for ever while you don't unplug the USB cable and gives a pretty good response time.
For more informations you can find the Python and Arduino code bellow.
Step 4: Final Result
Participated in the
Indoor Lighting Contest