Home Theater PC / Media Server Software

The software setup for my new HTPC started with a clean install of Ubuntu 9.10. This went without a hitch and it was time to install the various software packages that I use to get my system in working order.

Network Sharing

  • Samba (located in the System -> Administration menu after installation)

In the Ubuntu repository this is called the system-config-samba package. This is a great GUI tool for setting up shares on a Windows network and allows me to view all the content on my HTPC on my Windows machines. Just input your Workgroup, what you want to share and who is allowed to view it. This tool makes this process much easier than editing configuration files. One thing that confused me at first was setting up user access; make sure to include the computer name of the user in the “Windows Username” field. For example “joe” didn’t work, but “DESKTOP\joe” did.

Backup

  • Scheduled Tasks (located in the System Tools menu after installation)

Called gnome-schedule in the repository this utility allows me to run a backup script at a particular time. This is basically a GUI frontend for CRON and therefore much easier for a Linux novice like myself. I run a RSYNC script every night at 2AM which synchronizes the hard drive containing my media archive with another hard drive. I have found this a better backup solution than having a RAID array because it doesn’t rely on any controller hardware or software. If one of the drives fails I can just replace it and copy the files to the new one. If I want to put the hard drives in another machine I can just take them out and plug them in, no other configuration is necessary. I realize there are drawbacks to this system, but I prefer something that I understand and know how to fix as opposed to other solutions that I have tried that have failed and cannot be fixed (ie. the Drobo).

Media Playback

  • VLC – media player
  • Miro – RSS media aggregator/player
  • Boxee – media center based on XBMC with great web integration

This is the standard media grabbing and playback package I have been using for a while now. I use VLC whenever I’m in keyboard and mouse mode to play video and audio files. Miro isn’t perfect, but it’s better than any other media aggregator I have tried. Boxee is fantastic for local playback as well as web content and it can be controlled via remote control. In the past Boxee was somewhat finicky when it came to your audio and video settings, but I have found the new Beta version to be much more stable.

Bittorrent

  • Deluge – my favorite torrent client, has the right balance of features and simplicity

Remote Control

  • LIRC – configured this for my Windows Media Center remote and it integrated perfectly with XBMC & Boxee

Accessories

  • GNOME Do – an awesome tool much like Quicksilver on the Mac, only for the GNOME desktop
  • pyRenamer – a fantastic, simple tool for renaming lots of files quickly

This setup served me well on my Studio Hybrid HTPC and is performing equally well on my new machine. I frequently try different software packages, but these core programs are always present on my home theater box.

Home Theater PC / Media Server Hardware

My first HTPC consisted of some leftover parts I had laying around integrated into a Shuttle XPC barebones system. My replacement for that system was a Dell Studio Hybrid which performed well, was relatively quiet, and used little electricity. The main limitation for both of these machines were their reliance on external hard drives for storage expansion. I wanted to build something with more storage and upgrade flexibility.

The following were my goals for my HTPC/media server build:

  • Storage Expandability – plenty of internal 3.5″ slots so I can reuse my current content storage drives and add more as needed in the future
  • Adequate Onboard Video – although not as powerful as nVidia’s or ATI’s products, Intel’s integrated graphics are fine for home theater use when paired with a decent CPU, they also use less power, and their Linux compatibility is generally better
  • Low Power – this system will be on 24 hours a day so it needs to be as efficient as possible
  • Quiet – this will sit next to my TV so it has to be as quiet as possible

Parts

The Antec Mini P180 has 5 internal hard drive bays, plenty of ventilation (120mm & 200mm fans) and sound reducing panels. While this case is much larger than either of my previous HTPCs, I was more than willing to sacrifice space for a better all-around system. The Intel BOXDB43LD motherboard has decent onboard graphics (an upgrade over the Studio Hybrid’s X3100), plenty of SATA ports for storage expansion and a decent assortment of AV ports. The Celeron E3300 processor fits my requirements for a processor that is cheap, powerful enough, and uses relatively little electricity. In order to make this build as quiet as possible I decided to use a fanless CPU heatsink. This is possible because the thermal dissipation required by the Celeron E3300 (65W) is low, the heatsink I chose is fairly large, and it should get plenty of airflow from the two case fans even when they are run at their lowest setting. 

Assembly

The build for this machine was fairly straightforward. The case has enough room to creatively route cables behind the motherboard to minimize air blockage. I mounted the DVD burner on the bottom because the top slot’s depth is limited by the huge 200mm top fan. I also rotated the CPU’s heatsink from its normal orientation to take advantage of the top fan’s airflow.

