I2S MEMS SPH0645 Microphone - Volume way too low
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- RickTracer
- Posts: 5
- Joined: Tue May 23, 2017 3:39 am
I2S MEMS SPH0645 Microphone - Volume way too low
Hi, I recently bought the SPH0645 I2S MEMS microphone breakout and have hooked it up to a Raspberry Pi 3. I followed the tutorial but at the final step of recording rather than seeing a nice high volume indication I'm getting between 3 and 7 %. When I play back the recorded file I have to turn the speakers way up to hear anything.
Any guidance to increase the volume? There's no volume control in ALSAMIXER by default, I did try a bunch of stuff from Google on "Soft Vol" and "Mic Boost" and at one point had volume controls showing in ALSAMIXER but nothing actually changed anything and not sure that it was configured correctly.
I have 2 modules and both give the same, tried on 2 different Pi 3's as well as a clean Raspbian image.
Thanks!
Any guidance to increase the volume? There's no volume control in ALSAMIXER by default, I did try a bunch of stuff from Google on "Soft Vol" and "Mic Boost" and at one point had volume controls showing in ALSAMIXER but nothing actually changed anything and not sure that it was configured correctly.
I have 2 modules and both give the same, tried on 2 different Pi 3's as well as a clean Raspbian image.
Thanks!
- dlleigh
- Posts: 208
- Joined: Wed Jan 30, 2013 8:08 pm
Re: I2S MEMS SPH0645 Microphone - Volume way too low
Look at the audio port on the bottom to see if it might be clogged. It's small so you might want to use magnification and a good light.
What voltage are you powering the microphone board with?
What voltage are you powering the microphone board with?
- RickTracer
- Posts: 5
- Joined: Tue May 23, 2017 3:39 am
Re: I2S MEMS SPH0645 Microphone - Volume way too low
Hi, thanks for responding. Port is clear and I've 2 brand new units, tried both with the same result, on 2 separate Pi 3's and with 3 images (1 older Raspbian, 1 clean Raspbian, 1 Google AIY project image).
It's powered by the 3v3 pin on the Pi, which in turn I've powered from a (plugged in) laptop as well as an iPad USB charger.
I bought these as I understand they're the same MEMS microphone used in the Google AIY Voice Kit. Wiring it direct to the Pi running the AIY Voice Kit (with the hat removed) gave the same results. Trying to wire directly to the Mic input (https://www.element14.com/community/ser ... ematic.png) on the AIY Voice Kit HAT results in a very crackly noisy record (and volume on the arecord shows 50% constant).
Plugging the Google Microphone board directly to the Pi in the same configuration as the SPH0645 breakout also results in the same low volume.
So hardware wise it seems to be ok, just something needs to boost the recording volume somehow...
It's powered by the 3v3 pin on the Pi, which in turn I've powered from a (plugged in) laptop as well as an iPad USB charger.
I bought these as I understand they're the same MEMS microphone used in the Google AIY Voice Kit. Wiring it direct to the Pi running the AIY Voice Kit (with the hat removed) gave the same results. Trying to wire directly to the Mic input (https://www.element14.com/community/ser ... ematic.png) on the AIY Voice Kit HAT results in a very crackly noisy record (and volume on the arecord shows 50% constant).
Plugging the Google Microphone board directly to the Pi in the same configuration as the SPH0645 breakout also results in the same low volume.
So hardware wise it seems to be ok, just something needs to boost the recording volume somehow...
- meetri
- Posts: 1
- Joined: Sat Oct 24, 2015 2:34 am
Re: I2S MEMS SPH0645 Microphone - Volume way too low
i'm having the same problem. When gathering voltage details on the audio stream coming from this mic, i read consistent high numbers for the min and max values.
when the room is quiet i get values like min: 63830 - max: 63850 ( 16 bit values )
Are you getting similar values? Also the audio peaks out really easy too. Any suggestions on what I can do?
Overall, I am getting audio out, it's just quiet and peaks out easy.
when the room is quiet i get values like min: 63830 - max: 63850 ( 16 bit values )
Are you getting similar values? Also the audio peaks out really easy too. Any suggestions on what I can do?
Overall, I am getting audio out, it's just quiet and peaks out easy.
- adafruit2
- Posts: 21533
- Joined: Fri Mar 11, 2005 7:36 pm
Re: I2S MEMS SPH0645 Microphone - Volume way too low
the guide we have right now is hand-adding i2s mic support, and its cribbed from another source. it could be we're dropping significant bits. we *could* change the code to bump the volume in th driver but its a little tacky :)
if google+pi foundation added support for the AIY kit, they probably did a better job and it doesn't require compiling. but the docs for AIY are not very detailed... :/
https://aiyprojects.withgoogle.com
does anyone in this thread happen to have an AIY kit?
if google+pi foundation added support for the AIY kit, they probably did a better job and it doesn't require compiling. but the docs for AIY are not very detailed... :/
https://aiyprojects.withgoogle.com
does anyone in this thread happen to have an AIY kit?
- rockman55
- Posts: 100
- Joined: Tue Apr 14, 2015 6:17 pm
Re: I2S MEMS SPH0645 Microphone - Volume way too low
I have an AIY kit and also have just purchased two of th i2s MEMS SPH0645 Mic's. I have the same low volume recording as mentioned by the other users. Any help on this problem would be appreciated.
- adafruit2
- Posts: 21533
- Joined: Fri Mar 11, 2005 7:36 pm
Re: I2S MEMS SPH0645 Microphone - Volume way too low
try installing the aiy kit and see if the arecord is still quiet?
- rockman55
- Posts: 100
- Joined: Tue Apr 14, 2015 6:17 pm
Re: I2S MEMS SPH0645 Microphone - Volume way too low
I have the kit that came with my subscription of MagPi and the entire kit is built. I can take the SD card that I made for the i2s MIC and install it with the AIY kit. So should the AIY kit work with the software used for the Adafruit i2s MEMS mic?
- adafruit2
- Posts: 21533
- Joined: Fri Mar 11, 2005 7:36 pm
Re: I2S MEMS SPH0645 Microphone - Volume way too low
no the other way around, the AIY pi should have the driver for the i2s mic installed
- hystrix
- Posts: 8
- Joined: Sat Nov 19, 2016 4:11 am
Re: I2S MEMS SPH0645 Microphone - Volume way too low
Did anyone solve this low volume issue? I also have the SPH0645 I2S MEMS microphone breakout, and cannot get the recording volume very high at all.
- maby
- Posts: 8
- Joined: Tue Jul 18, 2017 6:02 am
Re: I2S MEMS SPH0645 Microphone - Volume way too low
Can I add my name to this list? I've plugged up an Adafruit I2S microphone to a RPi and the audio quality is fine, but the level is very low - with no obvious way of turning it up - has anyone made any progress with it yet? I really don't have the time to learn I2S kernel programming from scratch in order to work out how to fix it which would be a shame since it seems to be a good option.
- RickTracer
- Posts: 5
- Joined: Tue May 23, 2017 3:39 am
Re: I2S MEMS SPH0645 Microphone - Volume way too low
Ok, I think I have it licked after much on and off trying!
The solution comes from https://www.raspberrypi.org/forums/view ... 71#p607371 solution dated Tue Sep 02, 2014 6:51 pm but hopefully I can help the newbie a bit better with all steps (adjusting the volume in mixer and changing the arecord options to use the soft volume device).
First you need to edit your alsa configuration file
Update it like the file attached here which is also repeated at the bottom of this post. What this does is add in a reference to your I2S Mic and then create a software mixer.
Once you've done that you then have to use the alsa mixer to turn up the volume :
F6 and select your I2S mic "snd_rpi_simple_card"
F4 to set the capture volume
Arrow up until about 50% (if you do too much and the recording hits MAX too much you won't have a recording) Now you can record using arecord, you have to use to use the soft volume and must also specify the channels as 2 (yet to figure out how to make it fully mono) - note very case sensitive
Watch the volume bar, if it goes up to max and stays there turn the volume down in the mixer and record again or you won't hear anything on playback.
Now
And you should have a louder recording!
You can record without the software volume using
Hope this helps! Here's the .asoundrc - if anyone can help with how to set different default recording and playback devices please post! :
The solution comes from https://www.raspberrypi.org/forums/view ... 71#p607371 solution dated Tue Sep 02, 2014 6:51 pm but hopefully I can help the newbie a bit better with all steps (adjusting the volume in mixer and changing the arecord options to use the soft volume device).
First you need to edit your alsa configuration file
Code: Select all
sudo nano ~/.asoundrc
Once you've done that you then have to use the alsa mixer to turn up the volume :
Code: Select all
alsamixer
F4 to set the capture volume
Arrow up until about 50% (if you do too much and the recording hits MAX too much you won't have a recording) Now you can record using arecord, you have to use
Code: Select all
-D dmic_sv
Code: Select all
arecord -D dmic_sv -c2 -r 48000 -f S32_LE -t wav -V mono -v myfile.wav
Now
Code: Select all
aplay myfile.wav
You can record without the software volume using
Code: Select all
arecord -D dmic_hw -c2 -r 48000 -f S32_LE -t wav -V mono -v quiet.wav
aplay quiet.wav
Code: Select all
#The below 2 sections are commented, they control the default sound card to use
#This set up is for a Pi with an I2S microphone attached using the guide
#from adafruit at
# https://learn.adafruit.com/adafruit-i2s-mems-microphone-breakout
#Uncomment and the I2S will be your default card (assuming same setup)
#but you won't get audio playback because both recording and playback will be
#defaulted
#TODO - Figure out how to set default for recording separately
#To adjust use aplay -l to work out the devices you have and their card number
#For recording devices use arecord -l
#pcm.!default {
# type hw
# card 1
#}
#ctl.!default {
# type hw
# card 1
#}
#This section makes a reference to your I2S hardware, adjust the card name
# to what is shown in arecord -l after card x: before the name in []
#You may have to adjust channel count also but stick with default first
pcm.dmic_hw {
type hw
card sndrpisimplecar
channels 2
format S32_LE
}
#This is the software volume control, it links to the hardware above and after
# saving the .asoundrc file you can type alsamixer, press F6 to select
# your I2S mic then F4 to set the recording volume and arrow up and down
# to adjust the volume
# After adjusting the volume - go for 50 percent at first, you can do
# something like
# arecord -D dmic_sv -c2 -r 48000 -f S32_LE -t wav -V mono -v myfile.wav
pcm.dmic_sv {
type softvol
slave.pcm dmic_hw
control {
name "Boost Capture Volume"
card sndrpisimplecar
}
min_dB -3.0
max_dB 30.0
}
- adafruit2
- Posts: 21533
- Joined: Fri Mar 11, 2005 7:36 pm
Re: I2S MEMS SPH0645 Microphone - Volume way too low
oooh thanks for the note, we added it to the guide in case others bumped into it!
- maby
- Posts: 8
- Joined: Tue Jul 18, 2017 6:02 am
Re: I2S MEMS SPH0645 Microphone - Volume way too low
Hmmm, not working here... I make the changes to .asoundrc, but alsamixer still believes that the i2s card has no controls - any suggestions?
Martin
Martin
- rockman55
- Posts: 100
- Joined: Tue Apr 14, 2015 6:17 pm
Re: I2S MEMS SPH0645 Microphone - Volume way too low
I am having the same problem, no controls.
Please be positive and constructive with your questions and comments.