Members | Sign In
Legacy MOVI User Community Forum (readonly) > MOVI Question & Answers
avatar

external Microphone

posted Jan 06, 2016 11:55:53 by Pilif
Hello,
what is the line in voltage for the ext. microphone?
I guess that with the following circuit[1] Microphones that are pre-amplified could be connected ?
Can you give me an example of an Microphone without "pre-amplified" and more specific how can I search for such one?
Thanks!
[1]
page   1 2 3 next last
39 replies
avatar
GeraldFriedland said Jan 06, 2016 19:25:03
Unfortunately, I need to start off by saying that ultimately we (=Audeme) don't know. The microphone jack connects directly into the AllWinner chip and whatever proprietary circuit is in there. The only documentation we even have for the chip is this: http://dl.linux-sunxi.org/A13/A13%20User%20Manual%20-%20v1.2%20(2013-01-08).pdf (chapter 23)

Having said that, in working with the chip, we found out that pretty much any electret microphone will work. These are the types of microphones that are usually included in headsets or in cell phones. https://en.wikipedia.org/wiki/Electret_microphone

If you want to connect an amplified signal, you are correct, you need an attenuator. The one you are showing will probably work. I have successfully used the following circuit in the past for a line level signal:
  
               C1
+Line level in --||----R1----+-- +Mic level output
                   +         |
                             |
                  +----R2----+
                  |
Ground (input)----+--------------- Ground (output)


R2 = 1 kohm
R1 = 10 kohm
C1 = 10 uF

The only difference being the absolute values of the resistors and the capacitor to try to emulate the characteristics of the electret microphone. I usually like to choose low tolerance resistors when I work with audio signals.

This circuit is from: http://www.epanorama.net/circuits/line_to_mic.html
This site also shows attenuators for other levels of amplified audio signals.
[Last edited Jan 06, 2016 19:34:17]
avatar
Pilif said Jan 07, 2016 14:59:45
Thank you! will try it out and write back :) The circuit draw a colleague of mine who has audio/musk knowledge.

Got the shield today .. now playing(talking) with (to) it :)
avatar
PeterLum said Feb 06, 2016 02:32:12
Nice, keep us updated on the progress.
avatar
Dylan said Apr 05, 2016 01:38:57
Hello,

I have a related question about using an external microphone. I'm just getting started using MOVI and trying to integrate it into my project. I need an external microphone because the Arduino and MOVI will be tucked away in a place where it is certain to be unable to hear me. I like the microphone that I was using with my "other less capable voice recognition board" because of its long cable, suitable size, and it comes with a clip that works great where I need to mount it.

The trouble I'm having is that when I plug it in, MOVI hears nothing while running the LowLevelInterface example sketch. The problem may be that the plug on my mic is a mono style one. A quick web search suggests that this would only allow the "left channel" to be passed through (if one could say a single microphone had two channels) and the right channel would be grounded.

Is it true that MOVI only listens on the right channel of the stereo jack used for the microphone? If that is so, then is there a way to tell it to listen to the left channel instead or is this hardwired on the board? Baring that, could I cut the plug off the microphone cable and solder on another jack (hints welcome on wiring if this is even possible)? I don't have room for a bulky adapter, everything in my project is pretty tight already, the rear location of the jacks on MOVI is already presenting me a bit of a challenge.

Thanks in advance for any help or advise!
Dylan.
avatar
GeraldFriedland said Apr 06, 2016 05:28:35
Dylan,

MOVI has a stereo jack as external microphone input where both channels are put together. So MOVI listens to both the right and the left channel. So if you plug a mono jack into the stereo jack, you'll short circuit your microphone. This is, among other places, explained here: http://sound.stackexchange.com/questions/25577/stereo-and-mono-cables-and-jacks-what-happens-when-you-cross-them. We need to provide a stereo jack though because most headphones have a stereo jack even though the microphones and our input is mono (again, see explanation at the link above).

