Simple, inexpensive bird feeder that dispenses peanuts in exchange for dropping stuff in a hole.

Public Chat
Similar projects worth following
An inexpensive, simple bird feeder that dispenses a nut for stuff and can be built from analog components and discarded objects. Rodent proof, runs on 5-6V, one moving part (vibration motor). No 3D printing or laser cutting required, just some basic hand tools. Lots of improvement and customization possibilities. Lots of possibilities for the enclosure.

- comes on when it sees a warm body, stays on until it's gone
- detects when something is dropped in the hole, anything that fits will work
- dispenses a shelled peanut (maybe two or three)
- dispenser design is rodent-proof
- can be built in a weekend
- no programming/all analog
- cheap to make
- small enough to be portable
- easy to customize
- easy to improve upon

I had been thinking about this project for a while and got really inspired by Hans Forsberg's videos and comments. I wanted to make a very simple version of what he's been doing. I also wanted it to be small, cheap, using common analog components and discarded items.

I wanted to avoid programming and 3D printing - not that I don't love that stuff, but to keep this mechanically and electrically simple, cheap and accessible.

I hope this can be the type of project you can build easily, try it out and improve on it over time.  There is a lot of room and possibilities for improvement and enhancement. Solar charging, cameras, computer vision, do it all with a microcontroller, print better parts, more efficient design... lots of room for improvement :)

I've already built a prototype and started testing it with birds that visit my balcony (mostly pigeons, but some jackdaws, crows and magpies). The vibration motor does not startle them - especially when they learn it means a peanut is coming,

The circuit is fairly straightforward:

  • PIR sensor (the one thing I could not find laying around and had to buy. This turns on the rest of the circuit when triggered.
  • 555 monostable vibrator to keep the circuit on for ~30 secs after the PIR is triggered. There is a diode leading from pin 6/7 to the trigger. This allows the PIR to reset the timer during a cycle, keeping the thing continuously on while a bird is in front of the PIR.
  • LM358 dual op amp for the IR proximity sensors made from IR leds and phototransistors
  • another 555 for a bistable vibrator - when the drop sensor sees something it turns the vibration motor on, when the dispense sensor sees something it turns it back off
  • a third 555 astable vibrator - to use as an optional timed dispense to get birds used to it as a food source
  • small DC motor (the one I used is marked 2 volts) with a slice of cork pressed on the axle and some screws in one side of the cork to make it vibrate
  • some resistors, capacitors, a few transistors and diodes and signal LEDs to indicate what's going on

The circuit was the simple part.

Biggest problem I had to solve was dispensing one (or maybe two) peanuts at a time reliably without a complex mechanism or making peanut butter. A vibration feeder made from two jar lids with offset holes finally did the trick. This was a challenging puzzle to solve. I probably spent most of the project time on this.

The next one was sunlight - some leaks and reflections were triggering the sensors. Some foil tape and a better enclosure fixed this.

One interesting thing I discovered was that black shrink tubing did not trigger the IR proximity sensors, making it a great material to use as a backstop, letting you turn up the sensitivity a bit without extending the range - great for monitoring openings and chutes for passing objects.



Only the PIR and the FEEDER ON/OFF (monostable vibrator) are on until the PIR is triggered.

If it's in timer mode, the TIMER (astable vibrator) is also on.


  1. PIR sensor triggers monostable vibrator
  2. 555 Monostable vibrator turns on rest of circuit via an NPN transistor and keeps it on for ~30 sec after the last PIR trigger


  1. Deposit sensor detects passing object and triggers op amp 1
  2. Op amp 1 triggers bistable vibrator to go high
  3. Bistable vibrator turns on vibration motor via an NPN transistor


  1. Dispense sensor detects a passing peanut and triggers op amp 2
  2. Op amp 2 triggers bistable vibrator to go low
  3. Bistable vibrator turns off vibration motor via an NPN transistor

Timer Mode

The above is still true, but in addition:

  1. 555 astable vibrator completes ~50 min cycle and its output goes high to trigger
    1. NPN transistor to turn on the sensors and motor switch
    2. NPN transistor to turn on the motor
  2. Dispense cycle triggered as described above

The schematics in the project description should be readable. It's broken into modules, but the interconnections are labelled.

  • For the monostable, bistable...
Read more »

Nerdfeeder 1_10-29-36.mp4

The jackdaw family has taken notice.

MPEG-4 Video - 4.76 MB - 06/30/2022 at 10:12


Nerdfeeder 1_16-40-18.mp4

Sooooo close to figuring it out. The pigeon sinks quite a few things in the first three and a half minutes.

MPEG-4 Video - 22.91 MB - 06/29/2022 at 02:54


Nerdfeeder 1_15-23-16.mp4

The pigeon gets lucky at 1:32, 1:50 and 2:12!

MPEG-4 Video - 19.48 MB - 06/28/2022 at 22:01


Nerdfeeder 1_16-04-26_sm.mp4

Pigeons don't give up easily.

MPEG-4 Video - 38.83 MB - 06/27/2022 at 14:40


20220617_173135 (1).mp4

Another brief functional demo with the new circuit and timer mode.

MPEG-4 Video - 36.78 MB - 06/17/2022 at 15:37


View all 11 files

  • 1 × PIR sensor Small PIR sensor with short (1-3m) or adjustable range
  • 3 × NE555 Timer
  • 1 × LM358 Dual Op-Amp
  • 1 × Small DC Motor
  • 1 × Wine cork, eraser, test tube stopper or something like it to make a push-on load for the motor

View all 36 components

  • Extending Battery Life and Power Options

    Stephen Chasey3 days ago 1 comment

    It looks like 4 D-cells will last about a month before the voltage dips to the point that the vibration motor turns more slowly and takes longer to dispense a nut. The cheap store-brand batteries I'm using hold about 10K mAh.

    I looked into rechargable options for alkalines, like fast-charging USB power banks with 10K+ mAh. However the dispenser works best at 5.5+ volts.

    So, I think a voltage doubler ot boost converter will help me here. The motor works with 9V as well, so if I control the current I can probably hit it with 10-12V for short periods. This would let me get more out of the D-cells and open up some possibilities for powering the thing with a 5V rechargeable source that is not too expensive.

    I'm already using a power bank to run the camera. 10K mAh last about 20h.

    I'd also like to make the Pi only enable the camera when the PIR sensor is triggered - this would greatly extend the life of the camera on a powerbank.

    In the end, this things should be able to be left unattended for at least a week with everything working.

  • Jackdaw family

    Stephen Chasey4 days ago 0 comments

    The jackdaw family I was feeding out back has found the machine out front. Here's a video of the mom feeding one of her young on the platform and accidentally kicking a bottlecap into the hole and taking the dispensed peanut to feed the young one.

  • Maybe pigeons have a shot?

    Stephen Chasey4 days ago 0 comments

    I get that pigeons don't have the brain to bring a bottlecap from the street to the machine, but they are making pretty good progress in the couple of weeks I've been at this address. So much so that I think I will leave the machine where it is and build a second one to put out back.

    The first 3.5 min or so are interesting.

    They may have reached a plateau though. They seem to get that throwing stuff around gets you a peanut sometimes, but not sure they know what the hole is for. They "smart" pigeon with light gray wingsthat manages to hit the hole the most sticks it's head in there a lot.

    Will be interesting to see if they begin to understand the significance of the hole in the next week or so - if they do I can start challenging them a bit.

    I'd really like to put one in the park nearby soon. There are quite a few crows there, but due to the construction on my street at the moment they don't seem to come around my place much. Before that happens I need to think about how and where is best to do that.

  • Pigeon gets lucky

    Stephen Chasey5 days ago 0 comments

    I have a lot of video to go through, but I found this from this afternoon. One pigeon has been camping on the feeder trying to figure it out. I've seen him drop stuff in several times. This clip shows it getting lucky at 1:32, 1:50 and 2:12.

    Unfortunately it's hogging the machine and other birds don't have much chance to approach.

    I'll give the pigeon the rest of the week, then I have to move it out back. There's a family of jackdaws that I've been feeding peanuts in the shell on the back balcony to for a couple of weeks. I'd like to give them a try.

    I'm pretty confident about the design after it's been outside for a couple of weeks now and the batteries are actually going strong. I tried a few modifications and noticed the motor had a weak connection to the breadboard. Now it's back to normal. I need to start with the PCB soon - breadboards in a vibrating housing is asking for trouble.

    I'd like to build a second one, too. I already have another wooden wine box and some jars.

  • Other Bird Litter-for-Food Projects

    Stephen Chasey7 days ago 0 comments

    Corvid Cleaning in Sweden:

    Apparently got scooped by the media - not ready to share yet.

    Puy de Fou Park in France: More of a stunt than a sustainable effort, but very cool.

    The Crowbar by Crowded Cities:

    Wishful thinking by a Dutch Startup. Design looks nice but does not appear very functional.

    The Crowbox:

    Open source project based on a Dutch entrepreneur's idea. Latest version ncovers food instead of dispensing it.

    Original Version

    Current Version

    The Crowkit: Looks like an old, discontinued project. There is footage of crows using it as intended.

    Hans Forsberg:

    Real accomplishment getting wild magpies to exchange bottlecaps and other items for food. This project really got me started on my own. 

    Tomas and Olof Morsing (The Magpie Recycling Project):

    Other than Forsberg, one of the few successful examples out there. Huge contraption, but if I had my own yard I'd build big too :)

    In the end, for the purpose of getting wild, untrained birds to exchange stuff for food, the only the  success in getting wild birds to exchange litter for food I've seen so far was had by:

    • Hans Forsberg
    • Tomas and Olof Morsing
    • Some builders of the Crowkit

  • Pigeons trying so hard

    Stephen Chasey7 days ago 1 comment

    I don't know if they will figure it out, but if not it won't be for a lack of trying. I thought this was kind of funny.

  • Some adjustments

    Stephen Chasey7 days ago 1 comment

    I reduced the sensitivity of the dispense sensor as it was triggering when a tiny piece of nut was dispensed. Now it dispenses more reliably, though sometimes 3-4 peanuts at a time.

    Also got a 20K mAh power bank to run the Pi camera - runs it for about a day an a half. I tried a 10K mAh one as well which ran about 20 hours. I was thinking of getting another Pi Zero W - I got the one I have for 12 EUR a while back - now they are not available or much more expensive. I still have some old standard Pi's and a spare camera module I can use though - just need to figure out a good enclosure.

    Cut a window out of the TicTac box for the camera and taped a pice of transparency film over it. Still waterproof and the picture is much better than it was when shooting through the container wall (it was old and a bit scratched up).

    Videos are starting to get better, though I only have pigeons and jackdaws at the moment. I went out this morning looking for crows and saw that someone had put out at least a kg of cut up rookworst on a tree stump about 100m from my place. Not sure if this is a regular thing, but if so I will have to go find some hungrier crows somewhere else. The seagulls seemed to have dominated it, but I saw crows sneak in to grab a few bits. I still started trying to make friends with a crow family (2 adults and apparently 3 young ones) a little farther away by giving them peanuts in the shell. They were very cautious, much more so than park crows near the center. This will take time...

    I may need to replace the 4 D-cells soon. After a month of constant testing and being in timer mode 24/7 they are down to about 5 volts. I think they may not be able to turn the vibration motor fast enough once they hit ~4.7V or so. Still working fine for now, but the dispense mechanism is noticeably weaker.

    I will share some videos this week - even if they are only of pigeons desperately trying to figure out how to get those peanuts.

  • Rodent Proof

    Stephen Chasey06/24/2022 at 14:00 0 comments

    So being resistent to curious and hungry mice and rats is pretty important. Birds are dirty enough by themselves, but add some vermin and you will definitely hear from the neighbors. 

    My attempt at this was to have the peanuts drop into a funnel before being dispensed. The idea is that if a mouse (or tiny rat) manages to crawl up the dispense chute, they won't be able to reach the peanuts. Granted, they could possibly get into the enclosure and cause problems for the feeder, but they will do it on an empty stomach.

    Mice would be more of a problem than rats as most rats would be a little too big to get all the way into the enclosure though the dispense opening.

    It's been outside for over a week now in an area where I haven't had a day go by without seeing at least one rat - even in the daytime. No issues yet. I'm not at ground level and it's a newish building, so that helps.

  • Camera set up and configured

    Stephen Chasey06/23/2022 at 09:18 0 comments

    I've added the camera to the feeder itself rather than on the balcony door. Also set up motion detection and am dialing that in.

    I wanted a little more rain/sun protection for the camera and to keep the peanuts out of direct sunlight too much, so added a frisbee to the top. Held on by magnets for now since I'm not sure about it.

    Once I get some good videos will share them.

  • Camera Added

    Stephen Chasey06/21/2022 at 16:15 1 comment

    The feeder has been out on my front balcony for about 5 days now. I've noticed that pigeons are starting to push around the bottlecaps and butts around and sometimes get a peanut.

    I want to be able to see what's going on during the day while I'm away, so I made an IP cam from a Raspberry Pi Zero W and a wide-angle camera module using MotionEyeOS. I had tried Zoneminder and Agent DVR first, but they were resource intensive and harder to set up. MotioneyeOS took about 30 mins to install and configure.

    I'm still tweaking the motion detection, but hopefully I can share some interesting videos soon. Yes, that is a TicTac box.

View all 27 project logs

Enjoy this project?



Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates