Ambilight using boblight and arduino

This is general talk area for things that NOT RELATED WITH TV! Instead, about internal works like web site, forum, wiki, or talking, etc...

bole5
Posts: 10
Joined: Tue Dec 27, 2011 11:26 am

Ambilight using boblight and arduino

Post by bole5 »

Hi,

I am looking into adding ambient lighting to my newly-acquired Samsung UE46D6500. After doing extensive research on the internet (and being a big supporter of xbmc) I finally settled for the following solution:

1. boblight for calculating colors and sending them over to arduino over the USB. It can communicate with multiple devices such as atmolight, ikea dioder, adalight etc...

2. Arduino UNO for driving the LEDs

3. LEDs (cheap LED strips or more expensive digitally-controllable ones)

Boblight is great choice since it is a client-server solution and you can have them running on different devices. One example is client running on the XBMC communicating with server running on an openwrt router (for this setup check the xbmc forums). Arduino is a great open source hardware available for cca. 20$. We can easily drive LED stripes using PWM or much more sophisticated WS2801 based LED Pixels. Depending on your budget you can choose to order LED stripes from dealextreme (cca. 15$/meter) or LED Pixels from adafruit.

I would like to compile boblight for Samsung TV and adapt it to get the image directly from TV's framebuffer to calculate colors instead using xgetimage. I am still struggling to get the cross compiler running on my ubuntu 10.04 setup. Once that is done I will try to compile the server part and then adapt the client.

Questions:

