Project showcase
DIY Pet Feeder Using Bolt

DIY Pet Feeder Using Bolt © GPL3+

Ever forgot to feed your pet? No worries, now you can do so with the click of a button.

  • 32 respects

Components and supplies

Necessary tools and machines

Hy gluegun
Hot glue gun (generic)

Apps and online services

About this project

You've just reached office and realised something. Oops! You forgot to add food to your pet's food bowl.

Isn't this annoying and traumatic?

Not to worry anymore as using this guide and a few objects lying around your garage, you can ensure that your pet never goes hungry again and you can feed him/her remotely at the click of a button.

Basic Working

The main aim is to remotely feed your pet at the click of a button. On receiving the command from you, the housing should then open and close a trap door which would automatically dispense treats to the hungry waiting pet.

Step 1: Avengers, Assemble!

  • Cardboard pieces. (Preferably large up or up to your liking)
  • Pair of scissors.
  • Sturdy plastic spoon.
  • 1 inch nail.
  • Hot Gun Glue.
  • Marker.

Connect the Bolt device to the Boltduino. Power up the Boltduino and make sure that the Bolt device is connected to a working WiFi network and the green LED is glowing.

Step 2: Fabricate the Housing

In order to make the housing of your pet feeder, select a few pieces of cardboard that are sturdy enough. You can also choose different materials for your housing if you like.

Next, form two 'L' shapes with the cardboard pieces which are identical. Mark 5cms from the bottom of the short hand of the 'L'. Refer the image below for any clarification. Label the two 'L's as A1 and A2 respectively.

Next cut a rectangular piece of cardboard that is about 7 cm longer than the width of your housing and about 3 cm smaller than the thickness of your housing. Label this part as 'B'.

Make a hole in the spoon which is slightly larger than the nail that you are using as a pivot and insert the nail through it. Make sure that the spoon can rotate freely about the nail like a fidget spinner.

Next heat up the gun glue and glue the nail to the part labeled B. Make a rectangular hole 2cm by 2cm in part B which is roughly 3cm left of the centre.

In part A1, about 8 cm from the bottom, glue a rectangular piece of cardboard which is equal to the length and breadth of A1.

Cut a rectangular hole in cardboard above which is roughly in the center.

In parts A1 and A2, cut a rectangular hole which is roughly 1 cm in height and slightly lesser than the width of parts A1 and A2.

Now glue A1 and A2 together so that they form a rectangular box and the cuts that you have made in the step above line up.

Insert part B through the slits in the now joined parts A1 and A2 and check if it moves freely through the slits.

Attach the spoon to the servo motor and your now completed housing should look like the completed product without the Bolduino attached to it.

The completed housing would be enough to store treats for feeding a cat a couple of times in my design. You can increase the storage if your pet's appetite is voracious.

Note - I will be creating and adding a step by step video showing how to make the housing.

Step 3: Connect the various components

The servo motor should have three wires coming out of it which may be Black(GND), Red(5V) and White(PWM input) in colour.

Connect the jumper cables from the Servo motor to the Boltduino in the fashion given below:

  • Boltduino <-- --> Servo motor
  • 5V <-- -- Red Wire
  • GND <-- -- Black Wire
  • Pin 9 -- --> White Wire

For further clarity, refer the Fritzing diagram.

Step 4: Write codes

Write code for Boltduino using the Arduino IDE and upload it to the Boltduino.

Servo servo;
const int LED_PIN =  LED_BUILTIN; // The number of the LED pin
int SERVO_PIN = 9;    // The pin which the servo is attached to
int CLOSE_ANGLE = 0;  // The closing angle of the servo motor arm
int OPEN_ANGLE = 60;  // The opening angle of the servo motor arm
void setup() {
 // put your setup code here, to run once:
 servo.write(CLOSE_ANGLE); // Close the trapdoor when it first boots up
void loop() {
 // put your main code here, to run repeatedly:
   char c =;   // Read data sent by the cloud
     case 'a' : digitalWrite(LED_PIN,HIGH);  // If character received is 'a', dispense the treat
     case 'b' : digitalWrite(LED_PIN,LOW);   // If charecter received is 'b', close the trapdoor
     case 'c' : digitalWrite(LED_PIN,HIGH);  // If charecter received is 'c', open the trapdoor
     default : digitalWrite(LED_PIN,LOW);
void open_door(){
 Serial.println("Opened Door");
 servo.write(OPEN_ANGLE);   // Send the command to the servo motor to open the trap door
void close_door(){
 Serial.println("Closed Door");
 servo.write(CLOSE_ANGLE);   // Send te command to the servo motor to close the trap door

Write the code for the front-end and upload it to the Bolt cloud.

<!DOCTYPE html>
   <title>Pet Feeder</title>
   <script src=""></script>
       .button {
           background-color: #4CAF50;
           border: none;
           color: white;
           padding: 15px 32px;
           text-align: center;
           text-decoration: none;
           display: inline-block;
           font-size: 16px;
           margin: 4px 2px;
           cursor: pointer;
   <button class="button" onclick="dispense_treat()">Feed me!</button>
<script type="text/javascript">
   function dispense_treat(){
       console.log("Dispensing Treat");
       console.log("Dispensed Treat");
   function start_communication(){
       console.log("Init Communication");
   function open_door(){
       console.log("Opened Door");
   function close_door(){
       console.log("Closed Door");
   function cmd_serial_write(data_val){
       $.get(""+"Your API Key Here"+"/serialWrite?data="+data_val+"&deviceName="+"Your Bolt ID here");
   function cmd_serial_begin(){
       $.get(""+"Your API Key Here"+"/serialBegin?baud=9600&deviceName="+"Your Bolt ID here");

Also, don't forget to associate the page with your product.

Step 5: Deploy the project

Open your cloud dashboard and open the product associated with your Bolt.

Add pet food (not the mushy kind, but rather the dry treats) from the top of the housing and close it with a lid. Setup someplace comfortable where your pet cannot knock it down and attach a feeding bowl under the trapdoor. Click on the Feed me button and watch your creation dispense food to feed your pet.

If you want to strengthen or modify the design of the housing so that your pet does not chew up the housing, by all means please do so.

Also, if you want to feed your pet using just your voice, head over to this project where I explain you just that.


Pet Feeder
Clone the github repository to find the complete code for the DIY Pet-Feeder project.


Connections from the Boltduino(Arduino Uno r3) to the Servo motor
The Boltduino mimicks the Arduino Uno R3 and can be used and programmed like a typical Arduino Uno.
Petfeeder bb 5zaroyrzfm


Similar projects you might like

Bolt Controlled Robot Car

Project tutorial by Bolt

  • 35 respects

DIY Arduino Cat Feeder

Project showcase by Alexander Ulitin

  • 24 respects

IoT Pet Feeder

Project tutorial by team

  • 319 respects

Remote Controlled Pet Feeder

Project tutorial by Amal Mathew

  • 53 respects

Pet Center - Feed and Entertain Your Pet

Project tutorial by Vítor Barbosa

  • 11 respects
Add projectSign up / Login