# [sdiy] Digital accumulator VCO core?

Brian Willoughby brianw at audiobanshee.com
Fri Feb 12 06:27:18 CET 2021

```On Feb 10, 2021, at 23:46, cheater cheater wrote:
> Here's one thing I've been wondering about. Is there a form of ADC
> where every sample represents the total charge that passed through a
> conductor since the last sample? Normally, an ADC will only sample
> voltage (or current) at the time of sampling, but we don't really know
> anything about what happened between sampling intervals. If we assume
> that the current was roughly constant during the sampling, that's
> fine. But if it changed during that time, then we have to do some sort
> of interpolation. Even if we do a linear interpolation, maybe the
> current going through the conductor was concave or convex. Being able
> to sample the total charge going through a cap would be much easier,
> since I'd be converting the input data into a charge amount anyways
> (to be added to the virtual capacitor).

I worked on a product that needs to measure the power consumed by a device. Power is calculated by measuring voltage and current. The goal was to sample at a fairly low rate, but not miss any spikes in current that occurred between samples.

Just as you suggested (at least I think it's what you suggested), using an integrator (capacitor in an op-amp feedback loop) allows spikes in current to be captured no matter when they occur, and still contribute to the total current measured at the end of the sampling period.

This design suffers from the same problem as a ramp VCO. There's always the need to discharge the capacitor in an integrator before it reaches the power supply voltage rail. No matter how fast you try to discharge a capacitor, it always takes more than zero time. That short discharge time means that current spikes during a small window will be lost. It's possible make this a tiny percentage of the total sample period, but it's still a factor.

Note that we didn't find any ADC that measures current directly. These kind of systems use incredibly precise resistors of very small values, and a high-gain, high-precision instrumentation amplifier to boost the tiny voltage drop to a value large enough to measure with an ADC.

To my knowledge, there is no ADC that measures current directly. Not discretely, and not continuously.

Brian Willoughby

```