Go Down

### Topic: Replacing mic with phone output (Read 2818 times)previous topic - next topic

#### buffer_overfly

##### Jul 17, 2015, 05:46 pm
I've bought this board for offline voice recognition. It has an electrect mic to capture the voice, and apparently the board is fine-tuned to this mic. Here are the mic specs:

• Sensitivity: -38 dB
• Operating Voltage: 3 V
• Input signal: 20 mV peak-to-peak, centered around 1.5 V

This is the mic circuit:

The mic is ok but it is boring. I want to replace this mic with a line-level output coming out from a phone audio jack.

I've been researching a bit and I've found I need to do a few things for this to work:
• Measure the phone output signal to calculate the required attenuation. Apparently each phone might produce an slightly different signal.
• Build a pad (essentially a voltage divider) able to attenuate the signal to mic level,
• Convert the pad output (high impedance due to the two resistors) to low impedance so that it loads the receiver circuit as much as the original mic. This can be done with an op-amp buffer amplifier.
• Center the signal around 1.5 V ideally, but anything from 0.5V to 2.5V would do according to the manufacturer

And so I've 4 questions:

• To measure the phone signal I'd need a scope, which I don't have at the moment. I've ordered a cheap USB one and hope it does the job as we're talking kHz here. Once it arrives, lets assume I'm able to measure the amplitude and DC offset of my phone signal. How could I calculate the required attenuation from these parameters? Is there a formula for this?
• Once question #1 is solved, how can I calculate the resistor values for the pad? There are a lot of possible resistor combinations that can produce an equivalent voltage divider as long as the proportions between the resistors is the same. Should I pick an arbitrary one and calculate the other one?
• I've seen in this page that you might need a capacitor in the pad to block the DC. Do I need one?
• Do I really need a buffer amp? I've already tested a generic 20dB pad and nothing was burnt!

The competent programmer is fully aware of the strictly limited size of his own skull...(E.W.Dijkstra) (dammit only 140 chars?)

#### jack wp

#1
##### Jul 17, 2015, 07:21 pmLast Edit: Jul 17, 2015, 07:29 pm by jack wp
Here are the mic specs: I assume you meant the boards specs.

It may take a good bit of trial and error here. I would use a decoupling cap to start with tho.

Rather than a fixed resistor divider, you may be able to fine tune with a pot, and a limiting resistor (maybe somewhere in the 1k to 3k range).

I wouldn't expect you need an op-amp, probably you need to reduce the signal rather than amplify it.

You can use your VOM reading AC to get the RMS. Then you can do the math to convert RMS to Peak to Peak. I believe RMS X 2.83 = Peak to Peak (but verify that).

#### buffer_overfly

#2
##### Jul 17, 2015, 07:51 pm
Yes I need to attenuate the signal, from headphone level to mic level. But by introducing a pad, those two extra resistors would be loading the board in addition to the built-in resistor. And that's why the manufacturer is advising to use a buffer amp, just to feed the board with low-impedance.

On the other hand, none of the pad circuits I've seen in the internet so far had an op-amp.

The competent programmer is fully aware of the strictly limited size of his own skull...(E.W.Dijkstra) (dammit only 140 chars?)

#### jack wp

#3
##### Jul 17, 2015, 08:06 pmLast Edit: Jul 17, 2015, 08:14 pm by jack wp
I would expect a phone audio jack would have a pretty low impedance, compared to a microphone.
Is this phone, a cell phone, and the audio jack for an ear plug?

Low-impedance headphones are in the range 16 to 32 ohms and high-impedance headphones are about 100-600 ohms

You have used this board with the mic. and were happy with it?
I may want one of those. How close to the mic. do you have to be?

#### DVDdoug

#4
##### Jul 17, 2015, 08:15 pmLast Edit: Jul 17, 2015, 08:18 pm by DVDdoug
Quote
Measure the phone output signal to calculate the required attenuation. Apparently each phone might produce an slightly different signal.

Build a pad (essentially a voltage divider) able to attenuate the signal to mic level,
I'd just use trial-and-error, and probably a potentiometer.   A 10 to 1 voltage divider with a pot in front of it would be a good start.    Of course, the signal from a mic varies with the loudness of the sound hitting it, and "line level" can vary a lot unless you're working with calibrated pro-equipment....  Almost everything in audio has a volume or gain control.

Quote
Convert the pad output (high impedance due to the two resistors) to low impedance so that it loads the receiver circuit as much as the original mic. This can be done with an op-amp buffer amplifier.
That's an unusual requirement.   Any idea what that impedance should be?   That's shouldn't require an op-amp.

Quote
Center the signal around 1.5 V ideally, but anything from 0.5V to 2.5V would do according to the manufacturer
That's just a voltage divider too.

You do need a capacitor in-between the audio source and the 1.5V bias circuit.   This will keep the DC bias out of your audio circuit, and it will prevent the audio source circuit from mucking-up the bias.

You can make a 3-way voltage divider...   For example, two 10K resistors to divide the 3V supply for 1.5V.     That makes an equivalent resistance of 5K at the junction.     So, a 50K resistor connected to that 1.5V junction would make a 10:1 voltage divider for the audio signal.

So...  3 resistors and a capacitor should do it, plus maybe a pot.

#### buffer_overfly

#5
##### Jul 19, 2015, 04:38 pmLast Edit: Jul 19, 2015, 04:41 pm by buffer_overfly
Finally the chinesse scope arrived.

I've measured two android phones on full volume connected to the same headphones model:

Phone 1:
470mV Peak to Peak
Phone 2:
700mV Peak to Peak

