Help Creating a Board for Sum/Difference Functions - Page 1
Forum section: electronics / projects

author: LoveLaika
author_rank: Frequent Contributor
timestamp: July 09, 2021, 07:26:42 pm
content: I'm working on developing a circuit to perform three sums, but I'm having some trouble with how to proceed. This is all just in simulation until I am comfortable with the necessary parts.I have four input voltages (A, B, C, and D), and they can be roughly represented by the 'exp' text file. I want to build a circuit that will spit out three sums, and I'm using op-amps to do so. The sums I want to achieve are {A+B+C+D}, {A+B-C-D}, and {A-B-C+D}, all with no gain. My signal reaches goes from 0 to -2 volts in a matter of 5 ns (400 V/us). The output voltage, in theory, should go as low as -8 volts. Thus, I am constrained to op-amps that can take +10/-10 volts.To start off, I approached the series of equations as a series of sum and difference equations. According to some research , a generic linear amplifier (where you add and subtract in a single op-amp) appears to be bad practice as the CMRR would degrade as you increase the number of inputs and resistor mismatches. Thus, I thought to go another way by just taking the sum/difference of op-amps with 2 inputs at a time. This resulted in 7 op-amps being needed to achieve the necessary sums (3 summing amps, 4 difference amps). In order to save on room and costs, I'm trying to find a dual op-amp IC that would fit my needs.From what my simulation shows me, the LM7171 seems to be a very good summing amplifier, but it doesn't seem to perform as well as a difference amplifier. With regards to my difference amps, I chose the THS3062 for its high slew rate, wide GBW. It seemed like a good match up with the LM7171. However, running sims in LTspice, I'm having some issues with my output signals. The first output appears to be at the correct voltage, but the second and third sums don't behave as expected. When you expect the output to be 0 volts, the actual output reaches a peak of around 250 mV. Likewise, when the output is supposed to be -2 volts (or similarly, any other voltage), it's not exact, but it's a few mV off from the expected values. Plus, you can see some instances of two peaks being formed. I would like it to be more precise/accurate to the expected values without any distortion, so what should I do regarding the THS3062 to make it behave more like the LM7171 but as a difference amplifier? Or perhaps, what is causing such an issue and what can I do to rectify it?https://electronics.stackexchange.com/questions/49080/can-you-sum-and-difference-in-a-single-op-amp

author: TimFox
author_rank: Super Contributor
timestamp: July 09, 2021, 10:22:49 pm
content: In your other related post, we were surprised at your frequency requirements.Please specify how much accuracy you require at high frequencies.

author: LoveLaika
author_rank: Frequent Contributor
timestamp: July 09, 2021, 10:43:38 pm
content: At high frequencies, I'm trying to have be within 1% or less. To give an example, say the output is ideally -8 volts. With that accuracy, the output can be in the range of -7.92 volts or -8.08 volts. Though, if it is possible to reduce costs by aiming for a lower accuracy, I'm open to ideas and suggestions.In my schematic, the LM7171 achieves this kind of accuracy based on the tests I ran it through for the summation op-amps. The issue is with the difference amplifiers. Ideally, when they should be 0 volts, they're off by 8 mV. Also, for some reason, there's a small voltage spike of about 40 mV that occurs for around 10 ns. (Note that this is when all inputs are pulsing).NOTE: Sorry, but I forgot to mention. Current feedback amplifiers just don't seem to be working for my application. To achieve the results shown in the image, along with the other files, I used the LM7372 op-amp for my difference amplifiers while still keeping the LM7171 for my summing amplifiers.

author: TimFox
author_rank: Super Contributor
timestamp: July 10, 2021, 01:46:34 am
content: Again, at what frequency do you need this accuracy? Because of GBW and parasitic capacitance, it is harder to achieve (and measure) high accuracy.

author: LoveLaika
author_rank: Frequent Contributor
timestamp: July 10, 2021, 04:35:38 am
content: At least 100 MHz; would like to achieve 200 MHz.

author: LoveLaika
author_rank: Frequent Contributor
timestamp: July 13, 2021, 02:25:22 am
content: Quote from: TimFox on July 10, 2021, 01:46:34 amIt took me a while, but I was suddenly hit by inspiration. Thinking about what you said, I decided to get some sample data of the signals that I'm working with. Then, I decided to use MATLAB, read in the data, and use FFT to plot the signals in the frequency domain and determine what frequencies I need to focus on/filter out. I'm dumb for not thinking about this earlier.However, running it like this, given my limited data sample size, it seems a bit odd. I've attached a sample run along with code to show the FFT below, but going through all the runs with the following program, I see that the FFT highlights a high amplitude at frequencies less than 0.5 Hz. I would have thought that the frequency be much higher given the length of time each sample data was run at (600ns). Does this make sense, or am I doing my FFT wrong?