TeensyLCR – A Teensy based DIY LCR Meter - Page 1
Forum section: electronics / projects

author: WeTec
author_rank: Contributor
timestamp: February 07, 2024, 08:16:08 pm
content: The storyI have a couple of industrial grade PCBs lying around that are used for audio measurements and was wondering what I could do with them. The boards have audio ADCs and DACs with I2S interface and BNC connectors for in- and outputs. Just for curiosity i dig into the theory of LCR meters. Basic LCR meters using frequencies in the audio range. So why not building an LCR meter with audio ADCs? I kept digging, reading stuff and found this very interesting document:TIDA-060029 LCR meter analog front end reference designhttps://www.ti.com/tool/TIDA-060029This demonstrates a LCR meter analog frontend using an auto balancing impedance bridge. Just a couple of OP amps and analog switches for ranging. Exactly what’s on the boards I have. Well, not exactly but more on that later.However, it seems absolutely doable and I wanted to give it a go. This was my goal so far:• build a working LCR meter with an I2S audio codec• using the auto balancing impedance bridge principle• using a Teensy as the micro to communicate with the audio codecI chose the Teensy because there is lots of support for audio stuff.The first attemptI started with one of the boards with a CS4272 audio codec, a Teensy 4.1 on a breadboard and some wires between them. Just putting a sine wave out and used the two inputs for measuring voltage and current was not a problem but I was not satisfied with the results. This was mainly because of the missing transimpedance amplifier (a crucial part of the auto balancing bridge). Modifying the board with some cuts and extra wires was not possible. This was the reason to design a new board from scratch to have something to play with.The first prototypeI found existing designs that are using the same principle but most of them are using a single channel ADC and a relative complex phase detector. I wanted to use both inputs of the CS4272 to measure voltage and current at the same time and calculating the phase difference in firmware.Great help was the TI reference design linked above and the documents for the Evaluation Board For CS4272https://statics.cirrus.com/pubs/rdDatasheet/CDB4272-2.pdf.I used EasyEDA for the prototype design. Schematics are attached.As you can see, I used four BNC connectors for true Kelvin measurement. For the prototype I used the sample service from TI and Analog Devices to get the OP amps, analog switches, the LDO and switching regulators. I salvaged some other parts from the boards mentioned above. I placed a couple of pin headers to connect keypad and display later. There is an EEPROM to store calibration data and other settings. There is a I2C temperature sensor next to the codec to be able to compensate temperature drifts (not implemented yet).After some excessive coding sessions with Arduino and the Teensy Audio Library I was able to measure voltage and current and did the phase calculation with help of the Audio Library. The phase calculation works exactly the same way as in the TI reference design document. No fancy FFT stuff, just complex math. And it works very well! It works surprisingly well!The deviceI decided to go further and put the board with a display and a custom keyboard into a 19” case that I have laying around. Now I have a fully functional LCR meter. A very useful device:Well, the case is quit big for just the main PCB, power supply, display and keyboard. I don’t wanted to buy or build a new case and size was not a limiting factor. But hey, plenty of space for future extensions (DC bias?).Two 3D printed parts where made for the display and the keyboard front panel. I’ve used the keys of an old pocket calculator from the junk box.The specsI did measurements with 0.1% resistors from 100 Ohm to 1 MOhm as reference. Results are within 0.5%. So I guess I got a basic accuracy of at least 1% (not for all impedance ranges of course). I think I can improve that further by reworking the calibration routine.I set the display resolution to 5 digits, which means in fact 100,000 counts. This is quite much for an accuracy of 1%. But this helps me to find out the limits of the device.Please note: The CS4272 is a 24 bit codec but the Teensy Audio Library uses 16 bit only.There are four ranges: 100R, 1k, 10k, 100k. The range will be selected automatically according to the impedance of the DUT.Selectable test frequencies: 100 Hz, 1 kHz, 10 kHz (48 kHz sample rate).Selectable test levels: 300 mV, 600 mV, 1 VThe following complex parameter of the DUT can be measured (fixed combinations of them):• Rs // equivalent series resistance (ESR)• Rp // parallel resistance• Cs // series capacitance• Cp // parallel capacitance• Ls // series inductance• Lp // parallel inductance• Phi // phase angle of impedance• Xs // series reactance• Z // impedance• Q // quality factor• D // dissipation factor• G // conductance• B // susceptanceMoving average of the readings can be set from 1 to 256.Edit: updated schematicsGitHub project page:https://github.com/wschuma/TeensyLCR

author: moffy
author_rank: Super Contributor
timestamp: February 07, 2024, 08:42:02 pm
content: A nice lowish frequency VNA.

author: WeTec
author_rank: Contributor
timestamp: February 07, 2024, 09:10:58 pm
content: I will post more details and measurement results soon. Please be patient

