Help in making a Birdvocals recognition system

YvesD

Member
Hi everyone,


I trying to make a RPi + Teensy 4.1 system to help me recognize flightcalls of birds on migration (think of BirdNET-Pi but with a smaller set of birdsongs - just a set of specific birds and they're flightcalls). I have this Teensy around for some time now and would like to use it al last for a smart project.

I was recommended to use 4x MEMS I2S microphones on a Teensy 4.1 for the audiostream to the RPi 4B 4Gb.

Is this a good idea? Is this feasable with a Teensy 4.1 + RPi 4B?

I have ordered 4x ICS-43434 Omnidirectionele microfoonmodules MEMS. (for 4 directions of incoming sounds on the migration counting post).
The primary end (sound capturing) would be the Teensy -> USB connection -> the backend (recognition) would be BirdNET-Pi on the RPi 4b 4Gb.
I would have to be a 'off-grid' system, powerd by some 20.000mAh powerbanks ('on-time' aprox. 8 to 10 hours a day).


Some insights would be welcome to help me look at caveats if there are any.

Thanks in advance,
Best wishes for the upcoming holidays
(sorry, if my English writing is not that good !)

Yves.
 
Hi Yves,
Just this morning I had the rare joy to watch a Kinglet in our garden....
Nice project!
It is not really clear to me, what for the Teensy is needed in your project? Just as a usb-sound source and i2s master?
Will the Pi be online? Otherwise you could perhaps just record sounds with the Teensy to sd card and do the analysis later.
Do you already have the Birdnet-Pi running?
I would probably start from that side and do a little experimenting with a usb sound card. I have used Sound Blaster with Raspi. Try to find the most sensitive and low noise microphone preamp. In my experience this might be the most difficult part of the project. Though I don't have experience in recording nature. A compressor might be helpful.
Just some thoughts.
Cheers Christof
 
Hi Yves,
Just this morning I had the rare joy to watch a Kinglet in our garden....
Nice project!
It is not really clear to me, what for the Teensy is needed in your project? Just as a usb-sound source and i2s master?
Will the Pi be online? Otherwise you could perhaps just record sounds with the Teensy to sd card and do the analysis later.
Do you already have the Birdnet-Pi running?
I would probably start from that side and do a little experimenting with a usb sound card. I have used Sound Blaster with Raspi. Try to find the most sensitive and low noise microphone preamp. In my experience this might be the most difficult part of the project. Though I don't have experience in recording nature. A compressor might be helpful.
Just some thoughts.
Cheers Christof
Hi cebersp !
Thx for the quick reply.

The teensy 4.1 would be the motor to use 4x mems microphones and stream them into 1 mono channel to BirdNET-Pi (i have that already running at home for while)
The RPi can be on- or offline, that does not matter for BirdNET-Pi, the LLM are stored on the Pi itself.
I also looked at the batdetector project (that's awesome too !!) but no explanation found there about the I2S use ... i think :)

I'm not new to microcontrollers, (Arduino's, ESP32's) but never worked with the Teensy 4.1 (a shame really !!)

Grtz, Yves
 
Hi @YvesD
inspired by your post I installed Birdnet-Pi and it's running now.
There are some birds, that can be heard, but I have never seen here.
I wonder, if some prefiltering HP>100Hz might be helpful to achieve maximum sensivity.
Cheers Christof
 
Hi,
I'm wondering how i should connect the 4x MEMS microphones to the Teensy 4.1?The micromudles have 6pins
Do i just have to adjust the 'L/R" pins and the "SD" pins on the Teensy?
And can i then couple together all the other pins to the Teensy pins?
Or do i need to connect 4x4 pins of the MEMS to 4x4 different pins on the Teensy?

Grtz,
Yves
 

Attachments

  • Schermafbeelding 2025-12-28 195358.png
    Schermafbeelding 2025-12-28 195358.png
    73.1 KB · Views: 27
Hi @YvesD
inspired by your post I installed Birdnet-Pi and it's running now.
There are some birds, that can be heard, but I have never seen here.
I wonder, if some prefiltering HP>100Hz might be helpful to achieve maximum sensivity.
Cheers Christof
HP should be above 100Hz, because most songbirds are even above 2Khz...
I would, for myself set it aprox 900Hz - 1KHz

Greets and enjoy the setup of BirdNET-Pi.
Yves
 
I'm wondering how i should connect the 4x MEMS microphones to the Teensy 4.1?The micromudles have 6pins
Do i just have to adjust the 'L/R" pins and the "SD" pins on the Teensy?
And can i then couple together all the other pins to the Teensy pins?
Or do i need to connect 4x4 pins of the MEMS to 4x4 different pins on the Teensy?

Before I try to answer, please understand the only if I have is the photo you shared. I can't even know which MEMS mic is actually on that circuit board. If this answer isn't enough, please try giving a link to the product or a datasheet or other specific technical info.

I2S is a stereo format. Usually I2S MEMS microphones have a way to connect 2 to the same data wire, where one transmits as the left channel and the other transmits as the right channel. Usually the mic provides a pin you wire to either GND or 3.3V to configure which way it transmits. My guess is that's the purpose of the L/R pin. (remember, most of this answer involves guesswork because you didn't give specific technical specs about those MEMS mics you are using)

So the 3 simple pins are GND, VCC (3.3V) and L/R.

I2S receive on Teensy has 4 signals: RX, LRCLK, BCLK, MCLK. You will probably use the first 3 of these and leave MCLK unconnected. Many other audio chips need MCLK, but MEMS microphones almost never use MCLK.

For each pair of mics (one with L/R wired to GND and the other with L/R wired to 3.3V), you would connect their SD pins together and wire them RX on Teensy. Likewise, wire both WS together and (probably) connect to LRCLK. Same of SCK, wire them together and connect to BCLK.

On the Teensy software side you have a few choices. The simplest in the Design Tool would be i2s_quad.

1766951234408.png


If you're not familiar with the design tool or how to use the audio library, this 31 page tutorial (or its 45 minute walk-through video) is the best plage to start.

When you click on i2s_quad, you'll see its documentation appears on the right side panel. This is where you can see which pins to use on Teensy.

1766951408117.png


So to connect these 4 mics, you would wire each pair of SD pins to each of those RX pins on Teensy (pins 8 and 6 on Teensy 4.x). Wire all 4 WS pins to LRCLK (pin 20), and all 4 SCK pins to BCLK (pin 21).
 
You haven't said how long your wires will be, or what type of wiring you intend to use, but since you're wanting to connect 4 microphones my guess is you will want them spread apart by some distance so you're not just receiving 4 virtually identical copies of the same sound.

I2S is not meant to communicate "long" distances. It's meant to be kept on 1 circuit board spanning a short distance of only inches or centimeters. Normally the signals are meant to be routed with a ground place underneath, or at the very least with a GND wire among the traces.

The farther you try to communicate and the less your wiring looks like a PCB with ground plane, the more you will run into challenging signal quality issues.

One common technique to improve the signals involves adding a 100 ohm resistor between Teensy outputs (LRCLK and BCLK) and the wire traveling to the microphones. If you use 2 wires for each signal, best to have 2 resistors connected to the Teensy pin and connect only 1 wire to each resistor. If 4 separate wires, use 4 resistors so you have 1 per wire.

Likewise, if you have long wires you might get better results if you also add a 100 ohm resistor between each SD pin and the wire it drives. Like with the pins on Teensy which transmit the 2 clocks, those pins on the mics are transmitting data into the "long" wire. Adding a resistor between the transmitting pin and the wire can really help with signal quality problems.

Even with resistors, you should understand I2S is not meant for long distances. Series resistors between each transmitting pin and the wire it drives can help, but don't expect miracles. For long distances you really want a low impedance analog signal, not I2S which is designed to be used between chips soldered to the same circuit board.
 
You haven't said how long your wires will be, or what type of wiring you intend to use, but since you're wanting to connect 4 microphones my guess is you will want them spread apart by some distance so you're not just receiving 4 virtually identical copies of the same sound.

I2S is not meant to communicate "long" distances. It's meant to be kept on 1 circuit board spanning a short distance of only inches or centimeters. Normally the signals are meant to be routed with a ground place underneath, or at the very least with a GND wire among the traces.

The farther you try to communicate and the less your wiring looks like a PCB with ground plane, the more you will run into challenging signal quality issues.

One common technique to improve the signals involves adding a 100 ohm resistor between Teensy outputs (LRCLK and BCLK) and the wire traveling to the microphones. If you use 2 wires for each signal, best to have 2 resistors connected to the Teensy pin and connect only 1 wire to each resistor. If 4 separate wires, use 4 resistors so you have 1 per wire.

Likewise, if you have long wires you might get better results if you also add a 100 ohm resistor between each SD pin and the wire it drives. Like with the pins on Teensy which transmit the 2 clocks, those pins on the mics are transmitting data into the "long" wire. Adding a resistor between the transmitting pin and the wire can really help with signal quality problems.

Even with resistors, you should understand I2S is not meant for long distances. Series resistors between each transmitting pin and the wire it drives can help, but don't expect miracles. For long distances you really want a low impedance analog signal, not I2S which is designed to be used between chips soldered to the same circuit board.
Hi Paul,
OH THANKS for clearing things out for me !!

The MEMS are type "ICS-43434" (see picture below & params)

Wire will be as short as possible !! (i hope less than 6cm long)

I intend to make a special casing on the RPi+Teensy combo with 4 directional very low dishes (just to be able to put some stockings on top to prevent rain and dust creeping into de MEMS mics.) - so those dishes are not ment to compact the signal into the MEMS, because those MEMS are not ment to be for that i think. All will be powered in the field with a 30.000mAh powerbank 5V - 4.25Amps to work for 6 to 8 hours of "bird-migration-counting" with some spare powerbanks if needed.

This year with monitored 860K+ migrating birds for example by visual recognition, we would like to get into the NocMig - "Nocturnal Migration" too with this apparatus ... I've been on Arduino and ESP some time ago, but still had the Teensy in the drawer - and would like to use it now for this project.

I hope to get those MEMS the next day and will start on breadboard prototyping first before making a proper PCB.
Then i will try to write some code (trial and error will do just fine for me :cool: )

I already had a look at that AUDIO-Tools, looks awesome, but a bit strange too for me, will have to walk through the manual then :)