Your problem can be most likely solved with a mono to stereo adapter like this one. If you want to do soldering yourself, the easiest way is to cut the cable and solder a stereo plug yourself by connecting GND to GND and the signal to both left and right.

Gerald
avatar
Dylan said Apr 07, 2016 03:02:28
Thank you for the info about the short circuit Gerald. I incorrectly assumed that the one channel being short circuited to ground would leave the one channel enabled. I built a little adapter as you suggest and that does work. Now I'm not happy with my cheap microphone's response as it seems to be clipping off the beginning and end of my commands and cutting off unexpectedly when I use the LowLevelInterface sketch (even with very low values for setThreshold() like 2), but for now I'm going to assume I need a better quality microphone. I may post again if I cannot find a suitable microphone.

FYI - Many (perhaps most?) microphones designed for vehicle usage have a mono connector, so depending on how people plan to use MOVI you may get other people contacting you with the same issue. You can search Amazon for "car microphone" to see what I mean.

I have at least one other question about MOVI's behaviour but I think I'll post in a different topic as they don't relate to the microphone.

Thanks again,
Dylan.
avatar
Dylan said Apr 08, 2016 03:12:30
I was just re-reading this thread together with the MOVI user manual trying to get some hints on what sort of specs I should be looking for in a proper external microphone. A few things leave me confused and concerned. The user manual says these things:

"By default, the integrated electret microphone (see Microphone in Figure 1) is used. This
microphone is internally connected to an Automatic Gain Control that will amplify
incoming sounds to standard level independent of the distance. This will work up to
about 15 feet (5 meters), under good conditions sometimes even for wider distances."

followed by

"Also, the signal that comes through
External MicIn is not amplified."

Does this mean that I don't stand a chance of getting as good performance from an external microphone (without additional circuitry) as the integrated microphone? That would be a shame because my Arduino and MOVI need to be tucked away where it could never possibly hear me. But then to add to my confusion, the user manual says:

"Note: Do not connect a Line-In signal or any other signal that is pre-amplified to the
microphone jack."

So the integrated mic has some sort of automatic amplification, the external microphone port does not, yet I must not amplify the external mic in any way? Would I be best to desolder the integrated mic and hardwire a 3.5mm port to the resulting pads or through-holes so I can connect an external mic that would benefit from the same gain control circuitry that the integrated mic enjoys?

While I am here, I should point out an error in this section of the user manual. Based on my experience and responses above, the following statement is incorrect:

"Note: Only connect 2-conductor (mono) and 3-conductor (stereo) headphone jacks
to MOVI."

A mono connector plugged directly into the microphone input jack does not work making that statement false for the microphone port.

Dylan.
avatar
dmworking247 said Apr 08, 2016 04:00:36
I'm glad I found this thread, and I'm interested in the responses to the post above.

I also intend to tuck my Movi away behind an entertainment unit and use an external microphone. I was hoping for more accuracy/clarity this way. However I wrongly assumed that a typical (mono) interview mic (the type that would clip onto your shirt) would be suitable for this.

I think I need to know the clarification regarding mono vs stereo and amplification of external mics before I proceed.

A related question though: If the mic-in port is indeed stereo, is it more advisable to bridge the mono microphone across L & R channels, or use TWO of these external microphones (one left channel, one right, common ground) to improve coverage/direct of the microphones? Or would this introduce some kind of latency/echo problems?
avatar
GeraldFriedland said Apr 08, 2016 05:03:37
Dylan,

First of all: Thank you for the correction. The user manual is indeed not correct. Mono connectors will short circuit your microphone, resulting in a clean 0 energy input. :-(

Then, I unfortunately need to repeat my caveat again, that ultimately all we know about the microphone circuitry in the A13 chip is described here: http://dl.linux-sunxi.org/A13/A13%20User%20Manual%20-%20v1.2%20(2013-01-08).pdf (chapter 23)

Whenever you connect a microphone to the external mic jack, you directly connect to the A13 chip and, as said above, in working with the chip, we found out that pretty much any electret microphone will work. These are the types of microphones that are usually included in headsets or in cell phones. See also: https://en.wikipedia.org/wiki/Electret_microphone

Whenever you use the internal microphone, however, the microphone output goes through an Automatic Gain Control (AGC) circuit. This is a circuit that will keep the signal's low energy ranges low (ignore noise), amplify the middle energy ranges (assuming it's the signal far away), and dampen the high energy (to prevent clipping). For a description of how an AGC works, check here: https://en.wikipedia.org/wiki/Dynamic_range_compression So the internal microphone isn't actually amplified (ie., the signal is scaled up proportionally) but it's dynamic range is compressed.

So now to your question about integrating MOVI into a box. Whether you need dynamic range compression for the microphone that you externally connect to MOVI depends foremost on your application. Speech recognition experts will distinguish two use cases: Far field and near field. Far field speech recognition is the speech recognition MOVI is performing when you talk to it (from a distance) using the onboard microphone. Near field speech recognition is what happens when you use a microphone close to your mouth, e.g. using a headset microphone.

For near-field speech recognition, you just connect a headset-type microphone to the external Mic jack of MOVI and you are done. However, if you want to do far-field speech recognition using an external microphone, it's a bit more complicated:

First, you need to chose a microphone that will actually allow you to catch the signal over a distance. Obviously a microphone capsule like the one we integrated in MOVI works. Then I would recommend to use a dynamic gain control circuit, just like we did in MOVI. The chip we integrated in MOVI is the MAX9814. It's very easy to use and Maxim Integrated has an evaluation kit. Also, Adafruit sells a little board with it: https://www.adafruit.com/products/1713 .
The chip, however, like any other of these chips will output line signal. Therefore, you will need a circuit like the one already depicted above to attenuate the signal back to microphone signal:

               C1
+Line level in --||----R1----+-- +Mic level output
                   +         |
                             |
                  +----R2----+
                  |
Ground (input)----+--------------- Ground (output)


R2 = 1 kohm
R1 = 10 kohm
C1 = 10 uF
This circuit is explained here: http://www.epanorama.net/circuits/line_to_mic.html

If you feel this is to complicated, you could indeed desolder the microphone and connect your microphone as then you will use MOVI's AGC. Having said that: I really advise against it. We spent weeks of fine tuning the MAX9814 chip to the microphone capsule integrated in MOVI after wisely choosing the microphone capsule. What I am saying is: You are likely to have to tinker with your own audio front end, so it's better to start with a bread board setup as suggested by Adafruit.

Hope that helps.
[Last edited Apr 08, 2016 05:03:57]
avatar
GeraldFriedland said Apr 08, 2016 05:15:15
dmworking,

I would bridge the two microphones across L&R as we only do mono anyways. Be careful though: If you place the microphones too far away from each other, you will have a phase shift between the two microphones. This is due to the speed of sound. This blog post explains it quickly: http://www.uaudio.com/blog/understanding-audio-phase/
Of course, we are not concerned about listening to the signal hear but speech recognition accuracy might suffer if there is too much of a phase shift. I guess you could call these 'latency' problems :-)

When you place your far-field microphone, you should also make sure that they are far enough from the speakers as otherwise, you'll indeed get feedback loops and echos. To debug those, I recommend using the
MICDEBUG ON

command in the LowLevelInterface. This is described in Appendix C of the user manual.

Thank you for your feedback and I hope I didn't forget to answer any question. Definitely, let us know how it goes!
avatar
Dylan said Apr 08, 2016 06:09:42
Thank you for the explanation Gerald, I think that explains why I am seeing such a dramatic difference between using an external electret microphone at about a 2-3 foot distance and speaking to MOVI's integrated electret at a similar or even further distance. I can only get similar results from the external microphone if I speak loudly and clearly into it from a distance of perhaps 1-2 inches. I'm not very hopeful that the microphone I chose from Amazon today will fair any better than the cheap eBay one I already have given your response. I feel it is a bit of an unfortunate design decision to have left the external microphone without any amount of gain control, but that is how it is so at least I now understand it.

