Cat Candy Dispenser

by Pumiiu in Circuits > Arduino

405 Views, 2 Favorites, 0 Comments

Cat Candy Dispenser

Cat candy dispenser
20210808_155959.jpg
Supplies.png

For this project, I wanted to make a candy dispenser with the help of an Arduino UNO. Not just any dispenser, but a pooping cat! 🀭 You wave your hand in front of the cat's face for it to 'poop out' some small candy! (:

This is my very first Arduino project, so I hope you will like it and get inspired!

In this instructable I will show you how I made it.

🌟Let's go!🌟

Supplies

You will need:

-Arduino UNO

-Female/Female Wires

-Female/Male Wires

-Ultrasonic Sensor - HC-SR04

-Micro Servo Motor

Step 1: Prepare the Casing

20210807_142612.jpg
20210806_215112.jpg
20210806_215140.jpg

I used a scrap cardboard box as the body for the dispenser cat, but you can use any used box or create one out of scratch if you prefer.

Make sure the box can open and close in case of needed maintenance. To do this, I used regular tape on the inside and outside of the box.

Then make a hole in the top part to be able to refill the cat with candy. Don't forget to add a border around the hole to prevent spilling! Make the second hole for the ''butt'' where the candy will fall out of.

Lastly I made a container with a 'slide' for the candy. The slide has an edge, so it can be glued in an angle for the candy to fall out better.

Don't worry about it not looking too pretty, since this is just the inside (:

Step 2: Prepare the Schematics

Arduino layout.png
20210526_181537.jpg

Please refer to the schematics illustration for the layout.

Instead of using a breadboard, we have to solder the cables together. Solder all the - cables together. As well as the + cables with each other. Now you should have two sets of soldered cables. I recommend using heat shrink wrap for the soldered cables to stay secure and safe.

Here is the code for the arduino:

#include<Servo.h>int trig=8;int echo=9;int dt=10;Servo servo;//int distance,duration;void setup() {pinMode(trig,OUTPUT);pinMode(echo,INPUT);Serial.begin(9600);servo.attach(11);}void loop() {if (calc_dis()<10) //Calculate distance{  for (int i=0;i<=90;i++)  {    servo.write(i);    delay(3);  }  delay(100);  for (int i=90;i>=0;i--)   {    servo.write(i);    delay(3);  }  delay(100);}}//calculate the DISTANCE using ULTRASONIC SENSORint calc_dis(){  int duration,distance;  digitalWrite(trig,HIGH);  delay(dt);  digitalWrite(trig,LOW);  duration=pulseIn(echo,HIGH);  distance = (duration/2) / 15;  return distance;}<br>

Step 3: Putting It Together

20210807_200348.jpg
20210806_211555.jpg
20210807_152344.jpg
20210808_155308.jpg
20210808_155431.jpg

After gluing on the container for the candy, make a little holder in the corner for the servo. Next, measure a piece of cardboard from the servo handle to the container opening. the cardboard will act as a gate, which will open after waving a hand in front of the cat's eyes.

Which brings us to the cat's head. Make a head about the same width as the box and cut out two holes for the eyes. Keep the bottom of the head empty. Before gluing the head onto the body, carve out a hole into the body for the cables to be able to go through to the cat's head.

Now everything can be put into place! Plug the Arduino into your power bank and test it out!

Note: I definitely recommend getting a smaller power bank so it can fit neatly inside the box! I unfortunately only had a big one, which resulted in the body being cramped ):

Step 4: Decorate!

20210808_143749.jpg
20210808_154928.jpg
20210808_155816.jpg
20210808_155959.jpg

For the final step, we can decorate!

Color the cat any color you desire, but for this project I used a tin colored paint with a metallic shine to give it a robot feel.

Then add some facial details with marker, along with some whiskers made out of metal wire.

To finish the body, add some cardboard legs, ears and a tail!

For the very last step, add a ribbon to secure the lid and prevent it from opening.

🌟 Now you're done!! Your very own cat candy dispenser! 🌟