• Models
  • Contests
  • Slicer
  • Login
  • Start Here
    thingiverse-iconprintables-iconcults3d-iconmakerworld-iconmyminifactory-icon

    3D GO

    3D ModelsContestsCollectionsSaved ModelsOn a mobile device?

3D GO

Privacy Policy
Automatic Milk Bone Dispenser 3D Printer File Image 1
Automatic Milk Bone Dispenser 3D Printer File Image 2
Automatic Milk Bone Dispenser 3D Printer File Image 3
Automatic Milk Bone Dispenser 3D Printer File Image 4
Automatic Milk Bone Dispenser 3D Printer File Image 5
Automatic Milk Bone Dispenser 3D Printer File Thumbnail 1
Automatic Milk Bone Dispenser 3D Printer File Thumbnail 2
Automatic Milk Bone Dispenser 3D Printer File Thumbnail 3
Automatic Milk Bone Dispenser 3D Printer File Thumbnail 4
Automatic Milk Bone Dispenser 3D Printer File Thumbnail 5

Automatic Milk Bone Dispenser

SubBass100 avatarSubBass100

March 22, 2025

printables-icon
DescriptionCommentsTags

Description

Automatic Milk Bone Dispenser 

 

Description:

This project automatically pushes a single Milk Bone from a hopper. When powered on, the dispenser initializes by pulling the rack back for 2 seconds then releasing tension. When the arcade button is pushed, a servo connected to a pinion pushes out the Milk Bone and then retracts, allowing for gravity to ready the next bone from the hopper.  There is a variable delay as to not allow our dog to get too many treats at once. The dispenser wont re-arm until after it's cooldown period.

Backstory:

After watching the movie Honey, I shrunk the kids, my son and daughter were fascinated with "the automatic dog feeder" from the movie. So we worked together to design and name our own "Dog Treat Dispenser". Now our German Shepherd, Scout, can grab a snack when she wants. There is a timer in the logic to only allow her one Milkbone every x amount of time so she doesn't eat to much!

This was a great project to show the kids how an idea can go from a thought to code to design and then implementation. We learned about rare problems like, what if the the power goes out when the rack is half way? What to do when the power comes back on? What if our dog presses the button many times in a row?      We needed to think of how to programmatically solve these problems.

Hardware and Software Used

Hardware:
  • Arduino Duemilanove for initial programming and Debugging
  • Arduino Nano for implementation
  • Arduino Nano Screw Terminal Board
  • Wire
  • Arcade Button
  • Continuous motion Servo
  • Small nylon or metal bolts / nuts

Software:
  • Fusion360 for Rack and Pinion / Hopper design.
  • Arduino IDE for programming and uploading code to the Arduino

Wiring Diagram:

Code:

#include <Servo.h>

// Define servo and button pins as well as configurables
int servoPin = 7; //set the digital output pin for the servo pwm wire
int buttonPin = 4; // set the input button for pin
int initialize = 0; // leave this at zero, this is a counter for first power on initialization
int waittime = 5000; //Set the amount of milliseconds to wait until looking for another treat
int extend = 2000; //extend time
int retract = 2000; //retract time
int initialization = 2000; // How long to pull the rack back for initial startup

// Create servo object
Servo myServo;

void setup() {
  // Attach servo to pin
  myServo.attach(servoPin);

  // Set button pin as input
  pinMode(buttonPin, INPUT);

  // Enable pull-up resistors (optional)
  digitalWrite(buttonPin, HIGH);
}


void loop() {
  if (initialize == 0) { //This runs once
  myServo.write(0); //it pulls the rack all the way back into ready position
  delay(initialization); 
  myServo.write(180); //releases tension
  delay(100);  
  } else {} //after the program initializes once it doesnt have to anymore
  // Read button state
  int buttonState = digitalRead(buttonPin); //is the button pressed or no?

  // Check if button is pressed. I am using a normally closed switch that opens when pushed, this helps to not need debouce and dealing with noise
  if (buttonState == LOW) { //if button is not pushed
    myServo.write(85); //idle threshold (normally 90 but mine doesn't move at 85)
  } else { //if button is pushed
    myServo.write(180);
    delay(extend);
    myServo.write(0);
    delay(retract); 
    myServo.write(85);
    delay(waittime);  
  }
  initialize = 1; // this allows the initialization to be skipped in the beginning
}

Printing Instructions:

  • Print with PLA or PETG
  • Layer Height .2
  • Infill of your choosing (Mine was 15%)
  • Supports are recommended for the base

Assembly Instructions

  • Using the servo shaft round accessory screw  the round plate to the Pinion (or glue)
  • Place the rack into the slot on the base (there are stops on either side so it must be placed in before the servo)
  • The servo should bolt in using the included holes.
  • The Rack and Pinion should now be meshed.
  • The hopper slides onto the top of the base
  • Place the arcade button into
  • Adjust and customize the code above using the Arduino IDE 
Wiring:
  • Using the "common" and "normally closed"  part of the arcade switch use wire to connect to the arduino on the ground pin as well as d4 (digital pin 4)
  • The continuous servo has 3 wires, connect the black wire to GND on the Arduino, the Red wire to 5V on the Arduino and the yellow wire to D7
  • The Arduino will be connected to power via the USB port to when ready connect that to a usb charger or computer.

Demo and Usage Instructions

When the button is pressed a large Milk Bone is ejected and a new one is positioned into the hopper.

 

Video:

License:

Creative Commons — Attribution — Noncommercial — Share Alike

Related Models

Cable Corners... keep cables in corners! preview image

Cable Corners... keep cables in corners!

muzz64 profile image

muzz64

31,000

Headset Hanger 2.0 preview image

Headset Hanger 2.0

RMTB profile image

RMTB

16,812

Baby Birth Tag Holder for the wall  preview image

Baby Birth Tag Holder for the wall

Morganja profile image

Morganja

4,020

Universal Filament Filter and Lubricator preview image

Universal Filament Filter and Lubricator

CreativeTools profile image

CreativeTools

26,125

3D4U by Miele Coffee Clip preview image

3D4U by Miele Coffee Clip

3D4U powered by Miele profile image

3D4U powered by Miele

8,681

Haus-Familienaufsteller „Home“ mit Namensschildern preview image

Haus-Familienaufsteller „Home“ mit Namensschildern

Daniel Lippert profile image

Daniel Lippert

714

SHARKZ... Fun Multipurpose Clips / Holders / Pegs with moving jaws that bite! preview image

SHARKZ... Fun Multipurpose Clips / Holders / Pegs with moving jaws that bite!

muzz64 profile image

muzz64

24,680

Mechanical wall clock preview image

Mechanical wall clock

Harald Andersson profile image

Harald Andersson

6,979