By Forrest Cook
February 6, 2009
For a long time, your author has been searching for a
low power music playing computer for use in an
off-grid solar and wind powered mountain cabin.
The desire was to have a player with capabilities that were similar
to the grid-powered system used at home.
This consists of a library of over 5000
FLAC-encoded audio files
that are either randomly or sequentially played by one of several
Python scripts. The audio is fed from the computer's sound card to
the auxiliary input of a stereo amplifier.
The current off-grid audio system uses a car stereo deck with
a built-in CD player driving three stereo speaker sets, all running
on 12V DC power. Power consumption is in the range of 5-10 Watts,
depending on volume.
The car stereo deck has an auxiliary audio input
for connecting external sound sources, such as a computer.
After one becomes used to a Linux-powered music system with unattended
playback of a large music library, manually swapping individual CDs
every 45 minutes seems like a lot of trouble.
Initially, a stripped-down desktop computer was considered for the
job, but the
power consumption
was a bit too high for continuous off-grid use, especially when powering
the machine equipment through a DC to AC power inverter.
A number of
mini-ITX
systems were considered for the job, but their prices
were high, power consumption was still moderate, and
an external monitor, with more power consumption, was required.
A laptop computer seemed like a better platform for building such
a system. Taking the small system idea one step further,
it was decided that a palmtop computer would be
a good candidate for the task at hand. The
ASUS Eee PC
was chosen because it was inexpensive, common,
tiny, self-contained and would run on low power.
Also, another LWN editor had an Eee PC model 4G (701) that he was
willing to part with.
This machine uses a solid state flash drive for its primary filesystem.
One might ask, why not just get an iPod? In short, your author
does not like the sound quality that comes from highly compressed
audio formats, and the ability to create custom software was desired.
Also, the price of large capacity hard drives has
come down enough that high volume storage is no longer an issue.
The newly acquired Eee PC needed a fresh operating system installation.
Ubuntu was a logical choice since it was already being used for the
home-based music player.
Easy Peasy 1.0 (Ubuntu 8.10)
was the first Ubuntu-based distribution that was found for the Eee PC
platform. The EEEBUNTU
distribution also looks like a good candidate for running Ubuntu
on the the Eee PC.
Installing the operating system on a machine that lacked a
CDROM drive involved downloading the appropriate ISO image and
installing it on a USB memory stick.
Creation of a bootable USB memory stick is explained in
this article.
The Easy Peasy installation worked the first time, the only
annoyance involved the appearance of the Ubiquity system installation
window upon logging in. The Easy Peasy forum had an article on
Common issues and fixes that had the solution to that problem,
and some additional post-installation suggestions.
An article about
optimizing Linux on a solid stated drive suggested some additional
tricks for improving the life of the solid state memory.
The folks who put Easy Peasy together did a good job customizing
Ubuntu for the Eee platform, all of the various Eee PC peripherals
have worked with no problems.
A Seagate FreeAgent 320GB USB drive was chosen to hold the music
collection, it is small, frugal with power and gets its operating power
from the USB port. The drive required installation of an EXT3 filesystem.
The entire music collection was copied over by installing the new
drive on the home system and running an rsync command to populate the
filesystem. As the master music archive grows, it will be simple to
synchronize it with the USB drive using another rsync operation.
The USB drive also provides an off-site backup for the main music
collection.
A small amount of software had to be installed on the machine.
The Ubuntu vorbis-tools package contains the ogg123 command line FLAC
file player. Two custom Python scripts, RandFlacPlay.py and Playflacs.py
(available here)
use ogg123 to do the rest of the work.
The music is organized in a hierarchy of directory trees categorized
by genre, artist and recordings. The recordings of CDs, vinyl
disks and tapes each get their own directory.
RandFlacPlay.py is run with the primary music archive as an
argument, it picks random selections and plays them.
It can also be run on subsets of the entire collection or
on directories full of symbolic links to specific groupings of recordings.
Playflacs.py is used to play all of the songs in one particular
directory. Both Python scripts can be invoked multiple times inside
of a bash script for a wide variety of programmability.
Using the Kill-a-watt meter that was discussed in the aforementioned
power consumption article, data was taken for various modes of Eee PC
operation.
With the USB hard drive connected and the screen on, the worst-case
AC power usage was in the 17-21 Watt range while playing music.
This is about four times better than the best power consumption
achieved with the desktop machine, not counting the desktop video monitor.
When the Eee PC screen is closed, power consumption drops by about 2
Watts. Removing the USB hard drive causes the power consumption to
drop by around 4 Watts. Running from the AC charger, the Eee PC
can play music using only 11-15 Watts.
This number can likely be shaved by another 5 watts or so if the
machine is powered directly from 12V DC using a car cigar lighter
adapter, the AC adapter generates a lot of heat.
In the above example, minimum power usage was achieved with the
hard drive disconnected. However, a music player without music isn't
of much use. A bit of software solved the problem.
The RandFlacPlay.py script was modified so that instead of playing
the random music selections, it copies the songs from the hard drive
to a specified directory on the flash-based filesystem.
Flash space on this system is in short supply, so an external
4GB USB memory stick (1 Watt) was added to the machine.
The memory stick can be loaded with many hours of music
and the system can play without the hard drive.
Since this mode of operation involves no spinning drives, operating
the system in a car becomes a practical option.
A common iPod FM transmitter would
allow the player to be used in an automotive setting where no
auxiliary audio input is available.
In all, this project went together rather easily, no major
problems were encountered. Audio quality could likely be
improved by adding an external
USB sound card.
A remote control device such as the Wii Remote
(covered here)
would be a nice addition. The Eee PC features a large amount
of hardware capability in a tiny enclosure. It makes an
excellent platform for a music player and is capable of much more.
(
Log in to post comments)