Craftiarenko
Published © GPL3+

Automatic pet feeder

A feeder for pets that pours food on a schedule or on a remote control.

IntermediateFull instructions provided12 hours802
Automatic pet feeder

Things used in this project

Hardware components

Espressif ESP32-CAM
×1
SG90 Micro-servo motor
SG90 Micro-servo motor
×1
USB Type C Connector Board
×1
OV2640 2Mp/FOV120-NV
×1
Female/Female Jumper Wires
Female/Female Jumper Wires
×1
SparkFun Solder-able Breadboard - Mini
SparkFun Solder-able Breadboard - Mini
×1
Male Header 40 Position 1 Row (0.1")
Male Header 40 Position 1 Row (0.1")
×1
Accessory, Screw
Accessory, Screw
×9
Machine Screw, M4
Machine Screw, M4
×2
Machine Screw, M3
Machine Screw, M3
×2
Nut, M3
×2

Software apps and online services

Home Assistant
Home Assistant

Hand tools and fabrication machines

3D Printer (generic)
3D Printer (generic)
Wire Stripper & Cutter, 18-10 AWG / 0.75-4mm² Capacity Wires
Wire Stripper & Cutter, 18-10 AWG / 0.75-4mm² Capacity Wires
Solder Wire, Lead Free
Solder Wire, Lead Free
Soldering iron (generic)
Soldering iron (generic)
Multitool, Screwdriver
Multitool, Screwdriver

Story

Read more

Custom parts and enclosures

STL files

zip archive with all STL files of the project

Schematics

ESP32 circuit

Circuit diagram of a pet feeder

Code

pet_feeder_v2.yaml

YAML
esphome pet feeder configuration
esphome:
  name: pet-feeder-v2
  friendly_name: pet-feeder-v2
  
  on_boot:
    priority: 100
    then:
      - light.turn_off: bowl_light

esp32:
  board: esp32dev
  framework:
    type: arduino

# Enable logging
logger:

# Enable Home Assistant API
api:
  encryption:
    key: "your encryption key"

ota:
  password: "your ota passwrod"

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Pet-Feeder-V2 Fallback Hotspot"
    password: "your ap password"

captive_portal:

esp32_camera:
  external_clock:
    pin: GPIO0
    frequency: 20MHz
  i2c_pins:
    sda: GPIO26
    scl: GPIO27
  data_pins: [GPIO5, GPIO18, GPIO19, GPIO21, GPIO36, GPIO39, GPIO34, GPIO35]
  vsync_pin: GPIO25
  href_pin: GPIO23
  pixel_clock_pin: GPIO22
  power_down_pin: GPIO32
  name: "Bowl Camera"
  resolution: 1600x1200

output:
  - platform: ledc
    pin: GPIO4
    id: led_output
    channel: 2
    frequency: 500Hz

  - platform: ledc
    id: pwm_output
    pin: GPIO12
    frequency: 50 Hz

switch:
  - platform: template
    name: "Bowl Camera LED"
    id: bowl_light

    turn_on_action:
      - switch.template.publish:
          id: bowl_light
          state: ON
      - output.turn_on: led_output
      - delay: 15s
      - switch.template.publish:
          id: bowl_light
          state: OFF
      - output.turn_off: led_output
    turn_off_action:
      - switch.template.publish:
          id: bowl_light
          state: OFF
      - output.turn_off: led_output

servo:
  - id: feed_servo
    output: pwm_output

button:
  - platform: template
    name: "Feeding Button"
    on_press:
        - switch.turn_on: 
            id: bowl_light
        - servo.write:
            id: feed_servo
            level: 100%
        - delay: 0.4s
        - servo.write:
            id: feed_servo
            level: -100%
        - delay: 2s
        - servo.detach: feed_servo
        - delay: 0.2s

Credits

Craftiarenko

Craftiarenko

4 projects • 7 followers
Making simple things difficult :)

Comments