Tekko BDSimSimulatorProjects

অটোমেটিক পেট ফিডার — এক চাপে এক পোরশনAutomatic Pet Feeder with a Servo

বাটন চাপলে সার্ভো দরজা ১.৫ সেকেন্ড খুলে ঠিক এক পোরশন খাওয়ায়, তারপর বন্ধ করে ছোট্ট একটা শব্দ করে। LCD তে দিনের হিসাব জমা থাকে — বিড়াল দুবার খাওয়ার ভয় নেই।

The servo swings a gate over the food jar for exactly 1.5 seconds — one portion — then closes it and chirps. The LCD keeps the day count so nobody double-feeds the cat.

▶ ফ্রি চালিয়ে দেখো / Run it free Parts অর্ডার করো (WhatsApp)

সার্কিট ডায়াগ্রাম · Circuit diagram

Automatic Pet Feeder with a Servo circuit diagram — Arduino Uno R3, Servo motor (SG90), Push button, LCD 16x2 with I2C, Buzzer (5 V), Jumper wires

যা যা লাগবে · Parts you need

তার লাগানো · Wiring

Servo motor (SG90) VCC→Arduino Uno R3 5V
Servo motor (SG90) GND→Arduino Uno R3 GND
Servo motor (SG90) SIG→Arduino Uno R3 D9
Push button 1→Arduino Uno R3 D2
Push button 2→Arduino Uno R3 GND
LCD 16x2 with I2C VCC→Arduino Uno R3 5V
LCD 16x2 with I2C GND→Arduino Uno R3 GND
LCD 16x2 with I2C SDA→Arduino Uno R3 A4
LCD 16x2 with I2C SCL→Arduino Uno R3 A5
Buzzer (5 V) +→Arduino Uno R3 D8
Buzzer (5 V) -→Arduino Uno R3 GND.3

Code (Arduino C++)

#include <Servo.h>
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
// Automatic pet feeder: the servo swings a gate over the food jar. One press
// on the button opens the gate for 1.5 seconds — exactly one portion — then
// closes it and chirps. The LCD keeps the day's count so nobody double-feeds
// the cat. Swap the button for a real-time clock later and it feeds on time.
Servo gate;
LiquidCrystal_I2C lcd(0x27, 16, 2);
int fed = 0;

void setup() {
  Serial.begin(9600);
  pinMode(2, INPUT_PULLUP);
  pinMode(8, OUTPUT);
  gate.attach(9);
  gate.write(0);
  lcd.init();
  lcd.backlight();
}

void loop() {
  static long lastFeed = -5000;
  bool pressed = digitalRead(2) == LOW;
  if (pressed && millis() - lastFeed > 2500) {
    lastFeed = millis();
    fed++;
    gate.write(90);
    digitalWrite(8, HIGH);
    Serial.print("Feeding #"); Serial.println(fed);
  }
  if (millis() - lastFeed > 1500) {
    gate.write(0);
    digitalWrite(8, LOW);
  }
  lcd.setCursor(0, 0); lcd.print("Fed today: "); lcd.print(fed); lcd.print("   ");
  delay(80);
}

আরো project · More projects