2

I think this question is best asked on concrete-ish terms, so, here it goes.

Let's say we have 4 wires, all with common ground:

A) ≈9V-20V, varying.

B) ≈3V-6V, varying.

C) A low frequency analog signal (<1kHz), which can vary from 0 to A.

D) In here, I need to output the analog signal from wire C, but translated from range 0-A to range 0-B.

Point of the circuit being that it should self adjust to always translate the signal from range 0-A to range 0-B, even if A, B or both change.

I'm basically stuck, any pointer or a suggestion would be appreciated.

Ben Tait
  • 17
  • 3
  • 2
    Wouldn't this basically be an analog multiplier? If you *really* need this, expect to pay a pretty penny for it. – Hearth Dec 29 '20 at 17:50
  • 1
    What does "low frequency" mean to you? I've worked with folks who hear "10kHz" and say "that's insanely high frequency", and with other folks who hear "10MHz" and say "oh, that's low frequency". – TimWescott Dec 29 '20 at 17:52
  • 1
    Define real purpose and components – Tony Stewart EE75 Dec 29 '20 at 17:53
  • And how accurate do you need the translation to be? I assume that you want \$V_D = aV_C + b\$, with \$a\$ and \$b\$ adjusted based on \$V_A\$ and \$V_B\$ -- correct? – TimWescott Dec 29 '20 at 17:53
  • B seems to be about 1/3 of A. Is that ratio constant or some random DC – Tony Stewart EE75 Dec 29 '20 at 17:57
  • @TimWescott I clarified the frequency and yes, that's what I want, except I don't think b will need to be adjusted at all, since the whole system has a common ground and it will be the floor for both signals at all times. – Ben Tait Dec 29 '20 at 18:05
  • @TonyStewartSunnyskyguyEE75 No, there's no fixed ratio between them. – Ben Tait Dec 29 '20 at 18:05
  • If you can write it into a couple of equations like @TimWescott has done, then you can use a hand full of opamps to effect those equations into a circuit. – Aaron Dec 29 '20 at 18:12
  • @Aaron The problem arises when trying to adjust \$a\$ in Tim's equation. That requires the use of an analog multiplier, a nonlinear device. Getting that functionality with op amps is possible but rather annoying and hard to zero out the temperature coefficient. – Hearth Dec 29 '20 at 18:21
  • Well since analog multipliers are hard and the signal changes slowly, how about a digital multiplier? – user253751 Dec 29 '20 at 18:29
  • More specs are needed for impedance of DC , AC source and load with a block diagram or schematic – Tony Stewart EE75 Dec 29 '20 at 18:37
  • I'm assuming that \$V_A\$ and \$V_B\$ are also slowly varying, perhaps slower even than \$V_C\$? – TimWescott Dec 29 '20 at 18:38
  • Seems like an adjustable attenuator might do. Have you considered an adjustable potentiometer? Or a digitally-controlled resistor? – glen_geek Dec 29 '20 at 18:38
  • @TimWescott Yes, What's more, A and B are likely (but not certain) to remain constant throughout any instance of operation, but are likely to vary from instance to instance. – Ben Tait Dec 29 '20 at 18:44
  • @glen_geek I'm actually starting to consider an MCU controlled digipot. – Ben Tait Dec 29 '20 at 18:46

2 Answers2

5
  • Get an ADC. Set its analogue reference to be the voltage value on line A.

  • Get a DAC. Set its analogue reference to be the voltage value on line B.

  • Connect the ADC digital output with the DAC digital input.

  • Connect signal "C" to the ADC input.

  • Connect line "D" output to the DAC output.

  • Set both ADC and DAC for continual conversion (you might need a pulse generator).

If the "A" line range of 0 to 20 volts is too high for a particular ADC, then pot down to make 20 volts become 5 volts (for instance). Ditto the signal line "C". Same ratio of potting down.

If you can't get a suitable DAC that can have a reference input of 6 volts (line "B") then pot it down then, take the DAC output through an op-amp amplifier to restore to the value you need for line "D".

Andy aka
  • 434,556
  • 28
  • 351
  • 777
  • You'd have to make sure the ADC and DAC support this kind of operation, but this seems like a good solution to me. Avoids mucking about with microcontrollers. – Hearth Dec 29 '20 at 19:02
  • IF I can find a pair of ADC and DAC which can communicate without an MCU in the middle, this actually seems like as elegant a solution as I've seen to this problem yet. – Ben Tait Dec 29 '20 at 19:14
  • Well, it was doable mid 80s when I built a simple 8 bit analogue storage thingy. ADC -> RAM -> DAC different read and write speeds, no MCU. – Andy aka Dec 29 '20 at 19:46
3

The solution that uses the least board space is to find the smallest microcontroller you can that has an adequate ADC and an adequate DAC, or perhaps an even smaller microcontroller with better off-board ADC and DAC. At this point you can:

  1. Use an ADC with at least three inputs.
    1. Attenuate your \$V_A\$, \$V_B\$ and \$V_C\$ so they are in the input range of the ADC.
    2. Read \$V_C\$ at a sufficiently high rate (not 2kHz -- you probably want 5kHz or 10kHz), and \$V_A\$ and \$V_B\$ at the same rate, or at whatever slower rate fits with your judgement.
    3. Do the obvious math in the microcontroller, pump the answer out to the DAC, and amplify the result sufficiently to hit the correct range. This keeps the circuitry simple.
  2. Use a 1-input ADC with a flexible \$V_{ref}\$. Ditto the DAC.
    1. Attenuate \$V_A\$ and \$V_C\$ identically (or appropriately, depending on the ADC's \$V_{ref}\$ arrangement),
    2. drive the normal ADC input with the attunuated \$V_C\$ and the ADC \$V_{ref}\$ with the attenuated \$V_A\$.
    3. Attenuate \$V_B\$ to match the DAC's \$V_{ref}\$ range, then amplify its output by the reciprocal of the attenuation. Then the microprocessor just needs to shuttle the number from the ADC to the DAC (with chips circa 1980's, you could do this without the microprocessor -- oh, this degenerate age when you need a million transistors to do the work of 20...)

OR

Get on your analog high horse and eschew any of this digital nonsense. Make a triangle wave or sawtooth oscillator that operates at some fixed fraction of \$V_A\$ (preferably 0V to \$V_A\$). You'll need a way-high frequency here -- probably 20kHz at least, if not 200kHz. Feed that and \$V_C\$ to a comparator to get a square wave. Use that square wave to switch \$V_B\$ on and off. Low-pass that result, and you have \$V_D\$. It's functionally the same as the microprocessor solution, it just needs way more way lower integration components and it'll be more of a pain to keep tuned in manufacturing (I'm an analog circuit designer by inclination, but one who's continually disappointed by the reality of digital circuitry).

OR

Use multipliers as suggested -- this will be even more hard to tune than my PWM suggestion above, it'll be driftier, more sensitive to component variations, and as an added bonus, the available stock of analog multipliers is getting ever-more narrow and more expensive. But it's about as pure analog as can be done.

Neil_UK
  • 158,152
  • 3
  • 173
  • 387
TimWescott
  • 44,867
  • 1
  • 41
  • 104
  • Wow, talk about a comprehensive answer. I think you've covered all the theoretical prospects excellently. Now I'll roll up my sleeves and start testing each for practical viability in my application. Thank you very much. – Ben Tait Dec 29 '20 at 19:16