HaptiCapMag A haptic compass built into a hat.

Project Overview

Wearing the hat, front view In 2007, there was an article in Wired about someone who made and wore a haptic compass, which always indicated north using an array of vibrator motors, purportedly giving the wearer a "sixth sense"1. At the time, I was much less jaded than I am now about science and technology journalism, and as a result I became enamored of the idea of gaining a new sense -- even a fairly useless one. At the time, I was an undergrad with no money or ideas about where to start. I've gotten a PhD in physical chemistry doing research that involved building an ultra-sensitive magnetometer, and so last year I decided I finally had the time, know-how (and income) to build my haptic compass.

Previous haptic compass designs have used a belt and an anklet, but during the time I had to think about this, I decided that a hat might actually be the ideal form factor for this sort of thing. The primary motivation is that I wanted my compass to be lightweight and blend in to normal attire -- hats have a surprising amount of hidden space for electronics in them -- but as it turns out there are some other advantages in the usability of the indicator itself (which I get into in the operation section)


The hat I built uses 8 vibrator motors to indicate direction, and a Honeywell HMC5883L 3-axis digital magnetometer (using the GY-273 breakout board) to determine the compass heading, both of which are controlled by an Arduino nano; power is supplied by battries from an old smartphone2, along with a step up transformer. The hat I got for free at a conference, courtesy of Triangle Analytical, Inc.

The magnetometer is mounted on the underside of the visor/brim of the hat, and the motors are inserted into small pockets sewn into the band. The battery, step up transformer and most of the connections are sewn into the underside of the crown. The most obtrusive part of my prototype is the Arduino itself, mainly because the one I bought already had DIP headers soldered into it; ideally, I would just use wire-to-wire connections for everything to lower the profile of the component, but because I don't want to desolder the long DIP headers, so I simply added a small pocket to the back into which I've slipped the breakout board.

One significant caveat of this design is that, from what I understand, some step-up transformers have capacitors that are not necessarily rated to the maximum voltage of voltage regulator, so if you accidentally turn the potentiometer too high, the capacitors can explode.

This is not something I would enjoy happening to a component pointed directly at my skull, so rather while the intuitive way to mount the step-up transformer is facing in, I suggest mounting it facing out; I've found that it helps to use styrofoam standoffs to prevent the thread from fraying and loosening in this configuration. This simultaneously minimizes the chance that I'll accidentally turn the screw on the potentiometer and, if the capacitors do explode, they'll hopefully explode away from my head, not towards it.

For simplicity's sake, in the prototype the vibrator motors are actuated directly using the digital outputs of the Arduino, but these are primarily logic outputs and were not designed to drive circuits, so it may be better to use something like a CD74HC4067 16-channel digital multiplexer hooked up to the output of the step-up transformer. You can also try using 1 kΩ AD5254 digital potentiometers, which make it easier to control the vibration intensity, but requires 1 IC for every 4 channels. In my experience, both seem to have an "on" voltage of approximately 50 Ω.


Using either the direct digital pin output or the multiplexer, the vibrator motors are either powered or they aren't -- as opposed to the use of a digital potentiometer, where the current can be changed more or less continuously -- but with all the motors going full blast, the hat can be a bit overwhelming - not to mention a power hog. I've found, however, that if the motors are pulsed sufficiently fast (in my case I'm using a 20 ms pulsing period), inertia allows them to still feel like they are running continuously, but with lower intensity. Additionally, the motors on the sides are much closer to my ears, and so I'm much more sensitive to their vibrations than the motors on the front and back, so I added a mechanism in the Arduino sketch to calibrate each motor's duty cycle independently, so all the motors have the same subjective intensity.

One significant advantage that the hat form factor has over belts (and possibly anklets, I'm not sure) is that because I can turn my head back and forth, I can easily increase the effective "resolution" of the device. By using 8 motors, I have approximately 45° resolution -- a 15° heading and a -15° heading are indicated in the same way (motor 0 is activated); however, I know that the motor switches over at ±22.5° offsets from the indicated motor, so I can actually fairly accurately deduce the direction of north by seeing how much I have to turn my head in either direction to get the motor to switch. Generally I find that I actually move my head around enough anyway that I don't have to actively try to increase the resolution, and my general "north sense" is fairly accurate anyway.


I've been wearing the device for about two weeks now, so it may be a bit early to tell. I certainly am much more aware of my absolute orientation, and I'm often surprised by what it is. When I was coming home the other day I said, "Hm, I always forget that our house faces North", which belies the fact that I already have some (wrong) intuitions about the relative orientations of various places I go and that I may be starting to correct those intuitions. So far I've only had one dream with north-sense in it: my bed faces north-south, and because the hat does not provide 3-dimensional information, it doesn't work right when I'm lying down, but in my dream I could sense that north was the direction normal to the crown of my head, and (in the dream) I took off the hat and started looking at it to try and debug why I was sensing something from the crown of my head - so it's hard to tell if that was a dream where north-sense was incorporated into the dream or a much more common (for me) dream of debugging a device.

The most striking thing about wearing the hat all the time, however, is that I'm not acutely aware of how many ferromagnetic objects are around that are magnetized enough to interfere with a compass. I'll often walk by a wall, doorway or pillar, and the compass will stop pointing north and sometimes will point towards the ferromagnetic object. This is particularly problematic on the highways, which are made of steel-reinforced concrete. Evidently, the rebar in the concrete must become magnetized over time, because driving on the highway can be very disorienting, as the field vector often pulsates rapidly. You can see this when comparing data I took with my phone's magnetometer while standing in my house (left) and while driving on the highway (right) (plotted in spherical coordinates):

Magnetometer data

I can generally get a sense of which direction is north, but it's very hard to trust with that much interference. Overall, I worry that the prevalence of ferromagnetic materials in modern life is interfering with my brain's ability to interpret the sensations from the compass as truly "north", because when north is a counter-intuitive direction I seem to automatically assume it's because I'm near something ferromagnetic, though very frequently it's actually counter-intuitive just because I still haven't developed a strong sense for my absolute direction yet. I may be able to fix these problems by adding an accelerometer to the hat and indicating if there's a particularly strange inclination to the magnetization.


  1. ^ Though in fact we have many more than 5 senses already.

  2. ^ Any phone battery should work, I used batteries from my HTC Evo 4G, but you may be able to get a better deal by surfing around eBay for old phone batteries with chargers.