Author Topic: Building a sound mixer within my guitar amp with line IN & mic input  (Read 12354 times)

0 Members and 1 Guest are viewing this topic.

Offline dazzTopic starter

  • Frequent Contributor
  • **
  • Posts: 304
  • Country: es
Re: Building a sound mixer within my guitar amp with line IN & mic input
« Reply #50 on: June 05, 2019, 11:22:40 am »
I think you'll struggle to get that circuit to run down to 9V, because you won't be able to get the voltage across the collector resistors to fall within the TL72's common mode range, at low voltages.

You could replace the emitter resistors with constant current sources: try 1mA. See link below. Note that the diodes and resistor provide a reference voltage, which can be used for both current sources.
http://www.ecircuitcenter.com/Circuits_Audio_Amp/BJT%20Current_Source/BJT_Current_Source.htm

I hope you can see why I suggested an IC, for simplicity's sake, but you won't learn so much and it'll still work out more expensive.

Yes, learning is priority #1. I might use the IC for the actual amp eventually, but I'm definitely building this preamp.

Probably a silly question, but can't I take the opamp inputs from the PNP emitters instead of the collectors where the voltage is close to Vref? I'm guessing the pnp stage needs to be emitter followers to act as buffers for impedance reasons maybe? I'm going nowhere until I understand bjt's reasonably well, so I'm going to address that before I continue messing with this circuit
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19986
  • Country: gb
  • 0999
Re: Building a sound mixer within my guitar amp with line IN & mic input
« Reply #51 on: June 05, 2019, 12:42:09 pm »
I think you'll struggle to get that circuit to run down to 9V, because you won't be able to get the voltage across the collector resistors to fall within the TL72's common mode range, at low voltages.

You could replace the emitter resistors with constant current sources: try 1mA. See link below. Note that the diodes and resistor provide a reference voltage, which can be used for both current sources.
http://www.ecircuitcenter.com/Circuits_Audio_Amp/BJT%20Current_Source/BJT_Current_Source.htm

I hope you can see why I suggested an IC, for simplicity's sake, but you won't learn so much and it'll still work out more expensive.

Yes, learning is priority #1. I might use the IC for the actual amp eventually, but I'm definitely building this preamp.

Probably a silly question, but can't I take the opamp inputs from the PNP emitters instead of the collectors where the voltage is close to Vref? I'm guessing the pnp stage needs to be emitter followers to act as buffers for impedance reasons maybe? I'm going nowhere until I understand bjt's reasonably well, so I'm going to address that before I continue messing with this circuit
The propose of the two PNP transistors is to boost the signal before the op-amp. The transistors are less noisy, than the op-amp so using them to amplify the signal before, improves the noise figure.

Taking the signal from the emitters would be pointless, because there is no voltage gain at that point: look up emitter follower.
 

Offline dazzTopic starter

  • Frequent Contributor
  • **
  • Posts: 304
  • Country: es
Re: Building a sound mixer within my guitar amp with line IN & mic input
« Reply #52 on: June 05, 2019, 12:54:30 pm »
The propose of the two PNP transistors is to boost the signal before the op-amp. The transistors are less noisy, than the op-amp so using them to amplify the signal before, improves the noise figure.

Taking the signal from the emitters would be pointless, because there is no voltage gain at that point: look up emitter follower.

Yes, I know what an emitter follower is, but I'm only familiar with npn transistors and thought this was a common emitter job.  :palm:

I noticed something in the simulation: the dc bias at the opamp inputs is imbalanced, and that is what seems to be causing the distortion (see pic 1)

So I tweaked the value of one of the emitter resistors (from 15k to 20k) until I got pretty much the same dc voltage at the opamp inputs. The distortion is gone completely and the gain skyrocketed too! (see pic 2) Why would the gain increase so much?

I have no idea what I'm doing. LOL. Would a trimpot there be a good idea? Changing the Vref voltage didn't seem to help
 

Offline dazzTopic starter

  • Frequent Contributor
  • **
  • Posts: 304
  • Country: es