author: WeTec
author_rank: Contributor
timestamp: February 09, 2024, 04:38:10 pm
content: I did some capacitor measurements yesterday. Here are the results.Lets start with a 1.5pF ceramic cap:Reading is 2.1pF. There is no open/short correction implemented yet.10pF:Reading is 10.8pF100pF:Reading is 102.1pFNow some polystyrol film caps. 1.5nF 1%:Reading is 1.5064nF.Here is a 13.85nF 0.5% cap:Reading is 13.943pF.100nF 1%:Reading is 100.21nF1uF:Reading is 1.0087uFOk, lets get to the big ones. Now with 100Hz test frequency and Cs-Rs mode. 1000uF:Reading is 1.0199mF5600uF:Reading is 4.7295mF. Hmm, nearly 15% off. Did I found a bad one in my box?4700uF:Reading is 5.6286mF. What? A 5.6mF cap reads 4.7mF and vice versa?

author: WeTec
author_rank: Contributor
timestamp: February 09, 2024, 06:19:25 pm
content: Lets check another one.Reading is 4.9859mF. Ok. Well, it is not uncommon that this type of caps have a relativ high tolerance value, e.g. +20%/-10%.Now some big power supply caps. 10,000uF:Reading is 10.032mF.The (physically) biggest cap I have. 22,000uF:Reading is 23.027mF. Quite low ESR by the way.35,000mF:Reading is 30.629mF. The value is 13% lower than specified. The upper end of the capacitance range?However, it seems to work quite well so far...

author: jbb
author_rank: Super Contributor
timestamp: February 10, 2024, 12:42:32 am
content: Nice one! I’ll look through those schematics with interest; I’m interested in building something like this (but given my interest in power electronics, over a frequency range more like 0.1 - 10 MHz).Quote from: moffy on February 07, 2024, 08:42:02 pmI could be wrong, but I think VNAs are good around their characteristic impedance (eg 50 Ohm), but not so good as you go further away from that. Whereas LCR meters have those switched ranges (good for higher Z) and 4 wire connections (good for lower Z), but don’t go nearly as high in frequency

author: moffy
author_rank: Super Contributor
timestamp: February 10, 2024, 02:56:02 am
content: Quote from: jbb on February 10, 2024, 12:42:32 amVery nice results, and jbb you make valid points similar but not the same.

author: WeTec
author_rank: Contributor
timestamp: February 10, 2024, 07:12:34 am
content: Thanks both of you.At the moment I'm using 48 kHz sample rate. It would be possible to set the fs to 192 kHz and I could use 80-90 kHz as highest test frequency. Its not 100kHz standard but good enough to improve ESR measurements. Thats a feature on the ToDo list.

author: jbb
author_rank: Super Contributor
timestamp: February 10, 2024, 07:14:36 am
content: I had a look at the schematics and have a couple of questions:Did you consider keeping the V meas and I meas signals differential throughout? Right now you have instrumentation amps (diff - single ended) and then ADV drivers (single ended - diff)Do you use the extra gain from the V Programmable Gain Amplifier (PGA)? I imagine the V gain is useful for low impedanceDo you use the extra gain from the I PGA?Did you have any trouble with transimpedance amplifier stability?Do you have any trouble with the MUX resistance in the 100 Ohm range?

author: WeTec
author_rank: Contributor
timestamp: February 10, 2024, 05:41:45 pm
content: Hi jbb.To keep the signals differential all the way to the ADC, a fully differential PGA is required, which makes things more complicated. To keep the PGA simple, I chose this way.Both PGAs are set by the auto-ranging algorithm. The auto-ranging algorithm always tries to keep the voltage level at the ADC inputs as high as possible without clipping. And yes, the V (voltage) gain is usefull for low impedance and the I (current) gain is usefull for high impedance.Same as 2.I haven't had any trouble with transimpedance amplifier stability so far. I guess I need to test this further by pushing the device to its limits.The MUX on resistance is just added to the range resistors. The range resistors don't have to be super precise. All ranges are calibrated separately. No problems.

author: WeTec
author_rank: Contributor
timestamp: February 11, 2024, 02:27:34 pm
content: New feature implemeted: I can now save screenshots as bmp file to a connected USB thump drive.I've used the USB host interface from the Teensy 4.1 board.

author: fonak
author_rank: Contributor
timestamp: February 11, 2024, 10:00:51 pm
content: Hello WeTecVery nice impedance meterI have a question about OPA2376/OPA376 chips, i.e. are they powered by a symmetrical voltage of +/-5V ?Or maybe there is an error in the diagram and they are different chips.I am asking about this because OPA2376/OPA376 have a maximum allowable voltage of 5V.Regards

