Skip to the content
PCBKitNew board
2 layers150.4 × 114 mmVMFB, the printed circuit board in 3D

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

Size
150.4 × 114 mm
Copper layers
2
Thickness
1.6 mm
Parts
138
Nets
93
Pads
350
Tracks, vias
805, 2
Routed
Yes
KiCad
KiCad 7 (file 20221018)
Created
9 May 2023
Updated
6 Jan 2024

Overview

VMFB is an open-source printed circuit board by src1138, from the src1138/VMFB repository on GitHub. It is a 2-layer board of 150.4 × 114 mm with 138 parts on 93 nets, routed with 805 tracks and 2 vias.

It is built around the LM358, NE555P and SFH 313 FA-2/3, with the BC547B, TIP120 and BC337 among its other parts. Its parts include 48 resistors, 20 diodes, 19 connectors, 14 capacitors and 8 transistors.

Main components

6

README

README.md

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 ouot 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

MAIN FEATURES

  • portable
  • 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 and uses ~10mA in standby (~20mA if timer and powerbank keep-alive are enabled), ~250mA when IR LEDs are on and ~400mA when the dispenser motor is running. A 10,000 mAh USB powerbank should last about a week.

  • 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 and PCB (PCBWay): https://www.pcbway.com/project/shareproject/Vending_Machine_for_Birds_eda585b3.html

Front image

Back image

The PCB has footprints for USB type A, USB type B, barrel jack and screw terminal power input. You only need to populate the ones you will use.

In Rev.B Ver.1.0 you need to add a 10K resistor on the EMPTY sensor from the SIGNAL header pin to ground.

The Timer and Powerbank Keep-Alive are not essential and you don't have to populate the parts for them if you don't need/want to use them.

CRITICAL COMPONENTS

This project uses commodity components, and you can confidently use alternatives with similar specs. There are a few points to keep in mind.

  • For the phototransistors, they should have a photocurrent of around 10mA. If they have a lower photocurrent, you should replace the 10K resistors on the non-invertine op amp imputs with a higher value. For instance, if your phototransistors have a photocurrent of ~1mA, use a 100K resistor intead.
  • I use NE555Ps here - you could use other models, but keep in mind that the transistors controlling the IR LEDs (BD139) and motor (TIP41C) need a bit of current to their base. If for instance you use the CMOS 555 that can only source about 10mA, you may need to replace these transistors with ones that have more gain.

HOW IT WORKS

States

  • Standby - No PIR trigger in the last 22 secs (IR LEDs are off)
  • Sensors On - PIR was triggered in the last 22 secs (IR LEDs are on)
  • Dispensing - Dispenser motor is on

Modes

  • Normal (dispenses on deposit)
  • Timer (dispenses every x minutes AND dispenses on deposit)

Event Sequence

  1. PIR sensor sees a warm body
  2. PIR triggers IR LED 555
  3. IR LED 555 turn on sensor IR LEDs for 22 secs after last PIR trigger
  4. When something is dropped in the deposit hole, the deposit sensor sees it
  5. The deposit side of the dual op amp sends a pulse to trigger the motor 555
  6. The motor 555 turns on the vibration dispenser motor - it times out after 11 secs
  7. When something is dispensed, the dispense sensor sees it
  8. The dispense side of the dual op amp sends a pulse to reset the motor 555
  9. The dispenser motor is stopped

When timed dispense is triggered, it sends a signal to turn on the sensor IR LEDs and triggers the motor controller to start the vibration dispenser. When something is dispensed, the motor stops.

FAILURE MODES

  • Deposit sensor jammed: Sensor will not trigger a dispense event until it is unjammed. The sensor uses an inline capacitor to limit the signal to a pulse each time it is triggered.
  • Dispense sensor jammed: Vending machine will not dispense until the sensor is unjammed.
  • Peanut hopper jammed or empty: Dispense motor will stop after ~10 seconds.

MONITORING

I was using a Rasperry Pi Zero W with a wide-angle camera module with my vending machine, but I wanted something that drew less power (and was cheaper and more available). I found that the ESP32-CAM module consumes about 135 MA when streaming video, can be put to sleep (consuming just a few mA) and has 4 GPIO pins available when using the SD-card slot - it can stream/record video and log events from the vending machine, making it all available over wifi or bluetooth.

I'm still in the process of modifying the ESP32-CAM example program to monitor/log events and stream video, record video files to SD, and sleep until the PIR is triggered. I will put this code on Github when it's ready.

DISPENSER, ENCLOSURE, AND MOUNTING

