Automated Cat Feeder with Raspberry Pi

Automated Cat Feeder with Raspberry Pi

Limited time downloadReply “Tutorial” to get the microcontroller e-book, reply Simulation to get Proteus simulation materials Baidu cloud group share link update time: 2016-03-06,if invalid please leave a message at the end of the article, do not leave a message in the background

Let’s go back to February 2013 when I started teaching Raspberry Pi 101 courses at Hack Factory. Since the first class, I felt that the Raspberry Pi had deeply embedded itself in my mind. I planned a short weekend trip to the countryside with my girlfriend, so she had to leave her two little cats at home. She said she would leave a big bowl filled with cat food for them, but I gave her a better option: I would make an automated cat feeder for those two little guys. Automated Cat Feeder with Raspberry Pi

So they wouldn’t eat too much food, or maybe even additives, and it’s really cool!(Did I mention it’s cool?!) So… five days before we set off, I bought a food hopper, but unfortunately, I couldn’t finish it before leaving for vacation. So I switched to Plan B, a big bowl filled with cat food and water.

However, I didn’t give up on my original plan and successfully completed it for the next outing. In this blog post, I will introduce to you step by step (most parts are like this) how to make your own Wifi-enabled Raspberry Pi automatic cat/kid feeder.

I have already published a Google spreadsheet that lists some special parts needed for this project. This project is very simple, and once you have all the parts ready, you will be able to assemble it in 4 to 6 hours.

Tools Required:

  • Soldering iron

  • Drill

  • 1/2″ drill bit

  • 1″ drill bit (for installing the switch button, optional)

  • Hot glue gun and glue sticks

  • Wire cutters

Prerequisites:

  • Ensure all parts are ready, check against Google spreadsheet list: https://docs.google.com/spreadsheet/ccc?key=0Aql9CqlhyL98dGxydWVuR0FJckZLeXAxa2E1bElFS2c&usp=sharing#gid=0

  • Raspberry Pi has the operating system installed, either Adafruit Occidentalis: http://learn.adafruit.com/adafruit-raspberry-pi-lesson-1-preparing-and-sd-card-for-your-raspberry-pi or Raspbian: http://www.raspberrypi.org/downloads is fine

  • Wifi adapter configured and working: Occidentalis: http://learn.adafruit.com/adafruits-raspberry-pi-lesson-3-network-setup/setting-up-wifi-with-occidentalis or Raspbian: http://learn.adafruit.com/adafruits-raspberry-pi-lesson-3-network-setup/setting-up-wifi-with-raspbian

  • Download the source code from my Github Repo: https://github.com/videoman/Raspberry_Pi_Class to experience GPIO input and output

  • Install the Python GPIO.PWM module: RPIO install docs: http://pythonhosted.org/RPIO/index.html#installation

Install the motor! The continuously rotating motor needs to be connected to the handle to make the flap rotate. Before that, test to see if it can drive the flap handle. Here I used some tape to stick it to the front of the handle, fixed it, and then turned on the motor.

Automated Cat Feeder with Raspberry Pi

Automated Cat Feeder with Raspberry Pi

This at least tells me that the motor can drive the flap without major issues. Of course, there is no load now, as we haven’t put any food inside.

Next, I decided to place the handle at the back so that it wouldn’t be exposed to anyone or bump into those two little guys (or get grabbed by them). So I moved the handle to the back. After moving the handle to the back, I needed to dig out 3/4″ on each side’s back. This way, the handle can easily rotate 360 degrees.

Automated Cat Feeder with Raspberry PiAutomated Cat Feeder with Raspberry Pi

Now let’s open a channel for the little motor’s head…

Automated Cat Feeder with Raspberry Pi

I eventually dug into the channel by 2mm and basically had a motor base shape. That’s about it, but when I pressed other things on top with the hot glue gun, it felt like it was just stuck to the surface, not connecting the lever and would soon break. The hot glue gun sticks things well, but cannot serve as a solid joint. After gluing, I added two nylon tie straps.

Automated Cat Feeder with Raspberry Pi

As you can see, I have opened a channel for the little motor head and tried to keep its shaft close to the center. But it cannot be 100% centered, almost fine.

Automated Cat Feeder with Raspberry Pi

Connect all the wires! I used a “small size Raspberry Pi prototype breadboard” bought from Adafruit (http://www.adafruit.com/products/1171 ). Insert a 3-pin socket for each motor. This makes it easier to plug in/out the little motor.

Automated Cat Feeder with Raspberry Pi

Automated Cat Feeder with Raspberry Pi

The back of the board….

Automated Cat Feeder with Raspberry Pi

When you look at the back of the board, at the place where the motor wires are soldered, I made a 5V solder bridge (from the 5V line). On the left, another is the ground solder bridge, and it connects to the first hole, which is where I connect GPIO pin 18 and 23. To make this solder bridge, you need to carefully dig out the first two rows with tweezers (side cutter or dyke). Then you can solder the motor connection wires inside. Automated Cat Feeder with Raspberry Pi Next, we need to add a current limiting resistor for the LED light because we don’t want it to explode! Soldering a 390-ohm resistor on the line works well!Automated Cat Feeder with Raspberry Pi Make sure you put on heat shrink tubing before soldering the resistor.Automated Cat Feeder with Raspberry Pi I have a 12V button with neon lights, but I want to replace the neon light inside with an LED.Automated Cat Feeder with Raspberry Pi So I replaced the bulb with an LED, just need to pry open the switch (easier said than done), replace the bulb with an LED and solder it up. Connect one end of the two LEDs with a resistor to pin 4 and pin 27 on the breadboard as output. Connect the negative to the negative slot (don’t forget to connect the negative slot to the GND line).Automated Cat Feeder with Raspberry Pi Now, we do something when the button is pressed. We use the same 390-ohm resistor as our so-called “pressed” resistor. This resistor is grounded, ensuring our input pin won’t fluctuate and won’t be particularly high. Next, we connect the other end of the switch to the 3v socket. When the switch is pressed, it will read a “High” in the GPIO system or “True” in Python.Automated Cat Feeder with Raspberry PiAutomated Cat Feeder with Raspberry Pi

Finally, connect your buzzer to pin 24 and ground.Automated Cat Feeder with Raspberry Pi Now, once all the wires are soldered, and you press the button to test everything is fine, you can start modifying the food hopper and assemble everything together at its back… I have opened holes for the USB power line, motor head, through holes, and side button on it.Automated Cat Feeder with Raspberry Pi and I stuffed them all into a column…Automated Cat Feeder with Raspberry Pi Now it looks like this:Automated Cat Feeder with Raspberry Pi Now, turn it on and start testing!

View all photos on Flickr: http://www.flickr.com/photos/synackurgfoo/sets/72157633110276817/ .

Future improvements include:

  • Pi camera

  • Mobile WebUI using PiUi: https://github.com/dps/piui

  • Active speakers

  • Sound clips from red dwarf, especially the fish requested by the kittens

Original link: David Bryan’s Blog Translation: Geek Fan Boyd WangTranslation link: http://www.geekfan.net/6188/

Limited time download: Reply “Tutorial” to get the microcontroller e-book, reply “Simulation” to get Proteus simulation materials

> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >

How to share to Moments

Click the top right corner “…” three dots, select “Share to Moments

Microcontroller Subscription Account

WeChat Name:Microcontroller Daily updates various knowledge about microcontrollers, electronic DIY, and the latest news in the electronics industry, follow us, great!Automated Cat Feeder with Raspberry Pi

Recommended Hot Articles

Reply with the number below or click directly to get related articles

001:Must-read for Microcontroller Beginners

002:Words from Zhou Lijun for Young People Learning Microcontrollers

003:Experts talk: The difficulty of entering software and hardware and the span of mastery time

004:Feelings about Learning 51 Microcontroller; Recommended Reading; Must-write Programs

005:Comparison of Several Microcontrollers Used

006:《Learning Route for ARM+LINUX (Learning Order, Knowledge Points and Book Recommendations)

007:Differences and Relationships between ARM/DSP/FPGA/CPLD/SOPC/SOC

008:Interesting Electronic Production: Food Power Generation in the Hands of Artists – Electronic DIY

009:My Experience: From a Production Line Worker to a Microcontroller Engineer

010:My Buddy Brought Back a Toolbox from Germany for 200,000

Click the lower left corner “Read the original text”, enterForum Communication!!!

Leave a Comment

×