author: WeTec
author_rank: Contributor
timestamp: February 12, 2024, 12:28:49 pm
content: Oops. That is definitely a mistake and must be fixed.Thank you for reporting.OPA192 / OPA2192 seems to be a good alternative.

author: coromonadalix
author_rank: Super Contributor
timestamp: February 12, 2024, 01:26:28 pm
content: i would love to see this one pushed to 100khz measurements good workwill the code be shared ?my curiosity is the measurements coding ...

author: fonak
author_rank: Contributor
timestamp: February 12, 2024, 03:01:49 pm
content: HiI am also in the process of building an LCR meter based on a similar topology,but I am considering using OPA2810 (OPA2156) with BUF634A (or BUF634/LME49610) for TIA and the sine generator output buffer, this will increase the bandwidth and power.Instead of multiplexers, I will test PhotoMOS AQY221N3V/AQY221R2V or similar.First, I will use the internal ADC/DAC of STM32G474 or STM32H723 processors, if this does not bring good results,I will test DDS AD9833 as a DAC and ADC converters like AD4001/AD4003.Regards

author: WeTec
author_rank: Contributor
timestamp: February 12, 2024, 04:32:56 pm
content: Quote from: coromonadalix on February 12, 2024, 01:26:28 pmDefinitely. But I need to cleanup the code before going public.

author: WeTec
author_rank: Contributor
timestamp: February 12, 2024, 04:48:33 pm
content: Quote from: fonak on February 12, 2024, 03:01:49 pmSounds interesting. An additional output buffer helps with very low impedances. What is the lowest impedance range in your design?Quote from: fonak on February 12, 2024, 03:01:49 pm10 times lower on resistance than the multiplexer but expencive. 4-8$ per range.

author: fonak
author_rank: Contributor
timestamp: February 12, 2024, 05:13:53 pm
content: Hello WeTecMy target lower impedance range is around 10 Ohm (1Vpp/100mApp @10 Ohm DUT)As for PhotoMosfets, you can buy them cheaper on a well-known Chinese portal, i.e. about $4 for 10 pieces.PS. I tested two types of Photomosfet for an real switch Rdc @ Idc 200mA, and 10mA Led current:1. Vishay: VO14642AABTR Rdc =102,1 mOhm2. Cosmo: KAQY212S Rdc = 257,5 mOhm - (Cosmo KAQY212S is a clone Panasonic AQY212S)Regards

author: WeTec
author_rank: Contributor
timestamp: February 16, 2024, 08:13:14 pm
content: At the moment (version R1), the input protection (PTC1-4 + D1-4) is basically useless against charged caps. A capacitor charged to 8V can easily raise one of the power supply rail over 6V. This could be deadly for at least the codec and the differential amplifier.I don't think it is possible to fix that in the current prototype by simply adding Zener or TVS diodes across the rails.A possible solution for a next version could be this:R66 & R78 are used to biasing the diodes. The current of a charged capacitor flows thrugh PTC1, D1 and one of the Zener diodes to GND. The Zener diodes limit the voltage before R80 to about 6-7 volts and R80 finally protects U1 from this.

author: WeTec
author_rank: Contributor
timestamp: March 01, 2024, 06:21:44 pm
content: Progress has been made. I can now enter the test frequency manually in 100Hz steps. Furthermore I've increased the sample rate to 192kHz. This allows me to set test frequencies up to 90kHz.

author: jbb
author_rank: Super Contributor
timestamp: March 03, 2024, 05:16:49 am
content: Nice!I’m impressed you could get to 90 kHz with 192 kS/s. Do you still have a good signal at that frequency? I would have thought that the analog parts of the Cirrus chip would start to attenuate the signal when you go much over 20 kHz…

author: WeTec
author_rank: Contributor
timestamp: March 03, 2024, 05:48:45 pm
content: The CS4272 has attenuation at higher frequencies, depending on sample rate. At 90kHz signal it is about 6dB (192kHz fs). This is still ok, because both channels have the same attenuation (0.1dB interchannel gain missmatch). So voltage and current measurement have the same attenuation. This is canceled out at the impedance calculation.A much bigger problem is the gain bandwith product (GBW) of the PGA opamp. Here we need a GBW of 9 MHz to get the voltage/current signals unattenuated. Actually we need more than that. Typically, the GBW attenuation is specified as -3 dB in the data sheets. So with a GBW of about 50MHz we are save.The PGA can have different gain settings for voltage and current which leads to different gain errors at higher frequencies. Therefore we have an impedance error depending on frequency.There are two ways to fix this:1. Selecting an opamp with higher GBW or2. calibrating the PGA gain at every frequency that is used.At the moment I try to find another opamp with good GBW.

