Go Down

Topic: Analog Comparator falling edge setup (Read 4 times) previous topic - next topic

daywalkerdha


So the timer will trigger an external device to create a voltage which the analog comparator is going to compare against?

What does the whole thing do?


Measure the ESR of a cap

dhenry

I assume that you aren't using a bridge here.

The typical approach then is to charge up a fully depleted cap and measure the current during the initial charge up. The comparator is probably not a very good tool for this.

Unless you have a different approach?

daywalkerdha

#12
Dec 09, 2012, 11:19 pm Last Edit: Dec 09, 2012, 11:43 pm by daywalkerdha Reason: 1

I assume that you aren't using a bridge here.

The typical approach then is to charge up a fully depleted cap and measure the current during the initial charge up. The comparator is probably not a very good tool for this.

Unless you have a different approach?


I feed the DUT with a constant current(chopped by the generated pulse), amplify the generated voltage over the DUT and compare it to the voltage of a reference cap that is being charged by a constant current(==> linear rising voltage). If you want to read more, here's a link: http://members.ozemail.com.au/~bobpar/k7214.pdf I basically just added some stuff I wanted and converted it to be Arduino based.

But my question was if you know a better way with only one interrupt ;)

dhenry

Quote
But my question was if you know a better way with only one interrupt


I think his approach is quite convoluted - C10 for example only serves to tell time, which the mcu can do with ease.

The basic theory here is that when you charge up a capacitor with a constant current, the voltage rise

deltaV = I * Tc / C, assuming deltaV is sufficiently small and ESR is sufficiently small.

When  you discharge, the residual voltage at Td is

Vd = deltaV * exp(-Td / (ESR * C)).

So after each charge/discharge cycle, the voltage across the capacitor has gone up by Vd.

If, after n such cycles, the voltage across the capacitor is V, you have

V/n = (I * Tc / C) * exp (-Td / (ESR * C)), assuming of course V is sufficiently small.

If you know V, n, I, Tc, Td, C, you can solve for ESR from the above.

You can take his hardware, and you can rewrite the software:

1) charge the capacitor at I for Tc;
2) discharge the capacitor for Td;
3) go back to 1 for n times;
4) measure the voltage across the capacitor, V;
5) calculate ESR.

No need to have a comparator.


daywalkerdha

#14
Dec 10, 2012, 02:22 am Last Edit: Dec 10, 2012, 02:32 am by daywalkerdha Reason: 1
The comparator(and C10) is essentially there for an extremely fast analogRead(), which otherwise wouldn't be possible fast enough.
The goal of an ESR meter is to make measurements in circuit possible and if you charge the capacitor you'd activate other stuff in there.
http://en.wikipedia.org/wiki/Equivalent_series_resistance


If you know V, n, I, Tc, Td, C, you can solve for ESR from the above.

Where should the ┬ÁC know C from? I don't want to enter it every time.

Anyhow, can I improve my software solution or do I require two interrupts, without changes to the way the measurement is done?

Go Up