Automated Dog Bowl

by asrivera6 in Living > Pets

1142 Views, 3 Favorites, 0 Comments

Automated Dog Bowl

20230130_210124.jpg
20230130_221409.jpg
20230130_222637.jpg
20230130_222652.jpg

In order to solve a recurring problem of sharing food between the dogs in my household, I have created an automated dog bowl that can open and close its lid depending on if the specified dog approaches it. This will be done using an RFID reader placed on the dog's corresponding bowl and an RFID tag that I have placed on my dog's booties/and or collar.

Supplies

20230130_222642.jpg
20230130_210155.jpg
20230130_215036.jpg
20230130_222652.jpg
20230130_231837.jpg
20230130_233644.jpg

The main technological hardware needed are the following:

  • RFID tag from 30-500 KHz (most likely 125KHz)
  • RFID reader
  • Arduino with breadboard
  • Servo

Non-technical Materials:

  • Cardboard for the lid and two platforms
  • Popsicle sticks
  • hot glue gun
  • Old or new dog bowl
  • a real dog or multiple

Setting Up Software

Screenshot 2023-01-29 4.56.22 PM.png
Screenshot 2023-01-29 4.56.31 PM.png

You can just use the software above for your project I copied it below as well to copy and paste:

// This #include statement was automatically added by the Particle IDE.
#include <SmsWebhookRK.h>

#include <SPI.h>
#include <MFRC522.h>

constexpr uint8_t RST_PIN = D2;   // Configurable, see typical pin layout above
constexpr uint8_t SS_PIN = A5;   // Configurable, see typical pin layout above
 
MFRC522 mfrc522(SS_PIN, RST_PIN); // Create MFRC522 instance

Servo myServo;

void setup() {
  //SmsWebhook::instance().setup();
   myServo.attach(3);
https://build.particle.io/build/6387a8f7f904b80255d68a51#flash   myServo.write(170);
   
  Serial.begin(9600); // Initialize serial communications with the PC

SPI.begin(); // Init SPI bus
mfrc522.PCD_Init(); // Init MFRC522
mfrc522.PCD_DumpVersionToSerial(); // Show details of PCD - MFRC522 Card Reader details
Serial.println(F("Scan PICC to see UID, SAK, type, and data blocks..."));
myServo.write(55);
}

void loop() {
   
// Look for new cards
  if ( ! mfrc522.PICC_IsNewCardPresent()) {
    // If there are no cards
    // the door stays closed.
    //turns the servo to close the lid) if there are no cards
    delay(1500);
    myServo.write(55);       
    delay(1500);
    return;
  }
  
  
  // If there is a card, turn the servo to open the lid)
  // This is when the dog is there.
  //digitalWrite(7, HIGH);
  myServo.write(170);
  delay(1500);

  // This line is here to trick the reader into thinking
  // a new card is there on the next scan.
  mfrc522.PICC_IsNewCardPresent();
}

Set Up Servo

Snapchat-589799791.jpg
Snapchat-833233099.jpg
20230130_215505.jpg
Screenshot 2023-02-27 1.06.33 PM.png

Hard-wiring:

  • First things first we need to set up the servo, so we need three wires for this.


  • A servo already has three wires coming from it usually following the same color pattern.


  • There is a brown wire, which should be connected to GND, an orange wire which connects to it's digital pin (any pin, in this case I used pin 3), and lastly a red wire that connects to the power (VUSB)


-In regards to the code it is the basic code set up for a servo and the only obstacle I came across for the servo in the entire project was that I had to trouble shoot what degrees the servo should be turning to in order to open and close the lid properly.

I ended up having them at 55 degrees when it's closed and 170 when it's open for mine but depending on the height of your bowl it could be different.

Set Up RFID Reader

20230130_215229.jpg
Screenshot 2023-02-27 1.06.33 PM.png
20230130_215036.jpg
Snapchat-1680050672.jpg
Snapchat-740605008.jpg

-Make sure to download the library for the RFID reader linked here: ARGON-RFID-MFRC522 (1.3.7)   

Hard Wiring:

For the following I will be referring from the RFID reader to the argon pin out respectively

  • connect 3.3v to the 3v3
  • connect RST to D2
  • connect GND to GND
  • connect MISO to MI
  • connect MOSI to MO
  • connect SCK to SCK
  • connect SDA to A5

Cutout Cardboard Pieces and Make Servo Platform

20230130_222622.jpg
20230130_215416.jpg
20230130_215351.jpg
20230130_215316.jpg
  • Use the bowl to draw a circle on the cardboard to cut out the circle as the lid
  • Create a small square box using the hot glue gun and tiny rectangular/square pieces of cardboard with one open side for the servo to hang out of it
  • Using popsicle sticks cut out two pieces and use hot glue under the servo platform as well as a third to connect the two to give the platform a better support
  • Cut out a square piece of cardboard that would fit all three parts of your project (breadboard, bowl, & servo platform)

Connect Your RFID Tag to Your Pet

Screenshot_20230130_231035_Snapchat.jpg

Depending on the type of tag you are using be it a key-chain tag or card you can use the following methods:

  • If using a key-chain tag hook it on to your dogs collar
  • If using a card adhere it with hot glue to your dog's booties or a collar with a bow or an object similar on the front

-I ended up using the card attached to booties as my tag could not reach far enough for the reader

Connect Everything!

20230130_215125.jpg
20230130_215119.jpg
20230130_222637.jpg
Automated dog bowl

-Hot glue the servo wing to your lid holding the servo up right and the lid vertically

Glue the following to the square platform:

  • bowl
  • servo platform

Tape or glue your RFID sensor to the front of your bowl or on in front of the bowl on the platform and lastly, tape down your breadboard to the platform.

Now you're done! Enjoy!