Two open-source routes to a garden bird log: a 20 RMB ESP32-CAM that wakes on a PIR, or a microphone that names 6512 species
A handful of millet on a balcony rail, gone by morning, with no indication of who took it. Commercial AI bird feeders solve that — a Bird Buddy and its equivalents run past RMB 1000, with several features behind a monthly cloud subscription.
The open-source answer costs roughly a twentieth of that and splits into two routes that fail in opposite directions. One camera can only identify birds that land in front of it. The other identifies birds you never see.
Route one: make the camera wake up
BirdWatch is the hardware route most makers start with. Physically it is a 3D-printed wooden house with a small terrace; two 5 V solar panels sit on the sloping roof, and a camera plus PIR sensor are tucked above the terrace.
The obvious objection: an ESP32-CAM streaming Wi-Fi video drains two 18650 cells in half a day. How does a palm-sized panel keep it running for months?
The answer is that it never streams. It sleeps.
The power chain, as documented in the project: two 5 V panels in parallel into a CN3065 solar charger; two protected 18650 cells with a MAX17043 fuel gauge on I2C; an MCP1700 low-dropout regulator at 3.3 V with 1.6 µA quiescent current; an ESP32-CAM with OV2640 sensor, dual-core 240 MHz, Wi-Fi, wake pin on GPIO 13.
The five-step workflow:
- Deep sleep. With no bird present, camera and Wi-Fi are off. Only the AM312 PIR is live. Standby current drops to microamps.
- The PIR wakes the board. A bird lands on the feeder, the AM312 detects a warm body moving, GPIO 13 goes high, and the ESP32-CAM comes out of sleep in milliseconds.
- Capture, and read the battery while you are awake. Two SVGA frames, plus a fuel-gauge read over I2C for cell voltage and state of charge.
- Upload, then sleep again. Two to three seconds to associate with the balcony Wi-Fi, POST the image and battery reading to a local server, disconnect, back to deep sleep.
- The backend does the thinking. A local machine filters frames with no bird in them and labels the rest, then writes them into a dashboard.
The consequence of step 5 is the design's real economy: the RMB 20 board does not run a bird classifier. It runs a wake-up-and-transmit loop. The expensive part — detection, classification, archiving — runs on an old desktop or NAS that is already powered.
The project ships a web dashboard with visit counts, a species archive, and battery/solar charge-discharge curves, and integrates with Home Assistant.
Route two: identify by ear
A camera has a structural limitation: the bird has to come to the lens. Most of what is in a hedge or a tree canopy is heard and not seen.
BirdNET, from the Cornell Lab of Ornithology and Chemnitz University of Technology, handles that by converting birdsong into spectrograms — images of frequency over time — and running a vision network over the spectrogram features. It currently covers 6512 species globally.
BirdNET-Pi packages the model as a Raspberry Pi install. A USB microphone outside the window feeds it continuously; the local web page shows live spectrograms, playback of the day's clearest recordings, generated species cards, and a 24-hour activity chart. Enable sharing and your balcony becomes a live point on the BirdWeather map.
The reported detection quality in the source material is decent for single-observation use: a Laughing Kookaburra at 0.935 confidence on the live spectrogram, an Australian King-Parrot at 0.93 and a Spotted Dove at 0.95 in a maker's backyard rig. Those are per-detection confidences on clean, close audio and clean, close imagery, not species-level accuracy over a season — treat them as evidence the pipeline works, not as a benchmark.
The aesthetic branch of this route is worth mentioning: Teddy Warner mounted a 7.3-inch seven-colour e-paper panel in a wooden frame, driven by a Pi, refreshing daily with an illustration of whichever species the microphone heard. The wall tells you who visited.
Three visual configurations, honestly compared
| Approach | Hardware and cost | Strength |
|---|---|---|
| ESP32-CAM solar house | ESP32-CAM (~RMB 20) + PIR + panels, RMB 60–90 total | Cheapest, no wiring, backend can use a Chinese multimodal model |
| Raspberry Pi AI Camera | Pi + IMX500 camera, RMB 500–700 | Compute in the lens, local real-time boxes, no second machine |
| BirdNET-Pi | Pi (or old laptop) + USB mic, no soldering, no printing | Identifies 6512 species without the bird ever facing a lens |
The Pi AI Camera option (Luke Ditria's build) trains a model on 52 local species and runs it on the IMX500's onboard NPU; the second revision went into a waterproof box with a gasket and its own panel for outdoor mounting.
The localisation problem nobody mentions
Flash the overseas repositories unmodified onto a board on a Chinese balcony and the first thing that breaks is not the hardware. It is that the bundled models were trained on European, American or Australian birds.
BirdWatch's default model is described as "common European birds". Point it at a light-vented bulbul, a Chinese blackbird or a Japanese white-eye — the standard balcony visitors in Jiangnan and northern China — and it will confidently map them onto European relatives.
The workaround is straightforward and cheap: let the ESP32-CAM only capture, and delegate identification to a Chinese multimodal vision model (Doubao Vision, Qwen-VL, Kimi). Those recognise the standard quartet — light-vented bulbul, spotted dove, tree sparrow, Chinese blackbird, plus magpie and white-eye — from a single photo, and can generate a short habit note alongside. Push the result to a family WeChat group through PushPlus and you have a daily balcony bird report.
Three practical cautions from the source: high-rise balconies attract pigeons and the frame should be sized for them; lithium cells in direct summer sun need shading; and the PIR will fire on moving foliage, so the backend's empty-frame filter is not optional.
Three ways in, by budget
- Minimal capture, RMB 30–50. ESP32-CAM plus AM312 in an old wooden box or waterproof enclosure. One maker's version, mounted by a garden fountain, caught a robin bathing and a squirrel sneaking a drink.
- Solar dashboard, RMB 60–90 plus a printer or NAS. Build BirdWatch properly: printed enclosure, panel, fuel gauge, local server, web dashboard.
- Zero-solder listening. A spare Pi or old laptop, a USB lavalier microphone at the window, BirdNET-Pi installed in an evening. This is the one to start with if there are children involved, because the feedback loop is immediate and the failure modes are non-destructive.
Whichever route, the economics are the same: the intelligence moved off the cheap device and onto hardware you already own. That is the whole trick, and it generalises well beyond birds.