Introduction: DIY Automatic Food Dispenser for Chickens and Pets

About: Just want to explore the vastness of science and make useful stuffs!!

Hi readers welcome again to my Instructables, in this project I made this amazing food dispenser for chickens, cats, and dogs

The idea behind this project

I have 2 chickens, sad to say I have no cats and dogs! The chicken that I have are always hungry and the main problem is if I keep the feed outdoors some other pets eat them, so my chickens end up starving!

I didn't want this to happen

So I made this overengineered automatic pet feeder, Yes I know what you are thinking "What's wrong with the conventional pet feeders"

So far concerned they are good, but why say no to adapting this amazing technology that just converts the regular boring jobs into a very cool job

This food dispenser itself is completely automated except 2 things

One is the food that needs to be filled and the other is the battery that needs to be charged, I found that using 2 lithium-ion batteries gives an average of 3 days' backup for a couple of chickens

If you are having more and more chickens that battery backup for you might be different.

Anyways this being said let me go through a rough idea about the principle behind the working of this dispenser

How does this dispenser work?

The ultrasonic sensor detects the obstacles/chickens when it passes or comes near the dispenser

servo opens and closes instantly dropping grains of rice

This happens twice later the servo won't respond to any obstacles to avoid overfeeding

After some time the servo again responds to the obstacles detected by the ultrasonic sensor


Supplies

  • Arduino Board, Uno works best
  • Ultrasonic Sensor also called as HC-SR04
  • Micro Servo Motor
  • Plastic Bottle (to serve as the dispenser container)
  • Glue Gun
  • Jumper Wires
  • Power Source I used 2 lithium-ion batteries
  • Switch
  • Few elastic bands
  • Retractable stick recycled from the selfie stick

Why use a retractable stick?

This is because we will have the option to adjust the height of the dispenser, this is needed because the height of chickens or pets varies and with a fixed height this device faces issues so adding the retractable stick solves the problem.

Step 1: Circuit Diagram

To make this a lot easier I will divide the circuit into 2 steps according to the components

Ultrasonic sensor connections

Connect the VCC (power) and GND (ground) pins of the ultrasonic sensor to the 5V and GND pins on the Arduino respectively, Now connect the Trig (trigger) and Echo pins of the ultrasonic sensor to two digital pins on the Arduino. For example, you can connect Trig to digital pin 4 and Echo to digital pin 5 of Uno

Micro servo connections

Connect the signal (control) wire of the micro servo motor to the Arduino digital pin 9.

Usually, micro servos operate within a voltage range of 4.8V to 6V, so I will directly connect the power pin to the 5v pin of Uno and the gnd pin to GND of Uno

For the Power supply i used a battery holder inside which I had 2 lithium-ion batteries

These have a switch so as to control the power supply whenever needed.

Want to simplify this circuit again? PCBs for your electronic projects from PCBWay.is the best option

Why them? They have provided me with the best PCB and The quality is just amazing compared to other providers in the market

A revolutionary solution that combines the best of both rigid and flexible circuitry to elevate your electronic projects to new heights.

With their expertise in advanced manufacturing techniques, they offer a seamless integration of rigid and flexible components, ensuring enhanced reliability, durability, and space-saving benefits

Check Here for Rigid-flex Pcbs with this your circuit becomes flexible! i have added the images on this step kindly check

I bet you have not seen anywhere such assembly capabilities, Check here to know their best in-industry assembly techniques

Step 2: Arduino Codes

After the circuit is done, we can proceed with the coding part

Just connect the Arduino board to the computer using a programming cable

Open Arduino IDE, Paste the code provided

Select the proper port and board and click on the upload button, wait until the codes are uploaded

After the uploading is complete you can remove the programming cable from the computer

Step 3: Preparing Dispenser

Start by cutting the base of the plastic container with the safety cutter.

Make sure you are using a large-sized bottle like me, this is because later all the electronics will be hidden here

Now I will add this retractable piece to the bottle using hot glue

Use hot glue wisely to ensure thorough coupling

Make slots for inserting switches to the base as shown in the image

Step 4: Housing the Components

I will start with housing the Arduino board first, since the base of the bottle is a circle and the Arduino is square I will be using this piece of sponge to ensure a firm coupling to the base

Add the hot glue to the sponge and stick it to the plastic bottle base first

Now use the elastic band to Arduino and sponge, later keep these on the plastic bottle base, and again add the elastic band


Step 5: Finishing

Now we have wires hanging from the ultrasonic sensor and servo, we need to organize those

I made a small slot on the plastic bottle edge as in the first image of this step, placed the wires, and sealed them with a tiny amount of hot glue.

Place the ultrasonic sensor and stick them with glue, now for the micro servo connect the Arduino to the power supply and test the circuit

Depending on the servo horn movement adjust the position and stick with hot glue.

For the lock i cut a small circular piece and stick them to the tip.

You can also use cap from the same bottle, but working on cap is somewhat hard!



Step 6: How to Use

Using this dispenser is very simple, all you have to do is feed the type of food that you are willing to feed your pet

As I have chickens I will fill the dispenser with grains of rice, if you are using other large size food make sure the size of the food is less than the size of the dispenser holes

After you fill it up, switch on the device, as the device is new to your pets they may act weird, but don't worry they will learn to use them.

Once the pet comes in front of the dispenser the servo slides the lock and some food will be dropped instantly.

This happens 2 times and the servo stops working for some time which is done intentionally to stop the wastage of food by any chance.

If you have any questions ask me in the comments i will be happy to solve your issues.

Step 7: Working Video

Here is the video that shows the complete build of this project and most importantly the working, you should not miss to check how happy my chickens were with my project!

Thank you for reading, see you soon with other amazing projects.

Unusual Uses Contest

Participated in the
Unusual Uses Contest