Re: Building a sound mixer within my guitar amp with line IN & mic input
« Reply #53 on: June 05, 2019, 10:07:22 pm »
OK, I think the solution above was flawed. How about adding a cap like the one shown below? That seems to work fine, I get lots of gain with a few resistor tweaks so no need for another amplification stage.

Well, I got the transistors today, so time to start prototyping this thing and do some actual tests.
« Last Edit: June 05, 2019, 10:10:08 pm by dazz »
 

Online magic

  • Super Contributor
  • ***
  • Posts: 7235
  • Country: pl
Re: Building a sound mixer within my guitar amp with line IN & mic input
« Reply #54 on: June 05, 2019, 10:31:45 pm »
I'm currently designing an intercom system, using the NE5534 as a dynamic microphone pre-amplifier, simply because there's no point in using anything better.
Consider NJM2068, it's a dual, dirt cheap and very low noise - around 3nV/√Hz or so IIRC.
 

Offline Yansi

  • Super Contributor
  • ***
  • Posts: 3893
  • Country: 00
  • STM32, STM8, AVR, 8051
Re: Building a sound mixer within my guitar amp with line IN & mic input
« Reply #55 on: June 06, 2019, 08:49:08 am »
You absolutely have to have a C13 in there, if operating from single supply. However, its value shall be increased way above 1uF if you want to use electrolytics, which you want anyway, cause 1uF is just too low to have a decent bass response. Depending on the R14 in there, but I'd guess 22uF may be fine.

Output cap C5 shall be over 20uF also (even 47-100uF - not that uncommon to see).

The higher the value, the lower the AC voltage across it -> less distortion. And also less phase mangling at the lower end of audio spectrum.

And you are still MISSING the input EMI protection! Bypass both ends of C8 to ground using about 470pF caps and stick about 5 to 10 ohm resistor in series with both input pins.

C11 shall be at least 470uF! You need a very low impedance in between the emitters to obtain high gain and low distortion.

Use both C6 and C7 100uF.

Even your frequency plot shows the response on the low end is very inadequate for audio use. You can't have a -6dB roll-off on bass in a mixing desk.

I don't really see the value of Rop (R14, R18), but C9-C12 is likely limiting the frequency response upper end. There is no way this circuit would be that laze to chicken out at -3dB 20kHz.  You can't design audio this way. The frequency response shall be 50kHz+ to get the flattest possible response within 20Hz to those 20kHz.

Ain't nothing special analog mixing desks having bandwidths above 50kHz. It is to help to make transient responses better. Audio signal is not just a pretty sine-wave.  (But understand there is really not much point in pushing the response much further beyond say 70kHz, you will just welcome noise and spurious signal, that may mix on non-linearities in the circuit and cause a perceivable interference).

ALso, note the gain potentiometer shall be the C / Exponential type ("reverse log") for any practical use.
 
The following users thanked this post: dazz

Offline dazzTopic starter

  • Frequent Contributor
  • **
  • Posts: 304
  • Country: es
Re: Building a sound mixer within my guitar amp with line IN & mic input
« Reply #56 on: June 06, 2019, 11:21:05 am »
You absolutely have to have a C13 in there, if operating from single supply. However, its value shall be increased way above 1uF if you want to use electrolytics, which you want anyway, cause 1uF is just too low to have a decent bass response. Depending on the R14 in there, but I'd guess 22uF may be fine.

Output cap C5 shall be over 20uF also (even 47-100uF - not that uncommon to see).

The higher the value, the lower the AC voltage across it -> less distortion. And also less phase mangling at the lower end of audio spectrum.

And you are still MISSING the input EMI protection! Bypass both ends of C8 to ground using about 470pF caps and stick about 5 to 10 ohm resistor in series with both input pins.

C11 shall be at least 470uF! You need a very low impedance in between the emitters to obtain high gain and low distortion.

Use both C6 and C7 100uF.

Even your frequency plot shows the response on the low end is very inadequate for audio use. You can't have a -6dB roll-off on bass in a mixing desk.

