[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.