Controlling stereo audio volume with one control voltage/current. - Page 1
Forum section: electronics / projects

author: Mazo
author_rank: Regular Contributor
timestamp: August 14, 2018, 07:45:31 pm
content: Hi,I am a 20y old EE student that loves analog and power electronics.(just wanted to say hi after a few posts and long time lurk:D)So I was wondering how you would solve the problem of making a stereo,audio bandwidth attenuator/amplifier that is controlled by a single voltage/current.Discrete/op-amps allowed only(no real reason besides availability of parts).Only thing that pops in my mind is a voltage divider with a JFET but the 2 channels should be gain matched to some degreee and JFET's have very wide manufacturing spread...I wonder if somebody knows to what degree the 2 channels should be gain matched in order for the difference to be inaudible?I hope I am not missing an obvious solutionI can always put a few resistors and switch them in and out of circuit as a solution as few gain steps should suffice but where is the fun in that

author: schmitt trigger
author_rank: Super Contributor
timestamp: August 14, 2018, 07:50:37 pm
content: OTAs Operational Transconductance Amplifiers, were widely used for all sorts of VCAs and VCFs. Analog synthesizers used boatloads of them.Common types were the CA3080 and the dual LM13700. I know the former is obsolete, don't know about the latter.EDIT: checked the TI website. The LM13700 is still available.

author: ciccio
author_rank: Frequent Contributor
timestamp: August 14, 2018, 07:51:46 pm
content: - An attenuator with two resitors, two photoresistors and a LED with a single potentiometer controlling the LED's current.Search Google for "vactrols"- two Voltage Controlled Amplifiers (VCAs) or a stereo VCABest regards

author: Bassman59
author_rank: Super Contributor
timestamp: August 14, 2018, 08:07:16 pm
content: Quote from: Mazo on August 14, 2018, 07:45:31 pmDual VCAs from THAT.

author: calexanian
author_rank: Super Contributor
timestamp: August 14, 2018, 09:28:37 pm
content: +1 for THAT VCA’s. That can be a bit fiddly and be made of pure explodium staticus, but they work pretty well.

author: BrianHG
author_rank: Super Contributor
timestamp: August 14, 2018, 09:50:53 pm
content: Here is an expensive solution from TI:http://www.ti.com/product/VCA810?keyMatch=voltage%20controled%20amplifier&tisearch=Search-EN-Everything

author: Zero999
author_rank: Super Contributor
timestamp: August 14, 2018, 09:54:35 pm
content: Use an ADC to control a digital potentiometer's wiper, which can be used to attenuate the signal or as one of the gain setting resistors, in an amplifier. You'll most likely need a microcontroller. It doesn't have to be fancy: a basic 8-bit unit with an 8-bit ADC will be more than adequate.

author: JS
author_rank: Frequent Contributor
timestamp: August 14, 2018, 10:43:24 pm
content: You want your sides to be pretty tightly matched, 0.5dB would be the upper limit to a bit too much for any gpod quañity application.What you need to consider is the quality you are aiming for, THD+Noise figures, stereo matching, phase distortion, etc. Other thing to consider is the level range (max atten) and steps. If you want 8 5dB steps you are probably better with resostors and switch, if you want 0.1dB steps for a 60dB range you probably want a 10 or 12 bit DAC controlling the siga plus some calibration to match channels. That, plus the control law of the THAT ICs is in dB/V, so easy to control, other ways are less linear.You could do some cal using 2 or 3 CV, one for the master control and a second one for correction, calibrate once for 0.2dB matching and enjpy forever. That and some selected FETsYou couls also do a control with LDRs, but tracking is an issue, tempcos are crazy, but distortion and noise are auite optimal.JS

author: MasterT
author_rank: Frequent Contributor
timestamp: August 15, 2018, 12:33:16 am
content: https://www.nxp.com/docs/en/data-sheet/TDA7052A_AT.pdf

