Questions about balanced input and output stages

You need pull-down resistors on the digital control inputs of your electronic switch, otherwise the logic level with switched-off S1 is undefined, so you don't switch between active mode and bypass mode, but between active mode and anything-can-happen mode.

U7B is not connected as an attenuator, but as an amplifier with a gain of 1.33.

U8B is not connected as an inverting amplifier, but as a non-inverting amplifier with a gain of two (hint: swapped wires).

I'd move the electronic switch to the output side. The way it is connected now, you get a voltage division between the microphone and the op-amps when you try to put the circuit in bypass.

INA333 is quite noisy, as mentioned.

Are the op-amps TL082 or TLV2462?
 
  • Like
Reactions: hobby_guy
The op amps are TLV2462, sorry for the confusion; I only had the TL082 component in my Eagle library 😉
And thanks for the very helpful corrections... I must admit I was a bit too eager to make an drawing for the forum post.
Here is an updated schematic, where I have corrected the errors and also made the adjustments suggested (move switch to output, and get rid of INA333).
1750153417978.png


I kept the input and output passive components (series resistors, coupling caps, and 48K ground references) included "inside" the bypass path. I think this makes sense; I will need to "protect" the circuit (switch IC) from phantom power so I think the components should not be bypassed.

About the attenutation stage: Does it make sense, my reasoning about this working as a stomp box, FX in series with mic? As in, I want the mic to work as normal (true bypass) when the FX is turned off (S1). Seems to me I will then have to maintain a "mic level" signal throughout.
 
No it's not, just use dedicated solution to it ( idk the ic you use as preamp). The That dedicated one i talked about previously are dedicated mic preamp and are optimised to deliver the good: That 15XX series of ic's.
You mentioned 1606/1646, but you say 15XX series? Did you mean 16XX?

I have tried looking into this before, but never figured out the THAT series properly. Given my project constraints (mainly that I want battery operation, with 5V) could you perhaps suggest some suitable instrumentation/preamp? I mean, one which takes a balanced input and outputs an amplified single ended output.

I could probably also benefit from having a proper line driver at the output...

Sorry if I'm being lazy, but I have been trying to get an overview before and it just is a bit much specs to grasp. And they're rather expensive too.
 
Given my requirement of using single power supply (5 V battery) I think I might want to replace INA333 by an audio quality op amp like OPA1678, rather than THAT15XX which does not seem to be suitable for single power supply.

I think that's a good idea. The 1 kohm-47 kohm differential amplifier has the gain you need, so the extra gain stage after it is not needed or desired.

The attenuation at the output can probably best be done with two resistive voltage dividers after the buffer and inverter stages. That attenuates the noise of these op-amp stages.


Regarding the gain:

Equivalent input noise voltage density of the OPA1678: 4.5 nV/√Hz, its equivalent input noise current is negligible
Thermal noise voltage of 1 kohm at 20 degrees Celsius: 4.02 nV/√Hz
Thermal noise voltage of 600 ohm (microphone) at 20 degrees Celsius: 3.12 nV/√Hz

Total (root of the sum of the squares) of the microphone, op-amp, two 1 kohm resistors, everything else neglected: 7.9 nV/√Hz of input-referred noise

Noise in 13 kHz (about the noise bandwidth of A-weighted noise measurements): 900 nV

Voltage gain required to ensure that the -90 dBV of the echo circuit won't dominate the noise: 35.1 times from the open-terminal voltage (Thevenin voltage, EMF) of the microphone to the input of the echo circuit.

With 2 kohm input impedance and a 600 ohm microphone, that's 45.7 times from the amplifier input voltage to the echo circuit input. The differential amplifier has a gain of 47, so that's quite close.
 
  • Like
Reactions: hobby_guy
I meant something like this. 48 kohm is no standard value, by the way, while 47 kohm is.

echothing.png


Even though it's a common-mode voltage in a differential circuit, I wonder if you can't get crosstalk issues over the common half supply buffer output impedance. If the 5 V supply can float, it might be better to just connect the half supply buffer output to ground, so you get a +2.5 V/-2.5 V split supply.