Dispenser: two-layer vibration platform with offset holes made from 3mm PVC sheet and 15mm M3 brass standoffs. I used a small 24x12mm 2VDC motor attached to the dispenser with brass standoffs and 3mm PVC sheet. image

Enclosure: made from 110mm and 50mm PVC pipe and joints, 32mm PVC joints, a 35mm plastic tray and a 1.5l PET bottle. image

Mounting: can be mounted on the ground, horizontal or vertical railing, wooden fence, wall, pole The dispenser typically dispenses a peanut or two within 3 seconds. Since it is a vibration dispenser, the enclosure should be level and mounted securely to insure relaible dispensing.

The dispenser drops peanuts into a funnel made from the top of the PET bottle. There is about 12cm between the two, making it difficult for rodents small enough to get into the machine to get to the food. PVC is tough enough to keep larger rodents from gnawing or breaking thier way in.

FEED

I used peanuts in the shell to attract birds to the area and shelled peanuts in the vending machine. If you live in an area with lots of pigeons, using peanuts in the shell will not attract them as much since they can't eat them (can't get he shell off) and you have a better chance of attracting corvids. Shelled peanuts are easier to dispense reliably - peanuts in the shell are less dense, more irregular in shape, and jam easily. Dry cat and dog food also works.

BIRD CONDITIONING

Along with learning and having some fun, the goal is to get a birds to bring something, drop it in a hole, and get a reward. Birds need some conditioning for this, so there are a few phases to progress though to help them figure this out.

Conditioning Stages

0 - Put food in the area you plan to mount the vending machine to start attracting birds (1-2 weeks) 1 - Food Provided, Timed Dispense, Deposit Provided (2-3 weeks) 2 - No Food Provided, Timed Dispense, Deposit Provided (3-4 months) 3 - No Food Provided, No Timed Dispense, Deposit Provided (6-8 months) 4 - No Food Provided, No Timed Dispense, No Deposit Provided

Time estimates are based on my own experience over the past year or so, but Phase 3 duration is a guess. As of July 2023 I have not yet seen a bird deposit an item I didn't provide. Unfortunately I had to take my machine down in May due to some new HOA regulations prohibiting feeding the birds in my neighborhood. I plan to redeploy it when I find another suitable location.

PVC ENCLOSURE

The PVC enclosure contains the battery, electronics and sensors, dispenser, peanuts, and deposited items. The platform is a 35cm plastic tray for a plant pot, attached to the deposit chute with 4 90-degree brackets, four M4 bolts and two hose clamps.

I used bits of electrical or duct tape to make the PVC pipes and joints fit securely tight. This way it is easy to disassemble/modify/repair. It's a good idea to wrap upward-facing joints to prevent water ingress during heavy rains.

You can load peanuts (or whatever) by unscrewing the top cap and pouring them in. I made two baffles from 3mm PVC sheet to reduce the pressure on the vibration dispenser.

You can unload the deposited items by unscrewing one of the caps on the lower half of the vending machine.

Parts