I don't really see the value of Rop (R14, R18), but C9-C12 is likely limiting the frequency response upper end. There is no way this circuit would be that laze to chicken out at -3dB 20kHz.  You can't design audio this way. The frequency response shall be 50kHz+ to get the flattest possible response within 20Hz to those 20kHz.

Ain't nothing special analog mixing desks having bandwidths above 50kHz. It is to help to make transient responses better. Audio signal is not just a pretty sine-wave.  (But understand there is really not much point in pushing the response much further beyond say 70kHz, you will just welcome noise and spurious signal, that may mix on non-linearities in the circuit and cause a perceivable interference).

ALso, note the gain potentiometer shall be the C / Exponential type ("reverse log") for any practical use.

Thanks so much Yansi. I'll change all those cap values you mentioned. Some of them I have so low because it didn't make a difference in the simulation (on the top end) and I'm used to guitar designs where that kind of low end response is usually fine. I didn't know a higher capacitance will entail lower distortion (BTW, I just got the book you recommended  :-+)

Great to know that C13 is needed. I'll leave it there.

Rop (R14, R18) is up at 68k (from 22k) to increase the gain a tad, but I'll probably need to tweak that value once it's built to maximize gain without distortion.

The gain pot is indeed an antilog taper in the simulation. It just seemed to increase the gain much more evenly than the other tapers.
 

Offline Yansi

  • Super Contributor
  • ***
  • Posts: 3893
  • Country: 00
  • STM32, STM8, AVR, 8051
Re: Building a sound mixer within my guitar amp with line IN & mic input
« Reply #57 on: June 06, 2019, 11:47:07 am »
Coupling capacitors typically limit only the frequency response on the low-end of the spectrum.

With those 68k,  100pF is definitely the limiting factor (1/2piRC = 23.4kHz). If you want to keep the two feedback resistors 68k, then instead of 100pF I'd lower them to something more reasonable like 33pF. You just want to limit the bandwidth slightly to not allow for high frequency noise and spurious signal, but you do not want (nor need) to low pass filter the audio signal at 20kHz.

Regarding the Rop=68k: It seems your maximum gain of the preamp is over 70dB. That is way to high for this circuit (SNR will become bad with such gain). I  think you should lower the Rop somewhat so the maximum gain will be about 60dB, not more.

The typical input gain preamp in a mixing console may provide a gain of about 10 to 50dB with the 40dB range tunable by the gain pot. If you want more than 50dB gain, you can always crank other pots on the mixing desk, to get additional 10-15dB more ;)

