My senior project: LCR meter - Page 1
Forum section: electronics / projects

author: RobEE
author_rank: Contributor
timestamp: November 02, 2015, 03:51:53 pm
content: I am in my senior year working on my B.S. in Electronics Engineering. For my senior project I am building a LCR meter. I plan to share more of the details and the build later but right now I have a question. I need to produce a sinusoidal test signal at several frequencies to test components. I want to test at 100Hz, 1kHz, 10kHz, and 100kHz.How should I produce the signal and how do I divide or multiply it to provide the other needed frequencies?The need for precision kind of rules out a LC circuit. My one professor that is good with analog design does not teach this semester and the professor that teaches the senior projects class has given me some contradictory advice, so I thought I would come here for some help pointing me in the right direction.

author: dreaquil
author_rank: Regular Contributor
timestamp: November 02, 2015, 04:17:37 pm
content: I am also in my senior year of B.Eng Electronics and Electrical so take my suggestion as a peer's suggestion not from experience. Can't you use a high speed DAC to do that? You don't really care about the amplitude since u can test at anything as long as it can output at about 1MHz so that you can filter down to 100kHz that way you're way above the Nyquist Criterion.

author: nathanpc
author_rank: Unknown
timestamp: November 02, 2015, 04:20:01 pm
content: Since your frequencies are relatively low you could use a DDS chip and set the wave forms and desired frequencies with the microcontroller you're already going to use to do all the calculations and display the results. A good example are the numerousAD9850 modulesthat you can buy on eBay to play around with.

author: dr.diesel
author_rank: Super Contributor
timestamp: November 02, 2015, 04:20:08 pm
content: Not to be an ass, but is it much of a project if you just ask an expert how to make it happen?

author: Kalvin
author_rank: Super Contributor
timestamp: November 02, 2015, 04:23:05 pm
content: How accurate the frequency needs to be? What distortion level is required? Are you doing it all analog or mixed-signal?One analog solution could be to use a sine wave VCO. The now obsolite ICL8038 could produce sine wave up to 300kHz. There might be similar products or you may want to design something similar.The mixed-signal solution could be something like using a look-up table of 1000 digitazed the sine wave samples (or generate it on fly), feed it to DAC and filter it with a Nth order low-pass filter. Setting the lookup-table step size will then determine the output frequency.You may also want to search the Forum for the previous art.

author: JacquesBBB
author_rank: Frequent Contributor
timestamp: November 02, 2015, 04:40:18 pm
content: Quote from: dr.diesel on November 02, 2015, 04:20:08 pmI think you can always consult experts in a project, but at the end you have to acknowledge your sourcesin the presentation of the project.

author: free_electron
author_rank: Super Contributor
timestamp: November 02, 2015, 04:45:16 pm
content: It would be nice to have an LCR meter that goes beyond 10Khz. like up to the 100MHz domain. I'd like to see one with the following capabilities: Sweep from 10Khz to 50MHz or 100Mhz in steps of 1 Mhz: be able to apply a DC bias across the cap ranging from 0 to 20 volts.: plot the impedance, C and DSuch a meter would diversify it greatly form the oodles of lcr meters already out there.

author: DmitryL
author_rank: Regular Contributor
timestamp: November 02, 2015, 05:06:40 pm
content: Yes! Make hime make VNA!

