Tag Archives: cat

Track your cat’s activity with a homemade speedometer

Post Syndicated from Ashley Whittaker original https://www.raspberrypi.org/blog/track-your-cats-activity-with-a-homemade-speedometer/

Firstly, hamster wheels for cats are (still) a thing. Secondly, Bengal cats run far. And Shawn Nunley on reddit is the latest to hit on this solution for kitty exercise and bonus cat stats.

Here is the wheel itself. That part was shop-bought. (Apparently it’s a ZiggyDoo Ferris Cat Wheel.)

Smol kitty in big wheel

Shawn has created a speedometer that tracks distance and speed. Every time a magnet mounted on the wheel passes a fixed sensor, a Raspberry Pi Zero writes to a log file so he can see how far and fast his felines have travelled. The wheel has six sensors, which each record 2.095 ft of travel. This project revealed the cats do about 4-6 miles per night on their wheel, and they reach speeds of 14 miles an hour.

Here’s your shopping list:

  • Raspberry Pi
  • Reed switch (Shawn got these)
  • Jumper wires
  • Ferris cat wheel

The tiny white box sticking out at the base of the wheel is the sensor

Shawn soldered a 40-pin header to his Raspberry Pi Zero and used jumper wires to connect to the sensor. He mounted the sensor to the cat wheel using hot glue and a pill box cut in half, which provided the perfect offset so it could accurately detect the magnets passing by. The code is written in Python.

Upcoming improvements include adding RFID so the wheel can distinguish between the cats in this two-kitty household.

Shawn also plans to calculate how much energy the Bengals are expending, and he’ll soon be connecting the Raspberry Pi to their Google Cloud Platform account so you can all keep up with the cats’ stats.

The stats are currently available only locally

And, get this – this was Shawn’s first ever time doing anything with Raspberry Pi or Python. OK, so as an ex-programmer he had a bit of a head start, but he assures us he hasn’t touched the stuff since the 1990s. He explains: “I was totally shocked at how easy it was once I figured out how to get the Raspberry Pi to read a sensor.” Start to finish, the project took him just one week.

The post Track your cat’s activity with a homemade speedometer appeared first on Raspberry Pi.

Motion-controlled water fountain…for cats!

Post Syndicated from Alex Bate original https://www.raspberrypi.org/blog/motion-controlled-cat-water-fountain/

Tired of the constant trickle of your cat’s water fountain? Set up motion detection and put your cat in control.


Cats are fickle

My cat, Jimmy, loves drinking from running water. Or from the sink. Or from whatever glass I am currently using. Basically, my cat loves drinking out of anything that isn’t his water bowl…because like all cats, he’s fickle and lives to cause his humans as much aggravation as possible.

Here’s a photo of my gorgeous boy, because what cat owner doesn’t like showing off their cat at the slightest opportunity?

Jimmy’s getting better now, thanks to the introduction of a pet water fountain in the kitchen, and we’ve somehow tricked him into using it — but what I don’t like is how the constant trickle of water makes me want to pee all the time.

Thankfully, this motion-controlled water foundation from Hackster.io maker vladimirm is here to save the day by only turning on the fountain when his cat approached it.

Motion-controlled pet water foundation

So how does it work? Vladimir explains:

When the PIR sensor detects movement, it sends a message to the radio dongle plugged to the Raspberry Pi, which sends the message to the MQTT server. On the other side, the MQTT message is processed by the Home Assistant, which then, using the automation, triggers the smart plug and starts the configured countdown.

The build uses an old Raspberry Pi 1 Model B, and a BigClown Motion Detector Kit, alongside a TP-Link smart plug and an open-source Home Assistant. The Home Assistant smartphone app documents when the smart plug is activated, and for how long, which also means you can track when your pet is drinking and check they’re getting enough water.

Vladimir goes into far more detail in the project tutorial. Now go help your cat stay hydrated!

The post Motion-controlled water fountain…for cats! appeared first on Raspberry Pi.