# Voltage Controlled Attenuator

I'm trying to create a DC voltage attenuator which linearly scales the loss relative to an applied control voltage "Vc". In other words, K = Vout/Vin is a linear function of Vc. Vin is guaranteed to be in the range -2.75 to 2.75 V.

Ideally, the gain K ranges from 0.005 to 1.0. Such is to say, if Vc ranges from 0 to Vcmax, the goal is to come close to realizing the following transfer function: K = Vout/Vin = 0.005 + Vc*(.995 / Vcmax)

Does anyone know of a circuit or IC which will come close to realizing this functionality? No supply/cost constraints. I've heard that JFETs can be used as fairly linear voltage-controlled resistances: http://graffiti.virgin.net/ljmayes.mal/comp/vcr.htm

Edit: Another option could be to pre-scale the input and then implement a voltage-controlled amplifier

• Commented Dec 23, 2021 at 10:19

## 2 Answers

Because you want to control the amplification of a signal that is DC (maybe below 100Hz is my guesstimate), "conventional" devices such as JFETs are probably going to be fairly poor in DC performance. This would also apply to analogue multipliers such as the AD534 because temperature changes do affect analogue multipliers.

A better solution is to control an analogue switch from a square wave whose mark-space ratio represents the analogue control voltage. Your input feeds the switch and the output from the switch is your output.

If the square wave (say 10kHz) alternates between 0V (50% of the time) and 5V (50% of the time) and this switched the input signal (Vin) "on" and "off" via an analogue switch, the average output would be 50% of Vin. If the on/off ratio were altered to say 20% on (5V) and 80% off (0V), the average output would be 20% of Vin. Why do it this way?

It's quite easy to get a very accurate and reliable on/off duty-cycle using either analogue electronics or digital electronics and using this to "chop" the input to control its amplitude is a guaranteed way of overcoming the JFET/Multiplier problems associated with DC and temperature drift.

The output of the analogue switch would of course be "chopped-up" but the average value could entirely represent the transfer function you need. In addition, you can use standard filter techniques to recover the chopped signal back to a steady dc version.

You probably noticed that I mentioned the input being limited to 100Hz, and that I mentioned a chopping frequency of 10kHz - I did this purposely because this allows for a simple filter arrangement to recover the chopped output back to a smooth dc level.

Here's a simulation of a switching circuit: -

The output waveform (BLUE) is half a cycle of an input sinewave (100Hz) chopped by 10kHz 50:50 duty-cycle The chopping is done by the analogue switches S1 and S2. These are, of course, common-place devices. The red trace is the blue trace having undergone filtering by the op-amp circuit.

Because the duty-cycle of the square wave controlling the switches is 50:50, the output signal is halved in value. If the duty cycle were 1:99 (on for 1% of the time) then the output would be one-hundredth of the input.

This is how I'd tackle the problem BUT you could always use a cheap MCU and feed both inputs into its ADC and get the MCU to calculate the output value and have this fed to a DAC.

How about about using your voltage to control a VCO, and then using the VCO to drive a switched capacitor programmable gain amplifier. Details of the switched capacitor theory of operation can be found in THIS POST