author: Zero999
author_rank: Super Contributor
timestamp: August 15, 2018, 08:05:00 am
content: Quote from: JS on August 14, 2018, 10:43:24 pmIs gain matching really that important? Perhaps 0.5dB of mismatch might be noticeable through headphones, but there's no way it'll be noticeable with speakers. In any case, I think the difference in the sensitivity between each ear will dominate a 0.5dB mismatch.The original poster also wanted to limit this to jellybean op-amps and discrete parts, in the belief it will make it easier to get parts, but I think it might make it more difficult. As mentioned, J-FETs and LDRs have poorly controlled resistances, so it rules them out. On the other hand, digital potentiometers and microcontrolers are widely available.

author: JS
author_rank: Frequent Contributor
timestamp: August 15, 2018, 08:53:05 am
content: Quote from: Hero999 on August 15, 2018, 08:05:00 amYour ears mismatching would be grater than 0.5dB mismstch, granted. But and there's a big but here, but if you still have a brain, it will correct for that 0.5dB mismatch and you can distinguish changes much lower than the mismatch between your ears. Few years since my last audiometry but 10dB at certain freq between one ear and the other isn't that strange to see, pretty much the rule and even greater depending on freq, exposures, etc. Even them, I picled up a difference in my headphones of almost 1dB at the very low end, enough for them to send me an extra pair and let me keep the others after sending a measurement of the difference.Now, you say HP yes, speakers no. That really depends on the conditions, for a good listening spot in a decent room there's a noticeable difference as something over 0.5dB will radically shift the image, the center position, and that can be annoying. Now, if you are listening from the next room makes very little sense to have stereo and even less to keep track of their gains.There's one topology I forgot in my last post, and I think is the best over given the restrictions (CV, opamps and discrete) and if I were too design it with any level of precission in mind I'd go for a PWM gain control. Said that I don't like the topology to much as the filtering of the pwm signal is a bitch. I was asked to design one for a 32x32 matrix and the filtering was becoming a problem for the part count. Switches in such a mixer are almost free as you already need them to switch the channel in and out of the bus, is just matter of picking a fast one. I guess for two channels you are free to play around with the filters as much as you like.JS

author: David Hess
author_rank: Super Contributor
timestamp: August 15, 2018, 09:24:37 am
content: Quote from: Hero999 on August 15, 2018, 08:05:00 amWhere this matters, the control elements are used in pairs or even better with FETs, are monolithic matched pairs which allows compensation for non-linear control and temperature dependence. Operational transconductance amplifiers rely on bipolar transistor matching so this is hardly unusual but their control signal has a temperature dependence of –3300ppm/°C also just like all bipolar translinear devices.This also makes the LM13700 especially useful since its two operational transconductance amplifiers will match better than two separate devices. Their gain will change with temperature but at least both sections will change the same amount.

author: Zero999
author_rank: Super Contributor
timestamp: August 15, 2018, 09:54:00 am
content: Quote from: JS on August 15, 2018, 08:53:05 amWith stereo, each channel is supposed to different, so how do you know whether it's correct or not? If one is listening to live music, their position in the room will make more of a difference compared, to a 0.5dB difference in stereo channels.A small change in the recording set-up or the room acoustics (either in the recording studio or speaker placement) can cause a greater difference than 0.5dB between the channels.I'm cynical it really makes any difference and think the chances are no one will notice 0.5dB. It wouldn't surprise me if the gain mismatch between channels of analogue playback devices such reel-to-reel tape or vinyl is greater than that. Failing that, most Hi-Fis have a balance control.People tend to drastically overestimate their ability to hear things. The brain is very good at correcting for deficiency in the ears and hearing what it expects to hear. There have been some interesting experiments conducted into psychoacoustics and it's amazing what is clearly, blatantly obviously measurable but is completely inaudible.QuoteI'm not familiar with PWM gain control, is it just chopping the signal at a high frequency, then low pass filtering it? If so, it seems a sensible enough approach.

