Ambilight DFMirage [super Fast Screen Capture and Processing]

10,942

69

68

Published

Introduction: Ambilight DFMirage [super Fast Screen Capture and Processing]

About: Computer Engineering @ASU in JO.

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 ..

Share

Recommendations

  • Oil Contest

    Oil Contest
  • Water Contest

    Water Contest
  • Clocks Contest

    Clocks Contest

68 Discussions

Follow the instructions but never get it to work. Have all the parts and do as it says, but it seems to me that there is a lot of steps which is missing or not explained well enough for someone who has never done this before, And this is the only tutorial that does not require more parts I do not have. So if I could get help in any way to make it work then I would be grateful. Would be grateful if I even got it to shine x)

5 replies

Well seems like we both don’t know exactly whats not working on your setup , is it power to leds ? Is it the connection between the app and microcontroller ? Is it the screen scanning driver ? Power to the LED strip ? So many variables to be considered, i’d start with using only arduino and some searching to write a code to test the strip, this way the hardware part can be troubleshooted

Okay so I found a code that tested the led strip but it was only for the first like 8 or 9 led, but it did what it was supposed to do so I think it works.

This is the steps I do.

Fist I connect:

LED___ARDUINO___POWER

5v- - - - - - - - - - - - - - - - +

GNG - - - GNG - - - minus

SD - - - - - 11~

CK - - - - -13 (mine says SI but I think it is like same ting)

Now the led is shining but only the fist and led 46 and 78, sometimes different. The others is black

Copy fast led to library. Opens Adalight_Fastled_ws2801 in IDE. Change the number of led (hasn't cut the strip yet but fells like should work anyway) Uploade to the arduino. Install the Mirror Screen Driver. Step 7 I rely don't understand. And Ambilight DFMirage don't even boot

Se now that my led says WS2801SO on the chip. Dose that matter?

Reading from "https://www.ebay.com/itm/10pc-Worldsemi-WS2801SO-3... i don't see how it's different from the chip that was embedded in my strip so no .. But are you powering your led from arduino 5v ? if so .. that's not nearly enough to power it, otherwise you'll need to calculate the minimum power required for your LED count, by checking the power requirement for your LED strip and applying some simple math, example is shown in previous comments replying to "KunalD20".. finally setting the "Settings.ini", for testing now disable everything meaning set to "fasle" to all bools, and only set "true" to "enable screen leds (bool)" , set "arduino screen comport:" to your arduino comport which is very important, set the exact number of LEDS for top, bottom, left and right.

both steps mentioned are critical but please don't rely on troubleshooting using this setup, first make sure you are fully able to control the leds from the arduino directly, all leds and all R , G, B colors, only then move to trying. just so the base is clear and not stack problems upon other problems. good luck

Got all 160 led to shine in different colors so it works. and I use 5V 10A power supply. But still does´t get Ambilight to work. Feels like it would be so much easier to just buy ws2812b and downloade Prismatik and it seems to work. Or what do you think? what is the difference between this and the others tutorials?

You do not have a video that goes through all the steps and shows how to do it and me understand stuff better? :)

so after a lot of work I got it to work with ambibox and prismatik. but as PaulK294 says the LedController3.0.rar do not want to start and I have the same problem as him, thanks in any case for your help :)

hello h0uri, very nice guides you got here, i was wondering what software you recommend in 2018 to use ambilight with arduino on pc? I have not tried ambibox yet but from what i read it is very slow so what i read about your program here sounds amazing.

I downloaded your LedController3.0.rar but i can only find one executable in there that does not start for me in windows 10, the icon appears in the tray on the bottom right corner but as soon as you move our mouse over it it disappears. I have tried compatibilty modes and with admin priviliges, am i missing something? do i need to install arduino IDE and the software mentioned in this guide before i can start it?

Thank you and best of wishes

Where are the attachments LedController.rar and Adalight Arduino Sketch?


Are they the Adalight_Fastled_ws2801.rar and Ambilight DFMirage.rar?

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. <3

2 replies

Edit:

https://www.aliexpress.com/item/Free-Shipping-5M-W...

Ordered this strip, powering about 2 meters of it with a separate switching 5V/20A supply. Will this work?

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)?

I'm unable to ground the board using Molex connectors, they're all occupied.

at aliexpress details u can find that it's 8.64W/m, which mean 8.64 watts for each meter, P = I*V, 8.64=(I)*5, I = 1.728, 1.728 A for 1 meter, 8.64 for 5 meters, 20 A is plenty :)

Looks great! I only need bottom led support and then my setup would be perfect <3

temp_567581437.jpgtemp_-1035366208.jpg
6 replies

Perfect dude .. also good job on making it work for multiple monitors .. :D

bot leds are coming in July, ill be making major updates then .. :D

Is
the update finished? Where can I find it? I’m eager to use all of my led’s!

I’m still happy with the ambilight!

i've decided to discontinue this project,please read the notes.

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 .. :)

try v3.0, it has bottom leds .. :)

Hey h0uri,

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.

Great project! I have a question regarding adjusting the colors of the leds.

Is there a way to shift to a warmer range e.g. turn up for the reds in the leds?

I have ws2801 leds set around my monitor, and when I'm displaying white on my monitor, the leds shine a bright blue.

1 reply

Yes very much can be, 1 of two well need the change, arduino code or c# pc code, your gonna have to find where all the three RGB colors are calculated and processed, at that stage you might alter the values as you need. another and more recommened way is to alter "gamma" correction parameter.

0
user
KingN7

1 year ago

I made everything on my arduino nano and nothing. Theres something wrong with the software I guess