Thursday, May 26, 2016

Headphone/Microphone Combo Jack

The notebook computers nowadays tend to have only one audio jack, a headphone and microphone combo.  It has four connections and requires a 4-ring 3.5mm plug.  The pinouts are as follows




1. Tip - Left audio
2. Ring 1 - Right audio
3. Ring 2 - Ground
4. Sleeve - Microphone

The measurements on a computer show that Pin 4 is +3.6V relative to Pin 3 and can supply 1.86mA (equivalently about 2KOhm pullup),  Pin 1 to Pin 3  and Pin 2 to Pin 3 are 32 Ohms (this is surprisingly low).  When the common earphone is plugged, the sleeve is shorted to the ground, and the earphone works normally.  But a normal microphone usually has only two connection, the tip and the sleeve, so it would not work.  A 4-ring splitter is needed.  Only one audio input channel (mono) is possible.  The voltage on the sleeve is to supply the FET amplifier in an electret condenser microphone.

The audio input and output are sometimes useful as a signal generator and a data acquisition channel.  The frequency response is usually 20Hz - 20KHz.   The output can be up to 24 bits at 192KHz and the input up to 24 bits at 96KHz.  They usually have excellent noise characteristics.

Here is a 1000Hz sine wave generated by the PC headphone output with 48KHz sample rate and captured in by a NI DAQ module at 100KHz sample rate.  All this can be done in Python, using the sounddevice and PyDAQmx modules.  The volume control affects the amplitude; +/-2V seems to be the range for my computer.


And 0.2Vpp 1KHz sine wave captured by the microphone at 48000 samples per second, 
The microphone input seems to saturate around 0.4Vpp.  And the input should be AC coupled.

Sunday, May 22, 2016

Ideal Transistor

The basic solid state amplification devices are bipolar, JFET and MOSFET transistors.  All of them can be considered as transconductance device, which is a current source controlled by a voltage.

A bipolar transistor has a diode input structure: the input voltage between the base and the emitter sees a small signal resistance of $ V_T/I_b $, where $ V_T= kT/q $ is the thermal voltage, about 26mV at the room temperature and the $I_b$ is the base bias current, usually in the 10$\mu$A range, so the resistance $r_b$ is about $2.6K \Omega$.   A voltage $v_{be}$, that generates $i_b = v_{be}/r_b$, would cause a collector-emitter current $i_c = \beta i_b = \beta v_{be}/r_b$; so the transconductance is $g_m = \beta/r_b$. With $\beta$ around 100, the transductance is about 40mA/V. Another way to look at it is an ideal transistor with $r_e = 1/g_m$ at its emitter. An ideal transistor is to have an infinite transconductance, which implies that $v_{be}$ approaches zero.  Let's use this model for the three basic amplifier configurations.  The gain of the common-emitter amplifier with emitter degeneration, $- R_C/(r_e + R_E)$. $r_e$ is about $25 \Omega$, which is generally much less than $R_E$, so the gain simplifies to $-R_C/R_E$, independent of the transistor parameters.  For the common-collection amplifier or the follower, the gain is a simple voltage divider, $R_E/(r_e + R_E) = 1/(1 + r_e/R_E) \approx 1$.  For the common-base amplifier, the gain is $r_e/R_C$.

Now we have raised the concept of an ideal transistor, let's be more clear.  The transconductance is infinite.  Because we have been using the small-signal model, which is a linearized model around the bias point, we have ignored the biasing.  An ideal transistor would require no biasing, no input current into the base  and the emitter current is bi-directional, flowing both in and out the emitter.   Such an ideal transistor has been approximated by an integrated circuit that is called an operational transconductance amplifier (OTA) or a diamond transistor.   One example is Burr-Brown (TI)'s OPA860.  It has a high impedance input as the base and a bi-directional emitter and requires no bias.  The transconductance is adjustable, but is around 100 mA/V or equivalently $r_e = 10 \Omega$.  So the transconductance gain is not quite infinite, but $r_e$ is small enough compared to $R_E$.