Two Possibilities http://www.twopossibilities.com There's three sides to every story. Yours, mine, and the truth. Tue, 08 May 2012 00:13:11 +0000 en hourly 1 http://wordpress.org/?v=3.3.2 Hot Glass- Lampworking http://www.twopossibilities.com/2012/05/06/hot-glass-lampworking/ http://www.twopossibilities.com/2012/05/06/hot-glass-lampworking/#comments Mon, 07 May 2012 01:50:02 +0000 Eric Friedrich http://www.twopossibilities.com/?p=269 I should have been studying for my Into to Probability midterm today. Instead, I was at Artisan’s Asylum, taking an Intro to Lampworking class. Lampworking is the art of making beads, pendants, and other sculptures using molten glass rods over a torch. I had a great time and look forward to learning more of this skill.

The picture below is some of the items I made. My two favorites- a leaf and a heart pendant are being annealed (cured) in a kiln for better durability. I’ll be picking those up sometime in the next week.

]]>
http://www.twopossibilities.com/2012/05/06/hot-glass-lampworking/feed/ 0
Homebrew Stir Plate http://www.twopossibilities.com/2012/05/05/homebrew-stir-plate/ http://www.twopossibilities.com/2012/05/05/homebrew-stir-plate/#comments Sat, 05 May 2012 20:22:47 +0000 Eric Friedrich http://www.twopossibilities.com/?p=261 Whoops, went a year without updating the blog. Shame on me!

I just finished up a small project, constructing a magnetic stir plate. The stir plate is used to cultivate yeast starters for homebrewing beer. The stirring motion helps to aerate the starter, increasing the speed at which yeast propagates in the starter. A larger and healthier starter leads to a stronger fermentation and ultimately, a better beer.

There are several different designs floating around the Internet. Most of them employ some strong magnets attached the the hub of a 12V PC case fan. These magnets attract a magnetic stir bar, typically placed inside a flask of the yeast starter.

Speed control is very important for a stir plate. The speed of the stirrer is set to keep the stir bar spinning calmly in the flask.

Some of the popular designs use a voltage regulator or potentiometer to burn off the excess power, decreasing voltage to the fan. A more elegant, and only slightly more complex design uses Pule Width Modulation (PWM) control of the fan speed. Using PWM is more efficient compared to the two previous approaches, because PWM does not dissipate the excess power as heat, it just consumes less power in total.

The ever popular 555 timer IC is used in astable multivibrator mode (no input is necessary to trigger a pulse). A potentiometer is still used, not to dissipate excess power, but to change the duty cycle, or width of the pulse.

A great introduction to PWM and the use of the 555 timer is available at Dallas Personal Robotics Group. The schematic at the above site is identical to the schematic used in this circuit.

IMG_20120130_202445 IMG_20120402_220442 IMG_20120402_220452 IMG_20120504_221819 ]]>
http://www.twopossibilities.com/2012/05/05/homebrew-stir-plate/feed/ 0
Woodworking Intensive http://www.twopossibilities.com/2012/04/07/woodworking-intensive/ http://www.twopossibilities.com/2012/04/07/woodworking-intensive/#comments Sun, 08 Apr 2012 00:10:16 +0000 Eric Friedrich http://www.twopossibilities.com/?p=275 As a birthday gift, Stacey gave me a gift certificate to an Artisan’s Asylum class. I chose to take the Woodworking Intensive where we learned how to build a perfectly flat and level surface. The countertop is seen partially assembled in the picture. It has since been mostly completed, but still lacks hardwood trim and a durable top surface.

]]>
http://www.twopossibilities.com/2012/04/07/woodworking-intensive/feed/ 0
Homebrew Temperature Controller http://www.twopossibilities.com/2011/01/26/homebrew-temperature-controller/ http://www.twopossibilities.com/2011/01/26/homebrew-temperature-controller/#comments Wed, 26 Jan 2011 21:19:56 +0000 Eric Friedrich http://www.twopossibilities.com/?p=188 LED Screen

