Using the magnetometer sensor (contained on the IMU) I believe we could measure how fast a hamster is running in their wheel. We could attach a magnet to the outside of a hamster wheel and sense each time the magnet went by the sensor. Using some math (Help @BPeters) maybe we could then calculate how fast the hamster is going in RPMs or MPH.

What do you think?

Also, Weird Al

1 Like

The math is easy! You just need to figure out what the circumference of your hamster wheel is. One way to do this would be to measure the diameter (or radius & multiply by 2!) of the wheel, and multiply by pi. Another way would be to take a string and put it around the wheel as accurately as you can, then lay it out and measure it. Maybe there are other ways you can think of to get the circumference of the wheel?

After you have that distance, then speed is simply distance / time. In this case, you’ll measure how many revolutions (using the magnetometer) you get in some sampling period (say, 1 minute), then multiply that number by the distance of each revolution:

speed = ( circumference * revs ) / 1 min.

You can then use unit conversions to get into a more conventional unit, like MPH or km/h.