And as I've said I need to emulate a mic that produces a wave of 20mV peak to peak.

Do I have to design two pads taylor-made for each phone, or would a single design do?
What would be a good choice of resistors to handle both phone models?
The competent programmer is fully aware of the strictly limited size of his own skull...(E.W.Dijkstra) (dammit only 140 chars?)

#### jack wp

#6
##### Jul 20, 2015, 03:27 am
How about just turning the volume down, to the appropriate volume for each phone?

#### buffer_overfly

#7
##### Jul 21, 2015, 11:45 pm
You have used this board with the mic. and were happy with it?
I may want one of those. How close to the mic. do you have to be?

This board is meant to be used in a room. It has 3 levels of gain: headset (mic a few cm from mouth), arms length (60-90 cm) and far (up to 3m). The strictness of the recognition can also be adjusted.
The competent programmer is fully aware of the strictly limited size of his own skull...(E.W.Dijkstra) (dammit only 140 chars?)

#### buffer_overfly

#8
##### Jul 22, 2015, 12:36 amLast Edit: Jul 22, 2015, 12:37 am by buffer_overfly
I've measured the original mic's signal and it is 12mV peak to pead centered around 6mV (which is about 20mV peak to peak as the manufacturer said, but the offset is below the 0.5V minimum I was told).

I've given up on opamps as I don't really know whether or not I'm on high or low impedance.

The output is taken from the 1K resistor. When connected to the board, the pad produces a signal which is 90mV peak to peak, centered around 2V. And this is also odd since I'm using a 1.5V AA battery as offset, so I have no idea where that extra 0.5V comes from.

It works despite having 4x the amplitude of the mic signal. But I'm not sure about it. Right now I have two main concerns:

• Is the 2V offset being fed into my phone? The audio jack output was usually 500mV to 800mV peak to peak, centered around 0V. I wonder if this CD offset could damage my phone.
• Can I get rid of the AA battery and borrow 1 to 1.5V from the duino's 3V pin? (using a 1/2 voltage divider)
The competent programmer is fully aware of the strictly limited size of his own skull...(E.W.Dijkstra) (dammit only 140 chars?)

#### jack wp

#9
##### Jul 22, 2015, 12:52 amLast Edit: Jul 22, 2015, 12:55 am by jack wp
I think the AA battery can be dropped.

Maybe the 1K changed to a higher value (maybe 5k or 10k) would be good.

Have you got some pot ? (I mean POTS).

#### buffer_overfly

#10
##### Jul 29, 2015, 10:53 pm
Cmon guys, nobody can shed some light on the impedance enigma?

Should I use resistors in the order of kOhm, or smaller ones in the range of oms?

Headphones have really small impedances. Maybe adding kOhm resistors to the phone output is bad. Voltages go from 500mV to 1600mV though.

On the other hand, smaller resistors would let more current out of the phone, and maybe that is not very good for the mic input.
The competent programmer is fully aware of the strictly limited size of his own skull...(E.W.Dijkstra) (dammit only 140 chars?)

#### jack wp

#11
##### Jul 29, 2015, 11:30 pmLast Edit: Jul 30, 2015, 12:43 am by jack wp
I don't know of a formula to suggest to you.
You may have to do some test and see what the scope show you. You seem to know what peak to peak you need, so hook the scope up and adjust for that.

If you have two or three pots, then you should be able to make the adjustments pretty fast.

#### polymorph

#12
##### Jul 30, 2015, 02:40 am
It won't hurt the headphone outputs to have higher impedances on them.

Just use a potentiometer with resistor so it is adjustable.

No battery is necessary. Replace the microphone with a 1k resistor to ground. Then from the headphone, use a 47k resistor and a 10k potentiometer. Wiper arm of the potentiometer to a 10uF capacitor negative lead, then the positive lead of the capacitor to the input of the device. Use an audio taper potentiometer.
Steve Greenfield AE7HD
Drawing Schematics: tinyurl.com/23mo9pf - tinyurl.com/o97ysyx - https://tinyurl.com/Technote8

#### buffer_overfly

#13
##### Jul 30, 2015, 05:46 pm
It won't hurt the headphone outputs to have higher impedances on them.
I'm more concerned about the mic input. It is a very expensive board, and it was taylor-made to the mic included in the package (a really small electret one). It already has a 1k resistor in the path to the pre-amp that I can't remove. So loading it with more resistors in the range of kOhms doesn't look like a good idea. I will try with a buffer op-amp. The hack works without it as for now, but what if it breaks under some unexpected power condition.

No battery is necessary.
With the extra resistors, the original DC offset is affected. It should be 0.5V minimum. So I'm pumping some 1.2V of DC offset after R2. Maybe with the op-amp this is no longer needed? Will scope ASAP to see what's going on.
The competent programmer is fully aware of the strictly limited size of his own skull...(E.W.Dijkstra) (dammit only 140 chars?)

#### polymorph

#14
##### Jul 30, 2015, 06:25 pm

If it has a 1.2k resistor from 3V, and the voltage on the microphone is about 1.5V, then replacing it with a 1.2k resistor will be exactly replacing it.

Your resistor Rx from Vm to MIC is changing the circuit.

By the way, it is convention to have signal flow left-to-right.

Headphone - 47k resistor - 10k pot - ground

Wiper arm of 10k pot - 10uF cap negative lead, then positive lead to MIC

MIC - 1.2k resistor - ground

Sorry I have no simple way to sketch and upload this right now.
Steve Greenfield AE7HD
Drawing Schematics: tinyurl.com/23mo9pf - tinyurl.com/o97ysyx - https://tinyurl.com/Technote8