True North

rotatedWell, except for declination error and any nearby metal objects, and within the resolution of the stepper motor…

Ingredients:

The design is pretty much a matter of one questionable decision leading to another. At first, I wanted the sensor firmly mounted on the hat, but then I would have needed a foolproof way of measuring the angle of the needle (because skipped steps and unknown position at power-up). That was too hard, so the sensor had to move. And that in turn meant a slip ring, because the compass needle can rotate an arbitrary number of turns. And a slip ring meant the gear-shaft stepper, because the much-more-accurate BYJ-48 couldn’t drive anything on the far side of a slip ring without being geared itself, and why print and mesh two gears instead of one? Oh, and I could have used a motor-driver chip and driven the stepper with only 4 wires, but this is Halloween, so another set of blinking lights is all to the good.

This turned out to be a pretty good Halloween piece, because it’s subtle. Nothing happens until I turn my head. (In fact, when I first went out to supervise the kids trick-or-treating, someone stopped me to say “Hey, something’s wrong with your hat, it’s not spinning!”) It generally takes people a moment to figure out what’s going on, and then they like it.

The whole thing took longer to make work than I thought, mostly because I was confused about my directions: when the compass heading is positive, I have to tell the stepper to move clockwise to bring it back to north, and vice versa when it’s negative. So for a day it tried its best to point south while overcorrecting terribly in the wrong direction. Also, averaging angles (which you have to do because the measurements are noisy) is hard unless the angles are all in one quadrant, so finally I gave up and just put in a calibration spin at startup. And if I had it to do over again, I would definitely make a better hat. This one had no internal support and really wanted to slice through my ears by the end of the night.

This entry was posted in making, toys and tagged , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s