author: JS
author_rank: Frequent Contributor
timestamp: August 15, 2018, 03:26:47 pm
content: Quote from: Hero999 on August 15, 2018, 09:54:00 amThere is a lot of stuff perfectly centered in the recording, older media doesn't have that bad of a problem in stereo balance, the reproduction system quality varies a lot, level control pots don't track well, repro heads or capsules are not well aligned or matched between channels, etc. That doesn't mean it's good enough, it's way they could do for cheap back then.I've been trained and evaluated in the university, according to my hearing capabilities, of you could distinguish the frequency and amplitude of an eq applied to a signal you walk home with an A if you couldn't with an F. I've lost some of the trained for sure, but I trust my ears quite a bit, and I must add I work with them, not as much as I did some years back but every nowand then I have some live, recording mixing or something to do.QuoteBasically, yes. But aliasing appear, so you need anti aliasing filter and a reconstruction filter after which should attenuate the chopping freq enough without too much linear distortion in band. That ends in a pretty fast chopping frequency, at least 100kHz I would said, for the filtering to be accessible. Now, if you want 60dB attenuation range before cutting the signal off you need 10ns response at the switches and PWM generator.If you are ok with less attenuation and some filtering artifacts which would be fone for consumer products you can get much much lower freq. Note that the minimum attenuation and bit depth couñd be spmewhat independent, if you want 20dB maximum attenuation with 10bits you can get it, just make the switch off attenuate 20dB and then you chop between the original signal and the 20dB down. Now the level of noise and aliasing introduced by the chopping is lower, sp filters are simple and you can use lower freq.When audio quality should remain uncompromised over a wide range of gains this doesn't seem to be the way to go, at least conplexity was to bad at the time I tried to design it, from a single gain cell with cost in mind, it just wouldn't cut it.JS

author: Zero999
author_rank: Super Contributor
timestamp: August 15, 2018, 05:45:36 pm
content: Quote from: JS on August 15, 2018, 03:26:47 pmDefine perfectly centred? I very much doubt that the levels on the left and right channels are that well controlled. There will certainly be a larger difference than 0.5dB between them for most of the time.I suspect the level of matching dual ganged potentiometers, tape heads etc. is more than good enough. There's a tendency of overkill and extreme over-engineering in audio.As far as analogue media is concerned. I couldn't comment on matching, but the channel separation is exceptionally poor, especially on vinyl, which is terrible! CDs are far superior in this regard and should be as good as the analogue part of the system will allow.QuoteNo amount of training can make up for inherent inadequacies in the auditory system. It's plausible one can detect 0.5dB of mismatch, whilst listening to a pure sine wave, through headphones, but with a real music stereo recording it's doubtful. As mentioned above, the left and right tracks will be different and there will already be a far greater difference in volume between them than 0.5dB, even if it's well mixed.

author: Mazo
author_rank: Regular Contributor
timestamp: August 15, 2018, 05:53:48 pm
content: I think I will try the chopping method and apply the control voltage as the pullup voltage of an open-collector comparator.The reconstruction filter probably should be a Butterworth or a very low ripple Chebyshev(am I missing something?).I suppose I should pay attention to ramp generator and filter linearity and rise/fall times of the comparators?Will try LM393/319 around 100kHz chopping frequency and 3?pole filter(around 40dB of attenuation if my math is right,is that too low?).Thank you all for your input and the nice IC's you linked but the idea was to devise a circuit that can be built using drawer parts.The circuit is gonna be used in a car audio system for personal use so no HiFi claims or specs needed,just not introducing anything annoying in the signal path.As far as aliasing goes should I expect significant energy above 20kHz in the headphone output of a phone?

