On Cat Feeders and Aging Cats


Growing up I had pet rats. They were wonderful pets; affectionate, smart and active… mostly… but they didn’t live long, usually 2.5 years or less.

In 2010 I got a cat, a “pavement special”, for free, and as it turns out, cats live longer than pet rats 😅 - a lot longer.

Kitty is adorable, and at 16 has started to properly experience the inevitable savagery of aging, which includes nausea and an irritable bowel. This means she has had to transition from dry food on-tap to small meals consisting of wet, pre-processed food.

Actually providing this food to her in this format is a challenge as no one wants to deal with this additional admin - as much as we love her.

This is an old problem, there have been a number of attempts over the years to get this right and they all have shortcomings and trade-offs.

Option 1: The Aqara Smart Pet Feeder.
This is cool because it’s dirt cheap and supports Zigbee via Zigbee2MQTT. The bad side is that it doesn’t handle wet food, doesn’t refrigerate, the smallest portion size is quite large, and the Zigbee interface is minimal.

Option-ish 2: The Petsafe Refrigerated Pet Feeder
It’s cool because it supports 6 portion sizes. It’s also expensive and has that cloud platform involved. My previous experience with PetSafe makes me strongly distrust their cloud platform. Their products are usually quite rough around the edges. This product isn’t available in the UK. All considered, not a bad option.

Option 3: The Petlibro Pola

This machine is available in the UK, from a variety of standard retailers, and it’s relatively cheap (new for ~£100, used for £50). This company has a history of using Espressiff micro controllers in their products. If this product contains an ESP32 microcontroller - these are very hackable and compatible with ESPHome. The bad: only 3x portion compartments in the tray, if it isn’t esp32 based and/or has firmware signing active, we’re stuck with their shitty app.

We’ll come back to this 🫦


Option 4: Ask AI to rebuild the internet

As it turns out, if you give Claude/ChatGPT the tools it needs/framework to quantify your requirements, it can build 3D things.

I find this to be quite incredible. The prototype will be hard to build: sourcing all these components will be a challenge. Printing the components will be hard. It all needs testing. Hand-assembling the PCB will take time. Thermal dynamics are hard to quantify. But this is the thing. Local first/zero cloud, proper refrigeration, open source, etc. If this works, it will be incredible.

The current project state is available here: https://github.com/aquarat/cat-feeder

My engineering friend joked that a Chinese manufacturer may eventually pick it up 😂

This doesn’t solve the immediate challenge though, so back to the Petlibro…

Of course it arrived 5 minutes before long-last seen friends were about to join us for dinner 🤪😆

That means… open it faster! I neeed to know…

Indeed, that PCB has an esp32 soldered onto it and there’s a delightful TTL UART header right next to it. If we’re lucky this might be plug and play.

Solder faster!
btw, this Fantik soldering iron kit is insane value for money - and fun.

Header soldered. USB FTDI attached.

Attached to this laptop via x adapter is an esp32 MCU… I want you to determine if this esp32 allows reading of the flash contents and if firmware signing enforcement is turned on. (not the prompt - you get the idea)

I shorted pin 9 to ground while applying power to put the chip into download mode and sometime later Claude produced an initial project containing firmware dumps.

At my request the Claude harness and Opus model ran three processes concurrently and the arbitrated the output of those processes was a spec of the pinouts and operation of the stock firmware running in situ. From that Claude produced an esphome based firmware project, which is now available at https://github.com/aquarat/petlibro-polar-esphome


This is the story of my life these days, but Claude didn’t reject any of this research - cat feeders must be low-risk as far as the safety classifier is concerned 🫠

The stock firmware is, unsurprisingly, quite crap. It is wholly inadequate for my use case and the hardware also has some issues.


This esphome firmware has not been used to feed a cat as yet as there’s pending testing needed and refinement of the feeding approach I intend to use. On hardware, the Petlibro Polar, stock firmware, cools the food compartment to 12 degrees C. This is a fixed value. I say compartment because the sensor that reads this temperature is in the lid of the device and therefore bears an indirect relation to the temperature of the food itself.

This graph shows the compartment temperature of the device during an 8-hour peltier cooling unit run. This test was run with the food trays filled with 150ml of water each. The compartment temperature progressively dropped to around 16 degrees C and remained there (surprisingly even when the ambient room temperature increased to ~32 deg C). The start water temperature was 24.6 deg C and at the end of the 8 hours was 10.4 deg C average on the rear positioned trays and 14.4 deg C on the front (lid) tray - with the lid closed.

The TEC itself had a lot of condensate on the cold plate after this run, which tells me the issue here is air-insulation between the tray and the cooling surface. My current plan is to redesign and 3D print the tray adapter to bring the tray closer to the TEC cold plate.


Having this pet feeder in Home Assistant is pretty cool and happily we have all the diagnostics logged to our existing telemetry infrastructure.


The next step is to trial a new feeding algorithm:

  • Keep the food only in the two refrigerated trays.
  • When it’s feeing time (probably every 2 hours), rotate a tray to the area under the lid opening.
  • Ring the “meal bell” sound (yes, it has a sound chip with a ting ting loaded 😆)
  • Wait up to 10 minutes for the cat to come and have a nibble.
  • Wait until the nibbles area have been vacant for at least 5 minutes (she’s had her fill).
  • Close then lid, rotate the tray back to the cold area.
  • Repeat.

This approach should work for our cat because she normally doesn’t over eat in one go and this will greatly extend the lifespan of the food.