Two Possibilities

March 18, 2010

MythTV for the Second Time

Filed under: MythTV — Eric Friedrich @ 2:50 pm

A few years ago I had a sweet little MythTV setup. It worked well enough and I could tolerate all the little quirks that go along with using open source software. I moved into a new apartment a few years ago and started using the Comcast DVR. The MythTV box got relegated to an XBMC media player. All Live TV recordings is now done on the DVR, XBMC is only for playing music and video that we’ve ripped or downloaded.

The Comcast DVR is starting to outlive its usefulness and having to switch back and forth between XBMC and the cable box is confusing. I’ve heard a lot of good things about the advances Myth has made in terms of VDPAU for hardware decoding of video and major improvements to the user interface. This section of the blog will journal my efforts with Myth as a HTPC.

Between some well-timed Newegg sales and hardware I already own, the following is my plan for my home mediaNet. All pre-existing content will be stored on a ReadyNAS NV with 4x500GB RAID-5 drives for a total of 1.2TB of storage. This holds music, movies, and TV shows. Samba is used for all network mounts. The main HTPC will run a combined MythTV frontend/backend system and Squeezebox Server. The specs for this system are:

  • Motherboard: Biostar TF7050-M2 with onboard coaxial SPDIF out, Gigabit Ethernet, and Firewire
  • RAM: 4GB DDR 800
  • Graphics: Zotac 9800GT with 512MB DDR3 memory and 2 DVI ports
  • HD: 300GB Western Digital DMA100 (great candidate for replacement…)
  • Antec Fusion Remote case with 350W PowerSupply, iMon LCD and IR sensor.
  • Some old random CD-ROM drive. Might be nice to have a BluRay in here some day :-)

The Firewire port will be connected to a Motorola DCT6200 cable Set Top Box. A HDHomeRun Dual Tuner will also be used for recording ClearQAM (unencrypted) content. My initial plan is to run Mythbuntu off the 0.22-fixes branch of MythTV, allowing me to pickup the great user interface enhancements and VDPAU support. You may wonder why I chose a video card without HDMI- at the moment my receiver only supports digital audio and has no HDMI Inputs. Further, the NVIDIA 9800GT doesn’t support audio over the HDMI connection in the first place, only the GT220 and newer.

Look for more details coming as I assemble and configure the system. I’d like to compile a site that others can use to help themselves through the trickier parts of Myth config and troubleshooting.

December 23, 2009

iPod Remote Display – Scrolling LCD Display

Filed under: Projects — Tags: , — Eric Friedrich @ 9:58 pm

One of the two main parts of my Remote iPod Display is the LCD screen. For now, I’ve decided to go with a SparkFun SerLCD display. The particular one I’ve chosen is red lettering on a black screen to match the interior color scheme on my car. The serial enabled LCD are extraordinarily easy to use. Only three connections are required, +5V, Ground and a signal pin.

On the software side, the Arduino environment makes serial communications a breeze. My initial test program was as simple as Serial.println(“Hello World!”);.

My current plan is to have the title and artist of the current song scrolling on different lines of the display. Elapsed time into the song, total time, and time remaining are options as well. Given the small size of the screen, I will probably stick to just the song title and artist. If I am able to remotely control the iPod, I may try to use the screen to display navigation menus as well.
You can see from the video below that the scrolling is not very smooth. The entire screen is repainted twice a second. I’m not sure how to make the scrolling smoother. I may experiment with repainting one line at a time.

Hit the jump for a brief code walkthrough.

(more…)

December 20, 2009

iPod Remote Display

Filed under: Projects — Tags: , — Eric Friedrich @ 6:22 pm

Keeping in line with my earlier iPod projects, this is the beginning of a build log for an iPod Remote display. I always listen to my iPod during my commute. One of the hardest parts of using an iPod while driving is checking the screen to see what song is playing or navigating around the menus. This can also take my attention away from the road, which is quite dangerous. While some new cars come with an iPod kit, my car doesn’t include one. This page documents the construction of a remote display for an iPod and (possibly) a module for steering wheel control of the iPod.

I’ll be using an Arduino Diecimila for serial interface with the iPod and to drive a 2×24 character LED display. I picked the display up from SparkFun with an attached serial backpack. Printing characters to the display is incredibly easy with an Arduino and its libraries. Look for more on that in an upcoming post.

Design Notebook Entry

I scanned in an early drawing of my plans for this project. You can see from the date, that I’ve been thinking about this for the last year. I’m hopeful that this build log will give me some motivation to get things moving again.

