Author Archive for jbsnyder

Grossly Hacking a miniPOV3

So, in a recent post I mentioned that I started brewing beer and that I made my own temperature sensor (not for the wort, just for air temperature where things were fermenting/brewing/conditioning). To accomplish this, I took a miniPOV3 kit that I had constructed some number of months ago, and added a temperature sensor to it. I had originally thought, why not just use a thermistor and maybe some voltage dividers with A/D, and the binary display would make for a decent enough way to communicate the current temperature. Unfortunately it turns out that the ATTiny2313 in the kit doesn’t do A/D. Luckily I had a DS-1631 temperature sensor lying around that allows one to get the current temperature of the chip over an I2C bus.

The hack itself is rather simple, and I’ll post the Eagle CAD file in a bit if I can figure out how to modify the original diagram provided by ladyada over at adafruit industries (who sells the kit). The general gist of the hack was connecting the SCL & SDA lines on the DS-1631 to the PD0 and PD1 lines (with 4.7k pullups) and using Peter Fleury’s excellent I2C master library that implements i2c in software. The ATTiny2313 does have ways of doing I2C in hardware, but the pins for this were taken up with connections for some of the LEDs that give the miniPOV its ability to be both a persistence of vision toy, and to have a really cheap 8-bit display. Since this was already a hack, and I wanted to minimize the degree to which this was going to make a mess of the nice clean PCB, I instead used the software I2C implementation with some un-utilized pins, which has been plenty fast and reliable (it ran happily for about a month before killing its batteries). The DS-1631 also runs fine off the lower voltage provided by 2 AAs in series.

I may post some photos later. You’ll find a schematic (if someone can tell me how to fix the description box title, and how to properly make a device I would appreciate it. this one won’t move after placing it :-)

minipovtemp schematic (png)

miniPOVTemp code/firmware
miniPOVTemp schematic (eagle)

Kitchen Counter Invisible Fence

I must implement something like this for the cats, courtesy of the Curious Inventor Blog:

Although, perhaps in conjunction with something like this, but functional, so I don’t have to listen to a car horn every time the cats do something stupid :-)

What’s Brewing?

In answer to the title, beer, actually. At the beginning of this month I acquired by first beer brewing kit as a gift from my fiancé Annie. We picked it up from the Wine & Hop Shop in Madison while we were visiting her sister. There are a number of places also in the Chicago area, but most are not quite as close as I’d like. In the future, I’ll likely get supplies from the Brew & Grow in Chicago, which someone else recommended to me.

I started with malt extract kit for a California golden ale, prepping the ingredients per the instructions that came with the kit. It was pretty easy starting from this stage since you don’t have to do the extraction of the sugars from the grain yourself, which mean that only one boil was really necessary to get the wort ready. An aside for this portion of the prep process: get a pot that’s large enough. When they say you need a 3-gallon pot minimum, that really is the bare minimum, get a larger one. I had no troubles with boil-overs, but if I hadn’t kept a close eye on it, I’m quite sure my stove would have been covered with hot sticky wort, and would have reduced the strength or yield of the batch.

Getting the temperatures right at different stages was made fairly easy by using a digital thermometer (thermistor attached to a Fluke meter). I’ll post some details about hacking the miniPOV into a digital binary-display thermometer for the fermentation phase, shortly.

I did the primary fermentation in an ale pail (haha), if you do the same and therefore can’t see what’s going on inside, don’t worry if it takes a bit for air to start bubbling through the airlock.  It took a number of hours for mine to get started fermenting and then went pretty fast for a day or two (air bubbling out every several seconds).  Racking the beer into the secondary fermentation vessel, a glass carboy, was also fairly painless.  I would recommend getting an auto-siphon or racking cane to get the siphon started.  They’re very cheap, and though this stage isn’t too hard, it’ll keep your beer a bit cleaner than doing a mouth siphon.  On that subject heard from a number of people that are horrified by the prospect of mouth siphoning, and also from a number of people who guiltily admitted that they did it themselves.  I’d have to guess that the concerns there are perhaps a little overblown, but still you don’t want all the happy microbes in your mouth colonizing your beer.  You certainly don’t want any liquid you’re going to be conditioning and later bottling getting in contact with your mouth.