I know that you have previously described and stand by the caveat of the external microphone connecting directly to the A13 chip. Unfortunately that left end users still in the dark with respect to the lengthy work that you did to compensate with the gain control circuit attached to the integrated microphone. Your description of the combined adafruit MAX9814 circuit together with the attenuation circuit begins to shed light on what needs to be done to match the performance of the integrated mic when using one plugged into the external port. I have to say, from an end user perspective, this is a very large difference and believe that the user manual doesn't do enough to emphasize just how different the performance characteristics of the integrated mic differ from a mic plugged into the microphone port without any supporting circuitry.

I don't think that the circuit you describe is too complicated, it's just going to be ugly for me to add that physical circuitry to my design. Would you be able to share the model number or specs for the microphone that is onboard of MOVI? It might be cleaner for myself or others to desolder the onboard microphone and simply solder and run a cable to the very same model of microphone, just mounted at a distance.

Dylan.
avatar
GeraldFriedland said Apr 08, 2016 16:30:20
Dylan,

I can give you the part number (I need to look it up though) but I am not convinced that's helpful to you. How long is the cable going to be? Depending on the length of the cable you completely change the characteristics of the circuit (microphone impedance and capacity) and then it's not the same circuit anymore.

Here is my recommendation:
Go and get the Adafruit circuit I mentioned (with the microphone on) and treat the entire circuit as your microphone (it's pretty small). Then run the cable to MOVI with LINE level signal that comes from the Adafruit circuit (line signal level is made for cables). Then, right at MOVI's ext mic in plug, you use the little 3-part circuit from earlier in this thread to attenuate the signal to mic level. This way, a gain controlled, line-level signal runs over your cable and at the same time all you need is a 3-component circuit close to the MOVI board (which will not take a lot of space). From an audio perspective, I have a feeling this will work very well!

Do you think this would work for you mechanically?
avatar
Dylan said Apr 08, 2016 20:17:26
Gerald,

The cable needs to be somewhere between 8-10 feet long. Is that too long to have any hope of some degree of success? I was all ready to desolder that mic as it really would be the simplest solution just from a physical layout perspective.

In theory your recommendation would work. Two things I'm not sure what to do about. First, the Adafruit board doesn't come with a case, and fabricating one that is such a small size has me a little stumped. I need for it to look half way decent because it would need to be in view. The second problem is where to put that attenuation circuit. I might be able to solder the 3 components directly to the back of the 3.5mm jack I have mounted on my Arduino box, but I'm not sure that will be robust enough with the components just sort of hanging there. I'll need to consider it for a bit.

Dylan.
avatar
GeraldFriedland said Apr 08, 2016 23:18:17
Dylan,

Unfortunately, 8-10 feet is pretty long. The cable shouldn't be any longer than a typical headset cable. Electret microphone signals are in the tens of milli volts range! Seeing your car application though, I think a headset would be your best bet (just don't cover the ears of the driver). Once you get that working, you can move on to try other microphone types. The problem with using an AGC is that the car noise will most likely be amplified, so I wonder if you can get your hands on some directional microphone (that's what cars usually use for speech recognition).

Regarding your case for the Adafruit circuit: A match box would literally do it. I recommend asking a friend with a 3D printer. The three components can literally be as small as you are able to solder them together. They can easily fit into the space between the two audio jacks, for example.

Gerald
avatar
Dylan said Apr 09, 2016 00:31:24
Okay, thanks for the advise on the cable length. I had a feeling you'd suggest a headset mic for the car once you saw my video. I figure I'll try a more suitable microphone circuit at the location I have it now (rear view mirror) but I stand warned that the results may continue to be unreliable without a headset.

I did think about the 3D printer option for the case. I might scrounge around first at the Dollar Store to see what they might have that could work.

Alright, I've got some building to do before I move forward - I'll quiet down for a while now. :)

Dylan.
Login below to reply: