Sunday, November 17, 2013

Home Theater PC build


At present there is a dizzying array of options for consuming media in the home. You have to decide what you want, where and how you are going to get it, how and if you are going to store it, if you want to transfer it, how much you are willing to spend, and how you are going to deliver it to your senses. I'll say it again... dizzying.

I recently built a home theater PC (HTPC) to address some of this. A HTPC can be any computing device capable of video and audio playback.They are built primarily to function as media servers but can be much more than that with the proper hardware and software. They can also be built to function as video recording devices similar to the DVR's that you may currently be using. Before the HTPC, I was renting a DVR from Verizon FIOS and had it hooked up to a flat screen monitor and stereo receiver in the living room.  This wasn't a bad setup but it didn't have all the functions I wanted, most notably a data backup solution, more than 2 television tuners, and additional DVR storage. I could have rented another DVR, bought external storage for it and purchased a network attached storage device for my data backup requirements but that seemed a bit kludgy to me so I went with a more elegant system. I'll outline my computer hardware and software below and talk about its capabilities to address what I wanted my living room media experience to be.

Computer Hardware
Case: nMEDIAPC 5000B
MB: ASRock H77M
uP: Intel i3-3225
RAM: G.SKILL Ripjaws DDR3 1600 (8GB)
HDD: WD WD10EZEX (1TB) x2
Optical Drive: DVD ROM

Peripherals
Cablecard Tuner: Silicon Dust HDHR3-CC
Network: WD My Net Gigabit Switch
IR Remote: Logitech Harmony 550
IR Receiver: HP OVU400102/71
Keyboard/Trackpad: Logitech K400

Software
Windows 7 home premium 64bit (OEM) with Media Center
Shareport4w (airplay support)
Remote Potato (remote scheduling/viewing)
My Channel Logos (dressing up Media Center)

Many hours were spent researching the hardware that would eventually make up the guts of my rec room rig. A careful balancing act ensued between cost, performance, availability, and compatibility.  I wasn't on a budget but I also didn't want to break the bank. My goal for cost was to come in at or near what a decent network attached storage solution would run me. A difficult undertaking for sure but I already had a power supply, dvd drive, and hard disk storage so I was slightly ahead of the game. Various A/V forums around and about the internet were a huge help here. And to my delight, the newegg.com comment section for my targeted hardware gave great insight into what said hardware was actually capable of.

I heard raves about what Intel was doing with their integrated HD 4000 graphics.  I picked up the Intel i3-3225 processor because it was pretty much the cheapest Ivy Bridge processor with that particular tech on chip. The power savings with Ivy Bridge is paramount when you intend on leaving the computer running all day and night. At the end of the day, the main objective for the hardware setup is to play 1080 (full HD) video seamlessly and this is critical because even the slightest glitch would ruin the viewing experience. The i3 and HD 4000 combo did just that and surprised me with its performance. HD video playback seamed like an afterthought and it handled GTR Evolution (very realistic racing game) with ease. I'll explain the reason for installing that game in an upcoming post.  Another plus for the HD4000 is its HDCP compliance. Nothing new here since Microsoft's protected video path standard had been around for a while but it's nice to hear it reported that the hardware was drama free. I made sure the motherboard I picked out played ball as well.

Now that my HTPC was up to the task of serving up all the multimedia I could handle, additional hardware was needed to actually acquire the data I wanted. A good amount of video is available from various streaming sites but sadly most of the programming I enjoy still comes from the good ol cable companies. And yes, I'm including FIOS in the generalization. My distaste for the current availability and cost of content is well known but that's for another post. Enter the HDHomeRun Prime from Silicon Dust. This bad boy houses a cable card and serves up three tuners via your wired Ethernet network. This external network based solution is nice because any computer on the network has the ability to grab a tuner and you don't have to worry about a PCI based card fitting into your computer chassis. This is a problem with the Ceton InfiniTV 4 and some less expensive HTPC cases. The cable card is where you start to save money. It's about an eighth of the rental fee of a single box and less than a tenth the cost of a dual cable box system. We have three monitors in the house which amounts to over $40 a month saved in rental fees. There is a downside to cable cards though. Some cable companies have less than stellar support for the cards and barely willing to work with you on figuring out any problems that may arise. Luckily, setting up my card under FIOS was a breeze and it has worked flawlessly ever since. I was originally going to forego an optical drive but had to put one in to install Windows so I figured I'd keep it in there. Maybe I'll upgrade to a Blueray drive some day but for now I'll stick with the trusty DVD. We don't watch many movies from solid media anyway.