The minimum gain is basically set by the gain of the differential amplifier (opamp) part of the circuit. However, 10dB minimum gain is too much to allow for a line level signal to be injected into the MIC input, hence why mixer desks always allow means for attenuation the input signal by  10 to 20dB. Typicaly, there is a switch "20dB PAD" on the input, or the more common way is to implement two types of connectors: XLR for MIC level and a JACK (called typically also TRS 1/4") that is wired so that it attenuates the signal whenever something is plugged in - typically, just resistors in series with the signal that form a voltage divider together with the input imepdance of the MIC amplifier (10-20kohm LINE input impedance).

Keep in mind that those LINE jacks are TRS (tip-ring-sleev, ie. "stereo" type in laymen terms), but are used to transfer also BALANCED signal. For stereo LINE signal you need two separate TRS jack inputs.
Typically, TIP is the HOT side (positive polarity), RING is COLD (negative) and sleeves the ground as is standard.

This configuration allows for plugging an UNBALANCED signal, using just a TS jack ("mono"), which shorts the COLD (negative) input to ground.

I would recommend you to really look for some mixing desk service manuals/schematics to get a better idea how do these operate internally.

I have never built a full diy mixing desk myself (if I would, I would do it in digital domain now, hihi - I like DSP stuff), but I would encourage to do it. I have only built several specialized blocks, for example a separate quad MIC preamp such as yours, to turn LINE level only inputs on my mixer to another four MIC inputs.
Even if it will not be very useful result for practical use, you will pretty much learn a lot of the stuff during the process, which is why I love electronics.


« Last Edit: June 06, 2019, 11:50:06 am by Yansi »
 
The following users thanked this post: dazz

Offline dazzTopic starter

  • Frequent Contributor
  • **
  • Posts: 304
  • Country: es
Re: Building a sound mixer within my guitar amp with line IN & mic input
« Reply #58 on: June 06, 2019, 12:06:39 pm »
Yeah, it was the 100pF caps that were cutting off the high end. Obviously.
If I lower Rop to 6k7 I get a nice 7 to 50dB range of gain and lots of highs. I'll start there as per your suggestion 🍻
 

Offline Yansi

  • Super Contributor
  • ***
  • Posts: 3893
  • Country: 00
  • STM32, STM8, AVR, 8051
Re: Building a sound mixer within my guitar amp with line IN & mic input
« Reply #59 on: June 06, 2019, 12:59:14 pm »
6k7 is a non-standard value, I'd round to 6k8, or even allow for slightly higher gain to fit to the 10dB minimum.

Also a tip - make the gain pot just 5k,  if you will increase the value further, the gain will not drop by much. Instead, it will make most of the turn of the pot do "nothing" and then the gain will go up. A don't forget to use the exponential (reverse log) type, with a linear one the gain can't be controlled nicely, as it will sharply peak just near the end of the turn.

If you will have troubles finding the reverse log ones (seen plenty on fleabay, Aliexpress and Tayda), you can of course use normal log one, however you need to wire it then so the gain is rising with turning counter-clockwise (which is not pleasant, but still better than a linear pot).
 

Offline Yansi

  • Super Contributor
  • ***
  • Posts: 3893
  • Country: 00
  • STM32, STM8, AVR, 8051
Re: Building a sound mixer within my guitar amp with line IN & mic input
« Reply #60 on: June 06, 2019, 01:12:29 pm »
The minimum gain is basically set by the gain of the differential amplifier (opamp) part of the circuit.

I just forgot to add this:

The resistor between the emitters of the PNPs define the differential gain of that stage. The single-ended gain of the transistor is still mostly the same (very low) due to the Rc/Re ratio being quite low.

If you make the resistor between emitters of the transistors large (ie, none is present, gain pot set to maximum resistance or disconnected), then what you get is just a two separate common-emitter amplifier stages with just low gain (defined by approx. Rc/Re), hence why the minimum gain is mostly defined by the opamp following the transistor amp stage.

By decreasing the gain pot resistance, you increase the differential gain of that stage. The single-ended gain of the circuit is still low (Rc/Re), hence why the stage has a good CMRR at very high gains.
 

Offline dazzTopic starter

  • Frequent Contributor
  • **
  • Posts: 304
  • Country: es
Re: Building a sound mixer within my guitar amp with line IN & mic input
« Reply #61 on: June 06, 2019, 01:27:02 pm »
Oops, that was a typo. I meant 6k8. I'll rise that to 8k2 or 10K. I get minimums of 10dB and 12dB respectively with those.
I see what you mean re: the gain pot. By lowering it's value it seems to perform more evenly across it's range. I don't have any C5k pots though

Thanks for the explanation of the common emitter gain stage, very helpful! So we get a high CMRR because the gain is low, and then we can "trick" the circuit to increase the gain by means of the resistor across the emitters. So you mentioned that's called emitter degeneration... off to google!

One thing I'd like to ask you if I may about those bandwidth considerations you mentioned, do those apply to the mixer or the mic preamp? IOW, Do I really need that wide of a bandwidth in my mic preamp? I see most dynamic mics have a bandwidth of 50Hz-15kHz or whereabouts.
 

Offline Yansi

  • Super Contributor
  • ***
  • Posts: 3893
  • Country: 00
  • STM32, STM8, AVR, 8051
Re: Building a sound mixer within my guitar amp with line IN & mic input
« Reply #62 on: June 06, 2019, 02:00:06 pm »
Yes, emitter degeneration. But also look for differential amplifiers* with two discrete transistors, that is where it gets interesting.

*discrete ones are also often called a  "long tailed pair".

You may also find this interesting & practical explanation from w2aew:


He does not explain the emitter degeneration though (zero ohms in between emitters).
A lot of it can be found on the web and again in interesting books from Douglas Self (Audio Power Amplifier Design) etc.
 
 

Offline Audioguru

  • Super Contributor
  • ***
  • Posts: 1507
  • Country: ca
Re: Building a sound mixer within my guitar amp with line IN & mic input
« Reply #63 on: June 06, 2019, 02:58:51 pm »
A Shure SM-58 vocals mic has its frequency response rise above 2kHz for "presence" then a sharp dropoff above 12kHz. Most people who have been deafened by sounds too loud and who are used to hearing a muffled AM radio think it sounds live. You do not want to cut high frequencies any more. If your first-order lowpass filter has a -3dB (half the power) cutoff at 20kHz then it is flat up to only 4kHz.

When you increase the voltage gain of a transistor then you also increase its distortion. Negative feedback can be as simple an unbypassed emitter resistor reduces the gain and also reduces the distortion.
 
The following users thanked this post: cpt.armadillo

Offline dazzTopic starter

  • Frequent Contributor
  • **
  • Posts: 304
  • Country: es
Re: Building a sound mixer within my guitar amp with line IN & mic input
« Reply #64 on: June 06, 2019, 03:19:57 pm »
Crystal clear. I think this should do. Added the EMI protection components too, so I think I'm finally ready for the build
 

Offline dazzTopic starter

  • Frequent Contributor
  • **
  • Posts: 304
  • Country: es
Re: Building a sound mixer within my guitar amp with line IN & mic input
« Reply #65 on: June 06, 2019, 03:29:01 pm »
Oh, one more question please. Is it OK to use a LM358 instead of the TL082? The reason is that the LM358 goes all the way down to 0V, so it seems to work for lower supply voltages without distorting.
The reason to pick the tl082 is noise, right? I'll put a socket to try both
 

Offline Yansi

  • Super Contributor
  • ***
  • Posts: 3893
  • Country: 00
  • STM32, STM8, AVR, 8051
Re: Building a sound mixer within my guitar amp with line IN & mic input
« Reply #66 on: June 06, 2019, 04:17:22 pm »
358 is utter crap. For a test, you may try. But for a final application, hell no. I would not go less than NE5532. (TL07x may be also an acceptable choice, if 20V is all you have).

//this may not seem clear to a novice, but again, LM358 shall never be used for any audio applications, other than feeding a buzzer!  LM324 the same applies (it is 2x LM358 inside anyway) //
« Last Edit: June 06, 2019, 04:20:07 pm by Yansi »
 

Offline dazzTopic starter

  • Frequent Contributor
  • **
  • Posts: 304
  • Country: es
Re: Building a sound mixer within my guitar amp with line IN & mic input
« Reply #67 on: June 06, 2019, 08:01:23 pm »
OK, I think I might have found one that should work for the final pcb version: LT6200
https://www.analog.com/media/en/technical-documentation/data-sheets/62001ff.pdf

Even less noise than the NE5532 at 0.95nV/√Hz, unity gain stable and rail to rail.
 

Offline Yansi

  • Super Contributor
  • ***
  • Posts: 3893
  • Country: 00
  • STM32, STM8, AVR, 8051
Re: Building a sound mixer within my guitar amp with line IN & mic input
« Reply #68 on: June 06, 2019, 09:13:33 pm »
And who will pay for a 50pcs of $4 opamps for a mixing console?

And btw, it is just 12V maximum. That won't give you much headroom for signal processing.

None great expensive opamp will  magically make the circuit work better, unless you know how to design it better*

Stick with the industry proven NE5532 or NJM4560/4580. They are good for the task.


*I mean for example, have you already studied how to optimize audio channel summing for noise performance? Using your LT6200 you may think will give you much better performance - it won't. The opamp is just 5x less noisy (14dB), but your overall summing node topology may influence the resulting noise by much more than that - in such case the LT6200 use just would not pay off.
« Last Edit: June 06, 2019, 09:17:42 pm by Yansi »
 

Offline dazzTopic starter

  • Frequent Contributor
  • **
  • Posts: 304
  • Country: es
Re: Building a sound mixer within my guitar amp with line IN & mic input
« Reply #69 on: June 06, 2019, 09:45:37 pm »
Well, I had no plans to commercialize it, but I see where you're coming from. I'll stick with the NE5532 then. In fact I already placed an order for a bunch of NE5534's
I have the datasheet here, looks like I need to figure out what those comp/balance pins do
 

Offline dazzTopic starter

  • Frequent Contributor
  • **
  • Posts: 304
  • Country: es
Re: Building a sound mixer within my guitar amp with line IN & mic input
« Reply #70 on: June 06, 2019, 10:09:58 pm »
I think I already asked this, but can I reference the opamp to Vref like this and get rid of C13? or will that ruin my opamp's CMRR?
It seems to allow for a much lower supply voltage without distorting. I simmed it at 12V, but works at 9V too

EDIT: I forgot to swap the tl082 for a NC5532 there, but still seems to do the trick
« Last Edit: June 06, 2019, 10:18:00 pm by dazz »
 

Offline Yansi

  • Super Contributor
  • ***
  • Posts: 3893
  • Country: 00
  • STM32, STM8, AVR, 8051
Re: Building a sound mixer within my guitar amp with line IN & mic input
« Reply #71 on: June 06, 2019, 10:12:27 pm »
Balance pins are common on single-per-package opamps. These are used to trim the offset voltage to zero (you are balancing the input stage within the opamp).  For an audio signal application, this is of a not that much of an issue, as a small output offset voltage is stripped by the coupling capacitors. (But it may be an issue in DC coupled circuits, such as power amplifiers).

The comp pin is not very often seen now, but it serves to connecting an external compensation capacitor to change behavior ("slow down") the opamp a bit, to make feedback loops stable.

 

Offline Yansi

  • Super Contributor
  • ***
  • Posts: 3893
  • Country: 00
  • STM32, STM8, AVR, 8051
Re: Building a sound mixer within my guitar amp with line IN & mic input
« Reply #72 on: June 06, 2019, 10:17:57 pm »
I think I already asked this, but can I reference the opamp to Vref like this and get rid of C13? or will that ruin my opamp's CMRR?
It seems to allow for a much lower supply voltage without distorting. I simmed it at 12V, but works at 9V too

Good question! Not sure of hand, as I usually design these circuits with a symetrical supply voltage, but thinking about it...

If your VREF source is low impedance and well bypassed against ground (which it should be!), then connect it against VREF.

How is your VREF source circuit implemented?
 

Offline dazzTopic starter

  • Frequent Contributor
  • **
  • Posts: 304
  • Country: es
Re: Building a sound mixer within my guitar amp with line IN & mic input
« Reply #73 on: June 06, 2019, 10:20:53 pm »
I think I already asked this, but can I reference the opamp to Vref like this and get rid of C13? or will that ruin my opamp's CMRR?
It seems to allow for a much lower supply voltage without distorting. I simmed it at 12V, but works at 9V too

Good question! Not sure of hand, as I usually design these circuits with a symetrical supply voltage, but thinking about it...

If your VREF source is low impedance and well bypassed against ground (which it should be!), then connect it against VREF.

How is your VREF source circuit implemented?

It's a simple voltage divider with 1k resistors (had to lower them as the load seemed too much for higher resistor values and Vref dropped significantly)
But if I use NC5532's instead, since they're dual opamps, I can use one half to buffer the resistor divider and get very low impedance, right?
 

Offline dazzTopic starter

  • Frequent Contributor
  • **
  • Posts: 304
  • Country: es
Re: Building a sound mixer within my guitar amp with line IN & mic input
« Reply #74 on: June 06, 2019, 10:25:52 pm »
See green box for Vref circuit as it stands for now. Measured some 150mW across the 1K resistors at 24V Vdd
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf