A simple ESR meter based on synchronous detection - Page 1
Forum section: electronics / projects

author: dannyf
author_rank: Super Contributor
timestamp: April 02, 2016, 06:31:46 pm
content: A while back I experimented with the use of synchronous detection to measure ESR. I did some work on a Teensy (90USB1286).I picked it up a while back and just finished with an ESR meter built around an ATtiny85 and a SPDT analog switch (1/3 of HC4053):https://dannyelectronics.wordpress.com/2016/04/02/esr-meter-based-on-synchronous-rectifier-part-5se-pll/the design is fairly straight forward: the ATtiny85 as a signal generator: 100Khz out-of-phase signal and / or 16Khz in-phase signal, to drive a HC4053. The read-out is through a DMM either directly or through an optional difference amplifier.The 2-chip version needs less than 10 parts and the 3-chip version needs slightly more. Preliminary tests show it to be quite accurate, working down to 0.1Ohm.I have started working on subsequent versions to further reduce the number of chips involved.Your comments are welcome.

author: Kleinstein
author_rank: Super Contributor
timestamp: April 03, 2016, 08:10:39 am
content: You might want to have some protection especially for the driving µC pin.A good choice for the OP would be something like an MCP6002, a cheap Rail-Rail type.With most OPs R9 is not needed. The gain of the shown differential stage is rather high - you may not need that much.The cap C2,C3,C4 can likely be smaller (e.g. 100 nF) - no real need for so much filtering. The final filtering can be done by the µC in software or by the DMM.

author: dannyf
author_rank: Super Contributor
timestamp: April 03, 2016, 08:49:31 pm
content: I got the adc->pwm generator->coil meter calibration part working.It is interesting to the get the adc module working. I got over the offset errors fairly quickly. But soon realized that I have to correct for gain errors too: the measured ESR is non-linear vs the true ESR, and follows a quadratic equation.So I had to correct it. Doing so without using floating point math,, and with little space to spare.Here is what I come up with.Code://mESR error-correction//flowing point version: mESR_ec=0.706991*mESR + 6.64e(-5)*mESR^2//integer version: mESR_ec=181*(mESR + mESR/32)/256 + (mESR + mESR/32)*(mESR + mESR/32) * 2 * 2 / 256 / 256uint16_t mESR_ec(uint16_t mESR) {uint32_t mESR_32 = mESR + (mESR >> 5);uint32_t tmp;tmp = 181 * mESR_32;tmp+= (mESR_32 * mESR_32) >> 6;//+(mESR+mESR/32)^2*2*2/256return tmp >> 8;// / 256}

author: moffy
author_rank: Super Contributor
timestamp: April 04, 2016, 01:02:59 am
content: Thanks for the work, very nice. To get 50% duty cycle you could run the PWM signal through a divide by 2 F/F (74HC74) but that would be 1 extra IC. Also the 74HC4066 has much better performance than the 4053.

author: dannyf
author_rank: Super Contributor
timestamp: April 04, 2016, 11:01:30 am
content: Two ways to get 50 PCT duty cycle without using external parts.1. Use periods that are factors of 4.2. Use count-up/count-down (called phase correct pwm by atmel) pwm. This has the added advantage of being glitch free.

author: jpittner
author_rank: Contributor
timestamp: April 05, 2016, 12:41:56 pm
content: Hi,I have made some time ago a milliohmmeter/ESR meter based on synchronous detectionwith the STM32F37 MCU, you can have a look athttp://www.pittnerovi.com/jiri/hobby/electronics/milliohmmeter/index.htmlI made just a prototype - unfortunately no PCB designed, but firmware source published there is GPL.Best , Jiri