My  home theater setup sits across the room in my media cabinet so any wired peripheral is pretty much out of the question. Heck, I run a wireless keyboard and mouse on my office pc...the set in the picture above. I used them for testing. I already had a Logitech Harmony 550 remote control so I paired that up with a USB IR receiver for Media Center control. I rounded out the human interface with a wireless keyboard/trackpad combo which doesn't get much use but is very handy when it does.

The software is where the real magic happens. At first, I had my doubts about Widows 7 media center but had to give it a try because it's the only game in town that decodes premium content like HBO and Cinemax. If you don't need those channels, you could always go with XBMC, OpenELEC, MediaPortal or PLEX. I wish HBO would offer ala carte service so I could have gone with XBMC running on a Linux disto, which would have saved me some cash, but alas I'll have to get my Game of Thrones the old fashion way. Another plus of using Media Center is its ability to use XBOX 360's as extenders. The 360 basically operates as a remote desktop to Media Center which solves that pesky "write once flag" problem that premium channels put on their shows. The write once flag stops hardware, other than that which originally recorded the show, from accessing the data. Two add-ons I installed immediately were My Channel Logos and Netflix.  My Channel Logos dresses up the TV guide data with nice channel icons and adds a couple guide features that makes it a little more user friendly. The Netflix integration is pretty darn good and appears as if originally included with Media Center. I am soooo hooked on streaming Breaking Bad now. In addition to live and recorded TV, Media Center also serves up your DVD's, ripped movies, videos, music and pictures.

Outside of Media Center, I've added a couple of programs that take this rig to the next level. I mainly use Remote Potato to schedule my DVR recordings when away from home but it can also stream recorded shows over the internet. You won't get 1080p but VGA on your wifi attached netbook in a hotel room is pretty good. I also loaded up Shareport4W which enables audio only airplay connectivity. It's nice not having to run a separate piece of equipment to get audio streaming from my iPhone and iPad. Airplay makes playing a quick song or a few minutes of Pandora really quick and convenient.

Now that the media portion of my HTPC is covered, it's time to address storage and backup. At the moment, I have Windows running a weekly backup of all my library directories. That pretty much covers all the pictures, music, movies, recorded TV and videos stored on the PC. This is bare minimum and does a nice job covering my rear in case one of the disks fails but it's not ideal by any means. I plan to purchase additional storage and run RAID 0 on the main disk while creating a full system image to store on the secondary drive. That should cover me against failure and provide an easy and fast way of restoring the PC in case anything major happens.

I've had a really fun time researching and building my HTPC. And the fun continues because there is always something to add or tweak to make the system more feature rich. Not only does it serve as our portal to live or streaming media content, it has a seemingly infinite amount of storage space for recording said media. It also serves as the central location for all our music and pictures which is helpful because my wife and I previously had it strewn about to more than 6 devices. That was a source of much frustration. My favorite part is the flexibility that running a PC in the living room provides. We can do things like picture slideshows, video conferencing, games, TV, streaming music from Pandora or Songza, surfing the web, writing this blog, youtube, watching movies, email, and much more right on the big screen. There are a few minor downsides though. With a cable card, you lose the ability to do "on demand" programming through your cable provider. This isn't a huge deal because HBO and the like have all their stuff online and there are many other sources for online movies like Netflix, Redbox, iTunes, Amazon streamin, etc. Another downside is the upfront cost. Again, not bad considering what you save on rental fees. We will pocket about $500 a year which was close to what the HTPC cost so that's our break even point. After that, it's gravy. Building a HTPC isn't for everyone but if you like to tinker with computers or know me, you should give it a try.

Monday, March 11, 2013

The Christmas spirit is strong with these two


I've always wanted to make a Jedi costume. There, I've said it. Can't fly your geek flag any higher than that. I don't belong to any sort of Star Wars fandom guild, nor do I care to join one, so that pretty much narrows down the opportunity to wear said costume to Halloween. Problem is, I usually wait too long and any involved costume idea is relegated to the following year which then repeats itself unto infinity.  This year was no different but at least I was motivated enough to start researching the idea a little. At the time, I was also brainstorming Christmas card and Santa suit bar crawl ideas. That's when a vision of the Santa Jedi hit me. Take the getup Obi Wan wears in the prequels, color it red and that's pretty much what the typical Santa wears minus a little fuzziness. So it was early November and the Santa Suit Bar Crawl was on December 1st. The race was on. Not only was I going to made a Santa Jedi costume for myself, I roped my wife into the idea as well. Her desire to make me happy apparently has no bounds. BTW, The picture above was used in our Christmas card.

