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. 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 vup near the platform and sinking it.

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

Download

View all 39 files

  • Find your own litter

    Stephen Chasey11/27/2024 at 21:02 0 comments

    The birds have been making deposits every day for more than a month, except for 26-NOV when I did some balcony cleaning and spent a lot of time near the machine. I've been leaving the birds caps and butts around the balcony to use, and I think there are 3-4 jackdaws that fully understand what they are for. I'm going to let them run out and not provide them anything for a week or so and see what they do.

    The weather has turned cold, windy and rainy - standard Dutch November. This means fewer people out and makes food a little harder to find. I expect this to motivate the birds a bit and hopefully drive them to find their own litter. If they do, that will be a big breakthrough for me - Stage 5. If I can get wild birds to do this I will have a much better shot at finding a municipality/university/etc. that will consider letting me place one of these in a park or square for a year or so.

    I do need to get to work on the ESP32 port of the software and look into non-wifi IoT comms options in the meantime - it will be a much more attractive solution if I can power it reliably via solar and a ~20K mAh 5V battery and don't need a nearby wifi network.

  • Remaining Failure Modes

    Stephen Chasey11/11/2024 at 14:57 0 comments

    After running the vending machine unattended for almost a month, it has proven to be pretty reliable but still has some failure modes that are not completely solved.

    Funnel Jam - solution in testing

    The worst one is when the funnel beneath the dispenser gets jammed. There is no way to fix this remotely, so it needs to be avoided. After 100+ dispenses it jammed yesterday afternoon, leaving the jackdaws a little confused.

    I had been thinking of completely redesigning this to not use a funnel, just drop the peanut onto an angled platform to dispense. This would add some complexity and build difficulty, so yesterday I took a shot at improving the funnel design first. The path is smoother now and I think jams will be even less likely to happen. I built a new funnel assembly last night and swapped out the old one today. Hopefully no more funnel jams.

    Missed Deposit - solution known, to do

    This is the second worst, and should be pretty easy to fix. I need a better way to mount the deposit sensor (using tape and velcro now) to give it a better view of the deposit chute. Right now it appears to miss about 3% of deposits and I think this is the cause. I will have a look this weekend.

    This is not a persistent failure mode, and it happens rarely. I do think it can be easily fixed though.

    Ghost Dispense - solution ideas, need to refine and test

    Occasionally (about 2% of the time in the last month) a piece of shell or debris from the peanut hopper will register as a dispensed peanut. The best way to avoid this is to remove debris from the peanuts before loading the hopper and cleaning it a bit when refilling. I do have an idea to leave one or two small openings away from the sensors and modify the vibrating platform a bit so debris is dispensed but not seen by the dispense sensor. 

    This happens rarely, but with other rewards like dog food pellets it would be a worse problem as the vibrations could shake off crumbs and small pieces easier.

    Hopefully before the end of the year I will have eliminated or reduced the frequency of these failure modes.

  • Some Stats

    Stephen Chasey11/08/2024 at 10:29 0 comments

    I've been uploading deposit videos to YouTube since 16-OCT.  23 days running so far. I'm rarely at home and it's been unattended during that time except for a peanut top-up and providing some caps and butts on 27-OCT, and providing more caps and butts on 07-NOV.

    I'm still on Stage 4 - providing deposit material near the vending machine. Stage 5 is the goal - where a bird brings something I didn't provide.

    In the last 23 days I've had 104 deposits from birds.

    • only jackdaws making deposits so far
    • between 4-5 deposits per day
    • no jams or dispense timeouts so far
    • 4 deposits were not registered by the deposit sensor - a failure rate of about 4% which I plan to address

    To make the channel easier to deal with I think I will start concatenating deposit videos into daily videos or maybe weekly.

    The birds set a new record today, at least since 16-OCT - 11 deposits in one day: 

    Sometimes the machine has a lot of lurkers waiting for a smarter bitd to make a peanut come out. Here's a jackdaw that had a plan for that.

  • Unattended Operation and VMFB on YouTube

    Stephen Chasey10/28/2024 at 22:36 0 comments

    I left on holiday and was not at my place for 10 days. The VMFB worked fine while I was gone - no jams or technical issues. I occasionally monitored it via the motioneye web interface. Between 1 and 6 deposits daily from the local jackdaws.

    I finally added a YouTube channel and will be adding code to automatically upload videos that contain a deposit event.

    For now I'm doing it manually - only 10 videos uploaded so far starting from 16-OCT. Will add more once my upload restriction is lifted.

    https://www.youtube.com/@VendingMachineForBirds


    UPDATE - I'm now uploading videos daily-ish. 75 videos so far. Not sure if this is useful for others but it's nice to have all the deposit videos in one accessible place for me :)

  • VMFB-ESP32

    Stephen Chasey10/08/2024 at 18:12 0 comments

    I've been wanting to make use of the ESP32 in this project. Low power consumption, sleep mode, wireless comms, 2 DAC outputs, I2C, RTC, SD-card module and plenty of GPIO. Rather than have an ESP32 CAM module run the show, talking to a PIC that manages the events, I will just use a standard ESP32 dev board and allow adding a controlled camera module via I2C/S{I/UART. This will keep base costs and power consumption down, and still be suitable for those who don't want or already have a camera for this.

    So new PCB and software, optional I2C/UART/SPI-controlled camera - everything else will stay the same.

    The 2 DAC outputs will enable remote sensor adjustment - I can replace the pots with the DAC outputs.

    Solar power becomes more practical since power consumption will be lower (~150 when transmitting using wireless comms, ~80 when just listening, ~20 mA with wireless disabled, <1 mA sleeping).

    I can still enable remote monitoring and control, and make a more informative dashboard. Sending data and maybe files to a service to process/store would be even better and more power-efficient,

    Wifi and Bluetooth might also be options for camera control.

    LoRa or cellular might be worth considering since I'd like to deploy one of these in a park someday.

    Just putting this here so I don;t forget. I won't be able to start on this for a few weeks.

  • Cats and ground proximity

    Stephen Chasey09/27/2024 at 12:33 0 comments

    The Jackdaws are stil hacking away at stage 4 (deposit items left near the vending machine). Increased neighbor-cat traffic has led to fewer bird visits, but they still show up to deposit something 5-10 times a day. I don't want to keep the cats out - I like them too - but I do think I woud get more activity without them.

    One thing that has become apparent is that the further above the ground that you mount the machine, the less likely the birds are to gather things from the ground to deposit. My platform is less than a meter above the balcony floor, but on the first floor (second floor in the US). Birds will take things from around the balcony to deposit, but have not brought in any of the marked bottlecaps I left in the garden below. I think that putting it at ground level in the open would facilitate making it to stage 5, but I don't have a place to do this yet.

    If I moved to a place with a ground floor garden that would be ideal.

  • Fixed deposit sensor - ready to take a shot at Stage 5

    Stephen Chasey09/08/2024 at 20:39 0 comments

    I improved the deposit sensor placement a few days ago and so far no missed deposits. 

    The jackdaws have gottten pretty used to having to look for bottlecaps around the balcony, I took the arm off the machine and just put a few behind the machine, on the floor and in planters on the railing.

    I'll be taking a holiday soon and won't be around to provide caps and butts, so it will be a real test for them. 

  • Stage 4 Observations

    Stephen Chasey08/30/2024 at 13:39 1 comment

    Some stuff I've noticed over the last couple of weeks.

    • Most deposit activity is in the morning between 07:00 and 11:00 - average of about 15 deposits per day.
    • Using unshelled peanuts is a good way to attract corvids without attracting pigeons.
    • This will work best in an urban environment or near a public space like a park, square or stadium where cigarette butts, bottle caps and similar litter is easy to find.
    • Birds may get territorial about the vending machine. I used to get a couple magpies and the occasional crow. Now it's all jackdaws.

    Now the jackdaws are pros at depositing stuff I leave around the feeder.

    https://cdn.hackaday.io/files/1847547904515136/VMFB-MC_09-24-52.mp4

    I might try putting a few marked bottlecaps in the complex garden to see if they end up in the vending machine.

  • More Stage 4 Progress - and some adjustments to make

    Stephen Chasey08/25/2024 at 13:39 0 comments

    Today I saw a few instances on jackdaws landing with a bottlecap already in their mouth. They were Westmalle and Leffe caps, so I think they are likely mine and this one is wet and may have come from the planters on the balcony railing. The birds have occasionally taken caps from the platform and dropped them there. 

    The interesting bit is that they appear to be arriving with caps instead of landing empty-beaked and then looking for caps or butts to use.

    https://cdn.hackaday.io/files/1847547904515136/VMFB-MC_13-23-17.mp4

    I've also noticed that occasionally the deposit sensor misses a deposit. I think I need to adjust the placement a bit to make sure it sees everything that comes though. Things bounce around in the deposit tube on the way down and I think they sometimes bounce over the sensor's line of sight. I'll try to fix this in the next few days. 

    Here's a persistent jackdaw sinking 3 caps before getting a peanut. I need to fix this.

    https://cdn.hackaday.io/files/1847547904515136/VMFB-MC_11-49-08.mp4

    And another bringing two bottlecaps, maybe just in case.

    https://cdn.hackaday.io/files/1847547904515136/VMFB-MC_09-28-52.mp4

  • Stage 4 Progress

    Stephen Chasey08/20/2024 at 22:19 1 comment

    I added a conditioning stage because the gap between depositing stuff left on the platform and foraging for items seems too large without an intermediate step. Now I put a few things on the platform and the rest on the mounting stand and in a cup mounted a few centimeters from the platform. I think this will require a gradually moving them farther away from the vending machine until they will pick them up from the floor of the balcony.

    They are now pretty good at depositing caps and butts left for them to use.

    https://cdn.hackaday.io/files/1847547904515136/VMFB-MC_15-38-18.mp4

    And have started to understand that they can bring things that are not on the platform.

    Jackdaw sinking a cap taken from the cup near the platform and getting robbed by his friend.

    https://cdn.hackaday.io/files/1847547904515136/VMFB-MC_08-27-44.mp4

    Jackdaw taking a bottlecap from the stand behind the vending machine and sinking it.

    https://cdn.hackaday.io/files/1847547904515136/VMFB-MC_09-18-18.mp4

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

    https://cdn.hackaday.io/files/1847547904515136/VMFB-MC_17-03-10.mp4

    This seems like good progress for one week. As soon as they get good at it, I'll move it farther away. I can swivel the bowl arm to make the bowl about half a meter away from the platform. I also need to start lowering it closer to the ground.

View all 122 project logs

Enjoy this project?

Share

Discussions

rafununu wrote an hour ago point

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

  Are you sure? yes | no

l.ennyburkdoll wrote 05/15/2023 at 06:11 point

That project is best for birds.

https://www.pfmlogin.org/

  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