loading

yes, all my instructables are about one little project, but as you may have seen, i've evolved really good in these kind of projects.

in this article we're goin to use a software that i've been working on for quite a while, and as the title says"Super Fast", yes as fast as 75 fps with 15% of single processor, no gpu utilization, and best of all, full screen application support.

if you don't know whats the concept of ambilight, please use this link to get amazed by the idea :)

originally provided by Philips, now we clone the idea with the help of some skills.

how do we do such a thing ?

we need a PC with windows OS to do all the processing, digital addressable leds, and a micro-controller to connect the pc with the leds.

Houri, whats different and new in this version ?

well, 1st problem that most people were facing is the full screen applications, games and exclusive screen media players, solved :)

2nd problem is a small noticeable delay, caused by the capturing of image or by the sending data mechanism, also solved.

the capturing method I've used in this project is provided by the amazing guys at demoforge.com

it's super fast capturing method is used for streaming screens across the internet for whatever purposes.

here we are using it to capture our own screen and do the edges processing.

also you are given the

enough with the technical talk, GIVE ME THE HOW TO :D

Step 1: How To: What to Get and Where to Get It From?

1. Arduino uno there's plenty of options available, a clone is also a good idea [11$] from local store, don't forget the USB cable, might consider a longer than stock cable depending on the locations of your units.

2. ws2801 led strip , [43$] for the 5-meters, only used around 45 leds of total 160, used the others for other projects.

3. a power supply to power up the leds, the strip im using is 5v, with max of 9w per meter, im using 45 leds, do the math :D, but usually a pc power supply would be more than fine, and that what im using.

4. some solder and soldering equipment and skills if needed, thats if you are not using connectors like a molex connector and arduino pins connectors.

that's about it, project costs around 55$.

Step 2: Arduino Uno and WS2801 Connection

Ws2801 led strip has 4 connectors.

5V+,GND,Data,Clock.

the figure above shows how to connect them.

please note that you should apply your led strip on a screen that is very close to a wall.

also make sure that the first led index is at the right goin up to the top ending with the last led being at the left as shown on the previous figure.

Step 3: Software

Download Arduino IDE

Downlaod Fastled Arduino Library

Downlaod Mirror Screen Driver

Download both LedController.rar and Adalight Arduino Sketch from attachments

1. Install and run Arduino IDE

2. Include fast led io library in the Arduino IDE

3. open the Sketch code

4. Modify these defines

#define NUM_LEDS 43
#define SPEED 250000

NUM_LEDS is the total count of your leds, SPEED is the baudrate, leave it as is if you have no idea what's baudrade :D.

5. upload your sketch to your arduino uno.

6. install the Mirror Screen Driver.

7. in the "LedController\LedController\bin\Debug" you'll find "settings.ini" , edit it with any text editor and pick your settings.

8. run "Ambilight DFMirage\bin\Debug\Ambilight DFMirage.exe", make sure it runs As Admin

Step 4: End of Project

thats all to it, as you've seen the project solution is open source, it's a .net c# windows forms app made with visual studio comunity 2015 , the driver example, the gamma correction method, and the processing parts are all open source. here are all the links of codes i've used and learned allot from

http://www.codeproject.com/Articles/274461/Very-fast-screen-capture-using-DirectX-in-Csharp

http://www.demoforge.com/sdk/MirrSharp.zip

https://learn.adafruit.com/led-tricks-gamma-correction/the-quick-fix

http://www.dothediy.com/2015/08/arduino-ambilight.html

thanks for all of there efforts and without them this wouldn't have been done :)

if you guys have any improvements or ideas to the project please comment.

Enjoy and have fun :)

Step 5: Updates, History Log, to Do

//project discontinued:

I've decided to turn off the project, it was a good experience i've gained in the making and supporting it, in the other hand, i've decided to give a much larger project which this project was a small part of

make sure to edit the settings.ini and disable whatever hardware you don't have and enable the ones you have.

what is exactly in the new project ?

well, it's basically all what i can in do c#, you'll get 2 main things, the led control app server, and the web app, the server acts as:

Audio Output analyzer, led controller with lots of modes, one of them is ambilight with support for bottom leds, gamma correction, others like static color and rainbow, and a server for the web app.

