LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Capacitance measurement using voltage o/p

Hey everyone,

I am trying to measure cacpacitance by measuring the time constant using the  output voltage from an RCcircuit.R=8 KOHMS C=1NFARADS at 1Khz

Just to be sure i measured the time constant using an oscilloscope using a square wave of 4.6 voltsand it was pretty close.T=R*C=8 us.But when i use labview to do the same using the transition measurement vi something is going wrong.I have attached my vi.

I have set the high reference to 62% and the measurement info shows that the low is 0.156V and high is 2.93V which is right but the duration is no way close. Can anyone point out what I am doing wrong and what i should be doing.

I am using ni 9215 to measure voltage and a function generator to supply input.

Thanks

 

 

Download All
0 Kudos
Message 1 of 6
(4,293 Views)

It appears that you have your sample rate set to 1000 samples per second. Have you heard of the Nyquist criterion? It states that the sample rate must be greater than twice the highest frequency to be measured.  So you cannot even measure the frequency of your 1000 Hz square wave, let alone the rise time.

 

You want to measure time constants on the order of 8 us. How many points do you need during the rise time to get adequate resolution? Let's say that 10 points will give you a nice looking curve. The curve lasts ~ 3*T = 24 us. So you need about 10 points in 24 us = 1 point evry 2.4 us = ~417 kHz sampling rate. Which is about twice as fast as the 9215 can sample one channel.

 

Lynn

Message 2 of 6
(4,279 Views)

Thank you lynn.

I increased the sampling rate and added more resistors to get a time constant close to 150 us.Now the program works fine.

I had another question.Can i increase the rate at which i get the duration output from the vi.Now i am getting one output in one second.Can i make it faster.And is the vi measuring rising time for one wave in one second or every wave.I want to get as much data as possible.Eventually i am going to measure a variable capacitor.

Thnaks a lot for you help.

0 Kudos
Message 3 of 6
(4,267 Views)

I remember doing such things in our metrology lab course ....... ups, about 30 years ago.   First time I got in touch with the HPIB-bus ... programming in BASIC on a PET .... and we had a nice hardware GPIB-bus debugger........  

 

You get better results for each slope if you use your knowledge about the RC slope. 

It's an exponential formular and for each slope you have multiple point.   Try the exponential fit 😉   (and you can use the falling and rising slope!)

So slice your data with the threshold.vi into single slopes, apply a exponential fit on your slope , calc the capacity

You can think about a producer consumer loop.  One (producer) is collecting the data , an as soon as one slope is captured , pipe it to the second loop (consumer) that does the fit&calculation and show  the value....

 

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 4 of 6
(4,220 Views)

There are two parameters which control how often you get updates: The sample rate and the number of samples read at each call. In your original image you had rate = 1000 S/s and # samples = 1000. So it required 1 second to accumulate 1000 samples. Since you are still getting one update per second, I am guessing that both parameters have identical numerical values. Try reducing the # samples value to ~10% of the sample rate. That should give you ten updates per second.

 

According to the Detailed Help for the Pulse Measurements VI, it measures the characteristics of either the high or low portion of the pulse number you specify. If you want to check all the pulses in a block of data, put the Pulse Measurements VI inside a for loop and wire the iteration terminal (+1?) to the pulse number input.

 

Lynn

0 Kudos
Message 5 of 6
(4,184 Views)

If i understand correctly the transition measurement vi measure only one rising or falling edge from the sample.

I played with the sampling rate the the nuber of samples per channel and found that the loop time can be reduced below 4 ms i.e. time for one output.

In the images below my input frequesncy was 520 hz and the capacitor is still 1nF.

For a constant sampling rate say 100Khz,I kept on reducing the number of samples until i could only see one wave on the graph so that i get more data.If keep samples per channel high i will have multiple waves on and the transition vi just measure output on one of them (1st wave in my case) and the loop takes more time.

I am just wondering if I can reduce the loop time/get data quicker than 4 ms.

And would an impedance analyzer be quicker? I have agilent hp 4192A at my disposal.

Thank you for you help Lynn.

Sandesh

 

Download All
0 Kudos
Message 6 of 6
(4,155 Views)