At a high level the design has three components. First is the iPod itself. Through the dock connector, the iPod is connected to the Arduino. The Arduino will communicate with the iPod over a serial protocol to retrieve the Artist and Song Information. Its not clear yet if the Arduino can also control the iPod to start songs, stop play or move through the menus. The ‘duino then displays the song info on an LED display, which will be conveniently mounted on my cars’ dashboard. The above scan contains some circuitry to adjust the iPod 3.3V logic levels to the Arduino’s 5V logic. It also contains some circuitry so that the iPod interface circuitry can also charge the iPod.

Relevant Links:

December 9, 2009

iPod Dock Hack

Filed under: Technology — Tags: — Eric Friedrich @ 9:08 pm
Completed dock with iPod nano

Completed dock with iPod nano

I spend much of my free time in the kitchen as do my roommates. Whether its making a quick dinner after work or a more ambitious project (like homemade sausages), there is usually a pot of something boiling away on the stove. I enjoy throwing some cool jazz on the iPod for a relaxing weekend meal or something a little more upbeat for those dark New England winter mornings. As with all good things there is a downside, my roommate Josh’s off-key karaoke.

Always being a good friend, I gave in to his requests to hook his laptop up to the speakers, since he is one of the few people on this planet still without an iPod. Unfortunately my Phillips dock doesn’t have an audio input jack of any kind, so I would have to give it one. Putting another input on the iPod dock would also let me hook up my cellphone or anything else which can play MP3s.

I could have gone for a nice clean design, with a female headphone jack flush mounted to the case. I also could have just spent the extra 40 dollars to buy an iPod dock with an extra input. No, I would do this quick, I would do this dirty, and I would do this cheap. Heading to my local RadioShack(gag) I found a female headphone Y adapter for around 5 bucks, which would even give me an extra in case I totally botched this. I already had the extension cable around, I only had to dig it up out of a dusty box in the basement.

Bottom of Dock Circuit Board

Bottom of Dock Circuit Board

The hardest part of this whole mod was figuring out how to crack open the smooth white plastic case. I spent about 20 minutes turning it over in my hands looking for a seam. I had no sooner convinced myself it was welded shut than accidentally popped the inner top circle off exposing the circuit board beneath. The second photo below is the underside of the main circuit board. The two black jacks protruding at the top of the image are speaker jacks. Between those two is a jack for a DC power adapter.

Luckily the dock had some basic labels on it, namely L-Out and R-Out which gave me some solid clues where to make a connection. The ground wasn’t labeled, so some poking around with the multimeter around the area of the power jack turned up what appeared to be a valid ground point. A little skillful soldering later, I had installed a rather large and ugly looking jack onto the side of my iPod dock. Apologies there is no “after” picture, I sealed the case up before thinking to take another picture.

I am pretty satisfied with the end result. For a few hours and about 5 bucks we now have a much more useful set of speakers. I’m considering another small improvement- adding a USB port so it can charge my smartphone while music is playing.

December 8, 2009

Evernote: Sidecar for my Brain

Filed under: Technology — Eric Friedrich @ 5:18 pm

I’m not one of those people that uses a ton of little utility programs. My stable of applications is pretty small and most of the applications are used frequently. Evernote is one of those apps that has slowly been becoming a bigger part of my life over the past few months. I was originally a Google Notebooks user, but made the switch to Evernote when Google made the announcement to shut down their Notebooks service.

I have since come to depend on Evernote for all number of things, only a few of which I will describe here:

Recipe Box

I use Evernote to keep track of all interesting recipes I come across online. Recipes get added to Evernote using the Web Clipper or by scanning in the recipe from a print magazine. I also enjoy cooking by Ratio and use Evernote to track my results from using different ratios for foods like bread doughs, chocolate chip cookies and sausages.

Digital Library for E-Books and Journal Articles

Evernote is my online bookshelf for all my E-books and academic PDFs. I no longer have to worry about where I saved a copy or if it is on the computer I am currently using. With Evernote, I can always find the document, from any computer. Larger PDF files put a strain on my monthly bandwidth limit, but I have yet to actually hit the limit. It this eventually becomes an issue, I can always consider a premium membership. I’ve also had luck scanning in short booklets as PDFs and adding them to Evernote. This works great for things like instruction manuals and warranty cards that come with new products.

Notebook for work

Notes from meetings at work, computer IP addresses and the like all go into a special Evernote notebook. This is a “local notebook” meaning it is not synchronized with the Evernote servers, so everything I enter here stays private. I can only access it from my work laptop, where that notebook resides, which is how I want it. Unfortunately there is no concept of private tags, so I’m not able to tag items in this notebook without having the tags synchronized with the server. When I need to keep track of a diagram or figure, I can snap a quick picture of the paper or whiteboard with my cell phone and put it in this notebook. One other thing that would be very handy here is the ability to draw figures directly into notes with the Mac Evernote client.