Finished Product

Several months ago I heard some interviews with expert homebrewers advocating for better control of beer fermentation temperatures. The yeast used to ferment beer (producing alcohol and carbonation from sugars), is most effective in a relatively small temperature range. Above that range you may get off-flavors, while below it the beer may not fully ferment. The temperature in my apartments fluctuates quite widely, especially in the winter. We have a programmable thermostat in the apartment to keep it between 60 and 67 degrees, depending on time of day. Most yeasts prefer the 68-72 degree range, disliking temperatures down at 60 degrees. I needed some type of heater to warm my beer up and keep it at a constant temperature. As an added bonus, this project might be able to do double duty as a temperature controller for a sous vide water bath, but that’s another post. You can see the Temperature Controller in the photo to the right. A display shows current temperature of the sensor and what the set point is. The set point is adjusted with a potentiometer knob on the bottom of the box (not visible because of the lighting, but to the left of where the wires enter on the bottom). The “0″ on the bottom right of the display indicates that the relay is currently switched off. When the temperature drops enough, the relay switches on and the display shows a “1″ in that position. You can find links to the source code, schematic, board layout file, and parts list at the bottom of the post. Since there is no good licensing scheme for open sourcing hardware designs, if you use my board layout please at least give me credit.

Sensor

Temperature Probe

Temperature Probe

There are several options for the temperature sensor. The cheapest and easiest solution is using a thermistor, which is basically a resistor that varies its resistance with temperature. The temperature can be calculated by measuring the voltage drop across the resistor. This is how most cheap digital thermometers work. The second option is a thermocouple. Two pieces of different types of metal connected to each other create a voltage related to the temperature difference. These are more accurate, but also more complex to use correctly and require additional hardware. The type I ultimately ended up using is a digital temperature sensor. I already had several samples of the DS1820 Temperature Sensor laying around and had been looking for a reason to use one. It interfaces to the controller with a OneWire bus, only requiring a signal + ground connection. The DS1820 uses parasitic power, essentially powering itself off of the data connection. The Arduino platform already includes libraries for OneWire and DS1820 communications, making interfacing with the sensor a breeze. I wanted the temperature sensor to be waterproof, so I sealed all connections with a few layers of heatshrink and another layer of hot glue on top. High-temp silicone or epoxy may be a better choice as a sealant. Still, the heatshrink + hotglue combo is easier to repair and held up well after a few hours in 65 degree water. My first experiment with the DS1820 was simply measuring the air temperature of my room over the course of 24hrs. I did this quick proof of concept to gain experience working with the OneWire and DallasTemperature libraries and also to see if my room was a suitable temperature for growing a sourdough starter. Sampling the temperature once a second and graphing the results in gnuplot produced the following graph starting from 8AM on 12/16/2010. The temperature in my room varies between 17 and 23C. You can see it cool down during the day as the adjustable thermostat lowers the temperature while the apartment is empty.

Ambient Air Temp December 16, 2010

Controller

The brain of the temperature controller is a based on the Arduino family of microcontrollers. I like Arduino for their ease of use, support in the open source community, and wide range of available libraries. Getting the DS1820 OneWire interface working was a piece of cake, as was the Sparkfun SerLCD. One of the downsides of an Arduino is their price, a single board costs around 30 dollars. This is really meant as a prototyping tool; for a production item it is easy to move the micro-controller off the development board and onto a custom circuit board. This requires only 2 capacitors and a single crystal resonator, bringing the cost of components down from 30 dollars to about 6 dollars. I had never designed my own circuit board before and this project seemed like an ideal time to learn. I settled on Eagle and BatchPCB for board production, mainly on a basis of cost. There is a lead-time of several weeks, but the cost is low enough to justify the wait.

Printed Board

Printed Board

