20090528

On compasses and cyborgs

I find senses and perception fascinating. The human brain is amazingly plastic; it can take input in a variety of ways, and process it however is appropriate. What set of nerves the data arrives on is a seemingly secondary consideration. This makes adding new senses — a must for any discerning cyborg — surprisingly easy. Wired had a fascinating article on the matter. The belt mentioned in the article is discussed online. Eventually, I decided I had to try building such a belt. Why bother looking at a compass when you can simply know which way is North?

(I'll discuss a bit about the high-level design of the belt in this post; schematics and other details about working with the sensor will be in a future post.)

It turns out that electronic compass sensing is actually somewhat complicated. The sensors tend to be complex, expensive, or inaccurate. I'll try to document the belt in a manner that makes it clear how to use only the sensor portion, in case you wanted to add a compass to your robot or something. I eventually decided on the KMZ52 from NXP (datasheet), available from Digikey (568-2426-1-ND) for $7.39. This sensor is complicated and a little more expensive than I'd like, but easily accurate enough. It's only available as a surface mount SOIC-16, which is a little awkward for breadboard prototyping. I soldered it to a prototyping board for simplicity — a little pricey, but easy to work with (I don't like designing a PCB for a first prototype!).

The first version of the belt was a purely analog device (there's a newer version in progress; more on that later). For sake of simplicity, I also didn't make use of all the features available in the sensor. The end result was, as expected, rather finicky, with many potential areas of improvement. However, it did work — after a little training with it, you have a sense of North!

The feelSpace belt was too complicated for my tastes in a variety of ways. First, I didn't want to use a microprocessor if I could avoid it. Second, I was certain I didn't need anything like 13 motors (even inexpensive vibrator motors, like the ones I chose, are pricey when you have that many). Secondly, having a 13-state digital output seemed weird to me. Orientation is analog data, and your brain likes analog inputs. I decided to go with just four motors. They would be spaced evenly around the waist, and each of them would vibrate at full strength when it was pointing due North, not at all when due South, and vary sinusoidally in between. This was (not coincidentally) a good match for the sensor output. The KMZ52 is a two-axis electronic compass. Each axis outputs a signal proportional to the field strength along that axis. That means that one motor would be at full strength when on axis was pointed due North, and its opposite number would have an inverted response on the same axis. The other two motors would do the same on the other axis. All of this is done with op amps and a few drive transistors for the motors.

For various reasons, I ended up building the prototype version for my brother. I'll close with his thoughts on wearing it:

Being augmented is a surprising feeling.

When I'm paying attention to navigating, I'm now always conscious of a buzzing feeling which, despite being produced by four motors at four fixed spots, seems to simply move around my waist, always coming from the north.

Living in a city whose streets are laid out on a grid (in many places), I tend to navigate by knowing compass directions... but I'm often pretty bad at knowing which way is which, and have in the past solved this problem by staring at shadows and estimating based on the time and limited knowledge of sundials which way they should be going. This works quite well... except that I get lost sometimes on cloudy days.

With the belt on, I simply know which way north is. It's not because I pay attention to the moving buzzy feeling - it's just always there, so I know which way it is without taking the time to think about it. Perhaps unexpectedly, if I'm facing in one direction constantly even for thirty seconds my brain quickly tunes it out and I have no extra sense of north. But as soon as I move, I'm aware of directions again and my sixth sense returns. This means standing up when I've been at my computer for a while feels a little strange.

The weirdest part of the experience, though, has got to be my new nervous habit.

The belt needs to be degaussed periodically. There's a switch which you flip the other way and then return to its normal state in order to do this. Any time something gets the belt a little bit off, this is particularly necessary - and I notice such a thing on a subconscious level, when it happens. So something will feel jarring, I'll degauss and it will go away, and then I'll realize it's because I was standing next to a refrigerator for a while. But now I'm degaussing myself whenever something feels odd. "This soup tastes funny! Time to degauss!" "Holy crap what was that noise? Degauss!" "It feels weird not having my belt on. Deg- um, huh. That's vaguely unsettling."

20090527

Introduction

For some time now, I've been designing and building circuits as a hobby. They're documented to varying degrees, in a variety of forms (photos, napkin schematics, forum posts), and with varying quality. I've started this blog primarily as a way to organize that information. Not uncommonly, I find myself writing an explanation of a circuit I've built, and wished it was simpler to just give a URL to one of the previous explanations I wrote. I'll still document in varying degrees of detail, but hopefully it will mostly be in one place. I'll be posting some about some older projects, and also about new ones as they come along.

I work with both analog and digital circuits, but I'll basically only post about the analog ones here. The design of digital circuits just isn't as interesting -- anything complicated is handled by a specialty chip or a microprocessor. There's nothing wrong with that, and it's very useful, but I don't find it as interesting -- and there are a lot more people posting about it on the internet already. Analog design, on the other hand, is more complex and subtle, just as important to the hobbyist, and there's less about it on the Web already.

By far the most interesting circuits combine the two domains. They do so in myriad ways, driven by the wide ranging sets of requirements on different sorts of circuits. These days, it is rare to see a circuit that operates purely in the analog domain. Microprocessors are so cheap, and can do so much, that there really isn't much point. But the environment they operate in is decidedly and unavoidably analog, and ignoring that aspect of the circuit leads to more errors, and subtler ones, than many hobbyists realize.