In order to take advantage of the SPDIF connection on the motherboard I built myself a coaxial SPDIF bracket using an old PCI bracket, a female RCA jack, some single conductor shielded cable, and a 3 pin female header. All you have to do is wire the center of the RCA jack to the pin of the header that connects to the signal pin on the motherboard using the center conductor of the cable. Then connect the cable’s shield to the outside of the RCA jack and the ground pin of the motherboard header.

Input Devices

I have used this control setup for a while now and it works very well for me:

  • Logitech K400 Wireless Keyboard & Touchpad – I have used a lot of different combinations of mice and keyboards with my home theater setup and this one is the best. It takes up less space, has great range, and features a solid keyboard with a very responsive touchpad.
  • Logitech Harmony 610 Remote (set to emulate a Windows Media Center remote) – This isn’t the most advanced Harmony remote, but it also isn’t ridiculously expensive

Performance

Superficially this machine performs about the same as the Studio Hybrid. I noticed slightly less CPU utilization when playing videos. This could be attributed to the improved graphics processor, although the X4500 does not support CPU offloading of video decoding for any format other than MPEG2.

Here’s a performance comparison between this build (bold) and my Studio Hybrid (in parenthesis):

  • Boot Time – 0:55 (1:00)
  • CD Rip to FLAC time – 2:16 (3:41)
  • FLAC to MP3 Compression time – 1:16 (1:31)

Based on this info it seems that the Celeron E3300 is somewhat more powerful than the Core 2 Duo T5800 in the Studio Hybrid. Some of the performance difference can be attributed to the slower hard drive in the Studio Hybrid and the CD ripping performance was definitely affected by the much faster DVD drive in the new HTPC. However, the MP3 compression test relies heavily on CPU performance alone and shows that the Celeron E3300 is a solid performer.

Power Usage

  • Idle – 42W
  • Play 720p Video – 51W
  • Play 1080p Video – 55W
  • FLAC to MP3 Compression – 64W
  • Average over a week – 44.2W

Previously I determined that my Studio Hybrid used an average of 27W over the course of a week. This is 39% less than the 44.2W average used by my new HTPC, however, it doesn’t take into account the two external hard drives I had attached to the Studio Hybrid that are now mounted internally. When you add in the 5W used by each of the two hard drives, it results in only a 16.3% power savings by the Studio Hybrid over my new HTPC. That’s pretty good considering this new system is faster and uses desktop instead of laptop components.

Noise & Heat

I am very happy that all of my attempts to keep this machine as quiet as possible were very successful. In terms of absolute volume its probably about the same as the Studio Hybrid, however, the fans on this system are much lower pitched and therefore blend into the background noise of the room a lot more. Another advantage is that when under heavy load the fans don’t spin up & generate more noise like they did on the Studio Hybrid. The default cooling is more than enough for the low level of heat generated by this system. The CPU stays around 38C and the hard drives stay under 30C at all times.

Update – GPU Upgrade (April 2011)

I recently decided to upgrade the video capability of my Home Theater PCby installing an Asus EN210 video card which uses the nVidia GeForce 210 GPU. This is a great low power (it uses about 5W at idle) card that is especially ideal for home theater applications since it is fanless and consequently silent.

While this new video card hasn’t made a night and day change in video quality, it has smoothed out some of the rough edges presented by the onboard Intel graphics. Most notably I can now use the VDPAU option in Boxee, which utilizes the GPU to decode h.264 and MPEG2 video resulting in a lower CPU load as well as reduced power consumption (up to 10W) when playing video. I can also now use the deinterlacing option, which would previously push the CPU too hard and make videos lag. Flash video also seems to play more smoothly than before, although I am unsure if the version of Flash for Linux supports GPU offloading as it does on Windows.

As a bonus, for some reason Audacity is now much smoother than it used to be when scrubbing through an audio file.

Timelapse Using Arduino Intervalometer

I finally got around to using my Arduino Intervalometer to make a timelapse video. With a big snowstorm coming I decided to use it to my advantage. I set my camera in Aperture Priority mode at F5 and had the intervalometer trigger it every 5 minutes for 3 hours.

I used Adobe Premiere Elements and went with 1/8 of a second per frame since it makes the video fairly smooth while not blowing through the frames too fast. If I wanted to I could have reduced my timing interval by a third and made a video at the normal 24 frames per second for smoother video.

Custom Bokeh