- Do you think this is doable on D-series ARM? (Ideally I'd like to make it available for all models if possible)
- What is the least CPU-intensive way of getting image (screenshot) from the framebuffer?
- Has anyone succeeded in having a working cross compiler for D-series?
- Can I use pre-compiled toolchain from embdebian and if yes which one is the most suitable?
- Am I trying to reinvent the hot water/has anyone working ambilight setup already?


P.S. I tried to add direct links to the external resources such as boblight googlecode site but then I got following warning: "Your post looks too spamy for a new user, please remove off-site URLs. "
arris69
Official SamyGO Developer
Posts: 1700
Joined: Fri Oct 02, 2009 8:52 am
Location: Austria/Vienna (no Kangaroos here)
Contact:

Re: Ambilight using boblight and arduino

Post by arris69 »

bole5 wrote:Hi,
....

Questions:

- Do you think this is doable on D-series ARM? (Ideally I'd like to make it available for all models if possible)
- What is the least CPU-intensive way of getting image (screenshot) from the framebuffer?
you need to find the memory address where the framebuffer is mapped (this is done for b-series but not for d, http://forum.samygo.tv/viewtopic.php?f=3&t=346 ). but you need to make some usleeps betv. readings elsewhere tv becomes unusable and reboots
- Has anyone succeeded in having a working cross compiler for D-series?
- Can I use pre-compiled toolchain from embdebian and if yes which one is the most suitable?
you can find one on samsung opensource site (VDLinux-armv7a8-toolchain-lite)
- Am I trying to reinvent the hot water/has anyone working ambilight setup already?


P.S. I tried to add direct links to the external resources such as boblight googlecode site but then I got following warning: "Your post looks too spamy for a new user, please remove off-site URLs. "
bole5
Posts: 10
Joined: Tue Dec 27, 2011 11:26 am

Re: Ambilight using boblight and arduino

Post by bole5 »

Thank you arris69 for the hints. I'll start off by compiling boblight server and take it from there.
bole5
Posts: 10
Joined: Tue Dec 27, 2011 11:26 am

Re: Ambilight using boblight and arduino

Post by bole5 »

Ok. I've gotten so far:

- Ordered and received arduino UNO compatible board and 50 WS2801 RGB LED Pixels
- Compiled boblightd to run on my D-Series TV
- Connected my arduino with Adalight sketch to the USB port on my TV
- Everything works great when using client running on my HTPC!

So far I am very happy with the setup. It was very easy and quick to build.
I still have to run boblight client on my HTPC (for that I use XBMC with boblight addon), so I am still one step away from having a self contained ambilight system ;)

Could one of developers give me a hand with trying to get the picture samples from the framebuffer? Arris69 kindly pointed me to the "Half-resolution framebuffer" forum topic which provides a good insight but I haven't made much progress on making any of the code work on D-series.
idbirch
SamyGO Project Donor
Posts: 72
Joined: Fri Nov 20, 2009 11:56 am

Re: Ambilight using boblight and arduino

Post by idbirch »

Wow, nice work, I love this idea. I've already have a set of Ikea LEDs stuck to the back of my D7000 but obviously they're just set to a static colour (which still looks really cool though!)

Do you know if trying to set this up with the Ikea LEDs would require any kind of hardware modification as I probably wouldn't have the skill to do that?

edit: ok, just found this http://cauldrondevelopment.com/blog/200 ... oder-hack/. My electronics skills are practically zero so that might as well be written in Klingon :(

If you do manage to get this framebuffer thing working, I'll go shopping for some of the bits you mentioned in your first post. I look forward to hearing about your progress, good luck!
bole5
Posts: 10
Joined: Tue Dec 27, 2011 11:26 am

Re: Ambilight using boblight and arduino

Post by bole5 »

IMO Ikea Dioder is quite expensive and like any other analog 12v RGB LED strip more difficult to connect to arduino than digitally addressable strip.

In order to connect Dioder to the arduino you need to use a set of transistors or a dedicated IC (such as ULN2003). To learn more about analog LED strips have a look at: http://www.ladyada.net/products/rgbledstrip/ and http://ikennd.ac/blog/2011/09/arduino-dioder-part-one/ (he also has part two and three).

Since your electronic skills are a bit rusty I would definitely advise you to buy digitally addressable LEDs and make a setup described by ladyada: http://www.ladyada.net/make/adalight/
You can buy WS2801 LED pixels and the 5v power supply for much cheaper directly from China. I've had great experience with Ray Wu's store: http://www.aliexpress.com/fm-store/7017 ... color.html

I hope one of developers could help me move forward with the framebuffer. In any case I'll post my findings here.
idbirch
SamyGO Project Donor
Posts: 72
Joined: Fri Nov 20, 2009 11:56 am

Re: Ambilight using boblight and arduino

Post by idbirch »

Thanks for the links bole, some interesting reading there. The ladyada.net guide does indeed look like the best option for me - it mentions soldering equipment but it looks to me like the only soldering that's been done there is to attach some pinned wires onto the input end of the LEDs, is that right?

The only hurdle now is the screengrabbing from the TV's framebuffer, I'm wondering even if it's possible to do this how efficiently it can be done i.e. how often can the buffer be read and analysed by the TV without impacting performance of system critical operations. At least now I have some idea of the plan and cost if this comes to fruition, I hope one of the SamyGO team can help with the framebuffer work, as using a seperate HTPC in my living room wouldn't be an option. Thanks again for sharing your work and ideas :)
bole5
Posts: 10
Joined: Tue Dec 27, 2011 11:26 am

Re: Ambilight using boblight and arduino

Post by bole5 »

idbirch wrote:The ladyada.net guide does indeed look like the best option for me - it mentions soldering equipment but it looks to me like the only soldering that's been done there is to attach some pinned wires onto the input end of the LEDs, is that right?
Exactly, for my initial test setup I didn't solder anything, just connected the wires to power, LED pixels and arduino and taped it so that the wires don't "fall out".
bole5
Posts: 10
Joined: Tue Dec 27, 2011 11:26 am

Re: Ambilight using boblight and arduino

Post by bole5 »

We need to create a boblight client that works with Samsung TV. I can do that but need some help to get the picture data directly from the TV's memory (framebuffer)...

Post Reply

Return to “General”