DIY: Automated Squirrel Feeder

2 min read Original article ↗

A while ago I noticed a couple of squirrels running around in the garden. They seemed very active an not at all scared, but they kept a safe distance towards me. Numerous tries were made at feeding them, eventually I gave up.

Not being easily discouraged, I had an epiphany: What if I could feed the squirrels without them having to come really close to me?

Without further ado: The Squirrel Fedder 2000

What you need:

1. Some kind of container, e.g. Bird House
2. Raspberry Pi
3. Camera for the Raspberry
4. Stepper motor
5. Cables, Wood, Nails, …

My basic idea was to use the camera as a kind of motion detector, which should trigger the release of a treat (hazelnut) upon movement.

image

So far so, good the camera and the Raspberry Pi work together very nicely, this combination is further upgraded by the software motion which lets you configure countless things to do if movement is detected.

Next up was the treat-release mechanism, which turned out to be the most tricky part of the whole enterprise. I settled on a stepper motor for this part, because I needed finegrained control over the movement

image

On top of the motor I put an old camera lens-cap combined with a piece of wood. The motor would then turn 180 degrees, releasing the nut to fall downwards, while simultaneously making room for the next treat. New nuts would roll in from a container above (so I thought, at least).

I glued the Raspberry inside:

image

Last but not least I used some plastic cups to build a slide which connected the stepper motor with the hole in the bottom of the case, so the nut would actually leave the container. Voila, version 1 was ready.

The software configuration was really straightforward:

1. The camera detects some kind of motion
2. A video is recorded
3. Once the movement ends, a program is started that does the following
4a. Stepper motor turns 180 degrees to release the treat
4b. A stillframe from the recording is uploaded to Twitter

First success:

This actually happened about 30 minutes after I deployed the feeder into the wild, so I was delighted.

See the next post for problems with the initial design and improvements.

Source on Github