Biasing a transistor and emulating a electret microphone - Page 1
Forum section: electronics / beginners

author: Sudo_apt-get_install_yum
author_rank: Regular Contributor
timestamp: November 13, 2020, 06:29:31 pm
content: Hello everyone!I have been trying to build a simple digital signal processor after a course in discrete time systems but hit a roadblock that I cant find a "clean" solution to solve the issue.The processor I'm using outputs a variable analog voltage signal with a DC offset (0-3.3V). I would like to adjust the signal output so I can input it to my computers sound card.The sound card has an electret microphone input (DC supply with high impedance) and the electret microphone (JFET) pulls the supply to ground depending on the sound level.The microphone supply varies between 1.1-2.2VDC depending on the computer/ sound card.The problem is that I'm not sure how ill bias the transistor so that I utilize the full vertical resolution of the microphone input (0-V_audio). I'm using the scaling/amplification I have from the operational amplifier at the moment to test out the software. I would like to avoid this and have a more dynamic solution that does not require manual adjustment with a potentiometer.Could someone give me some feedback as to how to solve this in a elegant way.The output of the processor does not have any driving capability/ non buffered so some sort of buffer has to be used.Below is the test schematic and output of the test schematic.LEGEND:Blue = processor output/ input to circuit.Green = line voltage for microphone.Dark Blue = V_audio/ desired maximum voltage of green.

author: Zero999
author_rank: Super Contributor
timestamp: November 14, 2020, 12:25:40 pm
content: Why are you using the microphone, rather than the line input?The microphone input is a low level signal. The entire 1.1V to 2.2V range isn't used. It will clip if you inject a signal higher than around 50mV peak to peak.The values of R3 and R6 are more than 1000 too low. Try 150k for R6 and 1M for R3 and couple the signal from the op-amp, via a capacitor.Alternatively, why not simply use a J-FET? That will look exactly like an electrect microphone to the sound card. The signal level will probably be very strong, so it will need an attenuator, at the input.

author: Sudo_apt-get_install_yum
author_rank: Regular Contributor
timestamp: November 14, 2020, 01:44:09 pm
content: Why are you using the microphone, rather than the line input?The computers I have access to don't have line input. They are modern "micro desktops" that only have a 4-pole 3.5mm input jack. Where the only microphone input is for an electret microphone.The microphone input is a low level signal. The entire 1.1V to 2.2V range isn't used. It will clip if you inject a signal higher than around 50mV peak to peak.Ok, I might have misunderstood the way the electret mic is constructed but I though that the JFET just drags the high impedance DC signal to ground and having the "capacitor microphone" vary the current flow, resulting in a varying amplitude of the signal.The values of R3 and R6 are more than 1000 too low. Try 150k for R6 and 1M for R3 and couple the signal from the op-amp, via a capacitor.I tried this earlier and it sort of works, removing the dc component and biasing it through high value resistance but could not get a clean sine wave on the mic-line. It doesn't clip but get disrtorted at either end of the waveform. I'm not an audio gut but might not be pleasant with a chopped up sine? Bringing R6 down to ~200K gives of a relatively nice sine but results in amplitude loss on upper and lower part of the wave.R6 = 1M.R6 = 200K.Alternatively, why not simply use a J-FET? That will look exactly like an electrect microphone to the sound card. The signal level will probably be very strong, so it will need an attenuator, at the input.I was thinking of this as well but I don't have any JFETs at home and would have to order some. I will order some in the future but thought that I could use components I have at home as a start, thus the use of BJTs.Would something like this work? I haven't used JFET that much.

author: Zero999
author_rank: Super Contributor
timestamp: November 14, 2020, 02:05:28 pm
content: Quote from: Sudo_apt-get_install_yum on November 14, 2020, 01:44:09 pmYou're correct, but the amplitude is only tens of mV, even at very high sound levels. Refer to a data sheet for an electrect microphone capsule. Note the sensitivity is 6.3 mV/Pa. 1 Pa (pascal) is a sound pressure of 94dB.http://www.farnell.com/datasheets/2623021.pdfhttps://www.analog.com/en/analog-dialogue/articles/understanding-microphone-sensitivity.htmlQuoteYou're overdriving it, hence the distortion.QuoteR2 isn't doing anything. If anything it should go to 0V. Again, you're overdriving it.

author: Sudo_apt-get_install_yum
author_rank: Regular Contributor
timestamp: November 14, 2020, 04:44:27 pm
content: Ok, so i assume i no longer want something similar to the pic below (going from 0V to V_audio) and instead want a signal scaled to ex. 20mV pk-pk dragging the V_audio down to V_audio - Vpk. How would i go about this?

author: ucanel
author_rank: Regular Contributor
timestamp: November 14, 2020, 05:17:54 pm
content: Not the answer you asked for but as an alternative solutionyou may easily modify and use an usb microphone.

author: Zero999
author_rank: Super Contributor
timestamp: November 14, 2020, 06:35:47 pm
content: Quote from: Sudo_apt-get_install_yum on November 14, 2020, 04:44:27 pmA biasing resistor is required between node #4 and 0V.V1 is far too high. Reduce it by a factor of 1000, or do so with a potential divider.

author: Sudo_apt-get_install_yum
author_rank: Regular Contributor
timestamp: November 14, 2020, 07:21:20 pm
content: Thanks, i have no way at the moment to test this in reality but i get the hang of the idea. I though that i had to have a DC offset in the pulling down of the microphone signal level rather then just lowering it to the levels i need. I assume that the sound card just eliminates the DC offset and applies whatever gain is necessary to get maximum vertical resolution.Pk-Pk voltage is ~1mV il adjust it if it is to low for the sound card.Below is the simulated result and schematic.