3
\$\begingroup\$

I am trying to replicate project Jasper of raspberry pi. Currently I am using a USB to audio converter (shown in image below) and a regular PC mic. However the audio reception range is very small. So, I am planning to make my custom mic with opamp to amplify the sound signal.

This is the wiring of the mic (which confused me actually):

enter image description here

Pins labelled '1' are GND. However 2 and 3 tend to produce similar output. (I was assuming GND, VCC, Analog OUT kind of stuff so that I could replace the mic with the red modules shown in the bottom left part. They are ADMP-401 MEMS mics along with an op-amp).

Here are the waveforms that I got after randomly shouting at the mic while connected to laptop. I took the readings from Pin 2 and 3.

Pin 2 reading

Pin 3 reading

This is what I want to do:

Use the breakout board to be the mic and that USB to audio converter module (because raspberry pi doesn't have a mic-in) to provide a audio-input to the raspberry pi. The reason I want to use the breakout board rather than regular mic is "lack of good audio reception range".

This is what I think I should do to get it working:

1) Connect GND of breakout board to Pin - 1.

2) Connect VCC to USB 5V supply after using a 3v3 voltage regulator.

3) Connect AUD to pin 2 or 3 whichever tends to work.

One more discovery that I should share:

Before plugging in the mic, the voltages at pin 2 and 3 float around 4.8V but as soon as I plug the mic in, the voltage drops down to 3.7V.

Any suggestions from you guys will be quite helpful.

Thanks for reading.

\$\endgroup\$
  • \$\begingroup\$ What do you mean "the audio reception range is very small"? \$\endgroup\$ – Nick Johnson Jun 23 '15 at 14:51
  • \$\begingroup\$ I want to be able to speak from other corner of the room and the module should get the voice signal. Right now it works at a 1-feet range. That's why i planned to use an opamp to amplify the sound signal. @NickJohnson \$\endgroup\$ – Whiskeyjack Jun 23 '15 at 14:52
  • 1
    \$\begingroup\$ What microphone were you using? Is the input on that device a line in, or a mic in? If it's a line in, you will need a preamp. \$\endgroup\$ – Nick Johnson Jun 23 '15 at 14:55
  • 1
    \$\begingroup\$ I agree with Nick Johnson,you will need a preamp for line in,also the audio signal is same in both the channels,I once worked with piezoelectric mic,for it I had provide biasing with Opamp.But as my mic was specially piezoelectric its output was voltage,in your case it may be current ,so suggest you should try a preamp. \$\endgroup\$ – MaMba Jun 23 '15 at 15:03
  • 1
    \$\begingroup\$ My pleasure ! As a bonus, maybe this is a usefull AGC IC: maximintegrated.com/en/products/analog/audio/MAX9814.html \$\endgroup\$ – Bimpelrekkie Jun 23 '15 at 18:38
4
\$\begingroup\$

Typical USB sound cards have an earphone jack and a microphone jack. Since it works with your microphone, it is set up to deliver power to the electret microphone - hence the 4.8 Volts when open. That is to say, the sound card is delivering DC Voltage to your microphone.

The microphone input of a sound card can't supply much current, but it is enough for a small transistor amplifier. If fact, electret mics all have a single FET transistor amplifier attached to them - the signal from the mic itself is very high impedance and requires that little amplifier to deliver low impedance signal. You might stretch a point and find a low power op-amp that will work with 3.8V and damn near zero current, but I bet your pocket book will say "ouch" if you go that way.

Picking up a voice from across a (normal sized) room shouldn't be a problem, though, even without a preamplifier. The mic can pick it up easily, and the sound card will digitize it. What you hear has got relatively little to do with it, however. It might well pickup and be capable of recording a voice that you can't hear when played back through the speakers. You can amplify the signal digitally, however.

The sound card samples at 16Bits, which gives you a lot of room to amplify things digitally. All you need to do is multiply the incoming samples with some number to amplify the signal. Need 20dB of gain? Multiply your samples by 10.

A better microphone shouldn't be neccessary, unless the one you've got is just utter crap. I use a 20 year old electret mic from an old Toshiba laptop for my experiments - it can pick up voices from all across the room, even if I can't hear them on playback through the speakers. A little digital gain, though, and all is good.

If you actually do go the preamp route, you will probably need to consider using an automatic gain control. Cranking up the amplification until a voice from across the room gives you a full scale recording means that noises closer to the microphone will overload it and you'll just get a distorted mess. Again, digital amiplification can save your bacon. An AGC in software isn't that hard, so just take advantage of the 96dB range of that sound card and do the amplification digitally.


