Raspberry Pi + Python + Hamsters
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


#Hamstrometer ###Raspberry Pi Powered Hamster Pedometer ####Michelle Leonhart | www.tinwhiskers.net

License: GPL

The Internet claims that Roborovski hamsters (the breed I own) run "an equivalent of four human marathons each night on average".

This repo is part of a project to determine if my two pet hamsters -- Hamtaro and Hamtaro Grande -- can hold their own against this claim. Here's how it works:

Mod the Hamster Wheel to Allow for Safe Tracking

My hamster wheel is modded with a VCR head for two reasons:

  1. The ballbearings that are designed to play a video tape smoothly allow for relatively frictionless (and therefor nearly silent) rotation. Silence is golden when living with nocturnal pets who supposedly run nightly marathons on their wheel.
  2. The VCR head has an axel which can reach through the wires of the cage and attach to the wheel. This is important because it means I can mount the VCR head itself on the outside of the cage, allowing me to attach it to other objects safely outside of my hamsters' reach.

Build a System to Collect Data

(Link to Fritzing diagram)

  • Raspberry Pi
  • Hall Effect Sensor
  • Rare-earth magnet
  • Other misc circuitry
  • Ethernet Connection or w/e

ETL Code

Extract, Transform, Load Re-runnability

Track Data Over Time

tl;dr My hamsters are lazy

#Data Structure

Database Type


##Database hamstrometer.db



Columns Description Example
start_datetime Datetime of the first recorded rotation in the sprint 2015-07-11 12:34:56.123456
end_datetime Datetime of the last recorded rotation in the sprint 2015-07-11 01:23:45.123456
rotations Number of recorded rotations in the sprint 7