author: c4757p
author_rank: Super Contributor
timestamp: November 02, 2015, 05:32:18 pm
content: Quote from: dr.diesel on November 02, 2015, 04:20:08 pmIf his BSEE program is anything like mine, he's going way above and beyond by doing something as complex as an LCR meter, and expert assistance with the hard bits would not be frowned upon at all.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: November 02, 2015, 05:44:38 pm
content: Lots of options. At those frequencies, op-amps are still okay (but make sure they're fast enough, so they still have useful gain at the frequencies you're using -- a GBW over 10MHz would seem a good idea). So you could make an LC or RC (Wein bridge or twin-T?) oscillator. Which, as you note, might not be very accurate.Component values can be switched using analog switches, by the way. So selecting ranges shouldn't be a problem.There are some ways to get better accuracy. You can start with a dirty waveform, like a square wave (which is easily generated from an MCU's timer), and filter it. The filtering has to be pretty steep, to keep harmonics down. To get more than 60dB attenuation within one octave, you need a 5th order filter (or better). Which isn't bad, and can be adjusted with switches and all, but might not be the best anyway.You can make a locked oscillator. If you feed in just a tease of some initial frequency (or even, harmonics of it -- this can be used as a frequency divider!), the oscillator can latch onto that frequency (or one of its harmonics can, if it's very nonlinear). This is very similar to just having a bandpass filter with a really sharp peak (but you need a high Q filter for this, which means good quality LC components, or even more op-amp gain), but the filtering effect is a bit stronger.A more refined version of that, separates the oscillator and "locking" behaviors. This is a PLL (phase locked loop). You use a variable frequency oscillator, and vary the frequency until it's equal to a reference (the reference can be dirty, because it goes to a detector circuit, not to the oscillator). The oscillator needs to be stable, but not in an absolute sense, only over a fairly short time span (over long time spans, the loop adjusts it back to exactly the right place).The downside of a PLL, for this application, is getting a good variable range. At RF, varactor diodes are used. But these are only available up to a few 100pF size, and aren't very linear, so you have a hard time using them at very low frequencies, and for low distortion.There's also DDS, where you do it all in software (synthesizing the A*sin(2*pi*F*t) numerically) and spit it out a DAC. This understandably isn't so good for high frequencies, but even for low power MCUs, has real value. You can get the frequency as good as any other digital method, and the main drawback is noise and sidebands and harmonics due to the frequency-dividing process and the sampled output method. (The harmonics, at least, can be made quite low by sampling at a fairly high rate relative to the output; a 10kHz sample rate for generating 100Hz outputs pretty well covers harmonics up to the 50th or so.)So, you might want to look at a few options. A selectable filter might not be too bad. If nothing else, you can build a set of really good, fixed filters, and select between them (rather than trying to save a few op-amps by switching all the components around them). The lower frequencies (say, 1kHz and below, maybe even 10kHz) should probably be done with a DDS method, and modest filtering (but nothing crazy is needed).Finally, an op-amp should be okay for whatever kind of output drive you need. I would guess you'll be generating a voltage or current, and measuring the voltage drop or current flow through the terminals (taking note of phase, somehow or another). And, I would guess you won't need a ridiculous amount of output (i.e., anything in the couple volts, tens of mA range would be fine).Do keep in mind that, whether you're doing voltage or current, you're probably going to run into a limit with one or the other. There is no ideal current source: real devices are limited in output voltage. Vice versa for voltage sources. If you can measure some suitable characteristics of the driver's output (say, sampling it a few times and checking for unusual peaks or dips, suggesting distortion or clipping?), that'll help as far as confirming that it's doing what it should be, and that it's within range. (If it's not within range, you should have a range-switching option, or something?)Tim

author: Marco
author_rank: Super Contributor
timestamp: November 02, 2015, 06:59:58 pm
content: Quote from: free_electron on November 02, 2015, 04:45:16 pmThat really drives up the cost, need a GS/s DDS at that point.

author: Kleinstein
author_rank: Super Contributor
timestamp: November 02, 2015, 07:10:15 pm
content: Up to about 1 MHz it is possible to use a µC to do the DDS frequency generation is software. This might be cheaper than an external DDS chip, if the µC includes a DAC. Signal qualitiy should be good enough for a LCR meter, as requirements are usually not that high - even a triangle waveform can do the job, if detection is good. For higher frequency a DDS Chip or FPGA and DAC are options.Analog sine generation at low frequencies is not very practical, as the old FGEN chip like ICL8038, max038 or XR2206 are obsolete or soon to will be - in many cases replaced by DDS chips.The difference from a full featured LCR meter to a simple, limited range VNA is not that big. So it is not that far off to build something like a low frequency (e.g. 10 Hz - 100 kHz or 1 MHz) VNA and than let the µC calculate from there. Much of this can be done in a modern µC. The extra VNA function might be seen as a bonus, and one could also measure simple LCR circuits, not just the basic models like L or C with series / parallel resistor.

author: rfeecs
author_rank: Frequent Contributor
timestamp: November 02, 2015, 07:11:21 pm
content: Quote from: free_electron on November 02, 2015, 04:45:16 pmYou mean an impedance analyzer?:http://www.keysight.com/en/pc-1000000382%3Aepsg%3Apgr/impedance-analyzers?cc=US&lc=eng

author: Marco
author_rank: Super Contributor
timestamp: November 02, 2015, 07:28:57 pm
content: How accurate can you get square wave VNAs?Can you work backwards from high frequencies to subtract the harmonics from low frequencies to get decent accuracy?

author: LabSpokane
author_rank: Super Contributor
timestamp: November 02, 2015, 07:36:04 pm
content: Quote from: dr.diesel on November 02, 2015, 04:20:08 pmToo late.

author: dr.diesel
author_rank: Super Contributor
timestamp: November 02, 2015, 07:43:45 pm
content: Quote from: LabSpokane on November 02, 2015, 07:36:04 pmRemind me not to hire you either.

author: rfeecs
author_rank: Frequent Contributor
timestamp: November 02, 2015, 08:13:46 pm
content: Getting back to the original question of sine wave generation, I second the suggestion of a DDS chip, like the AD9833, or a pre-built ebay board from China.An alternative is doing some kind of PWM generation with a micro-controller. But this might be limited on the the maximum frequency you can achieve.This shows one approach and a lot of references:http://web.csulb.edu/~hill/ee470/Lab%202d%20-%20Sine_Wave_Generator.pdf

author: Kleinstein
author_rank: Super Contributor
timestamp: November 02, 2015, 09:19:49 pm
content: There are µC with internal DACs available - so no real need for using PWM as a poor DAC replacement. For the usually rather moderate requirements also a simple R2R DAC at 8 or even 6 port pins would be sufficient. If the DDS sampling frequency is high enough, one can use rather powerful LC filters - so going for a little higher speed (e.g. > Mhz sampling) might actually help here.So the at relatively low frequenies (possibly 1 MHz with a modern µC) one could use the µC to generate the driving sine signal and sample the recieved signal with the internal ADC. So this could end up beeing a rather software heavy project.I would not go with separate I/Q synchronous detectors down to zero ZF. A rather elegant solution is to use two DDS generators and a ZF in the sub kHz range, that is well handled with high res ADCs and a µC (alternatively soundcard at PC). Measurement might take twice as long, but one gets around DC drift of the ADCs and detectors / mixers.

author: free_electron
author_rank: Super Contributor
timestamp: November 02, 2015, 11:19:36 pm
content: Quote from: Marco on November 02, 2015, 06:59:58 pmmeh.. plenty of analog devices DDs chips can spit out sinewaves at these frequencies. they even com e in SO8 packages and cost a few dollars ...

author: rfeecs
author_rank: Frequent Contributor
timestamp: November 02, 2015, 11:33:10 pm
content: Quote from: Kleinstein on November 02, 2015, 09:19:49 pmZF in German is IF in English?This approach is similar to HP's old vector voltmeters: mix down to a low IF frequency, then use simple phase and amplitude detectors.In this case, not sure why you need two generators. For example couldn't you use one generator at 100kHz, sample your two signals at 99kHz for an IF of 1kHz? I guess if you count the sampling clock that is two generators.

author: Marco
author_rank: Super Contributor
timestamp: November 02, 2015, 11:42:19 pm
content: Quote from: free_electron on November 02, 2015, 11:19:36 pmA decent 100 MHz sine wave from a SO8? Which one?

author: RobEE
author_rank: Contributor
timestamp: November 03, 2015, 04:33:49 pm
content: Lots of great suggestions and things to think about and research. Thanks for all the help. As one person mentioned, I had considered writing the code and putting out the sine wave with a DAC, but I wanted to do my project in hardware as much as I can (for the learning experience). I had also considered some of the old analog waveform generators, as was mentioned by somebody else, but I didn't want to put an obsolete part into a new design, at least not for a school project. I had never heard about DDS before but since reading about them I think that is the way to go.

author: LabSpokane
author_rank: Super Contributor
timestamp: November 03, 2015, 07:22:48 pm
content: RobEEGood luck with your project! Do you have a team? That could be a lot of work for one person.

author: timofonic
author_rank: Frequent Contributor
timestamp: January 04, 2016, 09:41:04 pm
content: How's your project? The idea seems interesting