The Bitcoin Ranch
Projects and such + bitcoin
  • 2025-2026 Portland Trailblazer Tickets
  • 2025-2026 Portland Trailblazer Tickets
  • Home
  • /
  • Hummingbird sensor

Processing Sound of Hummingbirds

I have a fun little project that records hummingbird visits to my feeders. Each time a bird visits, I record temperature, barometric pressure, humidity, and the weight of the nectar left in the feeder. I even try to weigh the bird if they sit down. Then I log that data into my website database: Project Database. I am working to get nice looking graphs of this data to visualize things better.

Hummingbird detector
Hummingbird detector

I need to add a 2nd method of detecting hummingbird visits to my feeders. Currently I use a PIR (Passive InfraRed) sensor, that is used in most motion detectors.

Here is one configuration with the PIR looking down to the feeder:

IMG_20200424_091700~2

The problem with this configuration is that it will detect many false positives, like the feeder swinging in the breeze, or a cat walking by on the ground, or me cooking burgers on the deck.

Here is another configuration I have tried:

IMG_20200606_194407~2

Here the PIR faces up. To eliminate the feeder and breeze issue the feeder is attached to the bracket. The problem here is that the bracket hangs down too far and interferes with my deck access. In addition, when placed in another location, the swaying trees above constantly set it off.

So it is clear that I need a secondary detection method. The unit can sleep until the PIR is activated by motion, and then my detector will listen to the ambient sound. Hummingbirds have a very distinctive sound. Their wings flap right around 100Hz. I would like to program my micro-controller to process the sound from the microphone, and if it detects the dominant frequency to be between 50Hz and 200Hz then it will record a bird visit, if not it will go back to sleep.

I have stripped the sound out of this YouTube video:https://youtu.be/0vgRYTPV9qU as an mp3 file.

Here is the file:

http://bitcoinrancher.com/wp-content/uploads/2020/06/Hummingbird_Wing_Sounds.mp3

Then I imported the file into Audacity. I highlighted the areas where the birds were buzzing:

Hummingbird sound selection in Audacity
Hummingbird sound selection in Audacity

Then I choose Analyze Spectrum from the Analyze menu. The plot looks pretty good, with the largest peak at 96Hz.

Hummingbird sound spectrum
Hummingbird sound spectrum

I am having a challenge getting my ESP32 processor to recognize the peak frequency. I have tried playing the sound and placing the sound detector close to my speaker. I have tried a frequency generator to play a single frequency (440Hz, for example). It doesn’t identify the sound reliably. I am using this simple microphone:

Sound Detector
Sound Detector

I have read lots of stuff, and the example project I am trying is outlined here:

Frequency Detector with FFT

I didn’t get good results with it. So I may try this library:

Frequency Analysis with FHT

Posted on June 17, 2020 by Bitcoin Ranch Foreman. This entry was posted in Hummingbird sensor. Bookmark the permalink.
Modernizing Raspberry Pints
Creality Ender5 “device not accepting address XX, error -32”

Leave a Reply

Your email address will not be published. Required fields are marked *

    Recent Posts

    • 2021 C8 Corvette Order
    • Creality Ender5 “device not accepting address XX, error -32”
    • Processing Sound of Hummingbirds
    • Modernizing Raspberry Pints
    • Bitcoin Mining Farm outline

    Categories

    • Bitcoin
    • Hummingbird sensor
    • Projects
    • Uncategorized

    Recent Comments

    CATEGORIES

    • Bitcoin
    • Hummingbird sensor
    • Projects
    • Uncategorized

    RECENT COMMENTS

      ARCHIVES

      • February 2021
      • October 2020
      • June 2020
      • May 2020
      • July 2015
      • April 2015
      • March 2015
      PHP Code Snippets Powered By : XYZScripts.com
      Powered by