Circuit to detect the point at which a voltage changes in gradient - Page 1
Forum section: electronics / beginners

author: AQUAMAN
author_rank: Regular Contributor
timestamp: July 02, 2015, 09:47:16 pm
content: Hello

author: Marco
author_rank: Super Contributor
timestamp: July 02, 2015, 10:03:13 pm
content: Take second derivative, threshold the result.

author: Ian.M
author_rank: Super Contributor
timestamp: July 02, 2015, 10:36:30 pm
content: In addition to Marco's idea, the initial rate of increase shown is approximately 33mV/us, so to achieve the desired 1mV accuracy will need a fast sample and hold gated with a pulse of the order of ten nanoseconds. Propagation delays become significant at this timescale so the signal to the sample and hold will need to be delayed in a transmission line, with an adjustable delay applied to the sampling pulse to 'tune' it to the point of inflection by matching the signal and sample pulse total delays. If this must run unattended, temperature compensation is likely to be required to keep the delays matched. Feed the sampled voltage to a 16 bit ADC converter which doesn't need to be very fast but does need good linearity and accuracy.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: July 03, 2015, 06:28:12 am
content: This sounds like a simple problem asking for a terrible solution...What is the range of variability in the signal? If it were the exact same every time, you wouldn't need to ask, you could just use a timer.What can you tell us about the source?Why do you think you need to know the voltage (or time, or anything) so precisely?~4V isn't "quite close to 0V". It's 20% of the full scale shown, more like a "generous fraction"...Quote from: Marco on July 02, 2015, 10:03:13 pmFirst..?Note that derivative is noise sensitive, so you're generally going to have a band limited derivative (i.e., it only acts like a derivative over some range of frequencies). This range depends on the characteristics of the source, and how fast your circuit needs to operate.Quote from: Ian.M on July 02, 2015, 10:36:30 pmWait, who said anything about S&H?If you mean, doing it digitally, yes you could do that, but if the given waveform is truly representative, you can get by with much less than that sample rate (about 20kS/s is minimal, by the looks of it).Quote...And transmission lines and compensation oh my?...Actually, if you're doing it analog, that's a good tip: using transmission line delays to account for comparator and S&H propagation. Triggering on the derivative change (assuming the dV/dt window is suitable -- we don't know yet) then picking the point "in the middle" will do the job.To elaborate on that "slow sampling" point:If it's a smooth ramp, you only need two points on it, before and after the slope change. It can be timed or sensed. If the subsequent time constant is consistent, then only two points are needed there, otherwise three (to solve for the curve's rate and magnitude). Solve the line equation for the pairs of points, and find the intersection.If the source is noisy (and has more variation in the timing and rate and everything), more samples will be necessary. Some active analysis may also be required to determine where the slope changed. When that's found, do the same process, but use linear least squares interpolation to find the line equations and intersections.This can be performed in digital or analog. The analog implementation might use a series of S&H's triggered by a sequential counter, then their outputs are compared (differentially) against a variable reference: a chain of resistors between two voltage sources (thus giving slope and offset for N points on a line). The values of those sources are wiggled (with some reference ripple) until the error signal (ideally, the RMS of differences, though max(abs(err)) could be used as well) becomes balanced. Lastly, some op-amps solve the equation of the lines (just a ratio of voltages) to find the intersection point.Such an analog computational approach won't at all be very compact or expandable (you need N S&H's for N samples in the data set, plus muxes and other stuff if you want to do the computations serially, or N of those to do it all at once), but it would be capable of sufficient accuracy (the requested parts per thousand, without much trouble; pushing that into the ppm is probably wishful thinking though). More of a mental curiosity, if anything, but interesting anyway.Tim

author: mikerj
author_rank: Super Contributor
timestamp: July 03, 2015, 07:46:56 am
content: If 12 bit resolution is sufficient, a cheap STM32 can sample at 1MHz and has plenty of memory to store the entire sweep in a buffer for post processing.

author: Ian.M
author_rank: Super Contributor
timestamp: July 03, 2015, 09:26:10 am
content: Second derivative, because the point of interest is the only step change in the first derivative.1mV in 20V is 50ppm and needs 15 bits of ADC resolution.Affordable digital solutions come up an order of magnitude short of the desired resolution, which leaves the analog approach. Unfortunately thats going to be a real bundle of joy, and at least a hundred times times worse if its got to be mass produced. Don't even get me started on the pleasures of calibrating the system.IMHO if at all possible the spec. and the measurement process need to be thrown out the window and some other way of getting equivalent information to an accuracy suitable for normal engineering purposes (3 sig. figs.) needs to be developed.What is being measured?What does the inflection point actually represent?

author: T3sl4co1l
author_rank: Super Contributor
timestamp: July 04, 2015, 01:40:28 am
content: Variable capacitors work just fine in LTSpice; in fact they're built into the engine (that's how diode recovery is modeled; poorly, but better than nothing). If you can't figure it out, I don't know the specifics of LTSpice syntax myself but there should be many examples on the Yahoo group, give it a check.What physically happens to the capacitor? If this is like a type 2 dielectric, it doesn't suddenly change, it saturates roughly as sqrt(V) (which has the effect that energy stored rises linearly with voltage).How much charge is required? Would that not be a better measure? Does it depend on the initial state (i.e., unknown recharge cycles)? How much margin is there to go over or under? (Example: LiIon cells operate best when not quite fully charged or discharged; you don't usually "top them up" to 100%, and you certainly don't overcharge them.)Tim

author: T3sl4co1l
author_rank: Super Contributor
timestamp: July 05, 2015, 05:52:55 pm
content: Oh, so it won't be piecewise continuous at all, but continuous and gradual -- this is important information, because it means the derivatives will be finite, which sets limits on where the comparator threshold must be.Could you provide a complete circuit or equivalent of the MOS's environment (gate and drain sides) and drive circuitry?Tim

author: edavid
author_rank: Super Contributor
timestamp: July 05, 2015, 06:06:37 pm
content: How do commercial CV meters work? I thought they often used AC measurements.