[HOW TO] Build Ambilight on Linux (AppleTV; Sams image; Ubuntu 8.04;...)
#1
How to build ambilight (amblone) on Linux.
This guide is focused on AppleTV with Sam.Nazarko image build on Ubuntu 8.04 LTS, but it will also work for other Linux versions.

I did this with standard configuration and Ubuntu installed on internal disk.
I think it will also work with USB pen drive install and USB hub with small modification of boblight.conf (line: output /dev/ttyUSB0) file.

So lets get started. First you will need some hardware. This guide is using the hardware idea from Amblone project. So for building the hardware just go to http://amblone.com/guide On this site there is also schema for building the circuit board.

In this guide i will be using Arduino Mega1280 (http://arduino.cc/en/Main/ArduinoBoardMega) micro-controller with four channels output but it is the same on Arduino Duemilanove (http://www.arduino.cc/en/Main/ArduinoBoardDuemilanove). The only difference is that Duemilanove uses just two channels (one channel means one led stripe and one led stripe one colour). They are both USB type.

Basically you will need:

- 1x Arduino micro-controller (Arduino Mega1280 (4 channels) or. Arduino Duemilanove (2 channels))
(BUY: http://cgi.ebay.de/ws/eBayISAPI.dll?View...fe=sidebar or. http://cgi.ebay.de/Arduino-Duemilanove-2...3a64a21838 )
- 1x RGB LED stripes without lens. I'd recommend this one (5-m) (BUY: http://www.dealextreme.com/p/rgb-multico...-12v-14963
Or. http://www.dealextreme.com/p/rgb-multico...-12v-14965 )
- 1x A USB A to B cable (at some stores on e-Bay you get one with Arduini board as a gift
- 12x 2N 3904 transistors http://www.dz3w.com/uploadfile/2010/0807...813814.gif (BUY: http://cgi.ebay.com/30-x-2N3904-NPN-Gene...3a65d520b2 )
- 12x 2200ohm resistors (BUY: http://cgi.ebay.com/100-x-Resistors-2-2K...3a55380b13 )
- 1x power supply 12v 1A to fit in Arduino and powering RGB LED stripes (BUY: http://www.dealextreme.com/p/ac-to-dc-12...240v-15991 )
- 1x PCB Board (BUY: http://cgi.ebay.com/Paper-Phenolic-Proto...3360240fc5 )
- PIN Headers (BUY: http://cgi.ebay.com/5-X-40-pin-2-54mm-PC...2562e5eeb5 )
- Some wires (BUY: http://cgi.ebay.com/Arduino-Solderless-B...56412e01ab )

Now you have all parts for start building. Use Amblone guide on how to build the board from resistors and transistors. http://amblone.com/guide
First you have to program the micro-controller with the .pde file.
Download .pde for Arduino board from http://code.google.com/p/boblight/source...no_pwm.pde (copy and paste content to notepad and save as f.e. arduino.pde file) (This .pde is suitable for both Arduino Mega1280 and Arduino Duemilanove)

After that download software from http://arduino.cc/en/Main/Software or. direct link http://arduino.googlecode.com/files/arduino-0022.zip
Connect micro-controller to the PC and install drivers (included in software). Then run the program, select com port, Arduino board type and upload the .pde you have downloaded).
If you are having troubles, you can read on Arduino site the how too guide.

Now if you have uploaded the .pde to the controller, you are ready to install Boblight on ATV (Linux).

--------------------
How to ride on Linux
--------------------

First i did enable root account on Sams image. Later you can disable it.
Quote:sudo passwd root
This will prompt for a new root password and once you confirm it, you can start using the root account to login.
If you want to disable root account in Ubuntu you need to lock the root account by using the following command
Quote:sudo passwd -l root

Quote:sudo apt-get install libx11-dev libgl1-mesa-dev libxrender-dev portaudio19-dev libavcodec-dev libavformat-dev libswscale-dev libxext-dev

Download http://packages.ubuntu.com/natty/libavdevice-dev (libav_0.6.2.orig.tar.gz) and upload it with WinSCP into /tmp folder on AppleTV. You can also wget it.

Quote:cd /tmp
wget http://archive.ubuntu.com/ubuntu/pool/ma...rig.tar.gz
tar -zxvf libav_0.6.2.orig.tar.gz
cd libav-0.6.2
./configure
make
make install

Quote:cd
cd /tmp
svn checkout http://boblight.googlecode.com/svn/trunk/ boblight-read-only
cd boblight-read-only
./configure --without-ffmpeg
make
make install

Download .conf file from SVN. Conf file for Mega1280 http://code.google.com/p/boblight/source.../mega.conf and for Duemilanove http://code.google.com/p/boblight/source...anove.conf After that, rename it to boblight.conf and copy it into /etc (/etc/boblight.conf) with WinSCP. You can of course direct download it from Ubuntu if you know how to Smile


Now you can start boblight.

Quote:ldconfig
sudo boblightd -f
export DISPLAY=:0.0
boblight-X11 -f -x

You can experiment then a little with settings.
At the moment i have those
Quote:boblight-X11 -f -x -o speed=70 -o value=10 -o saturation=5.5 -o threshold=100

This are options for boblight-X11:
Quote:Usage: boblight-X11 [OPTION]

options:

-p priority, from 0 to 255, default is 128
-s address:[port], set the address and optional port to connect to
-o add libboblight option, syntax: [light:]option=value
-l list libboblight options
-i set the interval in seconds, default is 0.1
prefix the value with v to wait for a number of vertical blanks instead
-u set the number of pixels/rows to use
default is 64 for xrender and 16 for xgetimage
-x use XGetImage instead of XRender
-d debug mode
-f fork
-y set the sync mode, default is on, valid options are "on" and "off"

name type min max default
speed float 0.0 100.0 100.0
autospeed float 0 100.0 0.0
interpolation bool 0 1 0
use bool 0 1 0
saturation float 0.0 20.0 1.0
saturationmin float 0.0 1.0 0.0
saturationmax float 0.0 1.0 1.0
value float 0.0 20.0 1.0
valuemin float 0.0 1.0 0.0
valuemax float 0.0 1.0 1.0
threshold int 0 255 0
hscanstart float 0.0 100.0 -1.0
hscanend float 0.0 100.0 -1.0
vscanstart float 0.0 100.0 -1.0
vscanend float 0.0 100.0 -1.0

Some tips:
- If you run
Quote:boblightd
without switch, it will run in foreground (useful for troubleshooting). With CTRL+c you can cancel foreground deamon)
- First test lights with
Quote: boblight-constant ff
should run blue light. To exit CTRL+c.
- If it says: (root@appletv-ubuntu:/tmp/boblight-read-only# boblight-constant ff ERROR: libboblight.so: cannot open shared object file: No such file or directory root@appletv-ubuntu:/tmp/boblight-read-only#) then (run
Quote:ldconfig[quote] as root)
- [quote]killall boblightd
Stops boblight deamon.
-
Quote:killall boblight-X11
Stops boblight-X11 deamon.
-
Quote:boblight-X11 --help
Help info for more config options.
- Read this to auto-start "boblightd" http://forum.xbmc.org/showpost.php?p=800...stcount=10
- Advance Launcher with Ambilight: http://forum.xbmc.org/showpost.php?p=851...stcount=36
- To dim the lights select Screensaver as black.
- It makes no affect on CPU if using one or four channels.
- On my AppleTV the processor is:
- around 37% when on idle (on system info screen)
- 47% when playing 1080p movie (Avatar 8GB file) (Using CrystalHD 70012)
- 40% when playing 720p movie (Law Abinding Citizen 4GB file) (Using CrystalHD 70012)
- 30% on standard divx film (Animal United 1,57 - 2cd file)


TNX to bobo1on1 for making this possible and great IRC support.
Feedback and tips are welcome.

P.S.:
Here you can see some pictures of power circuit that I have build. This is just for better ''imagination''.
You have to be careful that you do insert some sort of isolation between the Arduino and power circuit.
http://www.flickr.com/photos/64262741@N03/

Also when soldering use paste to achieve good contacts between the components and solder. And when you are finished done soldering clean the PCB board (i have used Acetone and brush) to avoid conductibility between electronic parts. Also double check that there is no shortcuts between transistors.
Reply


Messages In This Thread
[HOW TO] Build Ambilight on Linux (AppleTV; Sams image; Ubuntu 8.04;...) - by illiac4 - 2011-05-13, 10:53
[No subject] - by davidw - 2011-05-13, 11:39
[No subject] - by Sam.Nazarko - 2011-05-13, 23:48
[No subject] - by Sam.Nazarko - 2011-05-13, 23:50
[No subject] - by illiac4 - 2011-05-14, 09:41
[No subject] - by Sam.Nazarko - 2011-05-14, 16:41
[No subject] - by bobo1on1 - 2011-05-14, 16:43
[No subject] - by Sam.Nazarko - 2011-05-14, 16:48
[No subject] - by illiac4 - 2011-05-14, 23:09
[No subject] - by illiac4 - 2011-05-19, 07:47
[No subject] - by thesam73 - 2011-05-19, 15:20
[No subject] - by alx5962 - 2011-05-19, 19:50
[No subject] - by illiac4 - 2011-05-19, 20:09
[No subject] - by bobo1on1 - 2011-05-19, 22:39
[No subject] - by thesam73 - 2011-05-20, 10:26
[No subject] - by tocinillo - 2011-05-31, 16:15
[No subject] - by Anastrophe - 2011-06-02, 16:03
[No subject] - by bobo1on1 - 2011-06-02, 16:26
[No subject] - by illiac4 - 2011-06-04, 08:07
Thanks - by brimnac - 2011-06-10, 20:55
[No subject] - by Sam.Nazarko - 2011-06-10, 22:10
[No subject] - by muggi - 2011-06-11, 19:28
[No subject] - by muggi - 2011-06-12, 19:35
[No subject] - by illiac4 - 2011-06-16, 08:45
[No subject] - by illiac4 - 2011-06-20, 06:41
[No subject] - by illiac4 - 2011-07-16, 07:04
[No subject] - by brimnac - 2011-07-20, 01:11
[No subject] - by brimnac - 2011-07-20, 15:43
[No subject] - by illiac4 - 2011-07-25, 18:40
[No subject] - by illiac4 - 2011-07-25, 18:46
[No subject] - by bobo1on1 - 2011-07-25, 22:18
[No subject] - by illiac4 - 2011-07-26, 05:44
[No subject] - by bobo1on1 - 2011-07-26, 16:45
[No subject] - by illiac4 - 2011-07-26, 17:13
[No subject] - by illiac4 - 2011-07-30, 09:27
[No subject] - by Sam.Nazarko - 2011-07-31, 19:42
[No subject] - by tocinillo - 2011-08-01, 02:00
[No subject] - by illiac4 - 2011-08-01, 20:40
[No subject] - by tocinillo - 2011-08-02, 00:21
[No subject] - by illiac4 - 2011-08-02, 13:02
[No subject] - by bobo1on1 - 2011-08-02, 13:23
[No subject] - by illiac4 - 2011-08-02, 13:35
[No subject] - by tocinillo - 2011-08-02, 21:07
[No subject] - by illiac4 - 2011-08-03, 07:06
[No subject] - by cervix - 2011-08-04, 02:05
[No subject] - by illiac4 - 2011-08-04, 10:26
[No subject] - by tocinillo - 2011-08-04, 10:46
[No subject] - by cervix - 2011-08-05, 00:32
[No subject] - by illiac4 - 2011-08-05, 09:45
[No subject] - by rasmuskarlsen - 2011-09-14, 21:55
[No subject] - by Merley - 2011-09-15, 15:02
[No subject] - by Steini - 2011-10-28, 02:16
[No subject] - by illiac4 - 2011-10-31, 17:42
[No subject] - by illiac4 - 2011-10-31, 17:49
[No subject] - by Steini - 2011-11-08, 01:42
[No subject] - by illiac4 - 2011-11-08, 21:02
[No subject] - by CEbbesen - 2011-11-16, 00:31
[No subject] - by lordindy - 2011-11-17, 22:28
[No subject] - by lordindy - 2011-11-18, 17:02
[No subject] - by lordindy - 2011-11-21, 15:59
[No subject] - by illiac4 - 2011-11-21, 18:47
[No subject] - by nokian93 - 2011-11-22, 11:22
[No subject] - by lordindy - 2011-11-24, 20:42
[No subject] - by lordindy - 2011-11-24, 21:00
[No subject] - by carthago - 2011-11-28, 18:30
[No subject] - by illiac4 - 2011-12-01, 12:14
RE: - by klemensl - 2012-04-02, 23:09
RE: - by gsjosh - 2012-04-12, 22:44
[No subject] - by venedesign - 2011-12-04, 23:43
[No subject] - by illiac4 - 2011-12-05, 06:54
[No subject] - by venedesign - 2011-12-05, 14:12
[No subject] - by illiac4 - 2011-12-17, 20:07
[No subject] - by bobo1on1 - 2011-12-17, 20:50
[No subject] - by Chaos_666 - 2011-12-28, 19:31
[No subject] - by ghart999 - 2012-01-04, 01:54
[No subject] - by illiac4 - 2012-01-06, 06:46
[No subject] - by illiac4 - 2012-01-06, 06:49
[No subject] - by Chaos_666 - 2012-01-08, 19:23
Logout Mark Read Team Forum Stats Members Help
[HOW TO] Build Ambilight on Linux (AppleTV; Sams image; Ubuntu 8.04;...)1