Measuring capacitor voltage with op-amp comparator in negative region? - Page 1
Forum section: electronics / beginners

author: Houseman
author_rank: Regular Contributor
timestamp: April 08, 2021, 10:46:23 am
content: Hi forum, and welcome back to you all!!!I missed you.Seems really simple question but not for me apparently... son any help would be very appreciated.I need a simple "voltage" detector across a "blocking" capacitor put in series of a load circuit a 1k resistor.The current generator is connected for 600us and then for 2400us the cap is shorted to ground.I attach the schematic.when voltage between cap is zero, it means an open circuit at the load and so a RED led has to go on.Otherwise when voltage across that cap is non zero ( let's say above 2V) a green led has to be on.Obviously the circuit has to draw less current than possible (10 to 20 of uA max.) since it would affect the net charge on the loadI was thinking of an OP-AMP connected as comparator of two stages.But now comes the problems for me.- The difference at the cap is positive (+2V) but all the circuit is negative relative to ground. I do not know how to connect the voltage divider.- Where should I connect the inverting/non inverting input?Should I use a differential amplifier?Any hint would be very appreciated. You know I do not want a solution. Just a light in the dark...And sorry.Thank You all.

author: Ian.M
author_rank: Super Contributor
timestamp: April 08, 2021, 11:25:46 am
content: What supply rails do you have available? You mentioned a -15V compliance voltage for the current source, so is there also a -15V to -18V supply rail that could power OPAMP buffers to get an arbitrarily high input impedance for your proposed differential amplifier + comparator?If not, there are various other options:Sense load current, not voltage. Would a 10R sense resistor in series with the load cause any issues? That would give you several hundred mV that could be easily amplified and detected.Simply sensing the voltage waveform on the load side of the capacitor is sufficient to detect most fault conditions. If its flat 0V, the signal source or grounding switch has failed. If its a triangularish waveform with limited amplitude, its operating normally. If its a 15V pk-pk squarewave, the 1K load is open circuitLast Resort: generate appropriate rails with a DC-DC converter so you can power OPAMPs with enough common mode input range to go with your original idea

author: Houseman
author_rank: Regular Contributor
timestamp: April 08, 2021, 02:12:14 pm
content: Thank You Ian.MI really appreciate your help. Sorry I am not used to work with negative voltages....Well I have a -15V supply which powers the current mirror for the constant negative current and a +3.6V where the (-15V) negative voltage is produced from via a boost converter.So I was thinking connecting Vcc of the OPAMP to the 3.6V and VEE to -15V.Does this shift the "ground level" inside the OPAMP at -9V?You wrote: "OPAMP buffers to get an arbitrarily high input impedance ". Do I need to put also a buffer before the differential? are the +/- IN high impedance of an OPAMP itself not enough?Simply sensing the voltage waveform on the load side of the capacitor is sufficient to detect most fault conditions. If its flat 0V, the signal source or grounding switch has failed. If its a triangularish waveform with limited amplitude, its operating normally. If its a 15V pk-pk squarewave, the 1K load is open circuit.Yes that would perfect .. but how to do it?? I actually have voltage drops on the load for 600us then 2400us load is shorted to ground.

author: Ian.M
author_rank: Super Contributor
timestamp: April 08, 2021, 02:48:44 pm
content: Once you've wrapped a feedback loop round a near-ideal OPAMP to make a practical circuit, the only ground that matters is whatever reference level you have chosen to relate the input and output to.There is however a failure mode that would be problematic for ordinary OPAMPs running from your +3.6V and -15V rails. If the grounding switch fails to operate for several microseconds the charge on the capacitor will build up, till the voltage across it reaches the 15V compliance limit or the switch closes. When the switch closes the voltage across the load instantaneously peaks at whatever the voltage has built up to, possibly +15V.Your buffer OPAMPs should therefore either have over-the-top*input capability to prevent damage and maintain operation, or if significant input leakage current is acceptable during fault conditions, should have inputs protected by series resistors + clamping.It may also be possible to use a single chip instrumentation amplifier with over-the-top capable inputs. This avoids the need for high precision or hand-trimmed feedback resistor networks to get acceptable CMRR performance.* See:https://www.analog.com/en/technical-articles/robust-high-voltage-over-the-top-op-amps-maintain-high-input-impedance-with-inputs-driven-apart-or.html

author: Houseman
author_rank: Regular Contributor
timestamp: April 08, 2021, 03:08:50 pm
content: Wow, thank You really Ian.MThis drawback (+15V peak in case of ground failure) could be prevented by building a correct +15V -15V supply rail for the opamp, right? There are several USB 5V to +-15V dc/dc converters available on the market I can think to implement for the final circuit.One last thing, please.Is my idea of a differential amp + cascaded comparator the right way?I mean I have mumbled this in my mind but dunno if it is the correct answer.I have to do the dirty calculation yet.I was thinking: well I have to measure a differential signal so use the diff-OPAMP.can the LM358 be classified as the " near-ideal OPAMP to make a practical circuit" for the first try? I have this in my shelf..RegardsP.S. One last thing is that I need NOT to reject the Common Mode Voltage (in my case approx. 2.5V) on which the capacitor voltage during the charge discharge swings (approx. +-330mV) since it's this that indicates the circuit is working.I am afraid that using a differential amplifier is not the right choice since it's know his high CMRR...Regards

author: Ian.M
author_rank: Super Contributor
timestamp: April 08, 2021, 03:34:23 pm
content: I don't know if its the 'right way', and doubt there is any single 'right way'. It does seem reasonably simple, but you'll need a rectifier and low pass filter stage between the differential amplifier and the comparator.LM358 type OPAMPs are likely to be suitable if you provide a higher Vcc rail for them. They wont work well from 3.6V Vcc as the common mode input range only extends to 1.5V below the rail. If you've got 5V available that should be good enough. Also note that output phase reversal due to violating the common mode range is likely (so don't do that!), and they have significant crossover distortion. Seehttps://www.ti.com/lit/pdf/sloa277for details.