I started by prototyping parts of the circuit with an Arduino Duemilanove and breadboard. The theory behind the relay control portion of the circuit was borrowed from Sparkfun’s Controllable Power Outlet tutorial. I then copied the schematic from the breadboard into EagleCAD’s schematic editor. From there I laid out the components on the board and allowed the Eagle auto-router to do most of the work. I’m thankful for the ability of software to plan all the traces on the board, I do not envy that task. It was at this point in the board layout phase that I should have put some more thought into the final assembly of the system. I made several oversights in my choice of connectors and footprints on the board that detracted from the overall quality of the project. Specifically, I didn’t use the proper footprint for my potentiometer and didn’t adequately plan which connectors I would use to connect the power supply, display and temp sensor to the Arduino.

Populated Circuit Board

Populating the board took a few hours at the soldering iron and another order from Sparkfun for a surface mount switch I had forgotten to order with the rest of the components. Everything fit well except the potentiometer (used the wrong footprint for the part) and the serial/programming screw terminal connection on the bottom right (also used the wrong footprint). Testing the board went surprisingly well. For my first attempt at creating a circuit board, I expected smoke, burnt traces and general mayhem. I started my testing off using a hot-wired PC power supply. Both +12V and Ground were connected from the yellow and black pins of a Molex connector to my the screw terminals with a piece of hookup wire. The first time I powered the circuit up, I was not disappointed as smoke started billowing out of the Molex connector and the smell of molten plastic spread throughout my room. I was convinced my careless board design was at fault here, but further investigation turned up a wiring short inside the Molex connector. Once this was corrected, I was able to power up and continue testing the circuit. I suspect the short also damaged the NPN transistor on the board (seen just below the relay in the picture to the left) Unfortunately, in a rush at RadioShack I accidentally purchased PNP transistors. I was so glad RadioShack still carried transistors and that I didn’t have to pay shipping that I wasn’t very attentive to what I was actually buying. This required a small change in my code, instead of setting the output signal low to activate the relay, setting the signal high now activates the relay.

EagleCad Board Layout

The software for the microcontroller was very simple and compact. Most of the heavy lifting for the sensor and display are done by the OneWire and DallasTemperature libraries and the SoftSerial library respectively. I’ll gloss over most of the details of the driving the display, only saying that it should be updated with a high enough frequency to be responsive to a user turning the potentiometer. The control algorithm is a simple on/off control loop with hysteresis. The user sets the control point using the potentiometer on the circuit board. The potentiometer acts as a voltage divider, increasing or decreasing the voltage seen at the Arduino’s analog input. The Arduino’s Analog to Digital Converter (ADC) converts from a voltage into a 10-bit number. I then map this value into a range between 0 and 100 degrees Celsius.  Simultaneously, the Arduino polls the DS1820 for the current temperature (also in degrees C). If the sensor value is less than the set point minus a predefined tolerance, the relay activates and the heater turns on. Similarly, if the sensor value exceeds the set point by more than a predefined tolerance, the relay is turned off and the system is allowed to cool. This allows for a temperature range of twice the tolerance, centered around the set point. Setting the tolerance too low switches the relay too rapidly, shortening its lifetime. Setting the tolerance too high allows the temperature to vary more than desired. I originally chose 2 degrees C as my tolerance, but this provided a 4C temperature range, too wide for most applications. The tolerance value is now .5 degree C, allowing the temperature to vary only 1C. In a future revision, I would like the ability to control the tolerance without having to re-program the microcontroller. Commercial controllers can heat a water bath with .01C accuracy. This type of on/off control is less precise than a continuous control loop, however binary nature of the relay limits my control algorithm. Using a PID control loop and a triac to control the duty cycle of the A/C power is an alternative solution. This approach is overly complex for my needs, but is behind the control systems of most commercial temperature control products.

Heating Element

The main heating element for my beer fermentation setup is a flexible heat mat wrapped around a carboy. The exact part is a FlexWatt Heat Tape meant for warming reptile cages, but resembles the meant-for-beer FermWrap very closely. The reptile heater was about one third the price. It is not clear yet how warm this will be able to keep the beer, although I shouldn’t need more than few degrees warmth out of it. Assembling the heat tape with the separately provided power connectors took only 5 minutes and a pair of pliers.