Parameters MEMS ICS-43434:
Sensitivity: 26 dBFS x 1 dB
Signal-to-noise ratio in high-power mode: 65 dBA
Low-power mode SNR: 64 dBA
Current consumption in high-power mode: 490 μA
Current consumption in low-power mode: 230 μA
Microphone SPL overload point (A0P): 120 dBSPL
Sampling rate in high-power mode: 23 ~ 51.6 kHz
Sampling rate in low-power mode: 6.25 ~ 18.75 kHz

Grtz, AND many thanks for the help you provided here.
Yves
 

Attachments

  • Schermafbeelding 2025-12-28 225401.png
    Schermafbeelding 2025-12-28 225401.png
    67.1 KB · Views: 21
I am curious about the choice of the microphone and the usage: Will you implement a beamformer by delay and sum processing of the four microphones? Is size crucial in this project? Do you expect advantages compared to large microphones with inbuilt directionality?
 
I am curious about the choice of the microphone and the usage: Will you implement a beamformer by delay and sum processing of the four microphones? Is size crucial in this project? Do you expect advantages compared to large microphones with inbuilt directionality?
Hi Tom!

The idea is to direct the 4 MEMS microphone to a slightly different direction, but still in front of me.
Like in 45° left and right, one straight forward, horizontal an the last one straight forward but 75° upwards from horizontal.
I hope to manage a system that a broad recordingarea would be captured, since all cables will be of the same lenght i presume to get a clear soundclip of migrating songbirds.
I di not understand your term "Beamformer" quite well ... (I'm Dutch speaking)
Also i do not really understand what you mean with "sum processing of the four microphones"
My idea is to capture as much sound surrounding me (left/right/front/overhead) at the same time.
I expect advantages from those MEMS, because all is about weight en compacness on the migration post (we are like 30meters hight on the top of a dune, near the sea - so every piece of equipment has to be carried up to the post).

Grtz, and happy holidays to all of you and your near ones.
Yves
 
This type of microprone has omnidirectional sensitivity. Pointing it in a different direction will give little to no useful effect.
 
This type of microprone has omnidirectional sensitivity. Pointing it in a different direction will give little to no useful effect.
Good information Paul !!
Hense the small, flat dishes ... trial and error will hopefully learn me a lot of new insights ...
I'll keep you posted ASAP !!!

Grtz,

Best wishes to you and the people around you Paul.
 
This type of microprone has omnidirectional sensitivity. Pointing it in a different direction will give little to no useful effect.
I have read about that ... but omnidirectional for the MEMS is that the same as omnidirectional in a electrec microphone, since there's is just a very small hole to let the soundpressure into these mics?

Those little dishes would only be 0.5cm high and square in format, just to have they abillity to put something over it to prevent rain or dust entering those small holes in the MEMS microphones .... is this a correct assumption?

BTW the microphones arrived just this afternoon, hope to get out testing past NYD...

PS : I appreciate all your input so much, since this is to become a true citizens science project, open source, i hope all the help from everybody helps me to accomplish this bioacoustics project for bird-migration tracking.
1000x Thx !!!

The project can be followed on "https://github.com/YvedD/BirdNET-Pi-MigCount"

Grtz Yves
 
If you want to capture all migrating birds from all directions, I would suggest using one single electret mic, eg. AOM5024 or EM272.
The ICS43434 are MUCH noisier and -even more important- much more sensitive to moisture and rain. So, with the AOM5024, you will record more birds because of their lower self-noise.
I have two BirdNET-Pi continously running for more than 3 years now using AOM5024 without any rain protection, only a small foam windshield. They still work perfectly. Electrets are very robust.
Also, BirdNET processes only one audio channel, even if you record Stereo files.
BTW, omnidirectional really means "from every direction", so one omnidirectional mic will cover all migrating birds over your head.
 
Last edited:
If you want to capture all migrating birds from all directions, I would suggest using one single electret mic, eg. AOM5024 or EM272.
The ICS43434 are MUCH noisier and -even more important- much more sensitive to moisture and rain. So, with the AOM5024, you will record more birds because of their lower self-noise.
I have two BirdNET-Pi continously running for more than 3 years now using AOM5024 without any rain protection, only a small foam windshield. They still work perfectly. Electrets are very robust.
Also, BirdNET processes only one audio channel, even if you record Stereo files.
BTW, omnidirectional really means "from every direction", so one omnidirectional mic will cover all migrating birds over your head.
Hi @DD4WH ,
what's your opinion to use a High Pass filter in a microphone preamp for a USB Soundcard for Birdnet? At the moment I am pondering over something like this:
1767203301796.png

The idea is, that the High Pass shall remove a lot of traffic noise from a distant big road.
 
HP filtering is not necessary, the BirdNET-classifier takes the frequencies it needs and rejects unneeded. However, you will have False positives of eg. Great Bittern etc. caused by traffic noise an airtraffic. But you can put those bird species in the exclude list in the BirdNET-Pi. If you install a HP filter, you will lower traffic noise, but you will also exclude wanted signals.
 
Addon: the AOM5024 and EM272 have such high sensitivity, that you do not need a preamp at all. I have tested both, with and without preamp. Just connect the electret mic to your USB sound card.
 
If you want to capture all migrating birds from all directions, I would suggest using one single electret mic, eg. AOM5024 or EM272.
The ICS43434 are MUCH noisier and -even more important- much more sensitive to moisture and rain. So, with the AOM5024, you will record more birds because of their lower self-noise.
I have two BirdNET-Pi continously running for more than 3 years now using AOM5024 without any rain protection, only a small foam windshield. They still work perfectly. Electrets are very robust.
Also, BirdNET processes only one audio channel, even if you record Stereo files.
BTW, omnidirectional really means "from every direction", so one omnidirectional mic will cover all migrating birds over your head.

Following this conversation with enormous amout of interest !!

- On my project i'm aiming to use it specifically to indentify mainly songbirds, since raptors, herons and other bigger birds are less difficult to detect and indentify. So most probably i'll even work with some sort of 'shortlist' on songbirds.
But the introduction of the best possible microphone setup is still a W.I.P. right now. The first test should start within a few day's (i've found a electrec microphone in my BirdFox-Birdmic Parabolic Dish i can use atm - there is even a TRRS audiocard that came with it, so maybe with a small TRRS-2-USB adapter i can go a long way ;))

