Voltage integrator power supply dependency - Page 1
Forum section: electronics / projects

author: brumbarchris
author_rank: Regular Contributor
timestamp: June 12, 2019, 03:06:28 pm
content: So, we have this nice requirement to make a voltage integrator circuit that takes an exponential signal at its input (called VC_OUT). It is a negative exponential, decaying from -0.8V to 0V, but the decay time itself can vary somewhere between 5...100us. The purpose of the integrator is to encode the "area under the graph" of this signal into a signal called INTEG_OUT, which has an amplitude which directly depends (in a proportional manner) on the decay time of the exponential. The final goal will be to eventually capture the peak of this signal and feed it to an ADC which does not need to be a very fast or accurate one (as opposed to the case in which we would feed the decaying exponential, perhaps inverted, directly to the ADC and doing some digital signal analysis to determine the decay time).Anyway, we came up with the circuit in the first picture below, which seems fit for the purpose. As you can see in the second picture, the output signal (INTEG_OUT) has a variable amplitude, directly dependent on the decay time of the input signal (VC_OUT). Don't mind the two MOSFETs, they are there to allow us exactly when to start integration, relative to the input signal.However, the circuit has a problem. If I run the simulation for a given decay time and if I vary the supply voltage of the opamp, an unexpected and rather significant dependency of the output signal is observed (see third picture). I am a bit puzzled, as I was under the impresion that the operation of the voltage integrator does not depend on its supply voltage, as long as we do not enter in voltage clipping issues.Please help me determine what is the cause of this dependency.Best regards,Cristian

author: cur8xgo
author_rank: Regular Contributor
timestamp: June 12, 2019, 06:24:52 pm
content: Generic SPICE strategies for anomalous behavior:-swap that opamp with other types and see if the behavior changes-simplify the circuit and stimuluses as much as possible and see if behavior still exists (delete fets, try a DC voltage input)-put 100 uohm resistors in series with everything and see what currents are different (maybe input bias current changed on opamp)-exaggerate the difference by increasing the value of resistors and the supply voltage-change the spice transient mode-maybe input offset voltage changed on opampOther things:Check the voltage across the feedback cap in the two cases..initial conditions aren't clear here.Shorting the output of an opamp with a mosfet is generally unwise...Mosfets should have pull up/downs on gates...even if its just for the sim, you will forget it and it will bite you and waste your time later

author: Kleinstein
author_rank: Super Contributor
timestamp: June 12, 2019, 08:37:06 pm
content: The reset switching is done wrong. The normal way would be a FET in parallel to R202.The way the circuit is, it depends a lot on details of the OP: the input offset and the maximum output current.

author: duak
author_rank: Super Contributor
timestamp: June 12, 2019, 11:52:41 pm
content: I haven't used Spice very much. When I look at the EXP function, I see it's calibrated in current - amps to be precise. Is this what is wanted? It would seem that -0.8 A would cause some unusual operation.Here's a quote from a manual:The EXP form causes the current to be <i1> for the first <td1> seconds. Then, the currentdecays exponentially from <i1> to <i2> using a time constant of <tc1>. The decay laststd2-td1 seconds. Then, the current decays from <i2> back to <i1> using a time constant of<tc2>.If I look at INTEG_OUT, I think I see the opamp fully saturated by being clamped against the body diode in the FET and then drifing towards zero. If so, this explains the supply voltage dependancy.

author: brumbarchris
author_rank: Regular Contributor
timestamp: June 13, 2019, 12:39:14 pm
content: Hi All,Thank you, I took your suggestions on-board and the result is a significant improvement.QuoteNo not really. Not sure which section of the manual you took that from, but if you look in the help file of a V source you see the V source can have also the exponential function and it is configured as voltage, not current. I have added a screenshot with the relevant section of the help file.Going back to the circuit, yes I implemented the RESET in parallel to the R202 resistor and it works better. I also had to tweak the resistor values, that also helped. However, for the life of me, I was not able to implement the switch using discrete transistors. I wanted to use MOSFETs, but these were heavily influencing the feedback loop, most likely by injecting current in it from the controlling signal via the various parasitic capacitances. Anyway, I got the simulation going with a dedicated analog switch, which is good enough for now. The VCC influence is now some 9mV, which is acceptable.Best regards,Cristian

author: duak
author_rank: Super Contributor
timestamp: June 14, 2019, 02:43:19 am
content: Cristian, I think I last used Spice (PSPICE actually) in 2001 and the manual I looked through is from 2000. I seem to have nothing but old, obsolete stuff here.