Whole Shebang

For a sous vide setup, the heating element is an analog slow cooker set to high. Digital models don’t work because they cannot have their power removed without stopping the cooking cycle. The model I used was able to bring a gallon or two of water up to 65 degrees C within an hour or so. I’ve not yet tested how hot it can possibly get or how well it maintains temperature.

Results:

Board Design

Backside of Board

Backside of Board, note rework with black wire

The main problems with my board revolve around connecting the sensor and power supply to the rest of the circuit. I added screw terminals for the power supply, although I should have used a power jack. Similarly, I added screw terminal connections for the sensor, but only for the Data signal. I thought the ground connection could share with the power supply ground. While possible, its a tight fit in the screw terminal for multiple wires. Especially since my original board design did not take into account using the Serial LCD display. I did not provide a connection for 5V power and needed to do some rework on the board to use a spare screw terminal (seen in the black wire on the underside of the board). Similarly I also needed to connect the LCD with the ground screw terminal already occupied by the power supply and sensor ground connections. This is a very tight fit. Nor did I really provide a connection of any type for the Serial LCD data. I placed a 2-pin header connector on the board for Serial data and in-circuit programming, but used the wrong footprint. I was not able to fit a screw connector into this space. A single wire is soldered into the via on the circuit board and runs to the serial LCD providing it with data. I was not able to get in circuit programming working, but didn’t spend much time on this, opting to switch the Atmega IC back and forth between the Arduino board and my custom circuit board.

Fermentation Setup

Fermentation Setup

Note: You may need to remove the “.txt” extension from the above filenames, WordPress is picky about what filetypes you can upload to it.



]]>
http://www.twopossibilities.com/2011/01/26/homebrew-temperature-controller/feed/ 9
Backing Up Purchased Music http://www.twopossibilities.com/2010/07/24/backing-up-purchased-music/ http://www.twopossibilities.com/2010/07/24/backing-up-purchased-music/#comments Sat, 24 Jul 2010 20:15:18 +0000 Eric Friedrich http://www.twopossibilities.com/?p=179 This is one post in the continuing saga of my challenges of backing up fairly important personal data. Over the years I’ve accumulated a good collection of music. Much of it comes from ripped CDs that I own and can easily recover if the digital files are lost. The rest of my music is not as easily restored, being purchased from Amazon, iTunes, and eMusic. I already regularly backup important files using an rsync job run out of a daily crontab. I’d like to expand the cronjob to also backup my music as well.

To complicate matters, I don’t want all of my music backed up, just the purchased music. I have been good about using the Comments field in the ID3 tag to record the source of the music, so I wrote a short script (my first attempt at Python) to filter on that. The python script creates a new directory tree of symbolic links which are then followed by the rsync command to backup the full file.

The script uses the mutagen library. Here’s the code-y goodness. Its a BSD License, so do with it what you want as long as my name stays attached

#!/usr/bin/python
#
# Copyright (c) 2010, Eric Friedrich
# All rights reserved.
# Redistribution and use in source and binary forms, with or  without modification, are permitted provided that the following  conditions are met:
# Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
#    -Redistributions in binary form must reproduce the above  copyright notice, this list of conditions and the following disclaimer  in the documentation and/or other
#          materials provided with the  distribution.
#    - Neither the name of Eric Friedrich; nor the names of  its contributors may be used to endorse or promote products derived from  this software without specific prior
#          written permission.
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND  CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
# INCLUDING,  BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. # IN NO EVENT SHALL THE  COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,  INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF  USE, DATA, OR
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON  ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
# TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF  THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.

import string, sys, os
import mutagen

saveTags = ["eMusic", "Amazon.com", "iTunes Music Store"]

def filter_comment(comment):
  for tag in saveTags:
	if comment.find(tag) != -1:
		return True
  return False