author: WeTec
author_rank: Contributor
timestamp: March 03, 2024, 09:45:33 pm
content: I need to replace all of the opamps anyway because of the low supply voltage of the OPAx376. The GBW is 5.5 MHz. Too low for the PGA.I will use OPA192/OPA2192 instead, except for the PGA opamps. LT6221 is a candidat.

author: jbb
author_rank: Super Contributor
timestamp: March 03, 2024, 09:57:54 pm
content: I've had the PGAs on my mind. I was sure that there's a way to keep the measurement signals as differential...After some thought, I remembered that you can use a MUX to switch between gain setting resistorsinsidethe instrumentation amp (see below). This cuts out two opamps from each signal chain. Does that look helpful?

author: WeTec
author_rank: Contributor
timestamp: March 05, 2024, 01:57:36 pm
content: Definitively worth a try. If I would do it again, I would change a few things in the design.

author: WeTec
author_rank: Contributor
timestamp: March 05, 2024, 05:27:15 pm
content: And thank you for sharing the simulation.At the moment I do not plan to make a redesign. The current design works well for frequencies up to 20kHz. I'll try to get more reliable results at 90 kHz with replaced opamps.If it works, great. More than I expected. If not, then it is still a useful device. And I've learned a lot.

author: jbb
author_rank: Super Contributor
timestamp: March 06, 2024, 07:54:37 pm
content: It looks like a really nice addition to the bench. It would be great to have the design files and software - even if they aren’t perfect :-).I’m certainly tempted to make one of my very own. Considering a couple of mods:- use a CODEC chip with built-in headphone amplifier (saves 2 opamps) and PGAs (saves 2 opamps and 2 muxes)- replace the Teensy 4.1 with I.MX RT1024 or similar chip (smaller version of the Teensy 4.x microcontroller)Edit: you'll laugh... I went through an exercise of trying assorted MUXes to find a good capacitance vs on resistance trade; I eventually found the MAX4052 was about the best fit

author: WeTec
author_rank: Contributor
timestamp: March 08, 2024, 08:03:03 pm
content: Yeah, the classics are still good enough for this kind of stuff.I will put everything on Github. Need to setup a Github account first...

author: WeTec
author_rank: Contributor
timestamp: March 10, 2024, 08:48:10 am
content: Here are some insights about the phase calculation:Teensy Audio System DesignA sine wave is send toaudioOutI2S1to get the sine wave signal source.audioInI2S1provides the I2S data from the CS4272 codec. Channel 1 is the measured voltage and channel 2 is the measured current.Additional, there are two AudioSynthWaveform objects that create a unity magnitude square wave with 0° and 90° phase. Both are multiplied by the voltage and current signals respectively.The phase is calculated byCode:phase = atan(mean2.read() / mean1.read()) - atan(mean4.read() / mean3.read());// cap phase to +-90°if (-phase > PI / 2) {phase = phase + PI;}if (phase > PI / 2) {phase = phase - PI;}The impedance is calulated byCode:impedance = analyzeRmsV.read() / analyzeRmsI.read();The code lines are simplified. The actual code is a bit more complex due to analog level calibration and moving average calculation.Basically the same math explained in the TIDA-060029.

author: jbb
author_rank: Super Contributor
timestamp: March 10, 2024, 09:34:18 pm
content: That makes sense. I can see how using the Teensy audio system saves you a great deal of messing around in code.Might I suggest that instead of atan(mean2.read() / mean1.read()) you try using atan2(mean2.read(), mean1.read()) ? It won’t blow up if mean1.read() happens to be (very close to) zero.

author: WeTec
author_rank: Contributor
timestamp: March 11, 2024, 08:46:06 pm
content: Thanks jbb for the hint! This helped me to fix a bug where I get the correct phase but with wrong sign. Now the phase calculation looks like this:Code:phase = atan2(mean2.read(), mean1.read()) - atan2(mean4.read(), mean3.read());// cap phase to +-90°if (-phase > PI / 2) {phase = -PI - phase;}if (phase > PI / 2) {phase = PI - phase;}Further information:https://stackoverflow.com/questions/283406/what-is-the-difference-between-atan-and-atan2-in-c

author: jbb
author_rank: Super Contributor
timestamp: March 13, 2024, 07:22:49 pm
content: I’m glad that helped! atan2 is a helpful one.On further looking, I see you’re generating the excitation signal with ‘sine1’ and the mixer signals with ‘squarewave’ and ‘squarewave_90’… I wonder if this arrangement will be sensitive to 3rd, 5th harmonic tones in the measured signals? I would have expected the scheme to use ‘sine1’ and a new ‘sine_90’ signal.Edit: you can also consider the mixer results (once low pass filtered) to be:V1 = mean1 + j mean2V2 = mean3 + j mean4Thus:mag(V1) = sqrt(mean1**2 + mean2**2)mag(V2) = sqrt(mean3**2 + mean4**2)Which may be a little less sensitive to noise than the RMS.

