Sunday, December 15, 2013

Party Sim Rig


I've always liked how competitive the guests on Top Gear get while running their lap. It's obviously the show's signature segment and has to play a part in getting stars to appear on the program. For those unfamiliar with the show, it mainly showcases high end vehicles and various producer crafted adventures for the three hosts. It is also part talk show and ends each interview with a discussion about how the guest thinks he or she performed during a lap around the Top Gear test track in a reasonably priced car. It's all in good fun and I thought I could capture a little of that during a party at my place a few months back.

Ever since my friend Mark gave me a gaming wheel a couple years ago I've been thinking about building some sort of cockpit to enhance my driving game experience. At the time, I didn't have the room or the time so it got put on the back burner... until now. I was recently brainstorming for fun party activities while watching an episode of Top Gear when I realized I could build a driving rig and have guests run a sim lap to mimic the experience. I'd also made a top ten board to introduce a little competition into the mix. There are relatively inexpensive rigs already on the market but they are still at least a couple hundred and I thought I could do better and on the cheap. And what fun is buying when you can make it yourself.

I was toying around with a few ideas but decided to concentrate on finding a good seat and build from there. To my surprise, ebay wasn't much help here. There were some acceptable options around the $150 mark but I designated those as a fallback option. What I really wanted was the stock seat out of a junked newer model corvette or f-body. Surely the salvage yards would yield something I could work with. I was incorrect in assuming I could find an inexpensive option. And guess what, the junk yard managers I contacted weren't the most helpful people in the world. This was looking like a dead end until I visited a Pick-and-Pull in Virginia Beach during a trip to the in-laws. After about an hour of ripped leather and stained cloth seats, a ray of light shone from the sky upon a gnarled up baby blue WRX tucked away at the far corner of the lot. It had graphics on the side and after market ground effects. Oh, this had to have a good seat for me. The drivers side seat was beaten into submission but the passenger side throne was definitely something I could save. I little sun and water damage wasn't going to stop me. I unbolted it from its rusting grave and carried it back in 95° heat the quarter mile to the sales office. Sweating and tired, I argued the sales guy down to 50 bucks. Not a great deal but I wasn't going to leave the seat there and he knew it. During the couple hours it took to clean the seat fabric and rebuild the horizontal sliding mechanism, I frequently questioned the wisdom of buying a used seat. However, after finishing, I was glad to have saved the old lounger and given it a new lease on life.

The chassis took a bit of time to sort out. I'm not sure why I instantly start thinking of PVC pipe when a project like this comes up. I guess it's easy to transport, relatively light weight and somewhat straight forward to cut but looks unrefined and can have sturdiness issues if done incorrectly. I ended up going with MDF, the old standby. I've got the tools that make shaping it effortless but getting a 4'x8' sheet home is daunting to say the least considering I don't know anyone with a pickup truck. I fixed that issue with a slight redesign. I made the rear side panels by halving an 8' x 11" MDF strip and I cut the front panels out of a 4'x4' board which is much easier to negotiate from the car into my house. The frame that holds everything together is fashioned out of 2x4's. What do you think of the paint job? All it took was a couple spray cans of red and white along with a little brushed on black gloss. Amazing what you can do with some painters tape and a lot of patience. I attached the panels to the frame with a bunch of lag bolts, extra large washers and nuts. The wheel and pedal decks added a bunch of rigidity to the structure so cross members weren't necessary. The whole thing actually breaks down rather easily and can be stored in a minimal space. That was something I carefully considered during the design.

Picking the right game was oddly the hardest part of this project. The wheel I had only worked with PC and Playstation 2/3. Seeing as though I don't own a Playstation of any kind, I started researching PC driving games with emphasis on finding one that included the Top Gear test track. I underestimated the difficulty in finding a PC driving game that would suit my needs.  I required something with minimal setup, the ability to race and re-race continually, easy enough for the casual gamer, hard enough to differentiate skill levels, and a menu screen that shows lap times when the race is finished. I also wanted a format where the racer was alone on the track.... again, like Top Gear. Turns out, this wasn't meant to be in the world of PC racing. Most games revolve around free world racing like the Need for Speed series or are geared towards career mode game play like GTR Evolution or rFactor. Oh and BTW, my HTPC with integrated video ran GTR Evolution like a champ. The video settings weren't nearly maxed out but it looked great in 1080 resolution. I decided to broaden my search  and after a bit of digging around, Forza 4 for Xbox 360 kept popping up. I already owned a console and the game cost just 16 dollars online so giving it a once over was a no-brainer. Forza almost had everything I wanted. Is it so hard to pick a car, pick a track, go for a quick spin and check your times? Apparently so. You can get out on the track but you can't choose a pre-determined end lap unless you race with other cars. Figuring that Forza was by far my best bet even with it being less than ideal, I endeavored to match it up with a wheel comparable to what I already had.

There are and were few wheels on the market made specifically for the 360, one of which was made by Microsoft to accompany Forza Motorsport 3 when it debuted a few years ago. A co-worker at the time had some nice things to say about said MS wireless force feedback wheel so I went on ebay looking for a deal and scored one in great condition for a song. The steering wheel is on the smallish side and the whole thing feels a tad plastic like and toyish but the next step up was a couple hundred bucks so the MS wheel would have to do. On the plus side, it does have some feedback on the steering wheel, which when going over bumps and trying to grip turns, feels pretty neat if you pay attention to it. The pedals don't offer much in terms of resistance or realistic feel but again, they would end up serving their purpose nicely. The wheel comes with a large clamping mechanism for temporary attachment to a desk or table. While is was no doubt designed for strength, I had a hard time believing it would weather many hours of rigorous game play in a party environment. I bought an after market adapter and fastened the unit snugly to the wheel deck using yet another adapter I made out of some scrap wood. A lack of mounting holes on the underside of the wheel base is a design flaw in my opinion.

What's the use of racing for time if you can't show off your skills and post your accomplishment for everyone to see? Yet again, I followed Top Gear's example and put together a metal leader board with magnetic dry erase strips. I made the strips re-writable because I only provided 10 during the party to encourage a little competition. There are more strips in the picture above because the rig still lives on in my office and house guests are invited to take a lap if they are so inclined. I made the strips by combining a 8 1/2" x 11" self adhesive dry erase sheet with a 8 1/2" x 11" sheet of printable magnetic paper. I cut the resulting sheet into strips and whoa-la.

The party was an afternoon outdoors affair during the summer so guests who wanted to escape the sun for a moment were invited to walk inside and take a turn or two. I deliberated for some time on how to set up Forza for the party. I landed on the following racing conditions:

Mode: Quick race with medium difficulty competition
Track: Bernese Alps - Festival Circuit (2 laps)
Car: 1988 Lamborghini Countach LP5000 QV (Red)
Gearbox: Automatic
Steering: Standard Steering
Braking: ABS
Suggested Line: Braking Only

I originally wanted the driver to be alone on the road. However that wasn't a good option because that mode is free run with no way to define a "finish line".  I went with quick race mode and set the AI to medium. A decent driver would quickly outpace them anyway. Those not as skilled would still have a good time battling their competition through the curvy ups and downs of the scenic Bernese Alps.

The rig ended up being a big hit at the party. It had constant use for about 10 hours with there being a line for most of the day.  I just wanted people to enjoy themselves and it was quite apparent that I accomplished my goal. Now all I have to do it build another one so I can have head to head race battles. That's taking it to the next level.

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...