Abandoned Project #013: Cat Presence Detection

by Hannah Goodridge ~ ~ 3 min read

Like this post?

00

Most of my side projects start the same way: a burst of enthusiasm and a full online basket. Some of them even get finished. This one didn't.

Two cats and a question

I've got two indoor cats and I wanted data on them. Specifically, when they eat and where they go during the day. Partly curiosity, partly because I fancied building something you can actually pick up for a change.

The idea was an ESP32 in each room, a Bluetooth beacon on each collar, and a dashboard mapping the cats as they wandered round the house.

The bit that worked

I ordered three ESP32s and a few sensors, then got stuck into the Arduino IDE, writing code and uploading it onto the boards. Coming from the web, there's a strange thrill in pushing code to a little board on your desk and watching it start sending data back. I loved it.

The dashboard was the easy part for me. A floor plan of the house with both cats on it, each one plotted by whichever board last heard their beacon. That's more or less my day job, so it came together quickly.

The bit that didn't

The ESP32s could hear a beacon. They just couldn't tell me where it was. I'd know a cat was in the kitchen, but not whether it was at the food bowl or asleep in the far corner, which was a problem when half the point was tracking when they ate.

The beacons were also enormous. Well, enormous on a cat. No collar of mine was carrying one of those.

(Yes, I can hear you shouting "just use an AirTag". I tried. You can't jailbreak one and hook it up to your own hardware, so it was never going to talk to my ESP32s.)

GPS was no help either. Indoor cats don't travel far, and the few metres from kitchen to sofa is well below what GPS can pick up.

Then the costs started creeping up. An ESP32 needs to be plugged in all the time or strapped to a hefty battery pack, and I'd need one in every room, with two or three in the bigger ones. Each extra board meant another plug or battery and another set of sensors.

Every time I looked into doing presence detection properly, the answer came back as LiDAR, and LiDAR isn't cheap. I couldn't justify that kind of money to find out which radiator a cat prefers, so I stopped there. By the end I was mostly wondering whether there was just an app for this.

What I got out of it

Loads, actually. It was my first proper go at IoT, and I learnt how the whole chain hangs together, from a reading on a board to a dot moving across a map in the browser.

I've also got a lot more respect for off-the-shelf smart devices. Building your own is fiddly. Power and placement alone took far more fiddling than I expected, and when you buy a smart device, somebody else has already done all of that for you.

Onto the pile

The cat tracker now lives on my pile of projects I'll never finish. I don't mind. Abandoning things is part and parcel of being a developer, and this one earned its spot.

That said, if you've cracked indoor cat tracking yourself, or know of something open source that does it, I could be tempted into dusting this one off again.

Read next