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


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.

  • \$\begingroup\$ Would it not be easier to define your error budget for gain and offset and eliminate this error by design using appropriate tolerance components? eg 0.5% or less with ratio arrays. Also you are NOT showing an Oscillator Design, rather just an Amp with an Arduino signal and hidden VCO with unknown specs and tolerances. Pls correct that and show design specs 1st (Always) \$\endgroup\$ Commented Apr 24, 2020 at 13:39
  • \$\begingroup\$ Your question implies a spec of Gain =1.00 Offset = 12.0V yet there is no tolerance or is it adjustable to correct offset of Varactor FM VCO? \$\endgroup\$ Commented Apr 24, 2020 at 13:42
  • \$\begingroup\$ Might want to feed that 12V reference to non inverting pin of both op amps. \$\endgroup\$
    – Leoman12
    Commented Apr 24, 2020 at 13:47
  • \$\begingroup\$ @TonyStewartSunnyskyguyEE75 That's because my "VCO" is extremely instable. But my question is about how to make a offset/scale circuit, not about the oscillator. FYI here is the "VCO" theory : kerrywong.com/2014/03/19/bjt-in-reverse-avalanche-mode \$\endgroup\$
    – risk
    Commented Apr 24, 2020 at 14:09
  • \$\begingroup\$ OK but now you must define your goals for Gain and offset with Out/In and Out-In range and tolerances. Or maybe you want to measure frequency and linearize that with a wide loop gain?? \$\endgroup\$ Commented Apr 24, 2020 at 15:11

3 Answers 3


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

  • \$\begingroup\$ Thanks ! It worked great indeed. I updated it by also amplifying the offset (12v) voltage so I can offset more than 12V. Then I summed the amplified signal with the amplified offset with a third opamp. It requires 3 opamps but it worked great and tuning can be done very easily ! I also added resistors to the divider bridges so I get a more precise tuning (for example the offset range is now 9-14V instead of 0-24V). Here is my circuit : tinyurl.com/y85owu8z \$\endgroup\$
    – risk
    Commented Apr 25, 2020 at 12:00

This should do it.

Oscillator Driver

Tuning procedure:

1) Set range pot to about mid setting.

2) Set DAC output to 0V and then adjust offset pot to get minimum oscillator frequency.

3) Set DAC output to 5V and then adjust range pot to get maximum oscillator frequency.

You may then need to repeat steps 2 & 3 two or three times to bring it in exactly.


With R2 = 10k as shown the op amp's output will probably saturate unless a single supply op amp is used. If you change R2 to 6k2 then you probably won't need a single supply op amp.

  • \$\begingroup\$ @risk Edit included. \$\endgroup\$
    – user173271
    Commented Apr 25, 2020 at 0:05
  • \$\begingroup\$ i think this could be more efficiently implemented with a single op-amp and fewer resistors.. no need for two. \$\endgroup\$ Commented Apr 25, 2020 at 1:30
  • \$\begingroup\$ @robert bristow-johnson Do you have a design in mind or are you just speculating? \$\endgroup\$
    – user173271
    Commented Apr 25, 2020 at 5:26
  • \$\begingroup\$ @James Worked great, thanks ! I ended with using a 3-opamps design so I can really decouple scale from offset, which really simplifies tuning. Also I had troubles to prevent the opamp from saturating for high values with your design. I could not make it go higher than 18V, but I may have gotten it wrong... FYI here is my final circuit : tinyurl.com/y85owu8z \$\endgroup\$
    – risk
    Commented Apr 25, 2020 at 12:05
  • \$\begingroup\$ @risk Very nice! I like that design. \$\endgroup\$
    – user173271
    Commented Apr 25, 2020 at 15:47

This is not an Oscillator design but merely a sloppy level shifter with unity gain and pots to compensate for poor tolerance resistors.

You can have a sweep VCO and separate Offset control. Here I simulate just the VCO input with a triangular offset.

Start with better design specs, then implement it. This is 0 to 5V sweep input and 0 to 5V offset input with the output shown below on Vmin-max for R values shown.

enter image description here


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.