Birdbox
Overview
Birdbox is a solar powered smart birdfeeder developed by me and two classmates for our Embedded Systems Capstone. Birdbox takes video of birds while they are feeeding and allows it to be viewed from a website. Birdbox is standalone but can be controlled as well through a desktop browser application powered by an Atmega328p microcontroller and ESP32 Cam Wifi Board
Components and Block Diagram
The birdbox is completely powered by a photovoltaic cell in lue with a solar power manager and 2500mA hours. It uses a servo motor to open and close the door, a ultrasonic sensor to detect a bird/object, a phototransistor to detect whether it is night time or day time, a toggle switch to turn the machine on or off, two pressure weight sensors to detect squirrels and food status. The ESP32 Wifi board has a camera that will record the birds. Since we utilized the one Atmega serial port for debugging, the Atmega328p and wifi board are interconnected through a series of GPIO pins.Below you will find all the pinnouts for theAtmega328p.
The ESP32 wifi board hosts a webserver that the user can connect to. From there the user can watch live bird feedings, observe if the feed status needs refilling, as well as manually open and close the door, turn on the camera and flash.
State Machine
The birdbox operated in a 10ms loop. This slow cycle was used to reduce power consumption so it can soley be powered by a solar panel. At the start of every cycle, it reads the ADC value of the photovoltaic cell to determine if its night or day time. If its night time, it ensures the door is closed and goes to sleep. If its daytime, it will open the door unless manually closed by the user from the webserver. Then it will check if the Ultrasonic Sensor has a bird within Range. If so it will turn on the camera and stream to the webserver. It will then check and update the Food status from an ADC as well as determine if the flashlight needs to turn on if the squirrel weight sensor is tripped. A diagram of this is shown below.
Demo Video
A demo vidoe showing the basic functionale of our birdbox prototype is shown below. I hope to someday improve upon this design and create my own fully functional personal birdfeeder!
Link to code
Here is the github link to my project and report. Feel free to take a look!