Author Topic: A simple ESR meter based on synchronous detection  (Read 3607 times)

0 Members and 1 Guest are viewing this topic.

Offline dannyfTopic starter

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
A simple ESR meter based on synchronous detection
« on: April 02, 2016, 06:31:46 pm »
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.
================================
https://dannyelectronics.wordpress.com/
 

Offline Kleinstein

  • Super Contributor
  • ***
  • Posts: 14795
  • Country: de
Re: A simple ESR meter based on synchronous detection
« Reply #1 on: April 03, 2016, 08:10:39 am »
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.
 

Offline dannyfTopic starter

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: A simple ESR meter based on synchronous detection
« Reply #2 on: April 03, 2016, 08:49:31 pm »
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: [Select]
//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 / 256
uint16_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/256
return tmp >> 8; // / 256
}

================================
https://dannyelectronics.wordpress.com/
 

Online moffy

  • Super Contributor
  • ***
  • Posts: 2106
  • Country: au
Re: A simple ESR meter based on synchronous detection
« Reply #3 on: April 04, 2016, 01:02:59 am »
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.
 

Offline dannyfTopic starter

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: A simple ESR meter based on synchronous detection
« Reply #4 on: April 04, 2016, 11:01:30 am »
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.
================================
https://dannyelectronics.wordpress.com/
 

Offline jpittner

  • Contributor
  • Posts: 14
  • Country: cz
Re: A simple ESR meter based on synchronous detection
« Reply #5 on: April 05, 2016, 12:41:56 pm »
Hi,
I have made some time ago a milliohmmeter/ESR meter based on synchronous detection
with the STM32F37 MCU, you can have a look at
http://www.pittnerovi.com/jiri/hobby/electronics/milliohmmeter/index.html
I made just a prototype - unfortunately no PCB designed, but firmware source published there is GPL.
Best , Jiri
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf