Black Lives Matter - Action and Equality. ... Adafruit is open and shipping.
0

Ambilight Project needs some assistance.
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Ambilight Project needs some assistance.

by sacredgaming on Wed Oct 05, 2011 4:33 pm

newb with a few questions if someone could assist i would greatly appreciate it. I have been thinking of building ambilight setup for my tv and saw the article in engadget today.

I noticed this setup was used for a pc monitor probably 24 inch. I'm trying to use it on a 50 inch tv so to my order i have added a second strand of rgb's which i assume would do. I noticed in the programming section that i might have to make some changes to the code in order to get the setup right and to be honest that wouldn't be my strong suit. What would need to be changed in order to accommodate the second strand?

Second question is they are using a uno programming board and i already have a few avr boards. this one in particular which from what i read is very close to the teensy boards.


amtel avr usb using the at90usb162 chip

please advise as to what changes might need to be made in order to accommodate this project.
sacredgaming
 
Posts: 12
Joined: Wed Oct 05, 2011 3:05 pm

Re: Ambilight Project needs some assistance.

by pburgess on Wed Oct 05, 2011 11:22 pm

Unless the board you're using works with the Arduino IDE and standard libraries (Serial, etc.), it would be a fair bit of work to adapt the code to run on this. Guessing this is something like a PS3Yes board? Haven't played with one myself, so can't say for certain.

For a larger ring of LEDs, you'd need to change the 'Adalight.pde' code (in Processing) around lines 20-24, as well as the arrayWidth and arrayHeight variables at lines 27 and 28. Let's suppose you take some measurements and decide to put 16 LEDs across and 10 down (just using made-up numbers here). That would be 48 pixels total, because the corner LEDs are shared between the horizontal and vertical segments. So, arrayWidth would be changed to 16, arrayHeight to 10, and that coord[][] array, where there's currently 25 number pairs, this would be expanded to a list of 48 pairs. Each pair represents the X/Y coordinates (with {0,0} at the top left) of the corresponding LED pixel in the strand...so the first pair in this list is the coordinates of the first pixel in the strand (which could be anywhere, depending how you laid out your wiring), second pair is for the second pixel, and so forth. Since the demo rig has that gap at the bottom, I chose to make a broken ring with the first pixel just to the left of this gap, which is why the list starts there (rather than, say, a corner). YMMV.

pburgess
 
Posts: 4055
Joined: Sun Oct 26, 2008 2:29 am

Re: Ambilight Project needs some assistance.

by sacredgaming on Thu Oct 06, 2011 8:04 am

Thank you for your detailed response once i get to playing around with it i will have a little better understanding of what your talking about. I've noticed that some people use the led strands and others use the strips. In your opinion which is more proficiant?
sacredgaming
 
Posts: 12
Joined: Wed Oct 05, 2011 3:05 pm

Re: Ambilight Project needs some assistance.

by MudHolland on Thu Oct 06, 2011 9:50 am

I'm very interested in this project! I've bought like 5 sets of the AMBX hardware, but since support is basically non-existant and the maximum resolution of 'pixels' is 9 (Center, North, Northwest, West and so on) I'm also looking at the ADALIGHT solution for a 50+ inch TV. Such a display needs more than 25 lights so am planning to use 2 strand of LED's as well, and if I'm going to buy 2 strands anyway, why use less than 50, since you want the highest 'resolution' as possible.

I've just ordered a Arduino Uno and it's been ages ago since i last programmed, but I'm going to give it a shot.

On your last question, the strand VS strip:

- The strands use LED's that can be addressed, so you can - for example - order LED6 to turn blue. Every single addressable LED is a pixel, and as I've said, you want the highest possible resolution for the best effect.

- Correct me if you've seen LED-strips with addressable microcontrollers in them, but the LED-strips I've seen are dumb, so each strip has 4 pins: Common anode, Red, Green, Blue. You should connect R,G and B to 3 pins to control the color. The strips i speak of are common anode, so you essentially pull don't the voltage of a color to create a voltage over your LEDS, but by pulling down this voltage with a pin from your microcontroller, you're basically making the current flow through your chip, which isn't the best idea. You can solve this by using a transistor to pull the voltage down, but you would be doing way too much work to get this to work. And EVEN IF you got one LED-strip connected with the transistors and 3 times the pins need, you're still left with a single 'pixel', so you need to do allllll this work as many times as the amount of pixels you want.

In the end, I think you're best off by buying and single strand and an Arduino Uno and simply build it, for under $80. When everything's done you can experiment with the code, and see if you can get the 25 leds to work on the left side and then use the 25 on the right, and if all works out you can buy the second strand and fix it up.
MudHolland
 
Posts: 26
Joined: Thu Oct 06, 2011 9:29 am

Re: Ambilight Project needs some assistance.

by MudHolland on Thu Oct 06, 2011 9:55 am

Sorry, just went to the adafruit shop and see the addressable led strips. I still think the strands are more suitable, since you can adjust the spacing between the pixels as needed.
MudHolland
 
Posts: 26
Joined: Thu Oct 06, 2011 9:29 am

Re: Ambilight Project needs some assistance.

by sacredgaming on Thu Oct 06, 2011 10:03 am

it seems the strips would be easier but, i agree the strands are more suitable for customization. Do you think the 20 strands will suffice or best to wait for 25 strands to come back in stock?
sacredgaming
 
Posts: 12
Joined: Wed Oct 05, 2011 3:05 pm

Re: Ambilight Project needs some assistance.

by adafruit on Thu Oct 06, 2011 11:39 am

the 20mm strands are a different chip, so it wont work out of the box. please sign up, we'll email you when our next shipment arrives!

adafruit
 
Posts: 12151
Joined: Thu Apr 06, 2006 4:21 pm
Location: nyc

Re: Ambilight Project needs some assistance.

by pburgess on Thu Oct 06, 2011 11:44 am

sacredgaming: the code relies on the WS2801 driver chip, which is only in the 25 LED strands right now.

MudHolland: most coherent response ever, thank you. I worry that some folks may be taking this too seriously as a "product," when the goal really, like much of what Adafruit does, is to get folks experimenting with code and electronics.

pburgess
 
Posts: 4055
Joined: Sun Oct 26, 2008 2:29 am

Re: Ambilight Project needs some assistance.

by sacredgaming on Thu Oct 06, 2011 12:44 pm

@pburgess By no means does it look like a plug and play project. If i wanted something PnP i would have purchased a Phillips ambilight. Not saying your comment was directed toward me. However a little guiding hand is always appreciated and i feel like i have gotten that. Now it is just a matter of waiting on the parts which will be back in stock in a few weeks and i can continue then. On a side note I am glad that there are people like you and mudholland that dont mind taking a little time to help it says alot about the community.
sacredgaming
 
Posts: 12
Joined: Wed Oct 05, 2011 3:05 pm

Re: Ambilight Project needs some assistance.

by kmd1970 on Thu Oct 06, 2011 4:47 pm

Hello,

Several years ago I bought a PC compatible ambilight package from arfx.nl. I was disappointed to find out that it wouldn't work when the Windows Media Center was at full-screen. (Although, it worked fine if I minimized and then stretched the media center window to the corners of my screen)

Can someone please verify that this project works with Windows Media Center at full-screen? Pretty please? Maybe now I can finally give away my Ikea Dioder (501.923.65) multicolor led strips :shock:
kmd1970
 
Posts: 15
Joined: Thu Oct 06, 2011 4:07 pm

Re: Ambilight Project needs some assistance.

by MudHolland on Fri Oct 07, 2011 2:54 am

@Sacredgaming

My opinion is that building this set must also include the fun in actually building it. If you want an easy way out, I suggest you look into AMBX, which was also created by Philips, but is an out-of-the-box solution. However, as I've said,

- the fun lies in experimenting and the pride of creating things from (near) scratch
- this AMBX set restricts you in maximum pixel count (9)
- and you're left with a boxed set so does not come with strips or strands, so not easy to hide behind your tv (although I've opened and modified a set to power a few meters of LED strips for a friend a few years back)
- the driver support stopped a long time ago (but it does recognize .exe-files and creates color accordingly, still use this on my PC for games)
- count yourself lucky if you can still find these sets (they went for way over 100 bucks, but after support stopped they were sold for 40, which is a good price imo)

@kmd1970
I'm quite sure you ARE talking about the AMBX-set, so think you're better off asking those question at the AMBX-forum... (Hint: Look for a program called 'Aurora Synthesia' ;) )

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Anyway, I'm not here to promote AMBX, and all in all, I think this Adalight project is WAYYYY more interesting, since the resolution is as high as you want it to get (and resolution is key!) and you are free in what the pixels display.
MudHolland
 
Posts: 26
Joined: Thu Oct 06, 2011 9:29 am

Re: Ambilight Project needs some assistance.

by kmd1970 on Fri Oct 07, 2011 12:57 pm

I'm quite sure you ARE talking about the AMBX-set


No, that's not what I am talking about. I got mine from Arfx.nl, as I stated. :?

I was actually hoping "pburgess" could provide an answer to my media center full-screen question. I assume he is the project originator? :D
kmd1970
 
Posts: 15
Joined: Thu Oct 06, 2011 4:07 pm

Re: Ambilight Project needs some assistance.

by MudHolland on Fri Oct 07, 2011 1:22 pm

kmd1970 wrote:
I'm quite sure you ARE talking about the AMBX-set

No, that's not what I am talking about. I got mine from Arfx.nl, as I stated. :?

I was actually hoping "pburgess" could provide an answer to my media center full-screen question. I assume he is the project originator? :D


Ah, I thought arfx.nl was just some site that sold hardware, and I thought you bought the AMBX there.

This project is just an Arduino that sends information to the LEDs because some program on the PC is constantly looking at the colors in definable squares on screen; I see absolutely no reason why this shouldn't work with WMC.
MudHolland
 
Posts: 26
Joined: Thu Oct 06, 2011 9:29 am

Re: Ambilight Project needs some assistance.

by pburgess on Fri Oct 07, 2011 10:59 pm

I can't answer definitively, since the results will vary with your specific hardware and media involved. But there's an easy way to test, which I'll get to in a sec...

The success (or failure) of the capture code will depend whether there's hardware-based media decoding going on. DVD playback, for instance...if it's a software decoder, the CPU is 'aware' of the frame buffer contents and the screen capture should work without a problem. Hardware decoders use a funky, almost chroma-key-like arrangement straight to the output, and the image never really hits the frame buffer, and the capture code probably won't work in this case. Same again for games...DirectX or OpenGL stuff might encounter some similar gas pains in this regard...not having anything in that regard to test with, I can't say for certain.

So! Try this: in the Processing source code, comment out these two lines:

port = new Serial(this, Serial.list()[0], 115200);

and:

port.write(buffer);

Then run the sketch (don't need an Arduino attached). You should get a little preview window of what the software is trying to do (it'll mostly be a black rectangle, but there should be some colored squares around the perimeter -- this is the data that's sent to the LEDs). If it's all black, or if the perimeter squares are all one color with no correlation to the screen's content, then there's some hardware-direct stuff going on beyond the reach of the screen capture code.

pburgess
 
Posts: 4055
Joined: Sun Oct 26, 2008 2:29 am

Re: Ambilight Project needs some assistance.

by MudHolland on Sat Oct 08, 2011 9:30 am

Just got my Arduino in the mail, so felt the sudden urge to code :) I don't have the LED strand (ordered just one for now) yet, but currently tried commenting out the two lines and rewritten the matrix so i have an 18X9 matrix, using all 50 LEDs, including the one in the bottom center.

On the frame buffer:
I tried youtube, which doesnt have any security, so it worked as planned.
playing video files however, nothing... At least: In BSplayer. VLC worked okay and playing files through XBMC (which is what I'm planning to use 90% on my HTPC) works like I hoped!
MudHolland
 
Posts: 26
Joined: Thu Oct 06, 2011 9:29 am

Please be positive and constructive with your questions and comments.