Smart Cat Feeder With ESP32 and AirTag Proximity Detection

by ánegreiros in Circuits > Arduino

98 Views, 0 Favorites, 0 Comments

Smart Cat Feeder With ESP32 and AirTag Proximity Detection

Screenshot 2025-07-28 at 13.55.59.png

One of my three cats, Billy, has severe allergies. Yet, he preferred eating his siblings’ food, turning every meal into a potential veterinary bill.

I started searching for ready-made solutions. Most used RFID, were expensive, and didn’t seem reliable for long-term use. So, I decided to go the DIY route, even though I usually prefer buying things ready to use.

I tested Arduino RFID readers. They only work if the tag touches the sensor, which is useless for a restless cat. I considered camera-based recognition, but another cat with the same fur pattern would ruin accuracy.

After a few minutes of thinking, I remembered the AirTag on Billy’s collar. While Apple encrypts its data, the Bluetooth signal can still be detected based on proximity. It seemed like the perfect balance between simplicity and effectiveness.

I jumped into the ESP32 world: a small board with Wi-Fi, plenty of pins, and most importantly, native Bluetooth Low Energy (BLE) scanning. I added a servo motor to control the feeder door. The parts arrived from São Paulo to Natal in less than 24 hours. Thanks, Mercado Livre.

To speed things up, I let ChatGPT write the code. Actually, it wrote everything, because, honestly, laziness is the real engineer’s superpower.

The result? Billy only accesses his own food without stress or complex electronics. This experience proves that, with generative AI, simple hardware projects are now accessible to anyone with more problems to solve than time to waste.

Supplies

  1. 1x ESP32 DevKit V1
  2. 1x Servo Motor (metal gear preferably)
  3. 1x 5V Active Buzzer
  4. 1x Apple AirTag (on your cat’s collar)
  5. 1x Power bank
  6. Jumper wires, breadboard, and (optional) an enclosure for the final build
  7. 2h work max (with AI to help of course )

🔌 Wiring Diagram

ComponentESP32 PinConnection

  1. Servo MG90S: GPIO23
  2. Signal → GPIO23 / VCC → VIN 5V / GND → GND
  3. Active Buzzer: GPIO22
  4. Signal → GPIO22 / VCC → VIN 5V / GND → GND
  5. LED Onboard: GPIO2
  6. Built-in for debugging


⚠️ Tip: If the servo causes ESP32 resets, power it with an external 5V supply and share the GND.

🤖 Code

Attached

🎯 Results


  1. The servo only closes when the unauthorized cat (with AirTag) gets close.
  2. The buzzer provides an audible alert.
  3. The servo doesn’t consume power when open because the PWM signal is detached.


Happy Ending

Screenshot 2025-07-28 at 14.07.47.png

💡 Did you like this project?

If you also have a “Billy” at home, now you can protect the food bowl CHEAPLY and smartly.

📌 Share if you build it and leave a comment with your improvements!

#DIY #ESP32 #Bluetooth #AI #Cats #AirTag