Your basic Obi Wan Jedi get-up has 6 parts.  This doesn't include his light saber which I will discuss later.
  • Knee high boots
  • Thick Utility Belt and Obi combo
  • Baggy Pants
  • Under Tunic
  • Outer Tunic
  • Tabbards
I sourced the knee high boots and baggy red pants from Amazon. They were surprisingly high in quality for the money. The boots came with a fabric shin guard that was held on by three straps.  I liked the way the extra piece looked but not the way it was loosely attached and allowed to shift around. I used black fabric tacks to secure it in place  and hot glue on the inside of the boot to make sure the tacks didn't go anywhere.  My wife already had some fancy "on the town" boots so that worked out nicely.

The faux leather belts were not going to be as easy to acquire. I had to make my own but got some great tips from this tutorial (warning: PDF link). You can get a great idea of what I did from the picture below. An essential tool here was the leather punch kit I picked up from Amazon for about 5 bucks. You're basically hammering a large hollow nail through your desired material. Definitely took a bit of practice on some scrap but once I got the hang of it, smooth sailing. Much of a typical Jedi outfit is borrowed from traditional Samurai attire so with this in mind, the belt is often worn over an Obi or formal waist sash. This was relatively  easy to make from a long rectangular swath of fabric.



The Jedi tunic is basically a shortened bathrobe so I bought a bathrobe pattern, left off the belt loops and added a little trim to the sleeves and hem. I wanted my wife and I to have slightly differing costumes so I gave her red trim around the collar and lengthened her robe to resemble more of a dress than tunic. I also left off the tabbards to give it a more feminine look.


Ah the lightsaber, an essential part of any good Jedi costume. I already had a rather inexpensive Darth Vader replica hilt with telescoping red saber and was actually playing with it when I got the whole costume idea. Like I said, it was kinda cheep so a little modification was necessary if it was going to be ready for prime time. The main problem was brightness. The stock incandescent bulb and AA batteries weren't cutting it.  I needed something with a little more kick. I completely disassembled the saber and gutted the housing.  I replaced the battery pack with a 900 mA hour lithium polymer battery and the bulb with a 3 watt white LED. I easily upped the perceived brightness by about tenfold. It may have been slightly overkill considering the large slug of  aluminum necessary to help dissipate the heat. I also painted the inside of the hilt white to help channel the light into the saber portion. This new excess of light was also a problem for the fogged plastic window about half the way up the hilt. Too much light was shining through the window so I made a custom PCB that blocks the light and replaces it with six small red LED's that scan back and forth.  Definitely adds some cool factor.  In a mostly dark room, these bright red fully extended sabers really made the costumes look legit.

The only thing really missing from this ensemble is the full length jedi robe. With a little more effort I could have pulled something together but ultimately decided against it  for a couple of reasons. It probably would have been to cumbersome in crowded bars and the rest of the costume looked so good, I didn't want to cover it up. That and the cost. Man, decent fabric can get expensive!

Thursday, December 20, 2012

Sometimes you feel like a nut.



This Halloween costume idea wasn't an original creation. The concept came from internet research but I executed the design and construction. The cutting and sewing was pretty straight forward, however I do have a couple tips that seem obvious after the fact. Firstly, where men are usually roundest around the chest and stomach, women are typically laid out in different proportions.  Keep this in mind whilst essentially making a fabric tube.  Secondly, my initial design called out for cutting the small "Peter Paul" lettering out of fabric.  If you want to keep your sanity, do not attempt such a thing.  I made a stencil and used white fabric paint. If not pressed for time, I probably would have laser cut some 1/32" acrylic for the stencil but exacto-ing out some card stock did the trick.  Here is a bonus tip... hot glue! I tried attaching the larger brown letters with spray adhesive but that basically turned into really weak velcro.  Hot glue is your friend. If you don't already have a dispenser, I'd highly recommend picking one up. I personally like the 1/4" sticks the best but I do more fine touch gluing so that makes sense for me.

