• PVC Enclosure BOM (for version 3.2)

    11/26/2025 at 21:44 0 comments

    Tools you will need

    • hacksaw
    • electric drill
    • 3.5, 5, 7, 11, 13, 15mm bits (for 15mm I used a step drill bit)
    • 50mm hole saw
    • coping saw or small hacksaw
    • hammer
    • sandpaper
    • pen knife
    ItemQuantityImage
    110mm PVC pipe1 meter
    50mm PVC pipe1 meter
    (only need ~20cm)
    110mm T-joint 45° 3x glue joint1
    110mm T-joint 90° 3x glue joint

    1
    110x50mm eccentric adapter1
    110x50x50mm eccentric adapter1
    110mm straight joint1
    110mm screw-on end cap2
    50mm elbow joint 90° (male-female)2
    50mm elbow joint 45° (male-female)1
    50mm end cap2
    3mm PVC sheet500x500mm 
    Ø~32cm plastic plant pot saucer1
    transparency film (for printing - a section of PET from a plastic bottle would also work)3x3cm
    Mast mount to fit 110mm PVC pipe1
    Hose clamp to fit 110mm PVC pipe1
    Hose clamp to fit 50mm PVC pipe1
    Adjustable foot - 6-8cm3
    Hanging plate1
    20cm L brace
    15cm L brace
    10cm L brace
    M3 2cm bolts, washers and nuts
    M4 2cm bolts and nuts
    1
    1
    1
    2
    6
    M6 2.5cm bolts, washers and nuts4for the pole mount
    2cm wood screws with countersink head
    Velcro tape~15cm
    Carpet tape~20cm
    Duct tape~20cm
    Matte black sparay paint1 can
    Black shrink tubing - 3+cm diameter30cm

  • Vending Machine For Birds - Digital Version

    05/29/2024 at 21:05 0 comments

    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. 

    This project is a continuation of the analog Vending Machine For Birds. I wanted to make a device that could be more useful to researchers, which meant monitoring, logging and control. For this version I also adjusted the dispenser design to dispense unshelled peanuts to avoid feeding pigeons while still attracting corvids.

    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
    • 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
    • remote monitoring, logging and control
    • cheap to build
    • customizable

    HOW IT WORKS

    States

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

    Modes

    • Normal - Dispenses on deposit
    • Timer - Dispenses every x minutes AND dispenses on deposit
    • Calibration - Disables dispenser so you can adjust the sensitivity of the deposit and dispenser sensors

    Other Features

    • Manual Dispense - you can manually trigger dispensing a peanut  
    • Powerbank Keep-Alive - When using a USB powerbank, in case your microcontroller ot SBC does not draw enough power to keep the powerbank on you can use this mode to sink ~200mA for x sesconds every y seconds.

    Event Sequence

    1. PIR sensor sees a warm body move
    2. PIR triggers input on SBC or microcontroller
    3. SBC/MC turns on sensor IR LEDs for 30 secs after last PIR trigger
    4. When something is dropped in the deposit hole, the deposit sensor sees it
    5. The deposit side output of the dual op amp goes high and triggers input on SBC/MC
    6. SBC/MC turns on the vibration dispenser motor - it times out after 10 secs
    7. When something is dispensed, the dispense sensor sees it 
    8. The dispense side of the dual op amp goes high and triggers input on SBC/MC
    9. SBC/MC stops the dispenser motor

    When timed dispense is triggered or manual dispense is used, 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. 
    • 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.

    ELECTRONICS, SENSORS, AND POWER

    The main board and sensors are analog, using a couple transistors, a diode, a couple pots and an 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 5VDC, consuming up to 800mA when sensors are on and the dispenser is running.  

    You can use pretty much any microcontroller or SBC. Preferably one that can use a camera module. I prototyped this on a RaspberryPi Zero W V1.1 with a 160-degree wide-angle camera. Together this consumes about 180mA. The main board and sensors use <5mA when idle, ~210mA when the sensors are on, and ~500 when the dispenser is running (this will depend on the motor you use)

    PCB, BOM AND GERBERS

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

    Read more »

  • Vending Machine For Birds - Analog Version

    05/27/2024 at 21:57 0 comments

    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
    • 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 BOM...

    Read more »