author: WeTec
author_rank: Contributor
timestamp: March 25, 2024, 06:54:12 pm
content: I've replaced all opamps now:U1, U4, U12 - OPA192U5, U6 - OPA2192U7, U8 - AD8032I do not have any parts with known values at 90 kHz, so I cannot say much about accuracy. I also have no access to a real LCR meter so I cannot do measurements to compare. The only thing I can do is to measure 0.1 % resistors that I have in stock. The results are pretty good I think. About 2-3% of at 90kHz.Here is a ESR measurement with a Würth capacitor WCAP-PT5H Aluminium-Polymer 180 µF:Capacitor connected:inputs shorted:9 mOhm @ 90 kHz.Pretty much close to the maximum value of 10 mOhm @ 100 kHz value from the datasheet.(Ignore the Cs values. They are typically far of at 90 kHz.)

author: WeTec
author_rank: Contributor
timestamp: April 12, 2024, 06:23:10 pm
content: The source code is public now! Please check the github project page:https://github.com/wschuma/TeensyLCR

author: KE5FX
author_rank: Super Contributor
timestamp: April 12, 2024, 08:18:21 pm
content: Nice job. The ability to see multiple parameters on the display at once is attractive next to my TongHui LCR meter, which requires a lot of button-pushing in everyday use.

author: WeTec
author_rank: Contributor
timestamp: April 13, 2024, 11:03:14 am
content: If someone (including me) wants to do a redesign, I would recommend to do the following changes to the PCB:Major improvements:Improve input protectionReplace the single ended PGAs by differential onesMinor improvements:Add button cell holder (for RTC)Add I2C test points (would be usefull for debugging)Add GND test points (makes it easier to connect your oscilloscope probes)For those who want to rebuild the current design (R1) I have uploaded the gerber files to GitHub.

author: Achu
author_rank: Contributor
timestamp: September 20, 2024, 02:03:54 pm
content: Hi,@KE5FX I hope you see this.I have a doubt. The test frequency is 1KHz, at 1KHz the reactance of 1pF is 159.15 Mega Ohms, and a current of only 6.28nA peak will flow through it. Even with a 100K resistor in the TIA, the output voltage is 628uV. At such smaller voltages won't the noise of the Opamps and resistors make everything messy?

author: Conrad Hoffman
author_rank: Super Contributor
timestamp: September 20, 2024, 04:23:49 pm
content: We use Agilent E4980 LCR meters at work and they get really noisey at the higher impedances and lower levels. I have to believe they work by similar means, though I think they have a lot of custom chips and can't be serviced by anybody other than Agilent (Keysight). To get the higher precision you have to set them to "slow" mode and a high number of averages. Max freq is 2 MHz. They're also absurdly expensive to have calibrated and only the factory has the necessary standards to do it. None of our local labs would touch it. Why? It's the same instrument they use to cal other stuff! I think you've got a great project here!

author: Achu
author_rank: Contributor
timestamp: September 20, 2024, 07:05:28 pm
content: I intend to DIY one. I plan to use TL08x opamps like many LCR kits seems to use.I hope this question is suitable here, the datasheet of the opamp says the following about the noise specs of TL08x opampsInput Noise = 9.2uVpp and 1.4uVrms @ f = 0.1Hz to 10HzInput voltage noise density = 31nV/sqrt(Hz) @ f = 1KHz and 21nV/sqrt(Hz) @ f = 10KHzworst case offset = 4mVNow If I use these opamps in the front end of my LCR meter which will have a Ftest = 100KHz, what would be the minimum voltage of across the DUT that I can amplify without being affected by the noise? I guess it has to do with the desired SNR? But I don't know anything other than that.

author: KE5FX
author_rank: Super Contributor
timestamp: September 20, 2024, 09:51:23 pm
content: Quote from: Achu on September 20, 2024, 02:03:54 pmI'm not involved in the project and haven't looked at its implementation details, but often when you are dealing with noise levels that low, synchronous (aka "lock-in") measurement of the signal in question is the best way to go. Stimulus-response measurements are ideal for that, because you're in control of the stimulus (or at least have access to a low-noise copy of it.) So perhaps he is doing something along those lines.Even without performing true synchronous detection, just knowing the frequency of the stimulus signal lets you improve the SNR greatly. You can measure the response in a very low bandwidth via aggressive bandpass filtering, or simply by evaluating a single Fourier bin while ignoring the rest.Either of those techniques would allow you to make measurements at the nanovolt level, but not necessarily very quickly.

author: Achu
author_rank: Contributor
timestamp: September 21, 2024, 03:40:43 am
content: I tagged you because I felt that you are knowledgeable in this. I wasn't wrong it seems

