Author Topic: OpenSource ESR Meter Help Needed  (Read 2567 times)

0 Members and 1 Guest are viewing this topic.

Offline bseishenTopic starter

  • Contributor
  • Posts: 14
OpenSource ESR Meter Help Needed
« on: April 09, 2013, 08:02:33 pm »
Currently working on creating a open ESR meter. I am using Dr Lee Hung's meter as the basis of my design.  http://members.upc.hu/lethanh.hung/LCFESRmero/en/LCFesR_4_eng.pdf I have also used the code from this form to get me up and going. http://arduino.cc/forum/index.php/topic,80357.0.html Currently my measurements are way off. I have a feeling that the Shottky diode Vf vs current going through should play into the calculation. I have attached a schematic of my current PCB. If someone could point me in the right direction on figuring out the formula it would be greatly appreciated!
« Last Edit: April 09, 2013, 08:36:06 pm by bseishen »
 

Offline bseishenTopic starter

  • Contributor
  • Posts: 14
Re: OpenSource ESR Meter Help Needed
« Reply #1 on: April 10, 2013, 03:29:38 pm »
Here is my current ESR measurement routine if it helps any!

Code: [Select]
#define DISCHARGE_PORT PORTB
#define DISCHARGE_PIN PB2
#define LO_PULSE_PORT PORTB
#define LO_PULSE_PIN PB1
#define LO_VIN_MV 4700
#define HI_PULSE_PORT PORTB
#define HI_PULSE_PIN PB4
#define HI_VIN_MV 4550
#define ADC_CHANNEL 0
#define R_PULSE_OHM 100
#define R_LO_PULSE_OHM 1000
#define V_REF 1.1

float getESR()
{
unsigned long accumulator = 0;
unsigned int sample = 0;
float Rm;
int i = 0;

while ( i++ < 4096 )
{
    DISCHARGE_PORT|=_BV(DISCHARGE_PIN);
    _delay_us( 600 );
    DISCHARGE_PORT&=~_BV(DISCHARGE_PIN);
    HI_PULSE_PORT&=~_BV(HI_PULSE_PIN);
_delay_us(5);
sample = ReadADC(ADC_CHANNEL);
HI_PULSE_PORT|=_BV(HI_PULSE_PIN);
    accumulator += sample;
i++;
}

esrSamples = accumulator >> 6; // decimate the accumulated result
// sampling is done
// calculate voltage on AIN0 pin...
milliVolts = (esrSamples * V_REF) / 65.536;
// calculate ESR in milliOhms R2=R1/((vin/vout)-1)
Rm = (R_PULSE_OHM / ((HI_VIN_MV / milliVolts) - 1)) * 1000;
return Rm;
}
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf