# Keeping tabs on your pets’ busy lives

[Stephen’s] daughter has a pair of mice she keeps as pets, who happen to be quite active at night. After they kept her awake for an entire evening by running like mad in their treadmill, they were moved from her bedroom. Since they were so active in the treadmill, [Stephen] thought it would be cool to try measuring how much the mice actually ran each night.

To keep track of their activity, he built a simple circuit that records how many rotations the treadmill makes. He fitted it with a rare earth magnet, installing a reed switch on the outside of case that ticks off each spin of the wheel. Any time the wheel starts moving, his PIC begins counting the rotations, displaying them on a 7-segment LED display. To mitigate data loss in the event of a power outage, the PIC stores the current number of rotations in its EEPROM every 10 seconds or so.

The counter keeps track of the total number of rounds the mice have completed, which his daughter uses to manually calculate their running sessions. Since they started tracking the mice, they have run over 700,000 rounds, sometimes completing as many as 20,000 in an evening.

We think it’s a pretty cool project, especially since it makes it fun for his daughter to stay involved in her pets’ lives.

## 14 thoughts on “Keeping tabs on your pets’ busy lives”

1. andar_b says:

I’d have made the mice generate their own power for the circuit. :) I remember being kept awake by my pygmy dwarf hamster one night when she was running like mad. She also figured out how to wedge herself behind the wheel and climb upside down on the wire-mesh lid for her cage like a jungle gym.

She was pregnant when we bought her, and she got REALLY mean when after she had her babies. The babies were nicer though, and thankfully both that survived were female, so no rodent incest. lol

2. Nick says:

To save people the math… if that wheel is:

4″ diameter, 138 miles!

6″ diameter, 208 MILES!

Thanks, Nick! I was just getting ready to do that math.

4. When do the mice get chipped and an RFID reader installed to determine who’s getting all the exercise? :)

5. Mike Nathan says:

@Nick,

Those are pretty impressive numbers when you calculate it out. Just keep in mind those figures are not even counting the times when his daughter forgot to reconnect the sensor. Looking at the picture of her log sheet that he posted, there are at least 10 days where the machine was not keeping track of their travels.

6. andar_b says:

now that I think of it, wouldn’t some sort of external RPM meter mounted to the outside of the enclosure be more user-friendly and less prone to leaving the sensor disconnected?

I’m thinking I’d attach a piece of retro-reflector to one of the treadmill bars and use an IR pair to detect the rotations. Not sure HOW I’d do that…but that’s what I’d think of first.

7. Sheldon says:

I did something similar for the wheel in my girlfriend’s Degu cage. I took the easy option and used a standard cycle computer which even took the wheel’s circumference as it was to give true readings. It being a bike computer, it instantly gives you distance (per day and total) along with instant speed (and maximum). They could hit just over 4mph running flat out and would do about 8-10 miles in a day. Only problem I had was keeping the sensor close enough to the wheel as they’d bounce the entire thing so much you’d get missed turns (I wasn’t allowed to modify the wheel).

8. Colecago says:

Just a note, the micro is not a PIC but an AVR. They call it an “Atmega PIC” but it is an Atmega128 according to the writeup.

9. katsmeat says:

Easy way to do this is with a bike computer. Just set the size of the “bike wheel” to be the circumference of the rodent wheel and you’re done.

10. j8g8j says:

Great science and technology project for the kiddos!

11. Grimreefer says:

j8g8j, Great idea, bio & tech in 1, these critters do run a fair bit, would be interesting how much they generate on a night’s run. mind you, if we could put a power generator on most things we touch, we could save lots of power, sprung doors for example, rotating doors?, peizo connected walk ways, regenerating lifts or escalators, we all could put a little energy back, you know, take a little off the load off.
Sorry, Rant over :-P, still.. ‘mind ponders’

12. pff says:

Best cage i have ever seen

13. t&p says:

god I know how it is with mice. I had 3. If they didn’t bury wheel they would run run run and run. The edges of the metal rubbing together (the plastic ones I tried sucked and they couldn’t move it) drove me nuts. Didn’t think it would be a good idea to put wd-40 on it as the mice loved to put everything in their mouths.