author: WeTec
author_rank: Contributor
timestamp: September 23, 2024, 04:29:26 pm
content: I'm working with an input buffer with 1920 samples length. A 100 Hz wave fits exactly once in the buffer. A 200 Hz wave two times and so on. So the stimulus is syncronous to the response measurement. Additional I use up to 256-fold averaging. A 1 kHz stimulus gives me 10 times averaging on top. Averaging is very effective against non-deterministic noise.

author: mawyatt
author_rank: Super Contributor
timestamp: September 23, 2024, 06:25:55 pm
content: This is indeed an interesting project, quite nicely done we might add.So hats off to WeTecNoted something in the schematic that might need addressing. The BAV199 protection diodes for Lpot are returned to the analog supplies. In normal operation Lpot potential should be ~ virtual ground (0 volts), so one could return the back to back diodes to ground as they should have almost no voltage across them during normal operation, maybe placing them on the "inside" of the series protection resistor to limit current.Also the same BAV199 diodes are used for Hcur and Lcur, might consider higher current types for better protection. The Hpot BAV199 protection diode might serve better on the "inside" of the series protection resistor.We can offer to help folks wrt components that are "characterized" at various frequencies with our best LCR Lab Meter a Hioki IM3536 which supports frequencies up to 8MHz. We have developed various custom LCR Meter "fixtures" to allow better results with SMD precision components. These "characterized" components could be utilized as sort of a "reference" component to help with setting up these initial LCR Projects.Are there any updates wrt to the project in the works, like V2 of the PCB and updated firmware expected?Anyway, just some thoughts.Best,

author: WeTec
author_rank: Contributor
timestamp: September 24, 2024, 07:04:54 pm
content: Thanks, mawyatt.Definitive a good idea to connect the Lpot diodes to GND. Moving the Hpot and Lpot protection diodes on the right side of the series resistors requires an additional resistor between diodes and the input of the opamp. Just to make sure that the current flowing into the opamp input diodes doesn't reach the absolute maximum (10mA). However, moving the diodes and using types for higher currents does not help against the increase in rail voltages in the event of an overvoltage. I think this is the weakest point here.Thanks for the offer to use caracterized reference components. I will come back to you if I want to be precise. For me, being better than 1% is super preciseAt the moment there are no updates in the firmware and PCB. I will post any updates here.

author: mawyatt
author_rank: Super Contributor
timestamp: September 24, 2024, 07:30:03 pm
content: Quote from: WeTec on September 24, 2024, 07:04:54 pmFor Lpot since it's clamped to ground you shouldn't need another series resistor. For Hpot diodes returning to the analog supply rails should be OK to protect the Op-Amp with a series resistor, you could split the present resistor and include before and after the clap diodes for more protection if you see fit, personally don't think the extra resistor is necessary tho.For Lcur, some back to back to ground higher current diodes should be considered, also higher current diodes to the supply rails for Hcur. If you are concerned about Power OFF conditions with an application of a voltage on the terminals, specifically Hcur, consider adding shunt Zener Diodes across the + and - rails to ground, these can be rated slightly above the nominal supply voltage so they don't conduct any supply current, but limit the voltage buildup due to a external accidental applied voltage.Would think these should do a reasonable job of protecting your LCR Meter from accidental applied external voltages to any terminals wether the LCR is power ON or OFF. Of course as always experimental verification is in orderBTW we had considering developing a custom LCR meter awhile back, but our software skills are limited and has kept us from moving forward. Your project and efforts are quite impressive, so we'll follow your project insteadBest,

author: WeTec
author_rank: Contributor
timestamp: January 05, 2025, 08:58:27 pm
content: I have added open and short correction function. It is only for one frequency spot. The short correction is very helpfull at low impedances (mili ohms range). The open correction is for high impedances (pico farad capacitors) but the acurracy at this range is worse than the correction helps. However, it turns out that the resolution is better than I thought. I have updated the minimum display range values. See the README in the github project page.

author: HaiLun
author_rank: Newbie
timestamp: January 17, 2025, 04:12:33 am
content: An interesting project !! You are a wise, very warm-hearted man！How accurate is the resistance measurement? See all the pictures most of them are capacitors, almost no resistance! The 4-wire method is particularly suitable for low resistance, such as 0.001~0.5 ohm.If you reduce the sampling frequency a little, can the Cs4272 use RP2040 or ESp32 as a driver? If you'd like to guide, I'd like to try it 。 Usually, the entry-level professional meter is only 100HZ、120HZ、200HZ、400HZ、800HZ、1KH、2KH、4KH、8KH and 10KHZ sampling rate. But it's accurate enough to do it very well. I have an entry-level LCR Meter in my hand,its maximum sampling rate is only 10KHZ, and even compared it with a 6 and a half bit multimeter,0.001~0.5 ohm, the accuracy is not lost. The 4-wire has a strong advantage.This 4-wire resistance is very cheap, has a variety of resistance values, the accuracy is good, does not require 6 and a half bit multimeter or other expensive standard components. That's good enough for a reference, especially when it comes to used parts, which are cheaper. There's nothing under the case, it's just a resistor, and 4-wire mode is the best package.I send picture in the attachment .An Very interesting project !！Happy life!!