def create_symlink(root, file):
  orig = os.path.join(root, file)

  # I'm pretty sure root will always be an absolute, given its generated
  # by os.walk. If its not, need a check for os.isabs()
  root = os.path.relpath(root, sys.argv[1])
  print "Creating symlink", os.path.join(sys.argv[2], root, file)
  root = os.path.join(sys.argv[2], root)

  if os.path.exists(os.path.join(root, file)):
    return

  if not os.path.exists(root):
    os.makedirs(root)
  os.symlink(orig, os.path.join(root, file))

if len(sys.argv) < 3:
	print 'Usage: mp3_backup.py  '
	sys.exit(0)

if not os.path.exists(sys.argv[2]):
  print "Destination directory does not exist, creating"
  os.mkdir(sys.argv[2])

print 'Searching ', sys.argv[1], 'for mp3 files\n'
for root, dirs, files in os.walk(sys.argv[1]):
	for file in files:
          try:
		mp3_file = mutagen.File(os.path.join(root, file))
#                print os.path.join(root, file)
          except IOError:

           print "Skipping file,", os.path.join(root, file), "no, header"
           continue
          if isinstance(mp3_file, mutagen.mp3.MP3) and \
            "COMM::'eng'" in mp3_file and \
            filter_comment(mp3_file["COMM::'eng'"].text[0]):
                create_symlink(root, file)
#EOF
]]>
http://www.twopossibilities.com/2010/07/24/backing-up-purchased-music/feed/ 0
Are Telephone Numbers Still Useful? http://www.twopossibilities.com/2010/07/06/are-telephone-numbers-still-useful/ http://www.twopossibilities.com/2010/07/06/are-telephone-numbers-still-useful/#comments Wed, 07 Jul 2010 01:44:44 +0000 Eric Friedrich http://www.twopossibilities.com/?p=168 This post was inspired by the Globe and Mail article linked below and a lecture given by one of my computer science professors (David Cheriton) on the theory behind directories and naming.

Telephone numbers have been used since the late 1800s as a way to make connecting phone calls easier for human operators. Eventually, rotary dialing and touch tones grew into the new world of automated call switching. Today, telephone numbers have a variety of purposes. They are used for everything from caller ID to locating the source of emergency 911 calls.

The history of telephone numbers is quite interesting on its own, saying much about the evolution of the telephone in the American household over the past 150 years. Wikipedia has a great history. Telephone numbers are most commonly used as the method for dialing a telephone call, or in abstractly, signaling the destination of your call. Yet, they also have many other uses that don’t immediately come to mind. For landline telephones, the area code and exchange indicate the geographic area of the number’s owner. With the emergence of cellphones this has become somewhat less reliable. New techniques such as aGPS is needed to locate a mobile phone. As mentioned before, determining the exact location of a calling phone, either through caller ID or aGPS, is incredibly important to the success of 911 and emergency responders. Informally, the area code has historically given a clue to the residence of a number. A Seinfeld episode even found Elaine rejected by a potential date for lacking the proper New York City area code. Finally, a phone number number can inform you of any long-distance charges (or 1-900 charges if you are into that type of thing) associated with a call.

One other less obvious benefit of a phone number is that the number of the destination must be known before you can place a call. You can’t just pick up the phone and call someone, you have to know their number first. For many people and businesses, their numbers are published in the white or yellow pages. However, many others, and almost everyone with a cell phone, enjoy the privacy an unlisted number brings.

Knowing the purposes of a telephone number, the question of their utility now arises. As modern communications evolve, does the 19th century telephone number fit the demands of 21st century technology? With the emergence of smartphones and touchpads, no longer are we constrained to a simple 12-button keypad or rotary dial. Additionally, most people are now available over several forms of communications, even considering only those voice-based ones. The result is living with several phone numbers- home landline, office, cell, Skype. Single Number Reachability (SRN)  is a common solution, with services such as Google Voice gaining popularity for their ability to dial a single telephone number and reach the recipient regardless of which phone number they receive the call on. Unsure about your location at a certain time? With Single Number Reachability this is not a problem, have a caller dial your SRN number and all of your phones will ring. Additional intelligence and features can be piled very high here, routing calls based on the caller, time of day, current location, and many other filters.

