Electronic – Offset and scale a DAC output with opamps

amplifierdacdc-offsetoperational-amplifieroscillator

I am trying to make a simple oscillator controller with an arduino and a DAC, to learn electronics.
I need to send a voltage between 12V and 17V to my oscillator to control its frequency. I got a 24V power and a 12V ref voltage. My DAC produce a 0/5V voltage.

I made a really simple circuit with a non inverting summer, which works fine :

enter image description here

(simulation)

Here the op amp is powered between 0V and 24V (I don't have negative voltage).

But my problem is, I need to be able to physically tune it using two variable resistors, for offset and scaling.

I think the process would be, theoretically :

  • Send lowest value to the DAC
  • Adjust offset trimmer until the oscillator is in tune for its lowest value
  • Send highest value to the DAC
  • Adjust scale trimmer until the oscillator is in tune for its highest value

Now I should have a perfect output range, which may not be exactly 12-17V but maybe something like 12.2V-16.5V or 12.5V-18V.

I tried to simulate many designs – the simplest one being tension divider bridges on the 12V ref and the DAC output. But my main problem is that adjusting one trimmer would impact the second. For example, adjusting the scale would also alter the offset.

I also tried to simulate this synthetizer "CV scale offset" schematic :
enter image description here

I still have the problem of linked scaled/offset but it seems more "linear". Maybe it could be possible to tune the oscillator if I begin by finding the right scale, then offset it.
But unfortunately I could not make it using a single power supply for the op amps. I had to power their negative supplies by -24V (which I have not) to make it work.

Here is a simulation (offset and scale controls in the right column).
enter image description here

Is there a simple solution to my problem ? I may be missing something (maybe the tuning process is not correct ?). Why does the last circuit not work with a single power supply, all my voltages being positive ?

Thank you very much for your help.

Best Answer

The easiest way is to seperate it into 2 different operations, 1 controlling the gain, another controlling the offset, this way 1 does not change the other significantly,

With this circuit you first get the gain correct, e.g. you know you need exactly 5V between min and max, once that is trimmed in, you then adjust the offset and the gain will not have changed.

enter image description here Simulation Link