New in Ubuntu Jaunty 9.04

30. Mar 2009 Comments 1 comment

I’m upgrading to the Jaunty beta tonight and taking a look at what’s new in the package rep.

Aside from thinkfinger breaking and Xorg not coming up right away, things went pretty well. The thinkfinger tools verify my finger so it seems like something related to PAM.  Meh, in tablet mode it will be lame to unlock my screen but that’s all I use biometrics for ATM.

Meaningless statistic: compared to hardy, there are fewer new packages (about 1500 fewer in intrepid to jaunty than gutsy to hardy).

  • mrpt - Mobile robot programming toolkit
    The Mobile Robot Programming Toolkit (MRPT) is an extensive, cross-platform, and open source C++ library aimed to help robotics researchers to design and implement algorithms (mainly) in the fields of Simultaneous Localization and Mapping (SLAM), computer vision, and motion planning (obstacle avoidance). The priorities are efficiency and reusability of code.
  • Ever wanted to karaoke on Linux?  Performous is in universe.  (Never used it but sounds interesting.  Website is down.)
  • The openoffice presenter console is in universe.  Dual screen presentations with presentation notes, next and current slide on one; just current slide on the other.

See the complete details here: newpkgs-jaunty.  It’s a gnumeric file with the new packages listed in three columns: package, section and description.

Refurbishing a Canon 30D

16. Feb 2009 Comments 0 comments

I recently picked up a Canon 30D for a great price.  Two things were wrong with it: its shutter release was unreliable and its focus was unreliable.  It turned out that both were easy fixes: the shutter release just required a bit of cleaning and the focus was unreliable due to a dirty mirror.

Cleaning the shutter release involved opening up the body, disassembling the two-stage switch and using isopropyl alcohol to clean the metal contacts.  This is described in detail here.  There is also a video of the procedure here.  The procedure is pretty easy and I was able to do it without using my soldering iron.  There are quite a few screws of different dimensions to keep track of, that was the only tricky bit.  I was very impressed with the quality of manufacture of the body.

The AF problem was simply a dirty mirror which I solved (carefully) using the eraser head of a pencil and some lint free lens cleaning paper.

During my research on tuning AF, when I thought that it was backfocusing, I scanned various forums and pages on how to calibrate the focus points of the 30D.  It turns out that the AF mirror rests on an eliptical 1.3mm bolt inside the mirror box.  By turning this bolt, one can play with the offset of the mirror with respect to the AF sensors.  The offset adjusts the effective distance from the AF sensor to the centre of the lens, which should as close as possible to the distance from the centre of the lens to the CMOS sensor as well as the viewfinder.  The procedure is described in detail here, here and here.  There is a caveat though: the offset bolt will change this distance in one direction for the sensors at the top of the image and in the other direction for the sensors at the bottom of the image.  By adjusting the offset, you might be throwing (at least) those sensors off.  (This is also explained here but the author refers to the sensors on the sides which on the 30D should not be affected as there are actually two elliptical bolts.)

One more thing, if you have a problematic EF 50mm f1.8 that is severely back- or front-focusing, you might be able to bridge some solder points inside the lens body to correct it.  This informative post details the procedure with images.  More information on this thread, which also links a collection of lens exploded diagrams here.

On charging batteries

03. Jan 2009 Comments 0 comments

I have a bluetooth mouse that runs off a single AA battery.  This is annoying since the charger I have can only charge doubles at a time and I seem to have lost all but two of my AA rechargables.  So in my infinitely perfect logic, rather than simply buying a few more rechargeables, I spent the evening building a single AA battery charger using a constant current source inspired from wikipedia and an Arduino.

My design kind of sucks for a number of reasons but mostly because it pushes 1.25 A through a 2 Ohm resistor while charging the battery at about 1.5V @ 1.25 A.  That is less than 50% efficiency not even including the voltage drop across the regulator.  It also tries to sense end of charge through sensing “negative delta V” across the battery.  According to a few sources, that is not the best way to do it; a better way is to sense temperature.  I figured it would work ok but my first battery has yet to finish charging (and it hasn’t gotten that hot yet).

