Skip to content

Bird Feeder Camera

A cedar feeder whose camera tells you which birds came to visit.

Try it

Simulated time

Behavior simulation: shows what it should do. It does not run the code.

Try this: Move the bird slider to 0 and back to a species to log a visit, then turn the daylight down and watch the camera become unsure.

Controls

  • Bird on the perch (0 = none)1
  • Daylight80 %
  • Clear today's visits

What it does

What the camera says
Confidence
Bird seen light
Visits today
Photo saved

What it does

A cedar bird feeder with a clear seed hopper, a perch and a small weatherproof camera box under the roof. The camera board inside looks at the perch every second and a bird model running on the board itself recognises robins, blue tits, house sparrows and cardinals, with no internet needed. When it is sure, a green light comes on and it saves the photo and the visit to a memory card, so you can see who came and when.

Try it above: Move the bird slider to 0 and back to a species to log a visit, then turn the daylight down and watch the camera become unsure.

Safety

  • Keep the power adapter indoors or in a covered outdoor socket box; only the 5 V cable goes outside.
  • Hang it out of reach of cats, and clean the tray every week so the seed doesn't go mouldy.

What’s inside

12 parts. We buy, make and put these together for you.

Brain

Runs the program and makes the decisions.

$13.99
  • Seeed XIAO ESP32S3 Sense (camera + mic)1×

    $13.99

    Takes the pictures and runs the bird model that tells the species apart.

    • 21 × 18 × 15 mm
    • Runs on: 4.75 to 5.25 V
    • Draws: about 120 mA
    list price, checked Oct 5, 2026 at SeeedView

Lights, sound and screen

How it tells you what it is doing.

$0.50
  • 5 mm LED, diffused red1×

    $0.50

    Lights up when the camera is sure which bird it sees.

    • 6 × 6 × 9 mm
    • Runs on: 1.85 to 2.5 V
    • Draws: about 15 mA
    list price, checked Oct 5, 2026 at SparkFunView

Motion

Everything that moves.

$1.00
  • Hardwood perch dowel, 10 mm1×

    $1.00

    Where birds land, right in front of the camera.

    • 24 × 1 × 1 cm
    estimate

Power

Where its energy comes from.

$16.00
  • 5 V USB power adapter with 5 m outdoor cable1×

    $16.00

    Runs the camera board from an indoor power outlet through a long weatherproof cable.

    • Cable: UV-resistant, 5 m
    • Output: 5 V DC, 2 A
    estimate

Small electronics and wiring

Resistors, connectors and cables that join it all up.

$0.75
  • Resistor 220 Ω, 1/4 W, 5 %1×

    $0.75

    Protects the light from too much current.

    • 6 × 3 × 3 mm
    • Value: 220Ω
    • Runs on: 0 to 300 V

    Pack of 25, you use 1, the 24 spares are yours.

    list price, checked Oct 5, 2026 at AdafruitView

Body and structure

The case, frame and panels.

$52.00
  • Cedar seed tray with drainage holes, 260 x 190 mm1×

    $12.00

    The base of the feeder: holds the seed and everything else is fixed to it.

    • 26 × 19 × 3 cm
    • Material: western red cedar, 12 mm
    Made by usestimate
  • Cedar corner posts, 20 x 20 x 220 mm2×

    $6.00

    Hold the roof up above the tray.

    • 25 × 2 × 22 cm
    Made by usestimate
  • Cedar roof, two panels1×

    $14.00

    Keeps rain off the seed and the camera.

    • 30 × 24 × 7.9 cm
    • Material: western red cedar, 10 mm
    Made by usestimate
  • Clear acrylic seed hopper, 1 litre1×

    $9.00

    Holds a day or two of seed and lets it trickle into the tray.

    • 9 × 7 × 14 cm
    Made by usestimate
  • Weatherproof camera housing with clear window (IP65)1×

    $11.00

    Keeps the camera board dry while it looks at the perch.

    • 54 × 45 × 44 mm
    Made by usestimate

Fixings

Screws, bolts and ties that hold it together.

$10.95
  • Stainless wood screws, 4 x 30 mm12×

    $0.96

    Hold the posts, roof and camera box together.

    estimate
  • M3 socket head screw (6-30 mm)2×

    $9.99

    Fix the camera board inside its housing.

    • 6 × 6 × 13 mm

    Pack of 1120, you use 2, the 1118 spares are yours.

    list price, checked Oct 5, 2026 at AmazonView

Parts total (12 lines)

$95.19

$25.23 from supplier list prices, $69.96 estimated. Preparation and shipping are added when you order.

How it goes together

The step-by-step instructions that come with your order, 1 step. Try them here first.

Before you start

Bird Feeder Camera goes together in 1 step, about 10 min in all. No soldering and no coding.

Already done in our workshop

  • Cut and finish the cedar
  • Build the feeder
  • Make the camera box
  • Fix the camera under the roof

1 step

Code

The code it runs1 file, 109 lines. We load it onto the board for you.

Uses: esp32-camera, bird_feeder_species_inferencing

bird_feeder_camera/bird_feeder_camera.ino
// Bird Feeder Camera// ------------------// Watches the perch with the camera on the XIAO ESP32S3 Sense. Every second it// takes a small picture and asks the bird model (which runs on the board// itself, no internet needed) which bird it sees. When it is at least 60 %// sure, it lights the green "bird seen" light, saves the photo to the memory// card and adds a line to visits.csv. Our workshop trains the model on these// four species and installs it as the "bird_feeder_species_inferencing"// library before shipping. #include <Arduino.h>#include "esp_camera.h"#include "FS.h"#include "SD.h"#include <bird_feeder_species_inferencing.h>  // the on-device bird model#include "edge-impulse-sdk/dsp/image/image.hpp" // ---- Wiring (matches the project's wiring view) ----const int SEEN_LED = D0;   // green light, through a 220 ohm resistorconst int SD_CS = 21;      // the Sense board's built-in memory card slot // Camera pins of the XIAO ESP32S3 Sense camera board.camera_config_t cameraConfig() {  camera_config_t c = {};  c.pin_pwdn = -1; c.pin_reset = -1; c.pin_xclk = 10; c.pin_sccb_sda = 40; c.pin_sccb_scl = 39;  c.pin_d7 = 48; c.pin_d6 = 11; c.pin_d5 = 12; c.pin_d4 = 14; c.pin_d3 = 16; c.pin_d2 = 18; c.pin_d1 = 17; c.pin_d0 = 15;  c.pin_vsync = 38; c.pin_href = 47; c.pin_pclk = 13;  c.xclk_freq_hz = 20000000;  c.pixel_format = PIXFORMAT_JPEG;  c.frame_size = FRAMESIZE_QVGA;  // 320 x 240 is plenty for the model  c.jpeg_quality = 12;  c.fb_count = 2;  c.fb_location = CAMERA_FB_IN_PSRAM;  c.grab_mode = CAMERA_GRAB_LATEST;  return c;} const float SURE_ENOUGH = 0.60;          // only log birds we are 60 % sure ofconst unsigned long LOOK_EVERY_MS = 1000;const unsigned long SAME_BIRD_MS = 30000; // one visit = same species within 30 s static uint8_t rgb[EI_CLASSIFIER_INPUT_WIDTH * EI_CLASSIFIER_INPUT_HEIGHT * 3];String lastSpecies = "";unsigned long lastSeenAt = 0, lastLookAt = 0;int visitsToday = 0; // Hands the model its pixels, three bytes per pixel packed into one float.int getPixels(size_t offset, size_t length, float* out) {  for (size_t i = 0; i < length; i++) {    size_t p = (offset + i) * 3;    out[i] = (rgb[p] << 16) | (rgb[p + 1] << 8) | rgb[p + 2];  }  return 0;} void savePhoto(camera_fb_t* fb, const String& species, float confidence) {  String path = "/photos/" + String(millis()) + "-" + species + ".jpg";  File photo = SD.open(path, FILE_WRITE);  if (photo) { photo.write(fb->buf, fb->len); photo.close(); }  File log = SD.open("/visits.csv", FILE_APPEND);  if (log) { log.printf("%lu,%s,%d,%s\n", millis() / 1000, species.c_str(), (int)(confidence * 100), path.c_str()); log.close(); }} void setup() {  Serial.begin(115200);  pinMode(SEEN_LED, OUTPUT);  digitalWrite(SEEN_LED, LOW);  camera_config_t config = cameraConfig();  if (esp_camera_init(&config) != ESP_OK) Serial.println("Camera did not start");  if (!SD.begin(SD_CS)) Serial.println("No memory card: photos won't be saved");  SD.mkdir("/photos");} void loop() {  if (millis() - lastLookAt < LOOK_EVERY_MS) return;  lastLookAt = millis();   camera_fb_t* fb = esp_camera_fb_get();  if (!fb) return;  // Shrink the photo to the model's input size and turn it into RGB.  uint8_t* full = (uint8_t*)ps_malloc(fb->width * fb->height * 3);  fmt2rgb888(fb->buf, fb->len, PIXFORMAT_JPEG, full);  ei::image::processing::crop_and_interpolate_rgb888(full, fb->width, fb->height, rgb, EI_CLASSIFIER_INPUT_WIDTH, EI_CLASSIFIER_INPUT_HEIGHT);  free(full);   ei::signal_t signal;  signal.total_length = EI_CLASSIFIER_INPUT_WIDTH * EI_CLASSIFIER_INPUT_HEIGHT;  signal.get_data = &getPixels;  ei_impulse_result_t result = {};  if (run_classifier(&signal, &result, false) == EI_IMPULSE_OK) {    // Find the most likely label ("empty" means no bird on the perch).    int best = 0;    for (int i = 1; i < EI_CLASSIFIER_LABEL_COUNT; i++) {      if (result.classification[i].value > result.classification[best].value) best = i;    }    String species = result.classification[best].label;    float confidence = result.classification[best].value;    bool bird = species != "empty" && confidence >= SURE_ENOUGH;    digitalWrite(SEEN_LED, bird ? HIGH : LOW);    if (bird && (species != lastSpecies || millis() - lastSeenAt > SAME_BIRD_MS)) {      visitsToday++;      savePhoto(fb, species, confidence);      Serial.printf("%s (%d%%), visit %d\n", species.c_str(), (int)(confidence * 100), visitsToday);    }    if (bird) { lastSpecies = species; lastSeenAt = millis(); }  }  esp_camera_fb_return(fb);} 

Comments

No comments yet

Ask the maker a question, or say what you would change. Comments are public.

Sign in to comment. It is free.

More in outdoors & water

See all in Outdoors & water