Assuming that the negative side of the supply needs to be grounded:
Does the switch need to be an electronic switch or would a mechanical switch or a small relay also be acceptable? If so, you could bypass straight from the input to the output and you could put the output attenuators after the output AC coupling capacitors. The attenuators can then be referred to ground, so any ripple on the half supply gets attenuated as well.
 
  • Like
Reactions: hobby_guy
Hi again, MarcelvdG, and thanks for the in-depth reply! Here's my reply I was working on before your follow-up post with the schematic 🙂
I must admit, the technical stuff was a bit difficult for me to understand fully.

1) Great that you emphasized the gain of the differential op amp on the input! However, my "amplification" opamp, with Rin=470 and Rf=2.2k, has been giving me a gain of only -4.6. Looking at this again now, I see that this is probably too low gain for bringing the signal from a dynamic mic up to within the range expected (or required) by the PT2399, or to "overcome" its noise levels. I guess this is why you suggested 1k and 47k, for a gain of 47.

2) I'll remove also the "attenuation" op amp, and replace it with a resistive voltage divider (using same values, 1k and 47k).

3) Finally, your last point about the electronic switch: I want to make a handheld device, so there are space limitations. I was stuck in the 3PDT stomp box mindset, and these just are not compact enough for my project. But, now it seems to me I could just use a small DPDT switch -- like the one already in my drawing -- to route the hot and cold lines?

I really appreciate the very interesting discussion, and I am learning a lot 🙂 IF you have the interest and time, I would be very interested in hearing any advice on simplifying the PT2399 echo configuration circuit, as shown previously -- taken from the PT datasheet. How to properly and sensibly integrate this with my circuit as input and output stages. I guess I should keep all the passive components around the processor, but I keep wondering if the PT expects a signal centered around 0 or if it has some way of handling a reference voltage? Right now, I include the coupling capacitors on the input and output to the PT, and I'd really like to get rid of those. I think 😀
 
Last edited:
1) Great that you emphasized the gain of the differential op amp on the input! However, my "amplification" opamp, with Rin=470 and Rf=2.2k, has been giving me a gain of only -4.6. Looking at this again now, I see that this is probably too low gain for bringing the signal from a dynamic mic up to within the range expected (or required) by the PT2399, or to "overcome" its noise levels. I guess this is why you suggested 1k and 47k, for a gain of 47.

Indeed. Mind you, I don't know how high you can make the gain without causing clipping when you sing loudly. If it should clip, you would have to reduce the gain and take the resulting increase in noise floor for granted.

2) I'll remove also the "attenuation" op amp, and replace it with a resistive voltage divider (using same values, 1k and 47k).

Ah, edit: I'll use the values you suggest, 3K3 and 100, for the voltage divider.

Preferably two voltage dividers right at the output (as in post #28), so you don't have any op-amps working at microphone level except the first.
3) Finally, your last point about the electronic switch: I want to make a handheld device, so there are space limitations. I was stuck in the 3PDT stomp box mindset, and these just are not compact enough for my project. But, now it seems to me I could just use a small DPDT switch -- like the one already in my drawing -- to route the hot and cold lines?

Yes, but make sure it has gold-plated contacts. Otherwise you are bound to get cracking sounds due to contact oxidation after a couple of months. That's not an issue when you switch high current and voltage levels (the story goes that the resulting sparks burn through the oxide), but it is an issue for line- and microphone-level audio.

(Four pole would be even better, then you can disconnect both the input and the output. I think four-pole toggle switches exist, but they are rare.)

I really appreciate the very interesting discussion, and I am learning a lot 🙂 IF you have the interest and time, I would be very interested in hearing any advice on simplifying the PT2399 echo configuration circuit, as shown previously -- taken from the PT datasheet. How to properly and sensibly integrate this with my circuit as input and output stages. I guess I should keep all the passive components around the processor, but I keep wondering if the PT expects a signal centered around 0 or if it has some way of handling a reference voltage? Right now, I include the coupling capacitors on the input and output to the PT, and I'd really like to get rid of those. I think 😀

I would just build the datasheet application circuit. There is not much information in the datasheets to go on to design your own.

You can see in this datasheet https://www.princeton.com.tw/LinkCl...=&tabid=693&portalid=0&mid=862&language=en-US that the signal does get superimposed on a DC level of nominally half the supply voltage, as there is a "1/2 Vcc" block in the datasheet with an external filter capacitor on pin 2. When you would DC couple it, you would get some offset voltage due to mismatch between your voltage divider and the ICs, plus several op-amp offsets. I don't know what effect that has on the comparator in the block diagram, the purpose of which I don't know.
 
  • Like
Reactions: hobby_guy
Thanks for the help!
I have made the adjustments (simplifications) to the schematic, but also added a hopefully related question regarding switches and buttons to toggle power and FX. I hope it's ok to keep working on this thread; if this is beyond the scope, I will make a separate thread. Let me know!

Anyway, the user experience I have in mind is something like this:

The user (vocalist) should have a hand-held device, not foot operated (stomp box). Normally, the FX is powered off (to save battery) and a switch UC handles bypass. There is a "mix" pot, where the user can select the depth of the effect; the ratio of wet to dry signal. This pot has a switch (S1) at one end of its travel, like a volume knob on a car radio which doubles as a power switch when volume reaches 0. The user will click on the FX using the mix pot, and set the desired mix. This disables bypass, and the DPDT switch also sends 5V to the "VCC" rail, which powers on all the other UCs.

There is a second switch (S3) which the user can use for "manual mode" -- if the FX is not off. Normally, this feeds dry signal into the FX subcircuit (PT2399) but the user can bypass SEND (sending dry directly into the "wet" part of the mix). This way, the user can push the "enable" button (S4), to intermittently enable the effect (for emphasis on certain words in the song etc). The wet FX will always trail out through the mix, even after the user releases the button. It's important the effect should not be abruptly cut off; it should fade out nicely (assuming the "depth" and "repeats" pots on the PT2399 subcircuit aren't set to extremes, of course).

If my description can be understood, does this sound decent? Maybe overkill, but I think it sounds like a fun toy to have, very expressive.
I'm sure there are technical problems with the way I envision the switches configuration though, so please comment 🙂

1750777601634.png


PS, I'm struggling to find a compact ~20K pot with a built-in switch. The switch must have totally separate terminals, not the kind where a switch cuts the pot itself -- I want a separate switch (and DPDT). So, I'm thinking of trying to 3D print some attachment onto the lever of a compact pot, which has some arm to manually toggle a switch. For starters, I'd just have a separate pot and switch.
 
So if I understand it correctly, +5V is an always-on 5 V supply and when you turn on the potmeter/S1, the echo circuit gets supplied via the AVCC line and the electronic switch goes from bypass to connecting the processed signal to the outputs. The electronic switch IC and the op-amps are running off the always-on domain.

If so, I wonder if you can't use a potmeter with a simple, single-pole on/off-switch and use a CMOS non-inverting Schmitt trigger (like a cascade of two inverters of a 40106) to derive a control signal for the electronic switch from AVCC. It may depend on how much decoupling there is on AVCC and how quickly that gets discharged - the electronic switch will remain in the functional rather than bypass mode until AVCC has gone below the lower switching threshold of the Schmitt trigger. You might even need to put a big resistor between AVCC and ground to keep the voltage from getting stuck somewhere, at one or two silicon forward diode voltages, for example.

Besides, I think the inputs of the differential amplifier are swapped, causing a polarity inversion in functional mode.
 
  • Like
Reactions: hobby_guy
Thanks for the tip on the differential amplifier, I'll have to look into that. Do you mean that hot and cold (pin 2 and 3 on xlr) are connected to wrong inputs?

But, in general, would my setup work? Even if it might have to be a separate pot and switch in the prototype? Would the manual mode idea work as I intend, where the enable button would feed the fx circuit at only specific times, and then this would trail off in the mix after the button is released? Does it make sense to patch the dry signal into both ends of the mix when the button is not pressed...? Is this very much a wild, amateur idea, or could this actually work (and give a somewhat stable volume when button is not pressed vs when it is pressed)?

I like the idea of making a pot with a switch work using separate components. Didn't quite understand the technical aspects though, but I will try to look up what you described. I might also believe there could be a DIY mechanical solution to this, using some 3D printed attachment to the pot knob. Or maybe one could simply have a dial with a hole, which would allow light through to a light sensor, for a LED based optocoupler idea.
 
Regarding the differential amplifier, I meant that R7 should be connected to C4 and that R35 should be connected to C9. It's the other way around now.

A nice feature of a combined switch and potmeter is that when you turn the knob of the potmeter slowly, the switch-off or switch-on thump of the echo circuit will occur while the output is almost dry. That is, it will be attenuated.

Reading your description and looking at your schematic again, I think that pin 1 of S4 should be left open instead of being connected to the return/wet signal line. The way it's shown now, op-amp U2A will be abruptly connected to the echo circuit output via S3 and S4 when S4 is released. The op-amp has a much lower output impedance than the typical application circuit of the PT2399, so it will short-circuit the echo signal as soon as you release S4. That's precisely what you don't want.
 
  • Like
Reactions: hobby_guy
The INA333 is an "instrument" amplifier suitable for voltmeters and thermometers, NOT AUDIO. It's unity gain bandwidth is 150KHz so at +40dB the bandwidth will be about 1.5KHz.

A 5V supply has serious dynamic range problems, including requiring rail-rail op-amps. Some effects pedals run an as little as 9V, but that assumes they are never required to pass clean audio.
 
The INA333 has already been removed from the design because of its high noise. A bandwidth of 1.5 kHz is another good reason to get rid of it!

The TLV2462 has a rail-to-rail input and output, the OPA1678 that's considered as an alternative for the differential amplifier only a rail-to-rail output.

The echo chip only supports 5 V. The gain of the differential amplifier may have to be reduced to avoid overdriving it, to be determined experimentally.

(As an aside, back in the good old days, the analogue electronics I designed at work sometimes had supply voltages as high as 5 V, or even 8.5 V. Nowadays my colleagues and I are lucky if we get 1.5 V.)
 
Thanks for the comment, Steve 🙂 Yes, I have already moved away from the INA333, rather using an (audio quality) op amp. As Marcel points out, the circuit is centered around PT2399, which runs on 5 V, and I want to design a compact device so I plan on using something like the battery charger+booster shown below. Regarding power usage, the OPA1678 has minimum supply voltage listed as 4.5V in the data sheet, does this mean it will not work well with this kind of supply or is the point of a booster that it will indeed maintain a stable 5 V until the battery needs to be recharged?

SparkFun LiPo Charger/Booster - 5V/1A​

https://www.sparkfun.com/sparkfun-lipo-charger-booster-5v-1a.html
1750923114204.png
 
1. Sparkfun warns that their charger+booster does not protect the battery from total discharge, which is very bad for the battery. I think you need to shut down the booster if the battery voltage gets too low.
2. According to the data sheet, the OPA1678 is not totally rail-rail and will clip 0.8V from the rails, so the max output with a 5V supply is 3.4VPP, ie 1.2Vrms.
3. The PT2399 has 6 internal op-amps, wired as inverters that could be used instead of adding many OPA1678 etc. I found this:
https://www.electrosmash.com/pt2399-analysis
4. I recall stories of Rockers yelling into microphones that produced voltages that could be measured with an analog meter, so I remain skeptical about the ability of a 5V circuit to handle such levels. Clipping is not a big issue for communications applications, but it is for music.
 
Yes, I'm sure you're right, in that 5 V might not be sufficient to properly handle high quality audio. This is a learning project, so my interest is to try it and see how it goes. My main concern is to not destroy any connected equipment (including ears). If there is some "coloration" to the sound, I'm quite flexible in calling that an "effect".

My first attempt will be to finish my large size prototype, which will run on 9 V battery and thus more suitable for the OPA1678. I might try to make a split -4.5 +4.5 V supply. If I can get this working halfway decent, I'll try to make a compact 5 V version (using only TLV2462).

Thanks for the tip on the opamps inside the PT2399! I have seen the electrosmash blog many times, but it's quite technical. Are you saying the ic is designed such that internal op amps can be repurposed? Or does it contain general purpose op amps ready for use?