138
QtyValueFootprintReferences
2910KResistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P2.54mm_VerticalR3, R11, R13, R14, R17, R18, R20, R21, R23, R25, R26, R27, R30, R31, R33, R35 +13
12Signal LEDLED_THT:LED_D5.0mmLED1, LED2, LED3, LED4, LED5, LED6, LED7, LED8, LED9, LED10, LED11, LED12
11Conn_01x03_PinConnector_PinHeader_2.54mm:PinHeader_1x03_P2.54mm_VerticalJ7, J8, J9, J10, J13, J14, J15, J16, J17, J18, J20
8SFH313FA-2/3LED_THT:LED_D5.0mmQP1, QP2, QP3, QP4, QP5, QP6, QP7, QP8
7100RResistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P2.54mm_VerticalR1, R2, R12, R16, R19, R22, R47
71N4007Diode_THT:D_DO-41_SOD81_P2.54mm_Vertical_KathodeUpD1, D2, D3, D4, D5, D6, D7
7IR LEDLED_THT:LED_D5.0mmIR1, IR2, IR3, IR4, IR5, IR6, IR7
510nFCapacitor_THT:C_Disc_D5.0mm_W2.5mm_P5.00mmC1, C5, C6, C12, C13
5BC547BPackage_TO_SOT_THT:TO-92_Inline_WideQ3, Q4, Q6, Q7, Q8
4100KPotentiometer_THT:Potentiometer_Piher_PT-10-V10_VerticalRV1, RV3, RV4, RV6
4NE555PPackage_DIP:DIP-8_W7.62mmU1, U2, U4, U5
3100uFCapacitor_THT:CP_Radial_D6.3mm_P2.50mmC4, C10, C14
2100KResistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P2.54mm_VerticalR8, R15
210uFCapacitor_THT:CP_Radial_D5.0mm_P2.00mmC2, C7
21uFCapacitor_THT:CP_Radial_D5.0mm_P2.00mmC8, C9
2220KResistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P2.54mm_VerticalR28, R29
2470RResistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P2.54mm_VerticalR24, R34
2Conn_01x02_PinConnector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_VerticalJ5, J6
2LOGOLOGODIRTY BIRD, Small Dirty Bird
2TIP120Package_TO_SOT_THT:TO-220-3_VerticalQ1, Q5
110KPotentiometer_THT:Potentiometer_Piher_PT-10-V10_VerticalRV2
110RResistor_THT:R_Axial_DIN0414_L11.9mm_D4.5mm_P5.08mm_VerticalR48
11KResistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P2.54mm_VerticalR32
12.2KResistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P2.54mm_VerticalR4
1220uFCapacitor_THT:CP_Radial_D8.0mm_P3.50mmC3
12MPotentiometer_THT:Potentiometer_Piher_PT-10-V10_VerticalRV5
14.7KResistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P2.54mm_VerticalR10
14700uFCapacitor_THT:CP_Radial_D16.0mm_P7.50mmC11
147KResistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P2.54mm_VerticalR6
147RResistor_THT:R_Axial_DIN0309_L9.0mm_D3.2mm_P2.54mm_VerticalR9
15.1VDiode_THT:D_DO-41_SOD81_P2.54mm_Vertical_KathodeUpD8
1BC337Package_TO_SOT_THT:TO-92_Inline_WideQ2
1Barrel_Jack_SwitchConnector_BarrelJack:BarrelJack_HorizontalJ4
1Center PosLOGOPolarity
1Conn_01x06_PinConnector_PinHeader_2.54mm:PinHeader_1x06_P2.54mm_VerticalJ12
1Conn_01x08_PinConnector_PinHeader_2.54mm:PinHeader_1x08_P2.54mm_VerticalJ11
1LM358Package_DIP:DIP-8_W7.62mmU3
1Screw_Terminal_01x02TerminalBlock:TerminalBlock_Altech_AK300-2_P5.00mmJ1
1USB_A_StackedConnector_USB:USB_A_Wuerth_61400826021_Horizontal_StackedJ2
1USB_BConnector_USB:USB_B_Lumberg_2411_02_HorizontalJ3

Questions

How big is the VMFB PCB?

It measures 150.4 × 114 mm and has 2 copper layers, 1.6 mm thick.

What parts does the VMFB use?

138 parts, built around the LM358, NE555P, SFH 313 FA-2/3 and BC547B. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the VMFB KiCad files?

From the src1138/VMFB repository on GitHub, at the commit this page was made from: the board is VMFB.kicad_pcb and its schematic VMFB.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the VMFB design in my own project?

Its repository states no licence, so its author keeps all rights: ask src1138 before reusing the design.

Similar boards

  • 2 layers64.6 × 67.3 mmVMFB MC, the printed circuit board in 3D

    VMFB MC

    src1138/VMFB-MC

    Simplified version of the VMFB PCB designed to rely on a microcontroller

    47 parts1GPL-3.0
  • 2 layers152.5 × 82 mmEdu board, the printed circuit board in 3D

    Edu board

    polish-space-agency/key-to-space

    PL: Cała zawartość tego repozytorium, w tym pliki projektowe programu KiCad (schematy i projekty płytek PCB) oraz dokumentacja techniczna, udostępniana jest na licencji: Creative Commons Uznanie autorstwa - Użycie…

    32 parts
  • 2 layers102.9 × 116.7 mmPocketBeagleCommandStation, the printed circuit board in 3D

    PocketBeagleCommandStation

    RobertPHeller/CommandStationsAndBoosters

    Command Stations and Boosters

    133 parts
  • 2 layers39.5 × 49 mmFlasor, the printed circuit board in 3D

    Flasor

    KapHeir/ne555-led-flasher

    A NE555 based LED flasher PCB designed in KiCad

    19 parts1
  • 2 layers153.5 × 53 mmIR Remote, the printed circuit board in 3D

    IR Remote

    bismarx-v1/SchoolStuff

    helo

    51 parts1
  • 2 layers153.5 × 125.2 mmPlaca Chute, the printed circuit board in 3D

    Placa Chute

    LuizAmaral19/PCBs_SSL-EL_2026

    34 parts
  • 2 layers118 × 103.5 mmEV Charger2, the printed circuit board in 3D

    EV Charger2

    fotherja/EV_Charger

    Arduino Uno Code for EV Charger

    62 parts167MIT