eel 4924 electrical engineering design final report · university of florida eel 4924—spring 2012...
TRANSCRIPT
EEL 4924 Electrical Engineering Design
Final Report
J & J Mic Pre
25 April 2012
Team Members:
Jordan Leslie & Joshua Levy
University of Florida EEL 4924—Spring 2012 25-April-12 Electrical & Computer Engineering
Page 2/18 Abstract: J & J Mic Pre
Project Abstract:
Our project consists of an all analog microphone preamplifier with two channels, two Direct
Inputs, and a regulated power supply. A “mic pre” will amplify the voltage of an electrical signal
provided by the microphone to a usable level. In our design we will provide enough gain to bring the
signal to the professional audio reference of 1.23 Vrms also known as “line level”. The first channel
will consist of a custom designed discrete op amp circuit with a Mic Input Transformer and Output
transformer and the second channel will be an “industry standard” design, such as an In-Amp, for
comparative purposes and also for user flexibility. The Direct Inputs transform the high impedance of
an instrument, ex. Bass guitar, to a low impedance to be used with a mic pre. We provided the option of
using either a singular JFET stage with gain or a standard non-inverting TL072 stage with gain. We
designed a separate power supply which will run from a 120VAC wall outlet, so we will convert the
signal into a dual polarity DC source through a power transformer and regulate the voltage to provide
steady and clean power to the active circuitry. It will also be providing the +48 V necessary to power a
condenser microphone when using the mic pre. In addition, to allow the user to intimately hear the
amplified signal, we will also design a headphone amplifier that monitors the direct output of the mic
pre.
University of Florida EEL 4924—Spring 2012 25-April-12 Electrical & Computer Engineering
Page 3/18 Abstract: J & J Mic Pre
Table of Contents:
Introduction___________________________________________________________________page 4
Features______________________________________________________________________page 4
Technical Objectives and Considerations ___________________________________________ page 4
Standard Preamplifier Image _____________________________________________________page 5
JandJ Preamplifier & Power Supply Image__________________________________________page 5
Concept/Technology Selection____________________________________________________page 6
JandJ Mic Pre Discrete Op Amp__________________________________________________ page 7
JandJ Meter Driver Discrete Op Amp_______________________________________________page 8
Block Diagram________________________________________________________________ page 9
Cost Objective ________________________________________________________________ page 9
Gantt Chart___________________________________________________________________ page 9
Appendix A-Board Layouts____________________________________________________page 10-12
Appendix B-Matlab Noise Code________________________________________________page 13-18
University of Florida EEL 4924—Spring 2012 25-April-12 Electrical & Computer Engineering
Page 4/18 Abstract: J & J Mic Pre
Introduction: In the world of professional studio gear, mic pres rein king. It is extremely important to get the
sound from the artist to some recording medium as clear and clean as possible to capture all the sonic
characteristics as if the listener were there with the artist. Since the microphone signals are nominally
too low to be utilized by units such as mixers and recording devices, the mic pre increases their signals
to a level required by these devices by providing stable gain while preventing induced noise that could
potentially distort the signal.
As this is the design objective of most mic pres, some users still claim each mic pre adds certain
coloration to the sound or even has its own characteristics. So we wanted to make a design that is
completely ours, by starting with designing our own discrete op-amp to be used in the mic pre and then
comparing to an “industry standard” mic pre channel that will use readily available op amps.
Features:
The J&J Mic Pre will have multiple features. The list is as follows:
Dual channel with phantom power option, -20 dB option, and phase option
Channel 1 Mic input and output transformer
Channel 2 In-Amp: Actively unbalanced input and balanced output
Two Direct Inputs with gain: Single JFET circuit and TL072 circuit
Ability to utilize dynamic and condenser microphone
High fidelity gain
Real-time headphone monitoring with RCA input for solo use
Regulated power supply
Technical Objectives and Considerations:
The main objective of our project is to design a low-noise mic pre and a power supply.
First objective is transforming the source impedance from a microphone to an optimal input
impedance for the mic pre, which is where the mic input transformers would come in which also
have a Common Mode Rejection Ratio far above what any active input channel can achieve.
Second objective is the design of a discrete op amp in which
o Common Mode Rejection Ratio
o Equivalent Input Current/Voltage Noise
o Bandwidth
o Voltage Offset
o Slew Rate
must be optimized.
Part selection
o High beta audio and power transistors
o Low ESR electrolytic, NP0/COG, and high quality polypropylene capacitors
o 1% metal film resistors
o Dual and single gang audio taper and/or reverse audio taper potentiometers
o XLR and phone connectors both male and female
o Transformers both power supply and mic pre input and output
AC coupling vs. DC coupling
Thermal consideration in output stages and in voltage regulators
Shielding via enclosures and appropriate wiring techniques
Proper Grounding Techniques(Star grounding)
PCB design
University of Florida EEL 4924—Spring 2012 25-April-12 Electrical & Computer Engineering
Page 5/18 Abstract: J & J Mic Pre
Figure 1: Standard layout of a mic preamp
Figure 2: JandJ Mic Pre & Power Supply
University of Florida EEL 4924—Spring 2012 25-April-12 Electrical & Computer Engineering
Page 6/18 Abstract: J & J Mic Pre
Concept/Technology Selection:
The concepts we need to consider first are the basic op amp configurations and their
specifications such as equivalent input voltage and current noise, compensation, and bandwidth. We will
implement different topologies such as the standard 2-stage, current mirror, and folded cascode, and
compare them to one another. We can use IC op-amp design limitations, such as small bias currents,
forced to use many active devices(more noise susceptibility) because of area constraints(passive
components on chip are very large), and cannot drive small resistive loads well or at all, ie; connecting
to a output transformer or headphones. With discrete transistors we could utilize higher bias currents for
lower noise and higher bandwidth and could use low noise metal film resistors which we can buy
precise values and also purchase super matched differential pairs for the input stage. Also we can use
power transistors for the output stage and do not have to worry about size constraints of compensation
capacitor or compensation networks.
So while selecting discrete transistors, we need to ensure the Beta’s in the differential pair are
closely matched to ensure high fidelity gain by increasing the common mode rejection ratio which is
solved by the MAT12 matched differential pair in our design. We will be using a high quality input
transformer to not only transform the source impedance, but to convert the differential signal from the
microphone to a singled ended with the highest CMRR. This is expensive so only one channel will
utilize this, while the second channel will unbalance the signal using an instrumentation amplifier
configuration while still maintaining relatively high CMRR if resistors are matched closely.
Other technologies were explored and implemented such as a JFET discrete transistor to provide
gain to an instrument and also adding an output buffer to decrease the output impedance. Also a non-
inverting TL072 monolithic amp with a JFET differential pair was also explored and implemented. The
high input impedance of the JFET and the differential JFET pair of the TL072 make these devices
exceptional for use with high source impedances such as bass guitars, synthesizers, and other high
impedance instruments.
When considering the power supply design, obviously provided the +48V phantom power would
require additional circuitry to increase the voltage to a level that can then be regulated down to the
+48V. So the Cockroft-Walton voltage doubler was used to increase the voltage from the positive
waveform of the AC signal.
University of Florida EEL 4924—Spring 2012 25-April-12 Electrical & Computer Engineering
Page 7/18 Abstract: J & J Mic Pre
Figure 3: JandJ Discrete Op-Amp
Figure 4: Phase Margin(59 degrees)
University of Florida EEL 4924—Spring 2012 25-April-12 Electrical & Computer Engineering
Page 8/18 Abstract: J & J Mic Pre
Figure 5: JandJ Discrete Current Mirror Op Amp(Meter Driver)
Figure 6: Phase Margin(64 degrees)
University of Florida EEL 4924—Spring 2012 25-April-12 Electrical & Computer Engineering
Page 9/18 Abstract: J & J Mic Pre
Block Diagram:
Figure 3: Block Diagram of Final Product
Cost Objectives: Parts: $450
Board Mills: $300
Enclosure: $250
We roughly stayed within our budget of $1000.
Gantt Chart:
University of Florida EEL 4924—Spring 2012 25-April-12 Electrical & Computer Engineering
Page 10/18 Abstract: J & J Mic Pre
Appendix A-Altium Layouts
Power Supply
Regulation Board
University of Florida EEL 4924—Spring 2012 25-April-12 Electrical & Computer Engineering
Page 11/18 Abstract: J & J Mic Pre
Headphone Amplifier and Meter Driver
In-Amp, JFET DI, TL072 DI
University of Florida EEL 4924—Spring 2012 25-April-12 Electrical & Computer Engineering
Page 12/18 Abstract: J & J Mic Pre
Discrete Op-Amp Channel w/Input & Output Transformers
JandJ Discrete Op-Amp
University of Florida EEL 4924—Spring 2012 25-April-12 Electrical & Computer Engineering
Page 13/18 Abstract: J & J Mic Pre
Appendix B-Matlab Noise Code
3 APPENDIX
Matlab Code: function [E_NI]=CE_AMP_DEGEN(Rs, R_E1)
%The the goal of this m-file is to calculate and plot various quantities %associated with noise performance of the Common-Emitter Amplifier with %Emitter Degeneration. There is an assumed (single supply) power supply %voltage of Vcc. (Initial value for Vcc=18V).
%The BJT is biased using the "4 resistor bias method" where the emitter %resistor, R_E, is broken up into two pieces: R_E1 and R_E2, where R_E2 is %bypassed with capacitor C2. The input and load are coupled through %capacitors C1 and C3 respectively. R_S is the source resistance (thevenin %equivalent of the signal source). R_L is the load resistance.
%VB, VE, and VC are the DC bias voltages at the base, the emitter, and the %collector, respectively.
%IB, IE, and IC are the DC bias currents at the base, the emitter, and the %collector, respectively. VBE is the bias base-emitter voltage drop, %nominally 0.6V.
%The base of the transistor is biased through R_B1 and R_B2. Although, %if IB is small, R_B1 and R_B2 are approx a voltage divider, we will use %a thevenin model (as in Sedra/Smith) to make this program work under more %general conditions (such as small beta).
%H_FE is the small signal CE current gain for the BJT under test %alpha is the small signal CB current gain for the BJT, and should be ~1.
%% Small-signal and noise parameters will be defined later on in the program
%clear all;
Vcc=18; %Power Supply Voltage H_FE = 300; %BJT H_FE VBE = 0.6; VCE_SAT=0.3; %Assume BJT saturates when VCE = VCE_SAT T=300; %Temperature, 300K is assumed room temp k=1.3806488E-23; %Boltzmann's constant q=1.59E-19; %elementary charge VT = k*T/q; %thermal voltage VA = 100; %Early voltage of BJT %Rs = 600; %Common source impedance of professional microphone Rx = 10; %Base spreading resistance
f_l = 3.7e3; %F_L comes from page 113 of Motchenbacher and Connelly %is the flicker noise constant. Takes on values from %3.7KHz to 7MHz. Is representative of noise corner freq %BUT does not exactly match it Gamma_flicker = 1; %Another constant related to flicker noise
University of Florida EEL 4924—Spring 2012 25-April-12 Electrical & Computer Engineering
Page 14/18 Abstract: J & J Mic Pre
%Noise bandwidth parameters (NOT THE SAME AS 3Db BANDWIDTH) f_high = 20e3; %Noise bandwidth upper limit f_low = 20; %Noise bandwidth lower limit
R_B1=20E3; R_B2=R_B1/2; %R_E1=200; %Formula to keep 2/3 voltage above the emitter %resistors. This allows the circuit to be divided up %evenly into three equal sections. Vcc - Vcollector, %VCE, and Vemitter - ground R_E2=R_E1/20; R_C=(R_E1 + R_E2)*1.5; R_L = 1E6;
RE_TOTAL = R_E1 + R_E2;
%% DC Bias Calculations:
VTHEV = Vcc*(R_B2)/(R_B2 + R_B1); RTHEV = R_B1*R_B2/(R_B1 + R_B2); %Rthev is parallel combination
num= (VTHEV - VBE)/RE_TOTAL; den= (1 + (RTHEV)/((H_FE + 1)*RE_TOTAL));
IE = num/den; IB = IE/(H_FE + 1); IC = H_FE*IB;
VB = VTHEV - IB*RTHEV; VE = VB - VBE; VC = Vcc - IC*R_C; VCE = VC - VE;
Saturation_Flag = VCE > VCE_SAT; %boolean flag in case BJT not in active region %should be a 1 if active region
%% Calculate Small-Signal Parameters
gm=IC/VT; %small-signal transconductance of BJT
r_pi = H_FE/gm; %small-signal hybrid pi model resistance looking into %base of grounded CE amp
r_e = r_pi/(H_FE + 1); %small-signal resistance looking into emitter of %grounded common-base amplifier
r_o = VA/IC; %small signal output resistance of grounded CE amp
IC = IC*Saturation_Flag; %Check to see if in active region
%% Small Signal Circuit Parameters
Gm = gm/(1 + gm*R_E1); %Total transconductance of CE Amp with degen
University of Florida EEL 4924—Spring 2012 25-April-12 Electrical & Computer Engineering
Page 15/18 Abstract: J & J Mic Pre
%rin_amp is the resistance seen looking into base of CE Amp with degen rin_amp = r_pi + (H_FE + 1)*R_E1; %R_into_emitter is the resistance seen looking up towards the emitter from the %capacitor branch attatched between R_E2 and R_E1 in which is ultimately in %parallel with R_E2 when fiding the effective resistance seen by C2 R_into_emitter = (r_e + (RTHEV*Rs/(RTHEV + Rs))/(H_FE + 1)); %rout_amp is the resistance seen looking back into the collector which is %ultimately in parallel with RC. r_stuff = r_pi + Rx + (RTHEV*Rs)/(RTHEV + Rs); %From derivation of output
resistance rout_amp = (R_E1*r_stuff)/(R_E1 + r_stuff) + r_o*(1 + gm*((r_pi*R_E1)/(r_stuff +
R_E1)));
Rin = (RTHEV*rin_amp)/(RTHEV + rin_amp); InputVoltageDivider = Rin/(Rs + Rin);
%From the simplified version in Dr. Fox's notes: rout_amp_check = r_o*(1 + H_FE*R_E1/(R_E1 + Rs + r_pi));
rout_amp_MAX = H_FE*r_o; %The output resistance of a BJT is limited by finite
H_FE % This is the approximate max value possible % Provided by Fox, derived using Blackman's % impedance formula
RL_EQ = ((1/R_C) + (1/R_L) + (1/rout_amp))^(-1);
VoltageGain = -1*InputVoltageDivider*Gm*RL_EQ; %passband gain of amplifier
R_L_EQUIV = (((rout_amp*R_C/(rout_amp + R_C)))*R_L)/(((rout_amp*R_C/(rout_amp +
R_C))) + R_L);
Av = -1*InputVoltageDivider*Gm*R_L_EQUIV; %Overall voltage gain of CE amp with
degen
%% Time Constant Analysis
% Necessary in order to choose capacitor size. We will use this analysis to % also determine where the most capacitance is needed in the circuit.
%Parameters need to account for worst case scenarios in order to pass the %desired bandwidth through the circuit. In this example, we are interested %in the audio band 20Hz through 20KHz.
f_3dB = 20; %Roll-in frequency desired in Hz Rs_worst = 0; %Resistance seen from the source. Worst case = 0 R_L_worst = 0;
Rc_EFF1 = (Rs_worst + (RTHEV*rin_amp)/(RTHEV + rin_amp)); Rc_EFF2 = (R_E2 * (R_E1 +R_into_emitter))/(R_E2 + (R_E1 + R_into_emitter)); Rc_EFF3 = ((R_C*rout_amp)/(R_C + rout_amp)) + R_L_worst;
tau_TOT = 1/(2*pi*f_3dB);
%Choose input and output capacitors to each be .1uF. This is a standard in %audio circuitry. Then solve for the remaining C2 value
University of Florida EEL 4924—Spring 2012 25-April-12 Electrical & Computer Engineering
Page 16/18 Abstract: J & J Mic Pre
C1 = 1e-7; C3 = C1;
tau1 = C1*Rc_EFF1; tau3 = C3*Rc_EFF3; tau2 = tau_TOT - tau1 - tau3;
C2 = tau2/(Rc_EFF2)
%% Noise Analysis
%Define all the noise generator of the system.
R_s = 600; %New source impedance used to find nominal voltage %noise from the source. Nominally 600 ohms (microphone)
%Thermal Noise E_t = sqrt(4*k*T); %RMS noise voltage/current in 1Hz of bandwidth in %V/(Hz^.5). Multiply by the square root of the %effective resistance for voltage, divide by the %square root of the effective resistance for current
%Low Frequency Noise (Flicker noise) flicker_numerator = 2*(q*f_l*IB)^Gamma_flicker; %I_f_squared = flicker_numerator/f; %Units of Amps^2/Hz, f is a variable
I_f_noise_power_integrated = flicker_numerator*log(f_high/f_low); %Units of Amps^2
I_f_noise_current=sqrt(I_f_noise_power_integrated); %units of amps
%Shot Noise %I_sh = (2*q*I_dc)^.5 %RMS
%Noise due to RTHEV resistors referred to output R_LEQ = (r_o*(R_L*R_C/(R_L + R_C))/(r_o + (R_L*R_C/(R_C + R_L)))); temp1 = (R_s*(Rx + rin_amp))/(R_s + (Rx +rin_amp)); E_NO1 = (E_t*(RTHEV^.5))*(temp1/(temp1 + RTHEV))*(Gm*(R_LEQ));
%Noise due to Source Resistance referred to output temp2 = (RTHEV*(Rx + rin_amp)/(RTHEV + (Rx + rin_amp))); E_NO2 = (E_t*(R_s^.5))*(temp2/(temp2 + R_s))*(Gm*(R_LEQ));
%Noise due to base spreading resistance referred to output temp3 = (R_s*RTHEV)/(RTHEV + R_s); E_NO3 = (E_t*sqrt(Rx))*(rin_amp/(temp3 + Rx + rin_amp))*(Av);
%Noise due to the flicker noise current referred to output %NOTE: I_NO4 is the INTEGRATED (RMS) noise voltage at the output due to %flicker noise: it has already been integrated over freq so should not be %scaled by the noise bandwidth (or root-bandwidth) like the noise-voltage %density terms above (V_NO1 to V_NO3). Thus, we are prescale the flicker %noise term by 1/sqrt(f_high - f_low) temp4 = temp3 + Rx + R_E1;
University of Florida EEL 4924—Spring 2012 25-April-12 Electrical & Computer Engineering
Page 17/18 Abstract: J & J Mic Pre
temp5 = ((temp4)/(1 + (temp4/r_pi) + (R_E1/r_pi) + gm*R_E1)*(gm*(R_LEQ))); E_NO4 = temp5*I_f_noise_current/sqrt(f_high-f_low);
%Noise due to the shot noise of the total base current I_dc = IB; %Direct current into base in Amps I_shot_base = sqrt(2*q*I_dc); E_NO5 = temp5*I_shot_base;
%Noise due to R_E1 referred to output temp6 = 1/(1+(RTHEV + Rx)/r_pi + R_E1/r_pi + gm*R_E1); E_NO6 = (E_t*sqrt(R_E1))*temp6*(gm*R_LEQ);
%Noise due to shot noise of the total collector current E_NO7 = sqrt(2*q*IC*R_LEQ);
%Noise due to R_LEQ referred to the output E_NO8 = E_t*sqrt(R_LEQ);
% Transistor Equivalent Input Noise Calculations figure(4) NOISE_VEC = 1e100*[E_NO1^2 E_NO2^2 E_NO3^2 E_NO4^2 E_NO5^2 E_NO6^2 E_NO7^2
E_NO8^2]; pie3s(NOISE_VEC,'Labels',{'Thevenin R','Source R','Base-Spread R','Flicker
Noise','Shot Noise Base','Emitter R','Shot Noise Collector','Load R'});
%Resulting output noise voltage TOT_NOISE = (E_NO1^2 + E_NO2^2 + E_NO3^2 + E_NO4^2 + E_NO5^2 + E_NO6^2 + E_NO7^2 +
E_NO8^2); E_NO = sqrt(TOT_NOISE);
E_NI = sqrt(E_NO^2/Av^2); %Total amplifier noise voltage at input
%In order to find the noise voltage and current model, an expression for %the total E_NI^2 needs to be found in the absence of source noise. By %definition, this yeilds E_N^2 of the transistor noise model E_N1 = (E_t*(RTHEV^.5))*(R_LEQ/(R_LEQ + RTHEV))*(Gm*(R_LEQ));
E_N3 = (E_t*sqrt(Rx))*(rin_amp/(RTHEV + Rx + rin_amp))*(Av);
temp4a = RTHEV + Rx + R_E1; temp5a = ((temp4)/(1 + (temp4a/r_pi) + (R_E1/r_pi) + gm*R_E1)*(gm*(R_LEQ))); E_N4 = temp5a*I_f_noise_current/sqrt(f_high-f_low);
E_N5 = E_NO5; E_N6 = E_NO6; E_N7 = E_NO7; E_N8 = E_NO8;
E_N = sqrt(E_N1^2 + E_N3^2 + E_N4^2 + E_N5^2 + E_N6^2 + E_N7^2 + E_N8^2);
%The other parameter of the transistor noise model is obtained by assuming %the the source resistance(R_s) is very large. Then by dividing each term by %R_s^2, we obtain the I_N^2 parameter
University of Florida EEL 4924—Spring 2012 25-April-12 Electrical & Computer Engineering
Page 18/18 Abstract: J & J Mic Pre
I_N = sqrt(2*q*IB + 2*q*I_f_noise_current/sqrt(f_high-f_low) + 2*q*IC);
Ro_OPT = E_N/I_N;
%Check that the sum of E_N and I_N is equal to E_NI
E_NI E_NI_CHECK = sqrt(E_N^2 + I_N^2);