C# WPF and Arduino Ambilight low budget copy
AmibLed is a low budget Philips Ambilight copy for WS2812B Leds + Arduino + PC setup. System is based on PC Aplication which sends information to microcontroller that changes specific leds on strip. Led strip refreshes aroud 15 times per second (Arduino data sending is not optimized :/) but its enough to watch movies with cool colorful effect!
Technology I used for this project:
To run the whole system you need some things. Here is a list with required hardware to even start thinking about testing the software:
If you are already stocked with required things you can prepare the program for your PC!
There’s two ways: you can download the master branch with code, check how it’s working and compile whole application in Visual Studio 2019, or simply download it from link below and run it from PcLedVisualization.exe
Here’s the download link for the newest version of the program
In the AmbiLed.zip archive you can find also the arduino AmbiLed.ino code which we will discuss later! (It can also be found in master brach ArduinoScript folder)
If the program runs with no problems you are good to go! Software preparation will be continued in How To Use section so hop in if you want!
To run the whole system, as I wrote before, you need some Arduino Uno with cable, WS2812B Leds with adapter, some Arduino cables and a resistor!
Before you start preparing hardware check again if your adapter will hold the led strip power consumption. Again here’s a powering guide for this type of led strips
If we are good to go, here’s the scheme of Arduino system you need to connect:
Just connect or solder like on scheme and it’s done! Just like that!
We will be setting up Arduino script in the next step so keep the circuit next to you!
If you already connected leds with Arduino you need to attach them to screen you want to use with AmbiLed. To do that try to fit led strip with the screen size. There’s two main rules:
Led strip needs to start in the bottom-right corner of the screen
After the measurement you can stick the leds to back of your screen starting from bottom-right corner and making sure that horizontal leds count matches and vertical leds count too. Write down the led numbers - we will need it for future steps
For now we are done with hardware preps! Great job!
We still have some preparations to make, so here’s the last three steps: Arduino Script preparation, Program preparation and First use config. We are close!
Then open the AmbiLed.ino file in Arduino IDE (if you downloaded the master branch it is in ArduinoScript folder) and edit 4. line
#define NUM_LEDS 102 // replace 102 with your leds total amount
Pro tip!
In 17. line the script sets brightness for leds, you can set it in 0-255 range, but 50 works best in my opinion. Edit it only if you want to experiment a little bit, and you have plenty of power under your jacket ;)
FastLED.setBrightness(50);
After that you can connect your PC with Arduino and send script to the circuit by matching COM port and clicking arrow in top-left corner of the IDE. Here you can write down also which COM port you connected the Arduino. Program needs the number of COM port so if you will always connect circuit to the same USB port in your PC you will have one more problem off your head!
If no errors occured we prepared the Arduino correctly and we are good to go!
Now you need to run the program and learn how current GUI works, here’s the scheme
button to start the connection with Arduino and leds, square turns green if it’s on!
So you know the scheme now, ok then, let’s start the last config and fire it on! There’s few minor steps, but i promise we’re almost there!
Now run the Send Leds button and the leds should lit like on screen preview!
Program will save inputed data after you click Calibrate so you don’t need to fill textboxes every time!
Every next use requires to perform again 3-6 steps!
Now just find a colorful movie and enjoy!
At this moment I’ve still got some issues to fix or improve:
What’s new? Here’s the list:
Thank you for peeking at my project!
If you’re interested check out my other stuff here