I get a kick out of putting together coupley type costumes. The trick is finding something that has most of its impact together but still works well on its own. My favorite part of these costumes was the public discourse they inspired. Almost everyone we passed by had a very strong opinion on what candy they liked more. I brought a bag of Almond Joys with me just in case they didn't see things my way ;)

Thursday, September 06, 2012

Electropong is going to change everything


I've been playing beer pong for the better part of 20 years. During that time, the tried and true setup and rules of the game really haven't changed that much. Why mess with a classic. Sure there have been many variations on the table used, certain house rules that one needs to entertain, and everyone has there own style of toss; but the core essence of the game has stood the test of time. I'm looking to shake that up a bit.  Introducing Electropong!

Feel like playing beer pong during the winter months but your brew freezes before you get a chance to throw. Wanna play inside but your significant other will raise hell if you get beer on the new carpet. Tired of wondering what germs you're passing around drinking out of the same cups everyone else is. Electropong may be just the game you're looking for.

Alright, I'm not here to give you the sales pitch, I just thought it would be neat to build an electronic beer pong game. It's very much like the electronic darts game machine you might find at a bar. Two teams play on one unit and hit the "swap team" button to cycle their turn. The color of the cups and the LED display keep track of which team is currently throwing. Each of the six cups has a RGB LED embedded inside and a hole at the bottom so a 40mm ping pong ball can pass through it. Under the cup base, the enclosure houses six IR interrupters, a 9V AC/DC power supply, a custom LED driver board (recycled from an old project) and a custom PCB that controls everything. In addition, there are three arcade style buttons on the front face that also have RGB LED's lighting them up. The display in the back is an off the shelf Betabrite scrolling LED matrix and above that are two mini beacons I got from Woot! The control board has a PIC18F6622 micro-controller that reads in all the IR interrupter inputs, talks to the LED matrix display, does PWM for the LED drivers, toggles the beacons and keeps track of the game play. I think that pretty much sums up the hardware section.

The real magic happens in the software. You can play games on Electropong that wouldn't be possible with the traditional setup. For instance, a popular game with my guests has been "king of the hill" where teams go head to head on the same board and try to be the first to light up three cups of their color. This game tends to go faster than regular pong and is a good fit for people who want to play a quick game and get back to the party. I'd still like to add one or two more games so if anyone has an idea, please leave a comment.

The construction of this game definitely wasn't without it's challenges. An un-tethered Solo Cup with about two ounces of beer in it sitting on a wet surface has some mechanical dampening properties that are difficult to simulate. At first, the cups on Electropong were rigidly fastened to the base with four screws. This caused the ping pong balls thrown at them to ricochet off dramatically. Turns out, the necessary shock absorption system was built right into the cups themselves. About a quarter inch of the outside diameter of the cup base sits squarely on the ground while the rest of the base is raised about an eighth inch. The screws attaching the cups were pressing this raised portion down so backing the screws out a little allowed the cups freedom to pivot a bit. However, in doing so, the imprecise holes I made in the cups allowed too much movement and they ended up not lining up correctly.  I fixed this by laser cutting a donut shaped spacer that fits in between the screw heads and the bottom of the cup. This locked the cup in place and still allowed it to pivot, effectively dampening the force of the ball against the cup.  The second significant challenge was reigning in the size of the unit, especially the height.  If the cups were offset too much from the table top, they would look awkward and the game-play would suffer. However, I still needed to concoct a ball return system. I ended up cutting away some of the base and putting the ball return ramp in its place. Had to go back to my junior high school trig skills to figure out the angles. I was very proud of myself.

Purists will object to certain aspects of the game that have been taken away like the rush of having to drink from a selected cup but I think I have made up for that with the additional games and the spectacle of lights. I don't want to compete with the traditional game, I want to add to it.  But hey, my party guests really seem to like it. I guess that's what matters most.

Oh, one more thing. There is a reason the cups are black. Aside from the obvious styling advantage, I needed to go with black so the light from the LED wouldn't bleed out through the cup. I initially wanted red cups but any hint of red light would make them glow like a lantern. And I think black makes the game look cooler, what do you think?

Monday, June 04, 2012

Networked Betabrite and a better party music solution

Home-brew Ethernet to RS-232 converter

For a recent party, I was looking for a better solution to my current audio setup and happened across a reconditioned Apple Airport Express on the web. While it has many features, I primarily wanted it for streaming music via iTunes on the ol laptop to my stereo receiver over the home network. With WiFi enabled I can locate the computer anywhere in the house I want. And I can control the playlist with the remote app on my iPhone. Got it, hooked it up, and everything worked great... but something was missing.