Still, Single Number Reachability is great, but the caller still needs to dial ten digits to start the call. The digits are the main problem here. We all have enough account numbers and ID numbers in our lives to make a calculator go cross-eyed, why add the burden of telephone numbers as well. They are hard to remember, frequently mis-dialed, and offer little benefit with today’s technology.

My solution: Get rid of the numbers, entirely.

When I call someone, I want to do so by name. If multiple people have the same name, let me use some other identifying information like a photograph, address or job title to make my choice. I want this phone book available on everything I use to make phone calls, synchronized across all of them. When I choose a person, the directory knows the correct phone to ring to reach the person. This could employ standard SNR technology like Google Voice does today, I don’t really care how the internals are built.

With a system like this, I would no longer have to give out phone numbers to businesses or people met in a bar. Imagine the end of scribbling a cute girl’s or guy’s digits on your hand, only to have them rinsed off by a spilled drink. The obvious downside (for some) is also the end of faked phone numbers, but its just as easy to lie about one’s name as about their phone number. Even today, my Android phone takes a step in the right direction by automatically updating my contacts phone numbers in response to changes in their Facebook profiles.

By having a large global directory, we would all be free from the curse of having to remember and manage a large rolodex of contact information for our friends and family. This frees our minds and time up to spend on more valuable activities. There are no technical reasons preventing a global white pages as I’ve outlined them here. However as seen in recent controversies over Facebook’s privacy policy, social and legal barriers are often drags on technical progress.

References:

Hanging Up On The Phone Book (The Globe and Mail, 6/6/2010)

]]>
http://www.twopossibilities.com/2010/07/06/are-telephone-numbers-still-useful/feed/ 0
iMon LCD and lcdproc http://www.twopossibilities.com/2010/06/24/imon-lcd-and-lcdproc/ http://www.twopossibilities.com/2010/06/24/imon-lcd-and-lcdproc/#comments Thu, 24 Jun 2010 19:13:11 +0000 Eric Friedrich http://www.twopossibilities.com/?p=119 My current HTPC case is an Antec Remote Fusion. It has an iMon LCD on the front, being driven by lcdproc. Setting this screen up was one of the easiest parts of my MythTV install. I haven’t done any customization of the information shown- the defaults work great. While media is playing, it displays a progress bar of the viewers position in the file. On a menu screen, the currently selected menu item is shown.

I followed instructions from the codeka forums on how to install lcdproc. I downloaded the current release of LCDProc which was 0.5.3 at the time. The release notes show that support for the iMon LCD has been added. Once the software was installed, I edited the /etc/LCDd.conf file, changing the drivers line to read ‘imonlcd’.

I also updated the Protocol setting based on my current hardware. Running lsusb reported “Bus 003 Device 002: ID 15c2:0038 SoundGraph Inc.” According to the LCDd.conf file, a value of 15c2:0038 needs a Protocol setting of 1

  # Specify which iMon protocol should be used [legal: 0=15c2:ffdc device,
  # 1=15c2:0038 device; default: 0]
  Protocol=1

Then, I verified that the /dev/lcd0 device was present and started LCDd by running ‘sudo /etc/init.d/LCDd start’. Once I was sure everything was running satisfactorily, I setup LCDd to run automatically on each boot by creating a symlink in the correct /etc/rc.d directory.

MythTV was set to use the LCD screen by following the brief instructions on the MythTV wiki.

]]>
http://www.twopossibilities.com/2010/06/24/imon-lcd-and-lcdproc/feed/ 0
TGIF http://www.twopossibilities.com/2010/05/17/tgif/ http://www.twopossibilities.com/2010/05/17/tgif/#comments Tue, 18 May 2010 03:08:05 +0000 Eric Friedrich http://www.twopossibilities.com/2010/05/17/tgif/