Various shopping and organizational lists

Evernote holds all my grocery lists, wishlists and assorted other lists in my life. My big To-do list is stored elsewhere because Evernote doesn’t have all the feature of other list-specific services.

Vacation Planning

I’m planning for several vacations in the next 6 months, ranging from a weekend in the New Hampshire White Mountains to three weeks in South Africa for the 2010 World Cup. Evernote lets me keep track of itineraries, travel activities and other important information for my trips. Whenever I find a website with useful information, it gets clipped into the Vacation notebook. Ideas for activities get texted in when I wake up in the middle of the night with a good idea. Confirmation emails and receipts also end up in the notebook so I can easily find them later.

Records for Homebrewing

I am just beginning to brew beer at home and plan to use Evernote for my record keeping. I don’t have a system in place yet, but plan to use a separate note for each beer. The note will contain details on the brewing process and comments on the resulting beer.

While I find plenty of uses for Evernote already, it could use some improvements in its support for non-mainstream clients. I’m specifically mentioning the Evernote web interface, which does not handle PDFs gracefully and their lack of a Linux client. I’ve recently begun using Evernote on the Android platform and am mostly happy for it, with the exception of missing a Notebook oriented view.

October 23, 2009

A letter to SPARC industries

Filed under: Technology — Eric Friedrich @ 9:00 pm

to sparcinfo@sparc.org
subject SPARC is not SparkFun

Dear SPARC Industries-

I am extremely disappointed to hear that your company found it necessary to send a Cease & Desist letter to the kind folks at SparkFun. In my casual opinion, I do not believe that there is any form of trademark violation occurring here. What I do see however, is another case of a large corporation taking advantage of their size and legal might for purposes of intimidation.
As an employee of a large corporation myself, I understand the need for all business large and small to protect their brand and intellectual property. However, the C&D letter sent to SparkFun is overzealous, even when viewed in the kindest light. As their CEO Nate points out on the SparkFun homepage, the logos of the two companies are in no way related, nor can the names be easily confused. In fact, whoever called the “SPARK” portion of the SparkFun logo nearly identical to the SPARC industries logo should dial back the hyperbole. I find it dishonest that the otherwise lowercase sparkfun logo was capitalized so that it may be viewed as closer in comparison to your company’s mark.
I am sure you are aware of the recent case involving Monster Energy Drink and the Rock Art Brewery in Vermont. Hopefully you are also aware that Vermont’s US Senator saw fit to become involved in this similar case of large corporation versus smaller business. While SparkFun is not located in Vermont, I can only help but think that Senator Sanders would have a similar opinion on this case.

A quote from a letter written by Senator Sanders sums up the opinion of many SparkFun supporters:
“Lastly, the American people are getting tired of the greed and recklessness of large corporations, which use their size and power to push individuals and small businesses around. A small company [...] is not a threat to you, and it would be extremely unfair of you to drag them into court and force them into a protracted, expensive, and pointless legal battle. Please leave [them] alone and allow them to produce their [product].”

Sincerely,
Eric Friedrich

June 5, 2009

Interfacing with Rails through the CLI

Filed under: Technology — Tags: , , , — Eric Friedrich @ 8:31 am

For a recent side project a work, I found myself experimenting with Ruby on Rails to make a small database driven website. There is lots of great information around the web to help with the RoR learning curve. Still, I found myself relying most on old standby O’Reilly and their book Ruby on Rails: Up and Running. It is amazing how fast you can bring a Rails application into existence. One of the new features is scaffolding, which uses automatic code generation to create the stub methods for all your Create, Retrieve, Update, and Delete methods. For my purposes, this was almost as much as I needed. I only had to create a style-sheet for myself and create a few custom views. It was a far cry from tedious creation of identical code and endless SQL statements that I associate with my web-programming days.

Once the app was built, I needed to find a way to import lots of pre-existing data into it. Placing the data directly into the database was one option, but I was worried about bypassing Rails and all of its validations. I didn’t want to create a brand new Rails page for this either. The import would be a quick one-off, something that is ugly, but easy. As most ugly & easy things go, I probably spent more time looking up ways to do this than it would have taken me to just create a new page. One of the issues I came across here, I have been dealing with in all my Rails interactions. Rails is under constant development and there is not much documentation on the newest features.