Now on to bottling.  Use your dishwasher to sanitize the bottles.  Its damned easy.  Just put some one step or whatever sanitizer/cleaner you use in the spot for detergent (I wouldn’t use a detergent on them though), and run a cycle. Also, get a bottle filler or bottling wand and a clamp. They are cheap and make filling more more consistent and easy with less spillage.  I spilled at least a bottle or two worth of beer on the door of the dishwasher (which happens to be a great spot to bottle since when you close the door, all your spilled beer will slosh into the dishwasher and not on your floor).  Many thanks to Seth for the dishwasher recommendation.

All that said, while I was paranoid along the way about whether or not I’d ruined the batch, it seems to have turned out fairly well.  It’s quite a nice golden ale, and tastes similar to what you might expect from a Sierra Nevada Pale Ale.  In addition to the above recommendations, I would suggest getting a kit with multiple fermentation containers.  Even if you don’t plan on doing multiple-stage fermentation it makes it much easier to mix in the extra sugar for carbonation in the bottles.  Who in their right mind wants to add a measured amount of sugar to 4-dozen bottles or deal with not sucking up sediment while bottling.

The following wiki is also useful for explaining different aspects of the brewing process:  Home Brewing Wiki.

Alive

I am alive and well. Winter quarter has begun, but I should have a few things up regarding the following in the near future:

  • Home brewing (as in beer)
  • Hacking a miniPOV into a digital thermometer (w/ a DS1631)
  • SensterAmp v2 (replacement digitally controlled amp for the electrosenster)

Also, I now apparently have a publication to my name :-)

Yay for winter in Chicago, again!

Seriously…

WTF (TSA Prevents Guy From Bringing Microcontroller Programmer on Flight)

Best quote: “Sir, this is an improvised electronic device. You will never be allowed to fly with this.”

Quick Tip: Restoring a System Disk Over NFS w/ the OS X Boot DVD

I can’t guarantee this works with any other release than 10.4.x, but I’ve just discovered that it is possible to mount NFS volumes while only booted from the Mac OS X install DVD that came with my MacBook. I set up the export on my Ubuntu based desktop using the instructions here. I only needed to add insecure as an option in addition to rw and sync. This seems to be related to the ports that OS X wants to use, and if that seems unacceptable, turn off exporting with that option after completing this procedure next, all you need is the following.

1. Start up Terminal.

2. Type:

mkdir /Volumes/mountpoint

mount_nfs <ip of server>:/mount/point /Volumes/mountpoint

If all goes well, it shouldn’t throw any errors, and you’ll have the volume mounted.

3. Quit Terminal, open Disk Utility.

4a. If you don’t have paritions on the destination disk, make them.

4b. Select destination paritions, go to the Restore tab, then give the path to the image file, i.e:

/Volumes/mountpoint/path/to/my_image.dmg

4c. Drag the target partition over to the destination and click Restore.

Simple, easy, and fast (if you’ve got gigabit, and the image on a raid :-) )

 Of Note: AFP & Samba did not work for me as both of their mounting tools required frameworks not included in the filesystem on the boot DVD.  Why apple would include the tools but not required frameworks is a bit of a mystery…

Quick Tip: VisualHub & Matlab AVI Files

Quick tip if one is working with VisualHub to convert MATLAB AVI files (uncompressed) into another format.   If you use the default decoder it will not get the rasterization correct and thus the movie looks skewed and wrapped at an angle. To resolve this issue simply go into “Advanced…” and select QuickTime Decoding from the “Force:” menu (Just above “Two Pass”).  The QuickTime AVI libraries seem to have less trouble with these AVI files and your results will come out just as high quality for having used this alternate decoder.

Flash Alternative

Here’s a nice little article on a flash alternative. I found that gnash didn’t work so well for me, but using the mplayer plugin with YouTube works perfectly.

Nice if you’ve got a 64-bit, non x86, or FreeBSD platform and don’t want to use emulation or compatibility layers.

Yes, Most Journal Articles Are Written in Word

A recent article on Slashdot about some journals rejecting Word 2007 documents has brought up an interesting point.  Most journal articles ARE written in Word.  People seem to be shocked that this is the case, and appalled that anyone who has a PhD would be using such a tool.  Well, I hate to break it to you, but even in computer science these days I don’t see a heck of a lot of students graduating with knowledge of TeX, much less in the natural sciences.  Older professors, especially in math departments are fond of TeX, but not a whole lot of people teach it, or require it, so people don’t learn it.

My advisor originally set out to require students to produce reports in TeX for a Neuromechatronics class he was teaching, but in the most recent year this has been eschewed since students end up spending more time learning how to prepare reports than actually writing them.

Now, whether all of this is sad or not is an entirely different question, but people, intelligent or no, generally follow the path of least resistance.  Students have grown up using word processors, are familiar with them, and tend to balk at other options.  If one expects journal articles to be written in TeX or another open format, it needs to be an aspect of curriculum at some point.  Sure, some folk, like me, will go off and learn it anyways and even write class notes in it, but we’re few and far between. Plenty of pre AND post doctoral people use software like Excel as well to do data analysis.  It’s there, it can do number crunching, and it’s on practically every Windows machine.

Is it sad that this is the case? Perhaps.  Think of it this way, however; most people have a limited area of expertise.  That may be in computing, neurobiology, quantum physics (yeah, they’re broad categories, so something much more specific within these), and generally not in other areas.  Sure, we all need to know what’s going on in the world outside of our immediate work, but are things like TeX, MATLAB (or Octave, or whatever), necessities within working in a technical realm?  This is hard to say.  I’d be happy to see everyone more savvy, but I’m not sure if requiring these things are validly simply elitist or not.  Perhaps that doesn’t matter either, and people should just have familiarity with as many tools as possible. We all should be well rounded in our technical abilities, shouldn’t we?  I’m sure we’d all be better off if we were.

On FreeBSD

Recently, I’ve been working about half of my time on FreeBSD 6.2 on a desktop at home.  I’m finding that it is both simultaneously fabulous and difficult.  What I mean here is less that it is driving me crazy, but rather that it’s been a learning experience.  The state of things on FreeBSD as with Solaris is much like the olden days with Linux in terms of user-friendliness.  It’s not exactly like it, since, most of the desktop GUI stuff has matured miles over the way it used to be.  Where it differs is in the setup.  One will definitely spend quite a bit of time at the command line getting things up and running.  Additionally, documentation on the basic system is much more widespread (hardware drivers like sound cards even have man pages), and on the lower levels there’s much more coherence than one finds with Linux.

This coherence, however, does not apply to all levels.  Where Linux has gotten much more coherent in the graphical realm, FreeBSD still feels like one is getting raw materials from a large number of sources.  While some things are patched specifically for the OS, categories under menus are a bit scattered, and graphical administration packages are either not as well adjusted on FreeBSD or are not existent.  The latter of these issues isn’t that big of a deal.  I like working with the command line, getting acquainted with the underpinnings and, over time, having a more intimate knowledge of what I’m working with.

What is a bit of a problem is that it feels like, on the desktop front, that tens or hundreds of different people have made decisions about things rather than there being a unified force.  One key example is how SciTE gets installed under Programming and Scribes goes under accessories, where I’d put both of these in one category since they’re both programming editors.

I’m not sure what the solution is, or if we really need one, but I think I might start submitting patches in cases where I think things are wonky.  We’ll see what the ports maintainers think :-)