- A DIY HP-filter that can be regulated by the user came into mind also, but that's for a next stage right now.

Addon: the AOM5024 and EM272 have such high sensitivity, that you do not need a preamp at all. I have tested both, with and without preamp. Just connect the electret mic to your USB sound card.

Those are a bit harder to find here in Belgium, have been looking online, can be found outside via webshops ...
Are those still 'the best' at this moment, or is there already a new generation of electret microphones that are even better (and tested)?

Still a bit 'afraid' to start with the Teensy 4.1 to be honest, because the lack of experience with that MCU.
 
Last edited:
About the highpass filter: As long as there is no clipping at any point of the analog stage it is more useful to have a filter implented digitally in software. This way you are far more flexible to choose the exact type of filter with all its parameters.
 
Is that Teensy really necessary in the setup?
Hi Tom,
I don't have a USB-soundcard ATM, and my project is totaly aimed for off-grid use on a migration observatory station.

Just finished tweaking my own BirdNET-PI-MigCount fork, added a vertical scrolling spectrogram with species detections + confindence scores scrolling up (think of a sort of Cornell Bird ID).

Now i'm up to the hardware, i received a message from someone on this board about a replacement for the AOM5024,
(PUI-Audio - AOM-5024L-HD-R) - don't even know if this is really good stuff to work with, the specs look alright anyway.

I have a directional "Comica VM-10 Pro" microphone (analog + digital output) at home, but that's a directional, not a omni-directional.

I like your remarks on the HP-filter, and that's where a Teensy 4.1 may come in handy, i looked in the Audio library manual, there are a lot of things that could be done there, before the signal is transfered to the Raspberry Pi 4B i think.

And still i'm thinking about those MEMS also,
I'm just very much out of my comfort zone at this moment :)

They aim is to make a "as cheap as possible, as mobile as possible, as robust as possible" open-source system for anyone to use on their migration stations. Target price for DIY <200€.

Just put the installation up, power on, read the detections directly from a smartphone or tablet, at home send the detections to eBird or Xento-Canto, charge up, and go for another day of migration counting....
Everything should have to fit into a 15cm x15cm x 7cm 3D printed box (including the 22,5watt powerbank)

Grtz,
Yves
 
EVERY single BirdNET detection has to be carefully checked manually by visual inspection of the spectrogram and listening BEFORE submitting to xenocanto or ebird.
Please do not implement any "automatic" batch upload possibility of unchecked recordings !
 
Back
Top