Some time ago I saw this project, which shows how you can make your own custom bokeh effect simply by placing a cardboard sleeve over a DSLR’s lens. In the time off I had over the holidays I decided to try this technique myself. This is ridiculously simple to do and produces some pretty cool results.

All you need to create this effect is a lens with a wide enough aperature to create fairly shallow depth of field (the wider the better). I used my Canon 50mm F1.4 lens. For the sleeve I used some cardstock I had laying around, some tape, and a razor blade to cut out the tree shape.

The photos below show the difference between a picture taken with the cardboard sleeve on and off. I used a Christmas tree in the background to create the small points of light necessary for this effect. Due to the relatively low light necessary for this type of photography a tripod may also be necessary, although these photos were taken hand-held.

Remote Camera Shutter & Focus Controls

In the process of building two intervalometers (analog, Arduino powered), I learned how easy it is to construct a remote trigger for a DSLR’s focus and shutter controls. Both of those units featured manual controls for focusing and taking photos, but I wanted to build another separate project that would only feature that ability. This would allow the device to be much smaller and lighter.

For this build I used a 3″x2″x1″ RadioShack project box, a 3.5mm stereo socket, and two momentary pushbuttons. In accordance with how my Canon Rebel XSi works, I wired the shutter trigger (red pushbutton) to the tip of the socket and the focus trigger (black pushbutton) to the middle contact. Then I wired the other side of both switches to the shield of the socket. I am a big fan of using a socket for a project such as this since I can now use a cable of any length or configuration as long as it has a 3.5mm plug on the end that plugs into the box. This is an incredibly simple build that works great and should come in very handy for all my remote triggering needs.

Vacuum Tube Audio Amplifier – Update

 

Tube_Amp_Enclosure1Ever since I first completed this project I have wanted to build an enclosure for it. I wanted something that would decrease the risk of electric shock while also showing off the cool aspect of the vacuum tubes, ie. their characteristic glow.

In order to keep it simple I bought a sheet of aluminum that had a pattern of pre-punched holes in it at the hardware store. This allows the tubes to be ventilated while still being visible. I then made a template out of cardboard to determine what shape needed to be cut from the sheet of aluminum that could then be bent into a proper enclosure. I made sure to leave tabs on the sides so that I could secure adjacent sides of the box to one another with sheet metal screws. I then relocated the power switch to the top of the case and attached the enclosure to the wood base with screws. Overall I am fairly satisfied with this enclosure. It’s not the perfect case for a project like this since you have to remove the box to change burnt out tubes, but it is good enough for my purposes.

Tube_Amp_Enc23 Tube_Amp_Enc21About two months ago I made an enclosure for my vacuum tube amplifier. While a decent first effort, I became more frustrated with it as time went on. The poor nature of my design prevented me from accessing the tubes themselves as well as the speaker wire connection points on the main board. Also, esthetically, it blocked the view of the vacuum tubes too much.

Tube_Amp_Enc22Instead of starting over from scratch, I decided to try to reuse the existing enclosure. In order to solve my complaints with the previous design I came to the conclusion that what the amplifier really needed was a circuit board cover, not a full enclosure. To accomplish this, I shortened the enclosure by cutting off the back couple of inches of aluminum. This allowed access to the speaker wire terminals. Next I removed a couple more inches from the bottom, shortening the overall height of the enclosure. Then I cut out a rectangle in the middle of the top to allow the tubes to stick through. Finally I re-attached the case to the base board using six screws instead of four, the two additional screws in the front greatly stiffened the whole unit.

I am much more pleased with my second attempt at enclosing my vacuum tube amplifier. It is much more functional, as well as better looking.

GIMP HDR Photos

A while back I ran across this Instructable, which details how to make High Dynamic Range photos using the GIMP photo editing program.

The steps are as follows:

  • Open the base image as the Background for the composite image
  • Dark Layer
    • Open the dark stock image
    • Copy & paste it into a new layer in the composite image
    • Rename the layer Dark
    • Desaturate the original dark stock image
    • Adjust the levels of the dark stock image
    • Create a layer mask for the Dark layer
    • Copy the desaturated dark stock image
    • Paste it into the Dark layer’s mask and anchor
  • Light Layer
    • Open the light stock image
    • Copy & paste it into a new layer in the composite image
    • Rename the layer Light
    • Desaturate the original light stock image
    • Invert the colors of the desaturated light stock image
    • Adjust the levels of the light stock image
    • Create a layer mask for the Light layer
    • Copy the desaturated & inverted light stock image
    • Paste it into the Light layer’s mask and anchor
  • Save the finished composite image
Base
Base
Dark
Dark
Light
Light
HDR
HDR

 

Base
Base
Dark
Dark
Light
Light
HDR
HDR

This is a fun technique to play around with. Some photos, if taken properly in the right conditions, can gain a whole new dimension when they get a little HDR boost.

Hard Drive Speakers

I first saw an article about hard drive speakers some time ago, but never thought about building my own until I saw this interesting project and decided to take a closer look. When I recently came into a pair of old hard drives, it was the perfect time to build my own set.

This is a very easy project to undertake. All that is required is to disassemble the hard drive (you will need some Torx screwdrivers) and solder two wires to the appropriate contacts on the hard drive’s read head. These wires are then attached to the speaker outputs of your amplifier (I used my vacuum tube amplifier to drive the speakers).

After playing with the finished speakers I found that if I restricted the read head’s movement by trapping the speaker wires between the two magnets at the base of the head’s armature (as shown) the speakers would produce much cleaner audio. By restricting the read head’s movement I prevent it from vibrating against the platters which can cause annoying scratching and rattling sounds. The downside of this is that you can no longer see the head’s armature move with the music, which is a pretty cool effect. Regardless of how you construct your own set, hard drive speakers sound best with music that contains a lot of treble. Check out the video below to hear how my speakers sound playing some Bach.

Arduino Intervalometer for Time-lapse Photography

Arduino-Intervalometer3Arduino-Intervalometer2Last fall when I built my first intervalometer and then used it for some time-lapse photography, the limitations of such a design became apparent. With an analog timer the circuit is limited by component values to function in a fixed way. The timing ranges cannot be changed without rebuilding the circuit and there is no way to be truly precise in your timing. A few months ago I came across this design for an Arduino intervalometer which is very basic and requires reprogramming for any timing changes. After some planning I decided to take the best features of my original intervalometer and combine it with an Arduino’s flexibility to make a much more versatile intervalometer.

Key features to keep from the original were:

  • Camera interface isolation
  • Timing range options
  • Battery or AC adapter power options
  • Camera connection flexibility
  • Manual controls

Additional features that I wanted to add were the following:

  • Power supply flexibility
  • LCD readout
  • Start/Stop the timing cycle

Arduino-Intervalometer1Arduino-Intervalometer-SchematicIn order to maintain what worked best in the original design I simply copied it directly over to the new version. I used the same relay isolation for shutter triggering, as well as hard-wired pushbuttons for manual focus and shutter control. I also used the same 3.5mm jack to connect to the camera as the original. For power I decided to use a coaxial power jack as I had previously but this time I did not place a battery inside the enclosure. Instead, I made an adapter cable with an N style coaxial DC power plug on one end and a USB plug on the other end. With this cable I can power my new intervalometer from any 5V USB power source (PCs, wall adapters, MintyBoost, etc). In order to keep this build as simple and inexpensive as possible I decided to use the Arduino Pro and a basic LCD for a total cost of $36. The Arduino Pro is the same as a standard Arduino, except it uses all surface-mount components and has no USB interface. This keeps the cost down and reduces the board size. The LCD was simple to wire requiring only +5V, ground, 6 data lines and a dimmer potentiometer input. The final features were all implemented in the Arduino code.

I ran into a few problems while developing the code for this project:

  • How to adjust the timing interval value
  • How to start & stop the timing cycle
  • How to switch timing ranges

For adjusting the timing interval I had originally planned to use pushbuttons, however, after playing with the idea I decided against it. I found that it was much quicker and more user friendly to use a potentiometer as a virtual selector switch. In order to do this I used the map function, to divide up the potentiometer’s analog input values into the specified number of steps.

Starting and stopping the timing cycle was not as easy as it first appeared because the simplest way to wait a specific amount of time between events is to use the delay function. The problem with this is that while the program is delaying for the set amount of time, no other commands are being run and inputs are not recognized. To get around this I used a technique I found on the Arduino website which blinks an LED without using the delay function. Instead it sets a preset interval and then checks how much time has past using the millis function until enough time has gone by to trigger the desired event. This allows the processor to keep scanning the code while the timing cycle is taking place. Now if I want to cancel the timing cycle I can do so without resetting the Arduino.

To switch timing ranges I used this clever piece of code that allows you to use one button for two functions. When the button is pressed the Arduino keeps track of how long it was pressed. For short presses it performs one function and for longer presses it does another. I used this method to implement both timing range switching as well as toggling between set mode and timing mode as shown in the video below.

After getting all of my code together I assembled my new intervalometer in a 6″X4″X2″ project box from Radioshack. This is somewhat oversized for these purposes, but it’s cheap and readily available. Overall I am very pleased with this project. The responsiveness of the interface is very good and it triggers my camera shutter perfectly. The two timing ranges I preset in the unit are 5-60 seconds in 5 second steps and 30 seconds to 10 minutes in 30 second steps. These should cover the most common intervals I will use, and I can change them at any time if I have to. This is by far the most complicated Arduino coding that I have done and it was a great learning experience. Check out the video below for a demonstration of the device.

 

Note: the LCD requires the updated LiquidCrystal Library, checkout this tutorial if you are using version 0016 or earlier of the Arduino software.

Carolina Windom Antenna

 

WindomI have wanted to build a multi-band wire antenna for some time now and this past Field Day I had an opportunity to use a very good one. The Carolina Windom is essentially an off-center fed dipole (OCFD) that uses a portion of its feed line as a vertical radiator. I used one to make about a 100 PSK31 contacts on 20, 40, and 80 meters during Field Day.

The key to an OCFD’s operation is the fact that there is a point on the antenna where the input impedance is approximately 200 Ohms at multiple frequencies. When fed with a 4:1 balun this provides a reasonable match to the standard 50 Ohm load that my coaxial cable and radio like to see. Even if the antenna doesn’t provide a perfect 1:1 SWR over all bands, it keeps it low enough that a simple antenna tuner can compensate for any mismatch. The problem with OCFDs is that since the two legs of the antenna are of different lengths, the currents in each leg are out of phase. This means that in order to avoid feed line radiation, you should use a 4:1 current balun to compensate for this current imbalance. These are not readily available for sale, but can be constructed from kits. Here’s a great article which describes how to wind your own current balun using this kit from Amidon. You can also buy an equivalent balun from DX Engineering or Balun Designs.

The Carolina Windom, however, wants the feed line to radiate (at least a portion of it) in order to gain the vertical radiation and some performance. To achieve this the Windom uses a 4:1 voltage balun, which matches the antenna’s leg voltages and then uses a separate 1:1 choke balun to isolate the feed line from the vertical radiator. Both of these baluns are readily available and relatively inexpensive.

The first step in constructing my Carolina Windom was to cut the antenna wire to length for an 80 meter version. I used these measurements from Radioworks, who sell pre-assembled Windoms, but other sites also show measurements and formulas for cutting a Windom for any band. My Windom has the same 133ft overall length of a traditional dipole, but is divided into 50ft and 83ft legs instead of equal lengths. Since this antenna will be used for temporary setups such as Field Day and the PA QSO Party, I didn’t make it out of heavy duty wire, instead I used insulated #14 stranded copper wire. This wire is a good compromise between strength and weight. Construction of the Windom is very straightforward; simply solder one end of each wire to opposite sides of the 4:1 balun and attach insulators to the other ends. For the 4:1 voltage balun I used the W2AU 4:1 and for the 1:1 choke balun I used the W2DU inline-HF, both of which are available from Unadilla. These are well constructed commercial baluns that work well for these purposes. In the picture I do not have the choke balun connected since I did not have it at the time, so in its place I created a poor man’s choke balun by coiling about 10 turns of my RG-58 feed line.

In order to test the antenna I set up my new fiberglass mast to about 25 feet with the Windom on top. While this isn’t an ideal height, it was fine for a test. I connected the feed line to my radio and tested the SWR. I was able to get a match using my Icom IC-703’s internal tuner on all of the HF bands. Since the 703’s internal tuner can only deal with SWRs of less than 3:1, this means the antenna is performing as expected, providing a decent match to the radio on all the HF bands. For a further test I tuned around the 20 meter band. Hearing a special event station in Maine, I gave him a call and he came right back to me. Not a bad first test, getting into Maine with 10 watts. This is exactly what I was hoping for, a solid performing multi-band antenna that I can use for temporary operations. Wire antennas are very simple and cheap to build, and this one is a great project for any type of station.

Windom2Here’s a picture of my finished antenna rolled up for storage. In between the 4:1 balun and the Unadilla W2DU inline-HF 1:1 choke balun is 22 feet of RG-8X coax that functions as the vertical radiating section. You could use any type of 50 Ohm coax, but I had some laying around from other projects and it is a good compromise between size/weight and signal loss for a portable antenna such as this.