For the same party, I was planning to set up my Betabrite scrolling LED sign to display a few generic messages such as the contents of the kegerator and a couple birthday wishes.  I quickly realized how boring the repetition would be.  You really must have continual content updates to keep the public's attention. Hmmm, maybe I should heed my own advice with this blog ;) I've seen other people scroll twitter updates and directed text messages to their betabrites but I don't currently have their programming chops so I opted to gobble up some local data.

I thought I would be neat to combo the new sound system with the display and scroll the currently playing song title and artist on the betabrite.  I had two weeks before the party, plenty of time right? There were challenges.

Challenge number one, hardware. In a nutshell, I needed an Ethernet to serial (RS-232) converter so I could connect the Betabrite directly to my router.  You can buy a quality unit for around a hundred dollars but a quick trip to the spare parts bin yielded a bounty that would get me most of the way there. The heavy lifting is done with a Lantronix XPORT Embedded Ethernet Device Server. I'm a big fan of these little guys.  It has many features but for this project I only utilized its UART (serial) output. On the PC side, you can use vendor provided software to create a virtual com port eliminating the need to fool with setting up a socket connection. The XPORT outputs TTL level signals but the betabrite sign requires +/-15V (RS-232) so I needed to gin up a proto board with a level shifter on it. As luck would have it, I made such a board for a previous project.  After tossing in a 3.3V linear regulator to power the XPORT, the hardware was complete.
 
Challenge number two, software. This was by no means trivial, I dabble in the medium at best. From a past project I already had a little C++ code that talks to the serial port so I decided to start there. The next logical steps were to gather up relevant information from iTunes, format said info, and write it out to the Betabrite. On a Mac, interacting with iTunes is native but Windows plays with iTunes a little differently. It uses the COM object interface to handle the data exchange. Thank goodness for Google and online example code.  The only real trick was setting up the Visual C++ dependencies correctly and getting all the various updates and whatnot working.  Looking through forums for semi-useful and somewhat relevant information is tedious. I'll provide the code and environment setup instructions upon request.  Writing to the Betabrite also proved to be a bit tricky. I had the programming guide along with some sample scripts but I still had to snoop the serial data from the vendor software to figure out the ins and outs of the protocol. You can never underestimate the importance of a good technical writer.

Having the Betabrite display update with the currently playing song turned out to be a hit with the party goers.  I'll have to make it permanent fixture for future gatherings. Maybe I can even get some tweets up there next time.


Tuesday, March 06, 2012

You say potato, I say evil



I implored onto my friend, and that day's frymaster, that there was evil in the bag of smiley face potatoes he was preparing to dump into the cauldron of boiling hot peanut oil. "Nonsense" he exhausted as droplets of the oil nipped at his un-gloved hand. He would be sorry...

Tuesday, December 20, 2011

Learning to surf in Barbados


Surfing has always been an activity I've wanted to try in my adult life.  A major stumbling block in this endeavor, up to now, has been opportunity.  Unlike skiing, surfing isn't something the novice generally designs a vacation around.  At least I've never thought about it.  I live reasonably close to the Delaware and Maryland Beaches but body surfing and sun soaking has always been the name of the game out there. That and I have yet to witness people getting any sort of instruction on the beach. Trust me, a good lesson is key.

Deb and I took a trip out to Barbados recently to visit a friend and stumbled upon a little free time during our last day there. Actually we had the whole day to ourselves and I pushed for surfing lessons pretty hard.  My wife was quite nervous about the idea partly because she didn't know whether she could do it or not. I'll give you one guess who the better surfer turned out to be.  It must be because she's shorter. By the way, this video is pretty much all you need to know about Barbados.  Remember what I told you about a good lesson. Well, the instructor is a big part of that. I can't imagine a better guide than Jonathan (Jona) from Barry's Surf Barbados Surf School.  He had us up on the board almost immediately.  It was apparent after watching other instructors on the beach that we lucked out.



I picked this video because I think it best captures the proper technique to successfully stand up on a long board.  That and it's the only video I had. The hardest part for me was remembering to look up toward the beach.  Your tendency is the check out your feet placement after standing up but that will almost assuredly put you in the ocean. I'm a little wobbly there at the end but to my defense, it was my third time out that day and the sea was rough my friends. Well, rough for a land lover. Definitely something everyone should try at least once.