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.

- runs on 5-6V (4x1.5V cells, USB powerbank, 6V DC adapter)
- 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 »


Basic functional test of the new stripboard pcb with sensors and motor attached.

MPEG-4 Video - 43.53 MB - 09/16/2022 at 18:49



Shows the bridges and cuts used for my stripboard-mounted circuit.

Portable Network Graphics (PNG) - 323.24 kB - 09/16/2022 at 15:27



Schematics showing the different parts of the feeder electronics.

image/png - 123.65 kB - 07/20/2022 at 20:55


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


View all 13 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 37 components

  • Rename?

    Stephen Chasey09/19/2022 at 14:56 2 comments

    It looks like my project name could use some improvement. There are a lot of things and people out there already using "nerdfeeder" and the resulting confusion is understandable.

    I was thinking more along the lines of a birdfeeder for nerds - or maybe that the birds themselves must be nerds if they can figure this out. Mostly, I liked that it sounded like "birdfeeder".

    I haven't been able to come up with a better name yet, other than a few that could be equally confusing, like "Nuts for Butts". 

    I'll be thinking, but if anyone reading this has a clever idea I would appreciate any suggestions.

  • Stripboards tested and schematics updated

    Stephen Chasey09/16/2022 at 15:34 0 comments

    Everything seems to work on the new boards, so I updated the schematics and stripboard diagram.

    Stripboard PCBs


    Cuts and Bridges

  • Breadboard > Stripboard

    Stephen Chasey09/15/2022 at 12:14 0 comments

    I've migrated the electronics from 5 solderless breadboards to 3 stripboards to mitigate the poor connections and mass of wires. After a little testing and tuning I'll be putting them in the new enclosure. Here is a pic of the main board with and without labels (there are also 2 more for the deposit and dispense sensors).

    I also found several more mistakes in my schematic and stripboard cut/bridge template. Seems like I can build it but my documentation is a little sloppy - really trying to improve this.

    After testinig I'll upload the updated/corrected schematic and stripboard layout.

  • PVC enclosure complete and mounted

    Stephen Chasey08/22/2022 at 14:05 0 comments

    I finally finished the PVC-based enclosure and found a way to mount it on my weird balcony railing. The mounting uses pipe clamps to attach it to some wood beams. I found a wooden pallet by the trash and took one of the beams, and cannibalized my old wooden enclosure. For a vertical-barred railing you could use two horizontal beams instead of one vertical one.

    For now I'm putting seed on the tray to get birds used to it again while I finish up other things.

    • The curved arm on the left side is to hold a camera.
    • The hole above the dispensing cup is for the PIR.

    Here's a brief look inside.

    Peanut container (now loads from top!)

    Vibration dispenser:

    Dispensing funnel (top part of 1.5L PET bottle)

    Deposit pathway

    Deposit collector (bottom part of 1.5L PET bottle)

    Now to resume putting the electronics on a solderable proto-board and fire it up again.

  • New enclosure - all PVC

    Stephen Chasey08/05/2022 at 13:25 0 comments

    I found some discarded 50mm and 110mm PVC pipes, added a few fittings and build a new feeder. It holds more peanuts and trash, is more weatherproof, and you can get all the materials in one trip to the hardware store for about 25 bucks. The frisbee trash tray is at 74cm (and is adjustable) so you can put a table next to it and set the frisbee part on the table to give the birds more space to approach the feeder. I'm also considering mounting perches since I would prefer to have it as an all-in-one thing, but a surface is better for training the birds. The little arm sticking out is for mounting a camera. The whole thing is about 110cm tall.

    For reference, here are the first two prototypes.

    Protoype #1 - Jars and discarded wood panels

    Prototype #2 - jars, wine gift box and discarded end table

    I hope to have this one operational in a couple of weeks. I'm still rebuilding the circuit one a solderable protoboard.

  • Slowing down a bit

    Stephen Chasey07/29/2022 at 12:50 0 comments

    Tired of shaky breadboard connections and rat's nest of wires, but not confident enough to design a proper PCB, so I'm moving eveything to stripboards. I'm also looking at making a new enclosure/containers with PVC pipes. In the meantime, my momentum will slow a bit as I've got other priorities popping up. 

    Quick-and-dirty PCB design (red lines are trace cuts, blue lines are bridge wires, didn't bother with component values, just layout).

    I've taken the feeder back inside to do this work. Hope to finish the proto-PCB and new enclosure before the end of August.

  • MVP Time

    Stephen Chasey07/23/2022 at 14:16 0 comments

    I think I have worked out most of the issues I ran into while designing, building and testing this food-for-litter birdfeeder. I'm ready to stop tweaking and finalize the electronics and dispense mechanism. There is still tons of room for improvement and optimization, but what I have so far is simple and works reliably so it's time to make some PCBs. Excluding the PCBs, the electronic components cost 10-15 EUR. If you've been building electronics for a bit, you probably already have everything you need.

    I'm hesitant to "finalize" the enclosure or deposit/dispense assembly - it is also simple and functional but once you have the electronics and dispense mechanism almost any enclosure will work provided it is light-tight-ish and the dispense and deposit pathways have bends to block reflections from outside. I don't know how commonly accessible wine gift boxes are and there are so many possibilities that may suit your needs or material availability better. I'll provide more details about the current enclosure as a reference design.

  • USB power working

    Stephen Chasey07/17/2022 at 21:54 0 comments

    I built one of those "powerbank keep-alive" circuits to draw ~150mA for ~2 secs every ~12secs. Seems to be working to keep a USB wall wart on for a few hours whilte the feeder is in standby - we'll see if it's still on tomorrow. If so I can ditch the D-cells for a rechargeable power bank and run the camera and feeder from one dual-port 5V 2.2A USB charger.

    I think a 20K mAh power bank would keep the camera and the feeder going for about a day. Feeder alone should last 6-8 weeks. It lasted about a month on D-cells with 10-20 deposit/dispense interactions per day. Using USB power banks might also make solar charging easier to add.

    And I get to use yet another 555! :)

    If it works I'll add it to the schematic and sanity check the rest for any errors I missed - I know there are some.


    Still not 100% on 5V DC wall chargers - for some reason the feeder does not work properly after  a day or so. I reduced the period of the keep-alive from ~12/2 to ~7/1 secs and that seemed to extend the running time a bit, but didn't fix the problem. Unplugging and replugging seems to fix it. Using 6V works fine over time, but 5V does not. I may have to solicit help from a friend in Texas that repairs power supplies for a living as I'm out of ideas.

    The keep-alive does work with USB power banks so far. It's been running strong on one for a day with no issues. I think I can tweak the keep-alive to make it more power-efficient (shorter pulse, longer cycle) while still keeping the power bank alive.

    Since the power bank works, I was thinking of putting two in the enclosure. Run off one of them and solar charge the other. I have some random solar cells I tried out and found two 3V 210mA cells that fit perfectly in a CD jewel case and put out ~6V at ~170mA when wired in series. Along with a small circuit to regulate the solar voltage to 5.1V it should run for ~4 weeks on one 10K mAh UBS power bank while the other charges. If there is an average/equivalent of 2-3 hours of usable sunlight per day, the second bank should be charged by the time the first one needs recharging.

    UPDATE - USB working, forget solar for now

    A 150mA keep alive pulse of ~1 sec every ~10 sec has been working on a 20K mAh power bank for a couple of days now with 20-40 interactions per day. I'm cheking it periodically to see when that first status light goes out - I'm hoping it's no less than ~10 days.

    Solar is another issue that I will get to later. I want to focus on finalizing the electronics for a V1 for this thing and making some PCBs.

  • Peanuts in the Shell - Nerdfeeder XL?

    Stephen Chasey07/14/2022 at 12:48 0 comments

    One of the drawbacks of using shelled peanuts is that most birds love them - including pigeons. At the moment I have primarily pigeons coming to the feeder. A few of them seem to understand a bit what needs to happen to get food. A couple of them even found a way to cheat by jumping from the railing tot he platform and landing hard, to shake a peanut loose. They would do this over and over, though it only works once or twice. They were even jumping in pairs for extra impact. I had to steady the platform with a bucket of water. They still try it from time to time, but that loophole has been closed :)

    Peanuts in the shell would be better since corvids love them, but pigeons can't open them up to eat them. I still put out some peanuts in the shell to attract jackdaws, and they seem to prefer them to shelled peanuts.

    I am thinking of building another feeder that works with in-shell peanuts. The feed container and dispense mechanism would have to be significatly bigger, maybe made entirely from PVC pipe bits or a small bucket instead of a jar. The rest should work as-is. In-shell peanuts are much less dense than shelled, but can get jammed more easily due to more irregular shapes and surface friction.

  • Using a DC power supply

    Stephen Chasey07/11/2022 at 15:59 0 comments

    I've added a jack near the switch so I can use a wall wart to power the feeder. while I continue to experiment. I found out that 5-5.5V is the optimal voltage range for my setup based on dispensing reliability and noise.

    However, being the beginner I am, I found myself wondering why the voltage would go from 5 to 4.5 over the course of a day. Apparently these unregulated power supplies need a base load to keep them putting out the expected voltage over time, and the PIR and single 555 aren't drawing enough to meet that threshold.

    So I'm going to dig up a diode and add a 1K or so dummy load that only affects DC-in, not the batttery. Ideally this would also keep a 5V USB charger or power bank up and running as well,

    In the end the motor I'm using does not seem to require lots of current since it's a low voltage motor and the only load is an eccentric free-spinning one. 


    Before I changed anything I did some more tests.

    I tried a couple more wall warts and found that a USB charger is sufficient to run both the birdfeeder and the Pi Zero camera. The charger I use can put out 2.4 amps and has two USB ports so I can plug both the camera and the birdfeeder into it. I got a USB-to-5.5x2.1mm barrel jack cable as I did not feel like adding a USB port to the birdfeeder. Eventually, maybe adding a type-A USB jack would be nice since the USB-to-barrel jack cable is not something most people have laying around. The Pi Zero currrent draw takes care of keeping the thing on if it has a minumun current draw requirement.

    So, no changes and using a single power source for everything. Plus USB chargers are pretty common. Will try it out for a few days. The previous power supply I used worked fine over time if I set it to 6 volts, but 5 works and is a little quieter.


    Looks like 5V wall warts need some more investigation. After about a day the power dips to the point where the motors and sensors don't work properly. 6V works fine over time, so I went back to using one USB charger for the two Pi cams and a 6V wall wart for the feeder until I figure this out.

View all 38 project logs

Enjoy this project?



John Opsahl wrote 09/23/2022 at 04:35 point

This project is way cool. Do you have a video of a bird dispensing an item and receiving a peanut? 

  Are you sure? yes | no

Stephen Chasey wrote 08/07/2022 at 06:58 point

It could be adapted to dispense a peanut for each commit :)

  Are you sure? yes | no

fdufnews wrote 08/05/2022 at 14:22 point


When I read the title, I first thought of a system to feed a pool of programmers

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

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