3

For an HVAC application I'm searching for a way to average two 0-10 V signals with the ability to give a "weight" to one or another.

Example:

  • I have input A at 10 V and input B at 5 V.

  • If I make a dumb average I get 7.5 V.

  • I want to be able to give more importance to one signal.

  • Let's say input A is set at 50% and B 100%. I want an output at 6.667V ([10x0,5+5x1]/[1+0,5]).

I tried simulations online with an op-amp but can't find a way to do it. I made an average circuit using a voltage follower as described here and was hoping that replacing the resistor with a potentiometer would do the job, but unfortunately it didn't.

The highest voltage seems to pass through the potentiometer of the other input if its resistance is lower.

I tried many other things next (diodes, more op-amps, etc.) but I'm a beginner so I didn't manage to find the way to go.

ocrdu
  • 8,705
  • 21
  • 30
  • 42
Nicobzh
  • 39
  • 3
  • What opamp simulations have you done? Did you try implementing a summing amplifier? What is the impedance of the input? Maximum frequency of interest? – vir Feb 16 '23 at 21:44
  • Agree with vir that a basic summing amp is the way to go. These basic circuits go way back. For a good reference on various op amp circuits, I recommend National Semiconductor's Ap Note 31 (AN-31) AN-20 (first published in 1969), and AN-4 (1968). The last one was authored by Robert J Widlar, one of the early analog gurus. – SteveSh Feb 16 '23 at 23:13
  • @Nicobzh: sometimes it helps to change your thinking slightly. Consider the "weights" always adding up to 100% (basically, you a-priori divide all the weights to the sum of the weights). In the case of only 2 terms (like in your case), this kind of thinking ends up with a solution like one proposed by Spehro Pefhany https://electronics.stackexchange.com/a/654361/211865. – virolino Feb 17 '23 at 12:13

2 Answers2

8

Here is one way, borrowing slightly from Theodore's answer.

The pot is set to 1/3 (0.5 being halfway) since you want 5/15 of the voltage to come from the 10V source.

schematic

simulate this circuit – Schematic created using CircuitLab

If \$\alpha\$ is the pot rotation from 0 to 1, the voltage at the output is \$\alpha V_1 + (1- \alpha)V_2\$.

Pot in the center is an unweighted average of the two voltages. Of course you could add resistors to the ends of the pot if you wanted to limit the range. Or replace the pot with two resistors, one of \$\alpha\cdot\$10kΩ and one of \$(1-\alpha)\cdot\$10kΩ


Alternatively, you could do something like this:

schematic

simulate this circuit

Which is exactly what I think you asked for. It requires dual element pots for both adjustments and a negative and positive supply voltage. Tracking of the pots may affect accuracy significantly (especially if the overall gain is high => (a + b) << 1. R1 is coupled to R8 and R4 to R9. The adjustments are linear from 0..1 (0 to 100%) for a and b.

It would also be possible to use (very expensive) multipliers to generate this analog function with single element pots. Or use the dreaded ADC->MCU->DAC approach, which would yield the excellent learning opportunity to spend weeks linking in 100k of potentially buggy code to allow capacitive touch slider controls on a color TFT display.

Spehro Pefhany
  • 376,485
  • 21
  • 320
  • 842
5

You are on the right track.

You are basically building a single-purpose analog computer that calculates Ax+By.

The averager and voltage follower you linked should be suitable, but you mentioned one issue:

The highest voltage seems to pass through the potentiometer of the other input if its resistance is lower.

This is because the 0-10V inputs have some output impedance that's not sufficiently low with respect to the input resistors you selected.

You can place voltage followers at the inputs too so that the potentiometers won't load down the sources:

schematic

simulate this circuit – Schematic created using CircuitLab

You also probably need to be mindful of your voltage references with respect to the op-amp power rails. Does your supply voltage extend above 10V and below 0V? Most om-amps can't receive input voltages or generate output voltages all the way to their supply voltages.

There are other ways to accomplish this, and some web-searching for analog computers may help.

Theodore
  • 2,061
  • 11
  • 23
  • I tried this by replacing R1 and R2 with potentiometers but it doesn't work as i want. to explain more deeply my problem, I have a setup with two exhaust fans with 0-10V variation, FanA with 100m3/h at 10V and FanB with 200m3/h at 10V and an intake fan with 300m3/h at 10V. When A and B vary i want to give the right signal to my intake fan. In my example with 10V in input A and 5V in input B, it give me 100+100 m3/h, so i have to send 6,67V to my intake fan to have the right flow If i follow your circuit i got 3,33V instead of 6,66V, did i miss something ? – Nicobzh Feb 17 '23 at 09:37
  • @Nicobzh: but in this case you do not need to weigh anything, if I read correctly. You only need to use simple average (half of sum), because the weighing of the input signals is already done by the controller of fans A and B. – virolino Feb 17 '23 at 12:20
  • @Nicobzh: actually, I was wrong. You need 1/3 of V(A) + 2/3 of V(B), not 50/50. I tested it with a few formulas in Excel. I assumed that the m3/h is proportional with the input voltage - which might not be on the entire range. – virolino Feb 17 '23 at 12:33
  • @Nicobzh Please edit your question to include all the details from your comment here. (You can delete the comment after if you like.) Also, The point of my diagrams was the buffers (voltage followers) at the input, not the specific resistor values. – Theodore Feb 17 '23 at 14:16