TGIF, originally uploaded by Eric’s Photo-A-Day.

This grill made some of the best grilled chicken I’ve ever had. The amount of noise in this photo is pretty disappointing, even given the fact that I took it on my cell phone camera and that I had to do a good amount of exposure correction.

]]>
http://www.twopossibilities.com/2010/05/17/tgif/feed/ 1
Personal Backup Strategy http://www.twopossibilities.com/2010/04/20/personal-backup-strategy/ http://www.twopossibilities.com/2010/04/20/personal-backup-strategy/#comments Tue, 20 Apr 2010 19:33:53 +0000 Eric Friedrich http://www.twopossibilities.com/?p=161 Like most, I have an increasingly large footprint of electronic data being stored on my computers. Some of the data is very important (financial records and those Jessica Biel photos), while the rest of it is somewhat less critical. Knowing the risks of only keeping a single copy of things, I’ve been working on a backup solution that is simple, yet also meets all my needs.

Requirements

  1. Dead easy and simple to use. I don’t want to have to think about this every day or fix it constantly when it breaks.
  2. Can encrypt a portion of the data, mostly my old financial records.
  3. Off-site storage is a must. If my apartment is broken into or burns down, I’d like to have something left.
  4. Capacity. This one is a little trickier. I have about 2GB of financial stuff, which is growing pretty slowly. I also have about 10GB of personal files from college and life that I would like to keep around. Then there is my media that I’ve bought (music and videos). Because of the licensing restrictions, I would not be able to download again if lost, so I need to keep my own backups. Finally, there are about 20GB of photographs that I’ve taken. I haven’t quite figured out how to handle these yet.

The Idea

The backup solution I’ve come up with right now is three-fold, but does have a few shortcomings. First, I use a Infrant (now Netgear) ReadyNAS NV w/ 1.2TB of HD space in a RAID5 configuration. This is the primary storage for all my data. The RAID 5 offers some level of redundancy against single disk failure (but not really against anything else). All of the important data mentioned above is copied every night from the ReadyNAS to a USB hard drive sitting next to it. this is my main backup should anything go wrong. Finally is the off-site backup. Using rsync + duplicity, I have setup a cronjob that runs every night and backs up the most important files to a webhost. This way, if anything terrible happens, at least I’ll be able to remind myself how much I paid in taxes last year.

Because of the cost of storage, I would rather not pay for the monthly cost of storing all my photos and music somewhere, but that may change as I compare some of the cloud/backup providers.

Update (7/10/2010): The crontab entry in use is 01 02 * * * /usr/local/bin/dreamhost_backup.sh

]]>
http://www.twopossibilities.com/2010/04/20/personal-backup-strategy/feed/ 3
HDHomeRun Setup http://www.twopossibilities.com/2010/04/20/hdhomerun-setup/ http://www.twopossibilities.com/2010/04/20/hdhomerun-setup/#comments Tue, 20 Apr 2010 19:12:19 +0000 Eric Friedrich http://www.twopossibilities.com/?p=117 The HDHomeRun is a pretty cool little device with the potential for greatness. Its got 2 Digital Cable/Terrestrial Tuners and a 1 gigabit ethernet jack. It will let you record directly off cable through MythTV and several other programs. Its one shortcoming- no CableCard support. This is the business decision of service providers and not of SiliconDust (makers of the HDHomeRun), so I hold out hope that one day CableCards will work under Linux. Until then, this box is only useful to record OTA and non-scrambled channels. This isn’t really that bad, because much of what I record is broadcast on ABC, NBC, CBS and FOX.

The HDHR also has an IR receiver and can forward IR commands over the network, to save someone from having to purchase a separate IR receiver. Pretty cool feature and could come in handy someday, although I don’t need it right now.