One such feature is the script/runner interface. This can be used to run a Rails script through a cron job, or in my case from the CLI. The simple script reads in each line of a CSV file and creates a database entry for each one. There is a test mode, which validates the line, but does not save it to the database. This mode lets the user try out their data set first and fix any errors before running on the production database. I placed the script in my <rails_app>/app directory and run it as script/runner app/BulkVideoImport.rb data_file.csv

You can find my example BulkVideoImport.rb available at http://www.twopossibilities.com/wp-content/uploads/2009/06/bulkvideoimport.rb

Resources:
1) http://www.ameravant.com/posts/recurring-tasks-in-ruby-on-rails-using-runner-and-cron-jobs
2)http://www.oreillynet.com/pub/a/ruby/2007/06/21/how-to-build-simple-console-apps-with-ruby-and-activerecord.html?page=1

February 18, 2009

The Three Speakers of Your Life

Filed under: Technology — Tags: — Eric Friedrich @ 10:14 pm

In the video industry, a big concept is serving the three screens of your life. This usually refers to your television, computer screen, and cell phone. Lately I’ve even heard it expanded to n-Screens, although I’m not exactly sure what the other screens could be (Nintendon DS, maybe?). The main idea behind three screens is that content should be available seamlessly to you, wherever and whenever you are. The same movie you watch at home on your couch should be visible on your cellphone while you are waiting in line at Trader Joe’s, buying your organic tomatoes. You should even be able to begin watching Tropic Thunder at home, realize how boring it is and pause it for later. Then you can pick it up later from your PC or cell phone once you finally decide to watch the awesome scene with Tom Cruise at the end.

While technology and wireless bandwidth may not completely be able to support the demands of wireless video delivery today, there is (more…)

February 15, 2009

The Importance of Software Requirements

Filed under: Technology — Tags: , — Eric Friedrich @ 9:15 pm

One of the most important aspects of software design is having well defined requirements.

When I was just out of school, I didn’t fully understand what that statement means. Two and a half years later I probably still don’t, but I am at least to the point where I am beginning to know what I don’t know. As I get more responsibility at work, I’ve been getting more opportunities to practice my writing skills in the form of functional specs and design documents. One of the major components of any good functional spec is a description of the requirements that the software must follow.  This means more than just having a bulleted list of vague requirements. A statement like, “The feature will be configured by a single configuration file” doesn’t cut it. Go deeper into what that requirement what really means. How will you parse the contents of the file? What library will be used or will you write one by hand? Is the file stored on disk or in memory? Is a database like MySQL used?

Questions like these are just the basic ones, technical details about how the software will work. They need to be answered before you can begin to write and test your code. Getting the above information down in writing or in pictures is crucial to avoiding costly mistakes which often come at the expense of half-baked designs. I personally work best with words, preferring to use diagrams sparingly. I know others that rely solely on PowerPoint slides. Do what works best for you. Once you’ve covered the above questions, you can implement your software. If your answers are relatively sane, your resulting software should work well.

This is where I am at right now, just thinking about the basic function of the app. Luckily I have some great role models to learn from and am setting a goal to improve my requirement writing. Using the above example of a configuration file, we can get into more detail with our questions. Will it be backwards compatibile? How exactly does that work? Who will be editing the file, and what will they have to do to add/edit a parameter? How easy is it to automate the process? What types of validation are there? What will be visible in the resulting UI?

In contrast to the first questions which deal with the operation of the software, these speak to usability. For software to truly be successful, the designer must not design something which just accomplishes the desired function, but it must do so in the manner which best meets the needs of its users. I recently wrote a document for a new feature which would be used by three different customers. We gathered input from one of the customers- it was designed with them in mind so we knew it would meet their requirements. The second customer was still in the pre-sales phase, so we used our design to influence their expectations. Not surprisingly, the third customer turned out to be more troublesome. In making sure our requirement met the needs of the first two customers, we naively assumed that they would meet the needs of the third. While mostly true, a closer look turned up a few cases about how our software would be used by the third customer. These were the base for more than a few discussions between myself and a the other engineers I work with. We are still ironing out the last of the details, but in the interest of avoiding these troubles in the future, it is important to realize how I ended up in the position- by not being thorough enough with my requirements.

Many of the software design methodologies include ways to create requirements, be it through brainstorming, user stories, or use cases. In the absence of one of these design methodologies, the responsibility officially falls to marketing to define the requirements. Often though, for reasons of time or simplicity, marketing defers to the engineers. When this happens, I must take the extra time to think not just about how the software will work, but how it will be used as well.

« Newer Posts

Powered by WordPress