Close
0%
0%

Vending Machine for Birds

Simple, inexpensive bird feeder that dispenses peanuts in exchange for dropping stuff in a hole. A vending machine for clever birds.

Similar projects worth following
An inexpensive, simple bird feeder that dispenses a nut for dropping stuff in a hole and can be built from analog components and discarded or scrap objects. Pest-resistant, runs on 5V, one moving part. Lots of improvement and customization possibilities.

MAIN FEATURES

- portable
- waterproof/weatherproof
- battery/solar or mains powered
- keep-alive for USB power banks
- accessible components and materials
- highly customizable
- optional external monitoring and control

This is not a new idea, just a new design. I have a page here listing some of the similar projects I have come across in the past few years.
https://hackaday.io/page/38619-bird-litter-for-food-projects

See it in action: https://www.youtube.com/@VendingMachineForBirds

More info on the analog and digital versions:
Analog VMFB: https://hackaday.io/page/296098-vending-machine-for-birds-analog-version
Digital VMFB: https://hackaday.io/page/296141-vending-machine-for-birds-digital-ve

A vending machine for birds that rewards them with food when they drop something in a hole. Electronics and enclosure materials cost <100 USD/EUR. I've designed a PCB and PVC pipe enclosure and dispenser (described below). The circuit is not complex, but I think a custom PCB makes it easier for people who are not electronics hobbyists to build this. I've made a few different enclosures out of scrap for this, but will share the PVC pipe enclosure details since it's sturdy, waterproof, and the materials can all be found at the hardware store.

There were two main inspirations for me to start and  document this project

  • Hans Forsberg - designed his own machine and was the first person I learned of that had birds (magpies) bringing items to deposit on thier own
  • Josh Klein - makes his Crowbox designs freely available and supports people who want to build it

I would like to thank PCBWay for helping me get the PCB made.

MAIN FEATURES

  • portable
  • waterproof/weatherproof
  • saves power until a warm body is present
  • battery or mains powered
  • one moving part
  • accessible components and materials
  • rodents can't break in and get the food
  • cheap to build
  • customizable

ELECTRONICS, SENSORS, AND POWER

The circuit is all analog, using four NE555 timers and one LM358 dual op amp. The sensors are all made using IR phototransistors and IR LEDs. The PCB has headers broken out so you can monitor and control it with a microcontroller or SBC. It runs on 5-6VDC, but be sure to use 5V if you are planning to power a USB device (like a camera) with the vending machine's USB ports. If you use a USB cable to power the vending machine, be sure it can deliver enough current. I found that some 10-year-old 2-meter USB 2.0 cables were resulting in a voltage drop from 5 to 4.5-4.8 volts on the vending machine power rail.  Cables that didn't work so well had a resistance >1Ω. Ones that did had a resistance of <0.5Ω. NE555's should get at least 4.5 and Raspberry Pis need at least 4.7V. If things are not working as expected, use a multimeter to check the rail voltage - it should be around 4.9V. Shorter cables are less lossy and take up less space inside the enclosure. 

Power consumption at 5V is as follows:

Without RPi Zero W

  • Idle with Powerbank Keep-Alive and TImer enabled: 18mA
  • Timer uses 8mA
  • Powerbank Keep-Alive uses 4mA
  • ^With both of these disabed it uses 6 mA
  • IR LEDs on: 320mA
  • IR LEDs and motor on: 510mA

With RPi Zero W and wide-angle camera module

  • Idle with Powerbank Keep-Alive and TImer enabled: 220mA
  • IR LEDs on: 520mA
  • IR LEDs and motor on: 820mA

So with the Rpi and camera you could get about 2 days out of a 20,000 mAh power bank. With just the vending machine you could get about 10 days.

Modules

  • Powerbank Keep-Alive: 555 sinks current every 7-22 seconds for 0.7-2.2 seconds to keep USB power banks on while sensors are in standby - the powerbank keep-alive can be disabled.
  • IR LED ON/OFF: 555 keeps the IR LEDs used by the sensors on for 22 seconds after the last PIR trigger
  • Op Amps: LM358 used as comparators to adjust the threshold of the sensors and send signals when they are triggered
  • Motor Controller: 555 turns on the dispenser vibration motor when the deposit sensors are triggered, tuns it off when the dispense sensor is triggered
  • Timed Dispense: 555 dispenses food every 10-100min - timed dispense can be disabled
  • Daytimer: Phototransistor that puts the timer in reset while it's dark outside - brightness threshold can be adjusted or disabled (Rev. B)
  • PIR Sensor: Sends a signal to turn on the sensor IR LEDs
  • Deposit/Dispense Sensors: IR phototransistors and IR LEDs used as proximity sensors to monitor the deposit and dispense chutes
  • Hopper Level Sensor: IR phototransistor and IR LED to detect when the food level gets low (Rev. B)
  • Monitoring/Control: lines for monitoring and triggering events with an external controller (Rev. B)

PCB, BOM AND GERBERS

Kicad Files (Github): https://github.com/src1138/VMFB
Gerbers, PCB and...

Read more »

VMFB-MC_09-24-52.mp4

Quick deposit - this bird knows exactly what it's doing.

MPEG-4 Video - 425.13 kB - 08/30/2024 at 13:33

Download

VMFB-MC_09-28-52.mp4

Jackdaw bringing two bottlecaps.

MPEG-4 Video - 1022.72 kB - 08/26/2024 at 12:46

Download

VMFB-MC_11-49-08.mp4

Persistent jackdaw sinking three bottlecaps - the first two failed to trigger the sensor - something I need to investigate.

MPEG-4 Video - 2.11 MB - 08/25/2024 at 13:37

Download

VMFB-MC_13-23-17.mp4

Jackdaw landing on the platform with a cap already in its beak.

MPEG-4 Video - 1.81 MB - 08/25/2024 at 13:28

Download

VMFB-MC_17-03-10.mp4

Jackdaw taking a cigarette butt from the cup near the platform and sinking it.

MPEG-4 Video - 2.87 MB - 08/20/2024 at 21:55

Download

View all 39 files

  • First deposit

    Stephen Chasey14 hours ago 0 comments

    First accidental deposit by the magpies in Amstelveen. The birds now associate the platform with food, so I mixed some peanuts in with litter so they have to dig through it. Accidental deposits are a little mote likely this way.

  • Stage 0 - magpies this time

    Stephen Chasey06/05/2025 at 10:23 1 comment

    Getting some traction with the local magpies. Will be interesting to see how they fare compared to the jackdaws.

  • Here we go

    Stephen Chasey06/03/2025 at 12:35 0 comments

    First visitor in Amstelveen. A magpie stopped by to check things out and grab a peanut.

  • Moving

    Stephen Chasey05/14/2025 at 15:17 2 comments

    I'm moving this month, so I'll be starting fresh in a new location. We'll see how smart the birds in Amstelveen are over the coming months.

  • New Learner

    Stephen Chasey04/30/2025 at 21:39 0 comments

    For the past couple of weeks, a new jackdaw has been coming by to watch the others get peanuts. It sometimes stands on the platform and inspects the machine for 5 minutes or more. The regular crowd has not been around in a few days and this one has been hanging around trying to figure it out.

    I put some bottle caps and a scrap of plastic on the platform to make it easier. After a few minutes shuffling things around, and flying away with a bottle cap, it was back and managed to sink the plastic scrap. 

    Over the course of the day it managed to make 4 deposits. The one time it brought one to the platform on it's own it threw the ones I left for it off the platform before proudly depositing the one it brought. You can see this at 5:06. A lot of this video is just this bird figuring things out.

    It also seems to look directly into the camera a lot.

  • Conditioning Wild Birds

    Stephen Chasey04/22/2025 at 21:15 0 comments

    There are lots of devices like this - birds deposit something and receive a reward. All shapes and sizes, different techniques for detecting a deposit and providing a reward. During the design and build, the dispenser assembly was the part I spent the most time on.  Once you have one ready to go, it's all about getting the birds to do what you want.

    This approach worked for me with pigeons and jackdaws. Durations here are based on my experience with jackdaws.

    0 - Small amount of food in the area you will mount the vending machine to attract birds (~1 week)
    - Food Provided, Timed Dispense, Deposit Provided (1-2 weeks)
    2 - No Food Provided, Timed Dispense, Deposit Provided (2-3 weeks)
    3 - No Food Provided, No Timed Dispense, Deposit Provided on the Platform (3-4 weeks)
    4 - No Food Provided, No Timed Dispense, Deposit Provided Near The Platform (TBD)
    5 - No Food Provided, No Timed Dispense, No Deposit Provided (GOAL!)

    Pigeons got to Stage 3 in less than two months but didn't show much promise to progress beyond that. Jackdaws got to Stage 4 and may make it to Stage 5 under the right conditions.

    Here are what I think are key aspects to training pigeons and corvids to deposit stuff for food.

    Encourage Accidental Deposits

    Hans Forsberg used this approach to train his magpies. A key thing to do is to mix the reward and the items you want birds to deposit on the platform. They will toss around and kick non-food items, often accidentally depositing one. After doing this 10 or 20 times they start to associate depositing those items with food. I found that they are likely to ignore other items in favor of the ones you trained them with. I trained the jackdaws with bottle caps and cigarette butts, and they go for that first before considering any other items like screws or scraps of plastic.

    Gradually Move Deposit Material Away

    There is a big gap between depositing stuff left ont he platform and bringing their own stuff from elsewhere. To get the birds to pick things up off the ground (or floor) it helps to start putting deposit material near the platform. I used a scrap of wood with a dish on the end to provide a path from the platform to the dish of bottle caps. I gradually swiveled this away from the platform over the next week or two so the birds got used to having to bring things to the platform. Then I lowered it over a few more days and finally started putting things on the floor. They then seemed to at least understand that any cigarette butt or bottle cap on my balcony was a potential peanut.

    Ground Level

    While being above ground does not make it harder to get started, in my estimation it does make it more challenging to get to Stage 5. My balcony is far from the litter on the ground. I think they view it as a box they can visit to get a peanut if there are caps or butts around. In a more open, ground level area I think they would not think of these artificial boundaries and it would be easier to train them to bring things from farther away. This one is just my hypothesis - I haven't lived at ground level with any outside space for a while.

  • 3 years ago

    Stephen Chasey04/17/2025 at 17:37 0 comments

    3 years ago I was building my first prototype of this thing. Materials included a mason jar, a frisbee, a TicTac box, a discarded ikea bookshelf, and a wine cork. I took some pictures and Google reminded me about it today.

    The dispenser motor with an eccentric load.

    Electronics were all on a few breadboards in a take out container.

    I had added an optional button that birds could press to get a peanut. That was way too easy - the pigeons figured it out in a few minutes. Them being able to see the peanuts in the jar may have helped attract them.

    I've learned a lot from this project, and still learn more about design, electronics, materials, and birds every week. 

  • New Daily Record and Odd Behavior

    Stephen Chasey04/16/2025 at 19:20 0 comments

    Today there were 14 deposits, beating the previous record of 11.

    One of the jackdaws sees the other birds using the machine, but does not quite understand it yet. Just after the 2:00 mark in the video above, it spends quite some time pondering the significance of the hole in the platform.

  • Stage 5 Challenges

    Stephen Chasey04/08/2025 at 15:32 0 comments

    It did not take long to get to Stage 4. The Jackdaws will pick up and deposit a cigarette but or bottlecap from anywhere on my balcony and have been for well over 6 months.

    However, they have not managed to bring anything on their own yet. I think not being on the ground floor is a big part of this. They only associate depositable items with the balcony and do not look elsewhere. 

    I think I need to find a ground-level spot if I want to get to Stage 5 anytime soon.

  • Vultures

    Stephen Chasey02/23/2025 at 17:15 0 comments

    Occasionally a jackdaw gets robbed as they are rewarded for depositing litter. Today a jackdaw got jumped by another just as they collected their reward. I've seen theft, but this is the first scuffle I've noticed. I guess this is the bird version of getting mugged at the ATM.

    The fight starts at 0:46 and lasts for 4 seconds. Nobody was hurt :) You see both birds fly away a moment later.

    They knocked in a bit of debris that triggered a dispense during the fight, but were too busy to notice so another bird got it.

View all 139 project logs

Enjoy this project?

Share

Discussions

soni wrote 02/05/2025 at 19:23 point

A nie masz problemów z wrzucaniem kamieni?

  Are you sure? yes | no

Stephen Chasey wrote 02/05/2025 at 22:20 point

Not yet. So far, with the exception of yesterday's apple, the birds just deposit the bottle caps and cigarette butts I leave for them. The deposit sensor and motion detection are only active when the PIR sensor is triggered by something on or in front of the vending machine.

  Are you sure? yes | no

bobricius wrote 01/29/2025 at 18:41 point

How you train birds for this ?

  Are you sure? yes | no

Stephen Chasey wrote 01/30/2025 at 14:46 point

It's done in stages. First to attract the birds and get them to associate the machine with food. Once they are visiting, I put bottlecaps and cigarette butts on the platform so the birds will accidentally knock them in the hole when they come for food. Eventually they understand that when something goes in the hole, a peanut comes out.

Conditioning Stages

0 - Small amount of food in the area you will mount the vending machine to attract birds (~1 week)
1 - Food Provided, Timed Dispense, Deposit Provided (1-2 weeks)
2 - No Food Provided, Timed Dispense, Deposit Provided (2-3 weeks)
3 - No Food Provided, No Timed Dispense, Deposit Provided on the Platform (3-4 weeks)
4 - No Food Provided, No Timed Dispense, Deposit Provided Near The Platform (TBD)
5 - No Food Provided, No Timed Dispense, No Deposit Provided (GOAL!)


  Are you sure? yes | no

rafununu wrote 12/07/2024 at 13:13 point

I don't know where you live but here birds cannot own credit cards, no more cash either :)

  Are you sure? yes | no

Stephen Chasey wrote 04/22/2023 at 10:24 point

A shortcut to useful logs:

Dispenser Detail: https://hackaday.io/project/184754-vending-machine-for-birds/log/216908-dispenser-new-vs-old

Some things I learned during this project so far: https://hackaday.io/project/184754-vending-machine-for-birds/log/213051-some-things-ive-learned-so-far

PVC Enclosure Detail: https://hackaday.io/project/184754-vending-machine-for-birds/log/210037-pvc-enclosure-complete-and-mounted

Pics of my first two enclosures: https://hackaday.io/project/184754-vending-machine-for-birds/log/209466-new-enclosure-all-pvc

Similar projects: https://hackaday.io/project/184754-vending-machine-for-birds/log/207933-other-bird-litter-for-food-projects

  Are you sure? yes | no

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 10/19/2022 at 14:52 point

Yes, there are a couple of videos in the files section.

  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

Nerdfeeder

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