mjmeli / arduino-ad5933

A simple library for controlling the AD5933 impedance converter system with an Arduino compatible device.
MIT License
47 stars 32 forks source link

AD5933 to measure change in impedance #4

Open AdarshGouda opened 6 years ago

AdarshGouda commented 6 years ago

Dear Experts,

I am trying to measure change in dielectric property (degradation of vegetable oil) by measuring the impedance using a simple parallel plate capacitor. The expectation is that the real and imaginarychange as the the oil degrades with temperature. This is continuously monitored over time.

I first need to find an optimum frequency (which i kinda know based on earlier literature) and continuously monitor the changes in complex impedance at that optimum frequency and display real and imaginary values (intend to use arduino with AD5933). How can i modify this code to achieve that?

If i understand correctly, i need to use frequencySweepEasy(); or frequencySweepRaw(); and not both- is that right?

What if i dont want to perform a sweep everytime and rather find img and real values at a fixed frequency? Is this possible? or do i need to perform a frequency sweep everytime?

Being a mechanical engineer, I'm not much of an expert in this regard.

Any help would be much appreciated.

Regards,

AdzTheDemon.

mjmeli commented 6 years ago

Hi,

frequencySweepEasy() and frequencySweepRaw() are just two different alternatives to handling the data. The easy method performs the entire sweep, stores the data in an array, and then returns to you to handle that data. This is a lot easier to deal with but means that you have to wait for the entire sweep to finish before processing and you must have large enough data arrays to hold the entire sweep data. The raw method avoids these problems by being a bit more complex and allowing you to handle the data at each individual frequency step at a time. For your application, it sounds like the easy method should be sufficient, but again, either will work.

One of the variables you can set for a sweep is the number of increments. You can probably set this to 1 and perform a single test at a single frequency. I am not sure if this is an intended use case of the device though and so I'd recommend reading the data sheet to make sure there isn't anything that makes this a bad idea and trying through experimentation. If you aren't sure of an optimal frequency, this is a good reason why you might want to use a sweep, though.

The example program should be a great resource in getting started for an application like this. If things don't make sense then the data sheet is pretty easy to understand and followed closely by the examples.