author: WeTec
author_rank: Contributor
timestamp: January 22, 2025, 04:31:24 pm
content: I did some measurements with low value resistors to test how well the correction function works:Resistor SampleReferenceCorr OFFDeviationCorr ONDeviation1R0,99981,00230,25 %0,9973-0,25 %500m506,1509,90,75 %504,8-0,26 %220m221,8225,91,85 %220,9-0,41 %100m100,1104,564,46 %99,53-0,57 %50m49,7654,178,86 %49,13-1,27 %3m (WSL2726 4-Terminal)2,9977,82160,93 %2,8-6,57 %The reference value is determined by 4-wire measurement with a 34461A and a current source.I'm planning to create an accuracy chart similar to the ones in Agilent or B&K Precision LCR meter specifications. To accomplish that I need to do a lot of measurements with reference impedances over the full impedance and frequency range of the meter, put the results into a big Excel sheet and create a chart.

author: WeTec
author_rank: Contributor
timestamp: January 22, 2025, 04:41:13 pm
content: I'm sure the processing power of RP2040 or ESP32 is sufficient. But you need a way to get the Teensy Audio Library to work. Not an easy task I think. Perhaps there are other audio libraries for these processors that can be used.

author: LinuxGuy123
author_rank: Regular Contributor
timestamp: January 23, 2025, 12:51:45 am
content: Very nice project.I'd like to add a good transistor hFE tester to this. Something that could test with base current > 1.0 uA, VCE > 1 volt and read betas higher than ~600. These are the parameters of most of the current transistor testers.It would be great if it had a thermistor attached to the transistor and it measured hFE at different temperatures as the transistor heated up.

author: HaiLun
author_rank: Newbie
timestamp: January 24, 2025, 12:49:49 am
content: Quote from: LinuxGuy123 on January 23, 2025, 12:51:45 amVCE > 1 ………… Are you sure 1V is enough?

author: drksy
author_rank: Regular Contributor
timestamp: January 24, 2025, 02:24:10 am
content: What's the total cost to build one from scratch, only counting the electronics, no enclosure, no kelvin alligators or other mechanical/misc stuff?

author: WeTec
author_rank: Contributor
timestamp: January 24, 2025, 02:13:41 pm
content: Quote from: LinuxGuy123 on January 23, 2025, 12:51:45 amI had the idea to add a DC output like Agilent E4980A option 001. This can also be used to measure RDSon of MOSFETs. A DAC module could easely be implemented. I had this in mind: DFRobot GP8211 1-Channel 15-bit I2C to 0-5V/10V DAC Module (https://www.dfrobot.com/product-2753.html).

author: WeTec
author_rank: Contributor
timestamp: January 24, 2025, 04:43:41 pm
content: Quote from: drksy on January 24, 2025, 02:24:10 amPCB with most of the passives preassembled: 80$ (incl. shipping+taxes) for 5 pcs.Display: 10$Teensy 4.1: 32$ (was a christmas pressent, so 0$ for me)Most of the ICs where salvaged from other PCBs or samples. So 0$ for me. About 87$ at Digikey for 1 unit.BNC connectors: 16$ (Salvaged from other PCBs, so 0$ for me.)Cheapo 4x4 keypad: 1$. I used a selfmade keyboard PCB: 7$ for 5 pcs.rotary encoder: 2$I paid about 100$. In addition to the fun of building it, it was absolutely worth it. If you are going to build it from scratch it will cost about 235$ + additional cost for kelvin alligators clips and other stuff. Depends what is laying around and in the junk box.

author: WeTec
author_rank: Contributor
timestamp: March 02, 2025, 06:00:49 pm
content: Some improvements have been made:Frequency resolution is now 10 Hz (was 100 Hz).Minimum frequency is now 10 Hz (was 100 Hz). Now one can measure components at mains frequencies like 50/60/100/120 Hz.Added list sweep function. Perform automatic sweep measurement by sweeping the frequency linearly or logarithmically. Users can view data by a table and obtain up to 100 points in one sweep. If a USB flash drive is connected, sweep data is stored as text file automatically.OPEN and SHORT correction function performs correction over 38 pre-set frequencies. The correction for all other frequencies are interpolated from those pre-set frequencies. The correction data is stored permanently on the EEPROM.

author: elwar85
author_rank: Newbie
timestamp: March 23, 2025, 09:50:57 pm
content: Very cool project. I'm interested in building one of these but would like to make some adjustments to the PCB form factor (to fit into a specific handheld enclosure). I gather it was designed in EasyEDA. Would you consider adding the schematic/PCB files to the repo?

author: WeTec
author_rank: Contributor
timestamp: March 24, 2025, 04:48:01 pm
content: Quote from: elwar85 on March 23, 2025, 09:50:57 pmSchematic and Gerber files are on Github already. Recently I made some adjustments to the built-in calibration routine and the hardware (tuning some resistor values). The repo is not up to date yet. I'll keep you updated.

author: elwar85
author_rank: Newbie
timestamp: March 24, 2025, 06:53:06 pm
content: I've seen there's a PDF of the schematic and the Gerber files, but this doesn't let me make changes to the layout. I'd have to rebuild both in EasyEDA to be able to change the PCB dimensions and move things around a bit. Was just hoping you might be able to save me that job!Will await your update before I attempt a build anyway, if there's been hardware changes.

author: coromonadalix
author_rank: Super Contributor
timestamp: April 16, 2025, 12:27:56 pm
content: @elwar85 you're still lucky to have source code and schematics ....What would be the Teensy minimal board revision(s) the latest 4.1 that i would need to buy or some older 3.5 3.6 ? i have one of theses laying somewherethks and continue the work

author: WeTec
author_rank: Contributor
timestamp: May 04, 2025, 04:30:39 pm
content: Recently I've updated the calibration routine. Everything you need is a pretty good AC voltmeter with 1VAC range (I recommend to use 34461A) and a couple of 0.1% resistors. You first adjust the output with the AC voltmeter. Voltage and current ranges are adjusted by using 0.1% precission resistors and the output. I achieved good accuracy after the adjustment. The reading error is less than 0.5% of all 0.1% resistors I have. Detailed results will follow.In order to achieve higher output voltage levels, changes are made to the output and input filters. Check Github for the latest schematic. Output level can now be set between 0.03 Vrms and 2.5 Vrms with 1 mV resolution.

author: WeTec
author_rank: Contributor
timestamp: May 04, 2025, 04:36:29 pm
content: Quote from: coromonadalix on April 16, 2025, 12:27:56 pmI recommend to use Teensy 4.1 because of way more CPU speed. I do a lot of calculations every 200ms. The floating point unit helps alot, but I'm not sure if the older models are fast enough.

author: WeTec
author_rank: Contributor
timestamp: May 27, 2025, 06:04:50 pm
content: You don't actually need a voltmeter like the 34461A for adjustment. Your regular handheld multimeter from the drawer is sufficient to adjust the output voltage of the LCR meter. The input voltage and current ranges are adjusted by applying a voltage to the 0.1% resistors. So the error of the voltmeter is equal (and with same sign) on the voltage and current measurement. The error is compensated by applying Ohm's law.I used my Extech EX330 to adjust the output. The EX330 has an accuracy of 1.5 %+-3 digit at the 4VAC range.I did some measurements with 0.1% resistors from 100 Ohm to 1 MOhm @100 Hz, 1 kHz and 10 kHz test frequency. For this purpose I built four resistance decade boxes with 0.1% resistors (one decade per box, 100 Ohm, 1k, 10k and 100k).100 Hz: Rs error of all results (100Ohm - 1MOhm) is <= 0.1%.1 kHz: Rs error of measurements up to 600 kOhm is <= 0.1%. From 700 kOhm, the error increases to -0.25% at 1 MOhm.10 kHz: Rs error of measurements up to 90 kOhm is <= 0.1%. From 100 kOhm, the error increases to -8% at 1 MOhm.

author: WeTec
author_rank: Contributor
timestamp: May 27, 2025, 06:38:28 pm
content: I still have some issues to get precise results of the phase between voltage and current. Especially at test frequencies >10kHz and very low or very high impedances. The main reason is the phase error of the gain stages. A phase measurement with an oscilloscope (probe before and after the gain stage) confirmed the simulation.

author: WeTec
author_rank: Contributor
timestamp: July 06, 2025, 01:57:21 pm
content: In fact, the parasitic capacities are way more complex than shown in the image above. For instance, there are some additional capacities at the analog switch. Hard to simulate. However, I have determained some phase correction values by measuring the phase of resistors (where I assumed no reactance). I use this values to compensate the phase deviation over frequency and gain setting. The overall phase error is not perfect but good enough to make some considerations about accuracy. I have created an accuracy chart which shows the impedance accuracy over frequency. This is based on resistor measurements only, but I assume that capacity and inductance results ar not far from that. Furthermore, I decided to specify only up to 80 kHz. 90 kHz is possible but, well, not very precice.