It seems to be common to use the LM317 IC in constant current applications.  This guy built something similar to mine except he uses the cheap, nasty PIC micros with an LM317.  His circuit achieves better efficiency, on the order of 50% with a single AA cell, but still pretty shitty.  (He uses his design to charge a bank of cells, so his efficiency is actually much better I think.)

Galvanic Skin Response (aka Electrodermal Activity)

24. Dec 2008 Comments 0 comments

I came across the Affective Diary the other day (Paper).  There’s a youtube video but this blog entry sums it up nicely:

As you move through your day, you send and take pictures and send messages over your mobile. These messages and pictures are captured to the system which is connected to a body monitor that tells your pace, using a pedometer, and a galvanic skin response meter. When you’re excited, a little blob on the screen turns red and upright and when you’re relaxed the blob is blue and sleepy. The system allows you to watch a timeline of your blobs allowing you to see when and where you were most excited or agitated and even provides biofeedback.

One tester found that she was most agitated when her son was leaving to go back to Paris. By noting this, she learned she could tell her son she missed him and feel much better after he left instead of holding it in and getting herself upset. It’s a very humanist - and friendly - approach to technology.

So they’re correlating galvanic skin response with communication logs and using that information to reflect on experience — pretty cool.  GSR is also used in lie detection tests and by the Church of Scientology to measure stress IIRC [not that that instutition is capable of lending this any credibility whatsoever].  I’m interested in playing around with this with my own kit so I’ve spent some time looking at building a GSR instrument.

Some Cornell students built a GSR monitor using a PIC, a whetstone bridge and an instrumentation amp.  It’s interesting to see the effect of meditation has on the GSR plots: it turns the erratic signal into something quite recognizable.  I’m critical about their bridge design as it seems to me that the single transducer would never produce a linear response.  Their choice in resistor values must have put the transfer function in an approximately linear zone.

This paper uses an alternate approach that also measures the conductance response.  Their aim is to detect drowsiness and it appears that the response is important for that.  Their method uses a constant current injected across the skin with an instrumentation amp (an AD630 no less — used one of these in class) measuring the resulting voltage drop.  It seems more robust to me.

On Why C# 3.0 is Cool

08. Dec 2008 Comments 0 comments

I come from a Perl background so with my beloved first code love Perl being a dynamically typed, interpreted imperative language with functional and object-oriented elements thrown in for free, I was delighted to read that C#, a statically-typed pseudo compiled imperative language has not only object-oriented grammar/semantics/features but functional ones too as of C# 3.0.  So hopeful was I that C# also got list comprehension but alas it has only a crude hack so that side effects are explicitly such.  (i.e. the “out” variable modifier)

Then, while reading Miguel de Icaza’s blog, I came across a presentation on C# 4.0 by its chief architect and was surprised to learn that not only have they put functional elements into C# but they are planning on bringing in optional dynamic typing.  This is kind of a converse to Perl6’s optionally static typing.  It’s almost like these two languages are converging somewhat: perl6 is dynamically typed with optional static typing, supports named optional parameters, functional paradigms, runs on a virtual machine… C#4 is statically typed with optional dynamic typing, supports named optional parameters, functional paradigms, runs on a virtual machine…  It’s even more interesting to watch Anders (C# architect) say things like “for x equals one to four, do blah” which make one wonder if he’s secretly a perl hacker inside.

Other cool, interesting C# things here and upcoming:

  • Mono GTK runs on Linux, AND Windows and Mac OS X.  It looks half decent on the latter two as well.  Not that it matters much anymore but during my brief one year foray into Candy Land Where Beach Balls Roam Free and Wild (aka Mac OS X) one app that I really wanted back was Tomboy.
  • Next major release of mono gets SIMD support
  • Closures and lambdas (and their lambdas look half decent to use)

cat /proc/engine

25. Jun 2008 Comments 0 comments

Every engine in every car sold new today is controlled digitally so wtf is not having an abundance of cheap ODB2 cables and open source software that supports every damn car out there. Get with it, Internet.

