Introduction: Project Floofball: an IoT Hamster Wheel

About: Hi, we’re Dane & Nicole, two makers that create stuff, which we happily share with you!

An IoT hamster wheel made using a Raspberry Pi and a magnetic door sensor, to see how far my hamster runs.

Full project video here!

The project files are available in this Instructable, and you can also find them on GitHub.

Step 1: Tracking the Wheel

The first step was locally tracking the spinning of the hamster wheel.

I used a magnetic door sensor to track the turning of the hamster wheel, not only because it’s very easy, but it also wouldn’t hurt or kill my hamster.

I used this Adafruit tutorial to track when the magnet passed by the sensor.

You can find the code used below and on GitHub.

Step 2: Connecting to ThingSpeak

I used this ThingSpeak tutorial to connect the hamsterwheel to the IoT service.

ThingSpeak was very easy to setup, easy to use and it creates these cool graphs. I highly recommend it!

Step 3: Adding the LCD Screen and Casing

I added the LCD screen to the Raspberry Pi, by following this tutorial by RaspberryPi-Spy.

My screen displays the amount total amount of km run per day, plus the speed in km/h.

To hide all the wiring and display the LCD screen, I lasercut a box.

Step 4: Collect Data and Enjoy!

Let your hamster run, and enjoy all the cool data you collect!

The summary of the data was made using Google Data Studio.

As you can see, it’s not always very accurate, the sensor got stuck a number of times, creating records of +40km a day, but overall it’s pretty neat!

Of course, a bonus picture of Harold the Hamster looking cute!