0
\$\begingroup\$

I am building a function generator as an exercise. I have a 9V power supply that I split into +/-4.5V. The +4.5V side powers an Arduino that outputs the waveform as a series of 8-bit values on digital pins 0-7. This 8-bit bus feeds an R2R DAC that converts it into a voltage from 0 to 4.5V, thus producing the waveform.

I want to be able to vary the amplitude and offset of the generated waveform. Also I want it to be centered on 0V instead of 2.25V. I figured I could do this by feeding (a) the waveform (from 0 to 4.5V), (b) -2.25V, produced by dividing the voltage between ground and the -4.5V rail, to center the waveform on 0V, and (c) a voltage from a potentiometer across the +4.5V and -4.5V rail, to control the offset, into a op amp summer. Another potentiometer would control the gain of the op amp and thus the amplitude of the signal. I am using the op amp in the inverting configuration to enable a gain of less than 1.

My problem is the the summer isn't working the way I expect. The op amp itself is fine, but the input to the op amp isn't what I thought it would be.

In the diagram, "In" is the input from the DAC (only three bits shown here for simplicity, converting the binary value 100), "Center" is the -2.25V, and "Offset" is the output of the offset pot. "Avg" is the average of the three, which will go into the op amp. If the op amp gain is 3, I should get the sum of the inputs. The voltage "In" from the DAC is +2.25V, while "Offset" is -2.25V, and with the pot centered and producing 0V, "Avg" should be 0V... but it's not. CircuitLab says it's -190.7mV. Similarly "In" is +1.03V instead of the expected +2.25V, and "Center" is -1.564V instead of the expected -2.25V.

I think I know what's going on here. All of these things are connected to the others, so for example "Center" affects "In." What I'm wondering is, what's the right way to fix this? More generally, how does one isolate the inputs to an op amp summer so they don't affect the others? I guess that one solution would be to buffer each of the inputs, but is there a simpler way?

Also--descriptions of op amp summers always say that the inputs should feed through equal-value resistors, thus the 10K resistors R11, R12, and R13. But that seems like it can't be right if what's behind the equal-value resistors is more resistors. What am I missing here?

Circuit

\$\endgroup\$
1
\$\begingroup\$

I guess that one solution would be to buffer each of the inputs, but is there a simpler way?

Not really. You'd have to buffer them somehow, regardless of complexity. And op amp followers are of low external complexity.

But that seems like it can't be right if what's behind the equal-value resistors is more resistors. What am I missing here?

You're missing buffering. The buffers would have high input impedance and low output impedance, leading to minimal losses on the summer inputs.

\$\endgroup\$
  • \$\begingroup\$ Okay, so if I put buffers behind R11, R12, and R13, that would seem normal to someone who does this for a living, as opposed to someone like me who fumbles around on the weekend? \$\endgroup\$ – Willis Blackburn Feb 14 '16 at 19:42
  • \$\begingroup\$ Normally buffering is the job of the DAC. But if it proves insufficient/ineffective then yes, external buffering would be the choice. \$\endgroup\$ – Ignacio Vazquez-Abrams Feb 14 '16 at 20:21
  • \$\begingroup\$ It's not really a DAC. It's a passive R2R circuit: bourns.com/pdfs/r2rap.pdf \$\endgroup\$ – Willis Blackburn Feb 14 '16 at 20:40
  • \$\begingroup\$ So the DAC buffering is not so much insufficient as non-existent. \$\endgroup\$ – Willis Blackburn Feb 14 '16 at 20:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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