I've bought a couple more modules
so thought I'd do some tests to compare performance.
This post concerns the use of USB audio modules in connection with miniature electret microphone capsules.
a PiHut audio USB module ...minus case |
I wanted to revisit my earlier audio testing, but concentrate on the USB audio modules.
Some people on-line seem to 'rave' about uGreen modules, so I've purchased 2 different versions and decided to compare them with the 2 existing module types that I've used up til now.
Most of these low cost units seem to come from China, and even my uGreen samples emanate from Shenzhen.
I think its fair to say that low cost USB audio modules like these are generally designed to provide reasonable performance for headsets, typically gaming headsets. So while the audio output channels need to provide reasonably good sound quality, the microphone input is typically mono and just used for [close-talking] voice.
For BirdNet applications, hi-fi quality is probably not necessary, just as long as there is no apparent distortion, with a frequency response up to around (say) 12kHz, and fairly high sensitivity. In fact sensitivity is probably one of the prime requirements for BirdNet-Pi.
My test setup:-
signal generator >>> attenuator >>> USB module under test >>> laptop |
Laptop software using 2 Linux terminals:-
terminal #1; alsamixer
terminal #2; arecord
Set signal generator for a 1kHz sine wave.
Having already determined which module was the most sensitive, and having set the signal generator level accordingly, I re-tested like this:-
1. On terminal #1 set the correct adapter via the alsamixer F6 menu (e.g. USB PnP Sound Device)
2. Select F4 [Capture] on alsamixer and set the Mic capture level to 75% (on some modules, 76% was nearest available setting)
3. On terminal #2 run the arecord command:-
arecord -vv --format=cd --duration=10 /home/steve/arecTest.wav
4. The wav file should be checked using (say) Audacity to ensure its not clipped
5. Make a note of the arecord vu % reading
Repeat on all modules ensuring alsamixer is reset for each module.
Disconnect the signal generator and measure the mic drive voltage across the 2k2 load resistor for each module reconnected to the system.
As you can see, the cheapest modules (from PiHut) produce a much larger output than the more expensive uGreen branded devices.
In addition, the mic drive voltage is higher on these cheap units, which will push up the sensitivity even further when in use with electret microphones.
Note: This is not necessarily to say that the cheaper modules are better when used for their intended application (close-talking gaming headsets) but higher sensitivity is probably advantageous for BirdNet-Pi.
Note also that modules like my uGreen CM477 using TRRS 4 pole jack connectors for the CTIA/AHJ standard are difficult to manually terminate, where the screen must be connected to the 2nd ring, rather than the screen clamp & (if metal) the cover of the plug.
final system checks with spectrogram
When the selected module & microphone combination is finally connected to the BirdNet-Pi, select the Spectrogram screen.
Check visually for any problems.
With my Texas Instruments powered module I get a series of horizontal lines at 1kHz intervals. I don't know what causes this but have noticed it on some other BirdNet-Pi users [published] spectrogram images. It could be a fault with this sample or typical for this model, but as I don't need to use this one, I have ruled it out.
Using the PiHut unit at full [100%] gain, I've noticed a spurious signal around 9kHz. This doesn't seem to be a problem, but with so much gain available, I can afford to reduce the mic gain in alsamixer a little to get rid of this. This also stops the system momentarily overloading on very windy days when (presumably) the wind blows across the top surface of the mic.
Listening to the system with Spectrogram running is also important. What can you hear?
Everything (e.g. even the distant sounds of dogs barking, children playing, or the reversing "beep" of a delivery truck) should be crisp & clear. If traffic noise or some other unwanted noise is prominent, you may need to re-site or shield your microphone from the noise source.
One thing I noticed before starting these tests is that the background noise on the BirdNet-Pi spectrogram display seems to be lower when the USB module is connected to one of the 2 slower USB ports (i.e. not connected to the blue USB ports).
electret mic drive voltage
For BirdNet-Pi we probably want to achieve the highest sensitivity possible.
Electret mics not only vary a great deal between types/models, they also vary quite a bit from sample-to-sample of the same make & type.
The sensitivity of the mic varies with load resistor and drive voltage due to the characteristics of the built in FET. So generally, a higher load resistor and a higher supply voltage will increase gain ...within reason.
This is an extract from C-Media's application circuit for the CM108 showing the mic input.
It should be noted that this is not necessarily the circuit actually employed in any of my USB modules. Module manufacturers can use it, but some may choose to simplify to reduce costs.
The points to note are coupling capacitor C11 and the Voltage bias components C15, R10 & R13. If we wanted to try using a higher mic bias voltage with a higher resistance load to increase gain, it looks like this should be easy.
I haven't thought too much about this but I would need to consult the electret microphone specification for maximum voltage and suitable drive current. The value of the capacitor could be (say) one tenth of C11 in order to reduce low frequency noise (e.g. mains hum).It would probably also benefit from a buffer/preamp stage.
I'll probably give this a go when I have some spare time (...maybe after Christmas!).
12-Dec-2024 Additional;
I took another look at my uGreen US205 because the drive voltage seemed so low.
By measuring both the loaded (with 2k2 resistor) and unloaded voltages, I calculated that the internal series resistor was just over 10kOhms fed from a 2.95V bias. Although this unit works well, this low drive voltage could indicate a fault (...maybe someone fitted the wrong resistor) so I decided to do a quick test using the suggested external drive circuit above.
I used a 10k load resistor, 0.22uF capacitor and a PP3 9V battery to power the circuit. As a result, the arecord vu meter increased from 30% to 80% and there was no sign of clipping in the captured sine wave.
I think this shows that there is scope to get more out of these electret microphones with this kind of modification.
Notes:-
1) Increasing the microphone drive voltage & load resistor does not affect the electret mic element itself, but increases the internal FET gain.
2) you should refer to the microphone specification before attempting this.
3) for my mic (Panasonic WM61A) the voltage range is specified as: 1-10V
4) I used the PP3 battery for this test only as a convenient, noise free power source (...it would probably last about 3 weeks if in continuous use).
No comments:
Post a Comment