the web app acts as:

remote controller for the leds, hardware monitoring, file transfer from mobile phones to pc and vice versa (works with iphones too), and a keyboard from your mobile to your PC.

now im really sorry that i had to stop supporting, but it's hard to find the time for this project, you can find the new solution named as "LedController3.0" in the downloads

v1.3: 3016-05-24 (last update)

-added event to exit the program on windows session switching(logoff)

v1.2: 2016-05-20

- added logger

- added screenshot capture[u can see in the screen shot that it doesn't have any text, thats normal]

- bug fix for resolutions that aren't 1920*1080

v1.1: 2016-05-17

- configration is now done with Configration.exe if you don't prefer handling it manually

- added a delay to slow down the thread to manage fps

- no need to compile your version after this release, only some configuration

v1.0:

initial release

_____________________________________________

tested on windows 10 64bit, i7 cpu, nvidia gtx770 ,16gb ram.

if you guys have tested it and found it useful and fun please post your setups and your specs, specially which os r u running on to know which functions well and which not ..

<p>I had to make an account to thank you for the wonderful and awesome project. It's been working great, but I noticed that only particularly bright colors work best, when gaming or watching videos bright colors are quite hard to come by so is there anything I can do to make the LEDs still light up quite a bit even to darker colors? That'd be awesome</p>
<p>Nvm I decreased square length and they light up pretty often now. </p>
<p>I made everything on my arduino nano and nothing. Theres something wrong with the software I guess</p>
<p>Maybe this Helps:</p><p><a href="http://www.meteocercal.info/forum/Thread-AuriolDuino-Receiver-COM-port-problems?page=2" rel="nofollow">http://www.meteocercal.info/forum/Thread-AuriolDui...</a></p>
Looks great! I only need bottom led support and then my setup would be perfect &lt;3
<p>try v3.0, it has bottom leds .. :)</p>
<p>Hey h0uri,</p><p>nice Project! Where can i download v3.0 ? In the current download Page in the Settings Tool there is only left,right and top LED.</p>
<p>Perfect dude .. also good job on making it work for multiple monitors .. :D</p><p>bot leds are coming in July, ill be making major updates then .. :D</p>
<p>i've decided to discontinue this project,please read the notes.</p><p>also i've been working on another project with the same goals,along with new features such as color control,bottom leds support,music analyzer,and control your led system fully from a mobile device locally, i'll make sure to update this thread once fully done, in a week hopefly .. :)</p>
<p>Is<br>the update finished? Where can I find it? I&rsquo;m eager to use all of my led&rsquo;s!</p><p>I&rsquo;m still happy with the ambilight!</p>
<p>hello thanks for the good work , i ran into a problme and that is where is this folder exactly ?</p><p> 7. in the &quot;LedController\LedController\bin\Debug&quot; you'll find &quot;settings.ini&quot; , edit it with any text editor and pick your settings.</p><p>thanks</p>
<p>Where are the attachments <u>LedController.rar</u> and <u>Adalight Arduino Sketch?</u></p><p><u><br></u>Are they the <strong>Adalight_Fastled_ws2801.rar </strong>and <strong>Ambilight DFMirage.rar</strong>?<br><br>I'm an absolute beginner at this, so could you please provide some pointers on how to set the files up? Would mean a lot to an aspiring tinkerer. &lt;3</p>
<p>Edit:</p><p><a href="https://www.aliexpress.com/item/Free-Shipping-5M-WS2801-RGB-LED-magic-dream-color-Strip-light-32Leds-M-non-Waterproof-32ic/32450765492.html" rel="nofollow">https://www.aliexpress.com/item/Free-Shipping-5M-W...</a><br><br>Ordered this strip, powering about 2 meters of it with a separate switching 5V/20A supply. Will this work?</p><p> Also, I read on Adafruit that data moves in one direction and power can go either way, so should is it possible to skip grounding the Arduino to the main supply (I'm using a USB connection any way) and ground the strip and connect it to the supply through the other end(opposite the Arduino)? </p><p>I'm unable to ground the board using Molex connectors, they're all occupied.<br></p>
<p>Is there a possibility to set the monitor which DFMirage looks at? I have my TV in a separate setup hooked to my pc and it would be awesome if DFMirage can look at the image on the TV (3th monitor) instead of my main monitor. </p>
<p>yes it's possible if you modify the code .. but sadly now i can't do anything about it since i'm not anywhere near my desktop and i don't have multi monitor to make sure it works .. it's gonna take a while for me to do it.. </p>
<p>Thanks for the fast reply and of course the awesome project! I will look into the code then, wish me luck ;) <br>I fixed it for now by setting the TV as monitor one and it works fine that way.</p>
<p>h0uri,</p><p>In the Configuration what do the scan options do?</p><p>Delay 0-500<br>Width 0-500<br>Skip 0-500</p>
<p>delay: if you are getting too much fps, or too much cpu usage, u can add a delay to slow down the thread</p><p>width: is the length of each rect to be scanned, the more it's the more u r closer to the center the slower the algorithm gets.</p><p>i've used skip as a factor, the more you skip the faster, with less quality of color.</p><p>less skip better color with slower performance</p><p>ex on skip: on 150 or 200 i was getting 70 to 75 fps</p><p>on 100 skip ii slowed down to 60 to 70 fps .. etc.</p>
<p>h0uri,</p><p>Great job on this version of ambilight for PC, I&rsquo;ve<br>tried the adalight but processing is slowing my games down to 30 fps which isn&rsquo;t<br>playable, your version is acceptable for gaming (45 FPS) so I&rsquo;m happy to<br>use your instructable.</p><p>I<br>have a problem , when a LED should be red it is blue of color, I&rsquo;ve followed<br>your tutorial, I&rsquo;m not sure what goes wrong.</p><p>My<br>setup is:<br><br>Arduino uno<br><br>75 ws2801 LED&rsquo;s (China) similar like <a href="https://cdn-shop.adafruit.com/970x728/322-00.jpg" rel="nofollow">https://cdn-shop.adafruit.com/970x728/322-00.jpg</a></p><p>Switching power supply 5V 10A<br><br><br><br>Windows 10 Pro<br><br>Intel Core i5-2500K<br><br>ATI/AMD Radeon R9 390</p><p>3<br>Monitors - DELL U2311H (DisplayPort)<br><br><br><br>------------------log.txt-----------------<br><br>Read Config.ini<br><br>Config Parsed<br><br>Buffer created<br><br>Total Leds 75<br><br>Gamma table created from 5<br><br>Rect {X=0,Y=0,Width=6048,Height=1080}<br><br>Init Rect<br><br>Driver Loaded<br><br>Driver Connected<br><br>Thread Started<br><br>Form lLoaded<br><br>Form Shown<br><br>Driver Disposed<br><br>closed serial port<br><br>Sent All Black<br><br>Exit Success<br><br>3-6-2016 22:09:44<br><br>Log End ..</p><p>------------------logDriver.txt-----------------</p><p>driver res<br>{X=0,Y=0,Width=6048,Height=1080}</p><p>Thanks,</p><p>Da_Plague</p>
<p>try to switch the RGB order in the arduino sketch to something else like BGR, or GBR, etc .. </p>
<p>yup, that did the trick!</p><p>Thank you!</p><p>Looking forward for bottom led support</p>
<p>Houri,</p><p>What about using WS2811/WS2812 (3 wire) compared to WS2801</p>
<p>well, not that big of a difference, i believe some tweaking on the arduino sketch code is required, and the wire connections too obliviously, the color structure is pretty much the same, but i'm not supporting it since i don't own them or have the ability to test on them, so i can't give you any assurance that it'll work.. goodluck .. :)</p>
<p>also this link will help</p><p> <a href="http://www.dothediy.com/2015/08/arduino-ambilight.html">http://www.dothediy.com/2015/08/arduino-ambilight....</a></p><p>he used WS2812B</p>
<p>Houri,</p><p>Here is another problem. If there are two users on one computer, DfMirage turns all the LEDs off when you switch to another user, and the new user is unable to run DFMirage. Can we have DFMirage run in the background or allow two instances of DFMirage to be run?</p>
<p>why is the other user unable to run it ? and is the first user still running the instance ?</p><p>the main problem is we can't have to programs sending data at one serial port.</p>
<p>The first user runs it, then when the second user logs on, the LEDs go off and when the second user runs DFMirage it does not work because the 1st instance is running, but the LEDs are not.</p>
<p>i don't think it's possible since as i've said before we only got 1 serial port and we can't connect two programs to 1 serial port, another thing that makes this complicated, we got only 1 driver which also won't accept two programs.</p><p>maybe using the windows task schedule to manage the situation, but i have no experience there .. </p>
<p>What about allowing the 1st instance to continue to run in the background? That would solve the problem.</p>
<p>i've looked a bit for on how to do such a thing, no luck finding a working method at all.</p>
<p>what about have an option to automatically exit DFMirage when logged off?</p>
<p>thats a good idea, i will make sure to ubdate it by the end of the day .. </p>
<p>v1.3 crashes everytime if win7 comes out of standby after logging in...</p>
<p>well, the only thing added to 1.3 is the exit on switching.. by crash do you mean crash with error or exception thrown ? or just normal close ?</p>
<p>added .. :)</p>
<p>I am in aww of this project. Just one question, is there a possibility of adding passive hmdi to be able to add a gaming console? im sorry if this is a noob question.</p>
<p>this project runs on windows os, if and only if you have some magical way of streaming your console screen to windows and view it at the same time you are gaming, then yes this might work for you.</p><p>the better solution for would be &quot;Hyperion&quot;, it's a software that runs on raspberry pi modules, and it works as a pass through device, you don't need windows os for the processing since it's being processed on the pi. </p>
<p>Thank looking at those projects now. I appreciate the quick response and all your hard work.</p>
You are very much welcome, but i gotta note that gaming with ambilight isn't really that good, actually it's kind of not noticeable and sometimes looks very ugly, i do allot of gaming on pc and i always turn it off or put it on a static color such as white ..
<p>Thanks Houri for you effort. <br><br>Here is log.txt:<br><br>Read Config.ini</p><p>Config Parsed</p><p>Buffer created</p><p>Total Leds 50</p><p>Gamma table created from 2.8</p><p>Rect {X=0,Y=0,Width=2560,Height=1600}</p><p>Init Rect</p><p>Driver Loaded</p><p>Driver Connected</p><p>Thread Started</p><p>Form lLoaded</p><p>Form Shown</p><p>Driver Disposed</p><p>closed serial port</p><p>Sent All Black</p><p>Exit Success</p><p>20-May-16 7:57:12 PM</p><p>Log End ..</p><p>logdriver.txt:</p><p>driver res {X=0,Y=0,Width=2560,Height=1600}</p>
<p>seems like it should work fine ..but i've added another function to to save a screenshot of the img, plz re download once again and post the img captured</p>
<p>Yeap, it works perfect now. Thank you...</p>
<p>nvm about the screenshot, i've used DSR by nvidia to change my res from 1080 to your res and fixed the code, now it should work .. </p>
<p>ok, everything works fine on 1920x1080. In 2560x1600. only LED 5 to 14 and 26 to 50 lights up.</p>
<p>I made this but I only get lights on both left and right side. Nothing from the top. Any ideas? I have 14 LEDs on each side and 22 on the TOP. If I for example set L=5, R=5, T=10 the TOP does light up. Where is the hiccup?</p>
<p>#define NUM_LEDS 50</p><p>have you done that on the arduino sketch ?</p>
Yes that is done. My screen resolution is 2560x1600. Both the Left and Right 14+14 lights up correctly following the left/right screen edges but nothing from the top. The wiring is fine or else the left bank LEDs will not work.<br>
<p>i've released 1.2, it contains a logger to make sure of almost everything .. post both log files after run and exit.</p>
<p>test on 1920x1080.</p>
I did the 5,5,10 just to test. When I do that the bottom 5 lights up, next 10 nothing and the following 5 which of course is on top, lights up. This is to confirm that the Top LEDs can work. <br>

About This Instructable

8,180views

63favorites

License:

Bio: Computer Engineering @ASU in JO.
More by h0uri:Remote Hardware Monitor Ambilight DFMirage [super fast screen capture and processing] Audio Spectrum Software [C#] 
Add instructable to: