Run, hamster, run!

Right-hand Y-axis goes with dashed line;  distance run, in miles
Left-hand Y-axis goes with the blue dots; miles per hour, averaged over 30-second intervals
X-axis is clock time; where 0 = midnight
Data collected using an  AVR microcontroller and Allegro hall effect sensor

The Set-up

These 3 photos might help visualize the task of "instrumenting" your hamster cage with a hamometer. 

Back of the wheel:

Here's the back of the wheel (out of focus... sorry), with the 2 magnets glued on, 180 degrees apart.  If you want to be able to deduce the direction of rotation (counter-clockwise or clockwise), a symmetric arrangement like this won't help.  Separating the magets by 90 degrees makes the software trickier but would let you deduce the direction.

The Sensor:

This is the sensor packaged so that it can be mounted inside the cage and protected from the hamster.  The actual hall effect component itself looks much like the temperature sensor -- not much to see.  The "packaging"  is nothing more than a cut-down strawberry container, with some twist-ties and cardboard.  Note the data cable.  By connecting all our the probes and sensors to CAT5 cable stubs with  RJ45 connectors, we can easily switch from one experiment to another without ever touching the microcontroller breadboard.  The breadboard side  has it's own RJ45 and cable stub.  We connected the probe to the AVR with 30' of CAT5 cable.

All together

An ensemble shot.  The closer the magnets to the sensor as the wheel goes around, the stronger the signal; this makes the software a little easier.  We found it easier to attach the wheel to the cage first, then place the packaged sensor in the desired location.  It isn't obvious from the photo, but the strawberry container also covers the data cable, until it emerges through the top of the cage.  Our hamster, for some reason, seems never to chew on things he  shouldn't, but some are more mischievous:  BEWARE.