I recently embarked on an exciting project to monitor my hamster’s wheel activity using openHAB and some DIY electronics. It all started during the festive period when I received a Raspberry Pi as a gift, freeing up an old WEMOS D1 board I had lying around. I decided to put it to good use by creating a smart pet wheel tracker. Here’s how I did it and what I’ve learned along the way.### The SetupI gathered a few components:- WEMOS D1 R2: The main controller.- 10k Resistor: To interface with the reed sensor.- Reed Sensor: To detect the wheel’s rotation.- Magnets: Attached to the wheel and cage.- Hamster Wheel and Cage: The star of the show.The process involved attaching magnets to the wheel and cage, wiring the reed sensor to the WEMOS board, and coding everything to send data to my openHAB setup. It was a fun mix of soldering, coding, and problem-solving.### The ExperienceSeeing my hamster’s activity data appear in openHAB was incredibly satisfying. I set up items to track speed, distance, and rotations, which gave me a fascinating glimpse into my pet’s daily routine. The persistence strategy using InfluxDB allowed me to monitor trends over time, which was both educational and entertaining.One thing I noticed was the need for careful calibration. The reed sensor’s sensitivity had to be just right to avoid false triggers but still capture every rotation accurately. I also had to ensure the magnets were positioned correctly to maintain a consistent signal.### Insights and Tricks- Code Adaptation: I used an existing GitHub project as a base and adapted it to my setup. Credit goes to Dage Kimber for the original code.- Magnet Placement: Sanding the magnets to prevent them from touching the cage was crucial for reliable readings.- Battery Life: The WEMOS board runs on a small battery, so optimizing the code for low power usage was important.### Questions and Future PlansI’m curious about how others might improve this setup. For instance, could adding a camera trigger provide video clips of my hamster’s activity? Also, I’d love to explore integrating this data with other smart home devices, like automatically adjusting the lighting based on my hamster’s active hours.Another thought: could this project be scaled up to monitor multiple pets or different types of activity? The flexibility of openHAB makes me think it’s possible, but I’m not sure where to start.### ConclusionThis project was a delightful blend of tech and pet care. It taught me a lot about DIY electronics and openHAB’s capabilities. Plus, it gave me a new appreciation for my hamster’s energy levels! If you’re looking for a fun and educational project, I highly recommend giving something like this a try. The satisfaction of seeing your creation come to life is unmatched.