This project is a smart pet (cat) food bowl scale built by assembling the M5Stack AtomS3R-M12 and the M5Stack Unit-Mini Scales using Lego bricks. It allows you to monitor food weight and check on your pet via live camera feed.
- Precision Weight Monitoring: Tracks real-time weight and absolute weight of the pet food bowl.
- Live Video Streaming: Streams video at 320x240 @ 2fps YUV422 using the AtomS3R-M12's onboard GC0308 camera.
- Tare Control: Zero-point calibration to subtract the food bowl's base weight.
- Status RGB LED: Controls the addressable WS2812 RGB LED built into the Unit-Mini Scales.
- Digital Filters: Fine-tunes sensor readings with low-pass (LP), average, and exponential moving average (EMA) filters.
To use this package, add the following to your ESPHome configuration file:
substitutions:
name: "esp-atom-scale"
friendly_name: "ESP Atom Scale"
packages:
remote:
refresh: always
url: https://github.com/eigger/espcomponents
ref: master
files:
- packages/device_base.yaml
- packages/esp32.yaml
- packages/scale/pet_scale.yamlProvide the Wi-Fi/OTA secrets required by the
shared base. The scale preset already selects
ESP32-S3 / ESP-IDF and octal PSRAM; it targets AtomS3R-M12 rather than a generic
Atom board. Confirm that the I2C scale appears at 0x26, tare the empty bowl, and
use the MINI calibration procedure
if a known weight reads incorrectly.
| M5Stack AtomS3R-M12 | M5Stack Unit-Mini Scales |
|---|---|
![]() |
![]() |
The Unit-Mini Scales is connected via the Grove port:
- SDA: GPIO2
- SCL: GPIO1
- I2C Address:
0x26
The onboard GC0308 camera on the AtomS3R-M12 uses the following pin map:
- I2C SDA: GPIO12 (CAM_SDA)
- I2C SCL: GPIO9 (CAM_SCL)
- Camera Power/Init Pin: GPIO18 (Inverted, must be turned ON at boot)
- VSYNC / HREF / PCLK: GPIO10 / GPIO14 / GPIO40
- Data Pins (Y2-9): [GPIO3, GPIO42, GPIO46, GPIO48, GPIO4, GPIO17, GPIO11, GPIO13]