Mmmf. Completely ignored the MEMs mic.

You might try connecting your MEMs mic like an electret with a simple transistor amp. It might work, since the data sheet say the module only needs 250µA at 3.3 Volts.

Like this:

schematic

simulate this circuit – Schematic created using CircuitLab

You might have to diddle with R1 and C1 (different values) to make it go.
R1 might need to be bigger, maybe C1 could be smaller.


Looking at your linked picture of the Echo, it would seem that they are using multiple mics to eliminate noise and possibly track the voice source (for better noise reduction and to separate voices.)
The tear down shows a Texas Instruments DM3725 processor, which combines a DSP and an ARM core in one unit. I expect the Echo uses the DSP core for all of the audio processing, and the ARM does the internet and user interface parts.

\$\endgroup\$
  • \$\begingroup\$ I was able to retrieve 67.8 mA current from the USB, I often have heard that it can go upto several hundreds of milli amphere,but practicality works in my case I had to use pre-amplifiers,I wonder about the whether FET gate is connected to the piezoelectric mic diaphragm,that changes the resistance in that case it would a current out device?I thought is was the voltage across the mic which changed the bias voltage to generate audio s/g. \$\endgroup\$ – MaMba Jun 23 '15 at 15:35
  • \$\begingroup\$ It is the voltage across the mic that generates the signal. It just such a high impedance signal that you really have to have the FET there as an impendance converter/amplifier. I've never seen an electret mic in use that didn't have the little FET attached to it. Not saying they don't exist, just saying that all the ones I've seen (even little naked 1/16 inch diameter mics) have the amp built in. \$\endgroup\$ – JRE Jun 23 '15 at 15:38
  • \$\begingroup\$ Fixed amplification will be an issue as you correctly pointed out. However I am planning to make something like OK Google, SIRI, Cortana or Amazon Echo. So, it will require realtime audio input (well realtime is better, I guess). And all this will be done on a raspberry pi because project Jasper is available which I am using. I wanted to go for hardware amplification because it is simple and fast. Do you think AGC software would be a good idea? Another hardware tweak is to use i2c controlled resistors to change gain on the go which seems easily doable. @JRE \$\endgroup\$ – Whiskeyjack Jun 23 '15 at 16:01
  • \$\begingroup\$ AGC in software is trivial, at least if you are used to doing DSP work. In fact, I would almost be that Jasper includes something of the sort. You're not the first person to want a longer range of voice detection than "right in your face." \$\endgroup\$ – JRE Jun 23 '15 at 16:14
  • 1
    \$\begingroup\$ @gvelascoh - sorry, but no. My intention was to make a cheaper alternative to amazon echo mic set but my approach was wrong. Echo uses an array of mics with hardware and software for noise cancellation and other features which improve the sound reception. The way I wanted to do was to have one or two mics with higher amplification. This won't be nearly as good as what echo has. I had to abandon the project altogether. \$\endgroup\$ – Whiskeyjack Oct 16 '18 at 9:26
2
\$\begingroup\$

The jacks are standard 3.5mm mini-phone plugs, otherwise known as tip-ring-sleeve jacks. They're not powered; as you observe the sleeve is ground, but the tip and ring are the left and right stereo channels.

What you describe ought to work, assuming the breakout board you're using provides enough amplification. The critical question is what input levels the USB device expects; microphones output very small signals, and if the USB device expects a line level input, you will need a great deal of amplification. You can connect the output from the microphone module to both ring and tip - 2 and 3 in your diagram - for a mono mic.

Bear in mind that whatever you do, the inverse square law applies - as you move away from the microphone, amplitude will decrease rapidly, far more rapidly than you might otherwise expect.

\$\endgroup\$
  • \$\begingroup\$ Thanks Nick. I opened up the regular mic and found nothing but a simple electret mic hooked up with some wires. So I am pretty sure the ADMP-401 will produce a better output than that electret. However I was worried about the VCC and output connection. \$\endgroup\$ – Whiskeyjack Jun 23 '15 at 15:04
-1
\$\begingroup\$

The voltage drops cause the wire heats up and the microphone wire wound also heats up hence the voltage drop. The use of ethernet wire dramatically changes the micrphones output ... Its like yer mic on electronic steroids. K take care and keep wath for the signs.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.