author: JS
author_rank: Frequent Contributor
timestamp: August 15, 2018, 06:30:55 pm
content: You should use an anti alias filter anyway, to take out the noise as out of band noise comes into the bamd with aliasing and noise flor becomes a problem. How much noise comes into the sistem depends on the duty cycle, at lower duty cycles higher frequencies gets aliased so dynamic range at low level will be bad. I suggest some filtering to reduce this effect but insidea car there's already plenty of noise so ypu don't need a very steep filter.About the shape of the filter, for HQ audio I prefer bessel filters as group delay is minimyzed and that kind of distortion is more audible than a slight HF attenuation. On the other extreme I would still stay away of chebyshev filters for that same reason.@Hero999: bit perfect matching for some part of the signal, as most music is digitally processed and no a smidge of error in there. The voice, the bass drum and bass, among other sources are almost always death center. Other signals which are indeed panned are of course not equal in both sides. In analog there are errors but pot tracking and pan pot errors at center are avoidable with good design most studio consoles have, the error in the summing resistors and amplifiers would be the worse source of error, and there's only one master fader and it has more attention than you imagine I guesa to match the tracking. Speccially designed stereo faders are used to provide good tracking, sometimes linear to provide better tracking and slugged taper to get a more logarithmic response. Precission in audio circuits has a lot to do with metrology grade stuff, working in a 24bit enviroment require certain cares to take the most out of the gear. Mastering processing has an even greater deal of precission and repeatability into their gear. To the point you let your gear worm up as you do in ametrology lab.Non of this is a problem inside a car, where nobody is sitting in a great spot and noise is high. So for this you could use LDRs, there are packages with 2 inide a single die so thermal tracking is great and they behave decently good, if you can get those might be the easiest way. As I said earlier, LDR have the best audio performance with the problem of tracking, precission, control linearity. So now, knowing your case (a car) I can say you don't need 0.5dB tracking I can recomend that for a simpler solution. If you want to know how much attenuation you get you could use a 3rd LDR or even 2 dual to make a feedback around it and work with it. I have experimented with that and seen some pro gear using it (not for mastering or stereo control) and does work.JS

author: David Hess
author_rank: Super Contributor
timestamp: August 15, 2018, 08:01:54 pm
content: Some analog multiplier implementation use chopping or charge balancing. I cannot say that I have ever seen chopping used for audio level control but obviously if class-D amplifiers work then so can it.For audio, linear phase response is usually irrelevant so sharper cutoff antialiasing filters are often used but they also have more stringent component matching requirements. For simple stuff, I use a 4 to 6 pole Butterworth filter made with 2 operational amplifiers which is a good compromise between distortion, filtering, and component requirements.

author: nctnico
author_rank: Super Contributor
timestamp: August 15, 2018, 08:10:41 pm
content: Back in my audio development days I used VCAs from NXP. These are in their range of audio related chips.

author: Zero999
author_rank: Super Contributor
timestamp: August 15, 2018, 10:10:45 pm
content: Quote from: Mazo on August 15, 2018, 05:53:48 pmIs voltage control really a requirement or do you simply want an electronically controlled amplifier/attenuator?I don't see how you're going to be able to use the plain LM393 as a chopper. The output is an open collector and can only pass current in one direction only. An analogue switch, is a more viable solution. Something like the 74HC4053 will do. PWM the switch to select between 0V and the audio source. The output can then be buffered and low pass filtered, to give the audio signal.https://assets.nexperia.com/documents/data-sheet/74HC_HCT4053.pdfI still don't see the issue with digital potentiometers. There's a vast selection available, they're cheap and fairly low distortion.https://www.mouser.co.uk/datasheet/2/268/22242A-54588.pdfhttps://www.mouser.co.uk/datasheet/2/256/DS1881-99614.pdfhttps://www.mouser.co.uk/datasheet/2/268/22147a-54123.pdfhttps://docs-emea.rs-online.com/webdocs/1394/0900766b81394544.pdf

author: Bassman59
author_rank: Super Contributor
timestamp: August 16, 2018, 12:48:29 am
content: Quote from: Hero999 on August 15, 2018, 08:05:00 amIf you have a microcontroller available, the TI PGA2320 is the simple solution. Remember to drive the inputs from an op-amp. Another option would be a dual log-taper digital pot. The digital pots need op-amps for drive and to buffer their outputs.As for the 0.5 dB channel matching, using the PGA2320 that's guaranteed. The more difficult part is matching your amplifier and speaker sensitivities to that level. That would get done in a mastering or recording studio as a matter of course. Whether that matters for a home stereo is for the user to decide.