# [sdiy] Digital accumulator VCO core?

cheater cheater cheater00social at gmail.com
Fri Feb 12 06:32:04 CET 2021

```I'm less looking for current and more looking for charge.

BTW, in my application, I am free to have a large shunt resistor,
which will give me a full scale voltage of even say 15V - because I
don't need to preserve the current.

However...

any ADC normally works by capturing some amount of charge into an
internal capacitor and then measuring the discharge time of that. So
it is kind of odd that you can't find an ADC that directly reports the
charge captured in some way... maybe it's implied somehow, and you
just have to use a normal ADC and somehow process its output based on
the math around its charge capture device.

On Fri, Feb 12, 2021 at 6:27 AM Brian Willoughby
<brianw at audiobanshee.com> wrote:
>
> 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
>

```