The HDHR setup was pretty straightforward using the provided instructions. The HDHR autoconfigured itself using DHCP and was easily discovered by the HDHomeRun config program. Updating the firmware went flawlessly, as did the inital MythConfig.

eric@shaman:~/hdhomerun/libhdhomerun$ ./hdhomerun_config discover
 hdhomerun device 1019A8F9 found at 192.168.1.149
 eric@shaman:~/hdhomerun/libhdhomerun$ ./hdhomerun_config 1019A8F9 get  /sys/version
 20091024
 eric@shaman:~/hdhomerun/libhdhomerun$ ./hdhomerun_config 1019A8F9  upgrade ~/Desktop/hdhomerun_atsc_firmware_20100213.bin
 uploading firmware...
 upgrading firmware...
 rebooting...
 upgrade complete - now running firmware 20100213

MythTV Config

http://www.mythtv.org/wiki/Silicondust_HDHomeRun

I added the tuner in mythtv-setup and it was autodetected by Myth. The frequency table should be set to cable. Moving on to the next screen, I added a new ClearQAM input source & entered Schedules Direct info.

I then associated the input source to the capture card.  I used the channel scan for 256QAM on all cable frequencies. I had no idea on the conflicting channels, or how to deal with them so I just ignored the conflicted ones. A little extra documentation about the channel scanner would be great in this area. The HDHomeRUn is connected to Comcast cable in the Boston, MA area. If the HDHomeRun was hooked up to a DTV antenna, I would have used the 8VSBmodulation instead. Once done, I “fetched listings from source”.

At this point I could watch video on all the channels, but the channel names were wrong and the guide data wasn’t correct. The easiest solution is to manually fix the channel database using the MythWeb interface. Simply fill in the correct channel #, XMLTV ID, and callsign. The XMLTV ID is available from the SiliconDust webpage as well as the SchedulesDirect Page.

If you’d like to make your life more difficult, keep reading…

scte65scan

I turned to this page http://www.mythtv.org/wiki/Frontend_Channel_Editor which led me down the path of XMLTV ID’s and eventually to scte65scan. This is where I get a bit distracted. Skip over the scte65stuff if you just want to make it work. I downloaded the scte65scan utility and added/modified the following lines to the Makefile.hdhr file:

LIBOBJS += $(HDHR_DIR)/hdhomerun_os_posix.o
LDFLAGS += -lpthread -lrt

To add support for hdhomerun, I downloaded the libhdhomerun tarball from SiliconDust and unpacked it into the scte65scan directory. Then I ran make -f Makefile.hdhr. It failed horribly… The current scte65scan package is meant only to run with the libhdhomerun_200901415.tgz package. I had libhdhomerun_20100213.tgz, and the warning in the scte65scan Makefile was upheld. I wasn’t in the mood to fix it the right way, so I just updated the LIBOBJS to point only to the libhdhomerun.so file produced by the libhdhomerun build. I then created a symlink from /lib/libhdhomerun.so to the original. This got scte65scan to work. If in doubt, check how the dynamic libraries are resolved by running ldd ./scte65scan. If everything is good, the output should report full pathnames for each library.

My STB via the diag screen d06 reports a VCT ID of 9.
Confirmed with ./scte65scan -H FFFFFFFF,0 us-Cable-Standard-center-frequencies-QAM256 where a VCT ID of 3009 appeared. Several others also appeared, I think they were pretty much identical

Then ran  ./scte65scan -H FFFFFFFF -f3 -V 3009 > ../vct.sql to collect the data into a SQL query. Then

mysql -u mythtv -p mythconverg < ./vct-03242010_1.sql  to insert it into the database.

However, scte65scan inserted data for all channels, not just the clearQAM channels, which caused a problem with allocating recordings to the right tuner once I added the firewire card. I don’t reccomend using scte65 scan with the HDHomeRun if oyu have alternate capture cards.

]]>
http://www.twopossibilities.com/2010/04/20/hdhomerun-setup/feed/ 1