Wednesday, May 16

Welcome to the Internet of Hamsters

It was only a matter of time. Everything else is getting its data logged and reported to the Internet for detailed analysis, so why should our rodents be any different? The cover story is that [Nicole Horward] hooked her pet hamster Harold up to the web because she wanted to see if he was getting as much exercise as he should. The real reason is, of course, that Harold wanted to show off to his “friends” on Hamsterbook.

The hardware side of this hack is very simple, a magnetic door sensor (like the kind used in alarm systems) is used to detect each time the wheel makes a complete rotation. The sensor is hooked up to the GPIO pins of a Raspberry Pi, where it’s read by a Python script. A small LCD screen was added to give some visual feedback on Harold’s daily activity, and the whole thing was boxed up in a laser cut enclosure.

That gave [Nicole] a cute little display next to Harold’s cage, but it didn’t do much for analyzing his activity. For that, a script is used to upload the data every minute to a ThingSpeak channel via MQTT. This automatically generates attractive graphs from the raw data, making it much easier to visualize what’s happening over the long term.

Now might be a good time to brush up on your MQTT knowledge, so that your pet could be the next to join the IoT revolution.

No comments:

Post a Comment