So I picked up a VAG-COM the other week and have been slowly getting accustomed to being able to cat /proc on my car.

I can pull up so much stuff about my car. I started with seeing if the air flow being detected by my MAF sensor was about right and then went on to see if my turbo was working right through manifold pressure measurements. (I think the turbo is used somewhat like a throttle plate in a gasoline car, to regulate the air volume that is delivered to the cylinders. i.e. for load regulation, which is pretty cool and one of the reasons why diesel engines get my inner geek all hot and bothered.) They all tested fine so I’m now using it merely for amusement (or perhaps not), to compare fuel usage to and from work.

Seen above: two 25 km trips, north at highway speeds (on the highway, which is more or less indicated on the histogram) and south through traffic at 60-70 kph (see the big contribution of engine speeds < 1000 in the histogram). Weird that the highway trip used more fuel in total but it is a net up hill drive so maybe not so weird.

One thing that pisses me off about the tool is how it only lets you select predetermined sets of measurements. I.e. measuring block 16 gives engine speed, injected quantity, fuel use and some other stupid measurement when it would actually be more useful to have vehicle speed in there. You can have two “measuring blocks” logging at once but it slows down the poll rate, which already sucks at like 2-3 Hz.

Goosh: the Google shell

02. Jun 2008 Comments 0 comments

Goosh is a command line shell to google. I really like being able to consolidate several types of searches into a simple, bare bones, consistent list style query/result interface. It feels revolutionary to use, sort of 5/7 of the way towards the feeling I had when I discovered MP3 compression… back in the 90s. Much like then, this thing is not that great right now but has immense potential to be incredibly super fantastic.

I’ve just been testing stuff with it so far, like:

> video the shins
> go 1

Or:

> place m4m1y2
> go 1

It needs these features:

  • I’ve lost the ability to “go” and “open” once. It came back spontaneously.
  • Emacs/bash style editing shortcuts are missing (CTRL-A, CTRL-E, CTRL-D, ALT-F, etc)
  • An alias framework that maps arguments to URLs. Getopt style arguments would be fantastic

Josh Sommers and the Droste Effect

09. May 2008 Comments 0 comments

Droste EffectBeen busy moving into a new apartment in Toronto’s East Chinatown. Painting, cleaning, buying stuff for the kitchen… other misc junk.

While searching flickr for suitably cool pictures to hang on my walls, I came across this guy named Josh Sommers. He uses MathMap, an extremely cool GIMP plug-in, to make recursive pictures ala Escher (specifically utilizing the so-called Droste Effect). The image above is his and you can find his flickr stream here.

The Memristor

02. May 2008 Comments 0 comments

There’s a new (ackwardly named) basic circuit element that relates magnetic flux with charge. It joins the inductor, the capacitor and the resistor as the fundamental basic building blocks of electric circuits. According to arstechnica, once you dive into the math, it actually boils down to a variable resistance as a function of the charge passed through it. They also speculate that transistors based on memristors will be able to scale down well enough that they put off the demise of moore’s law well into the forseeable future. Also, the article has some details on a solid state storage device by HP with higher data density than flash with DRAM latency. That could be interesting as it could allow the merger of “main memory” (RAM) and “secondary storage” (hard disk). The integration of all that stuff into the CPU much like your garden variety microcontroller does today would be cool too.

Weekend Point Post #2

26. Apr 2008 Comments 0 comments

  • This Atmel based boost regulator is powered by 2AA and produces 10.5 V output. It’s designed to drive 3 LEDs so it’s current limited to about 60 mA. Shown above.
  • WikiMindMap shows all the wiki links from a particular article as a graph. For topics with subsections, the subsections appear on the same graph as fold out graphs. It’s a visual keyword summary of the article.
  • Laser Graffiti, some guys coupled a camera and a projector with a computer to use a 60mw laser pointer to write on giant buildings. Recently used to tag Toronto’s city hall
  • BrightKite takes social networking to new extremes of stalking location tracking