+ Post New Thread
Results 1 to 2 of 2
  1. #1
    Full Member level 6
    Points: 3,158, Level: 13
    Achievements:
    7 years registered

    Join Date
    Nov 2010
    Posts
    341
    Helped
    2 / 2
    Points
    3,158
    Level
    13

    problem in inductive current measrement with acs712 hall effect sensor

    I am having problem in measuring inductive load current with acs712(20amps) hall effect sensor, for resistive load it works 99% accurately. I am using pic micr 18f4620 this is my sample code

    Code C - [expand]
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    
    While(1)
    {
    n1 = 0;        j = 0;
    for(int16 i = 0;i<20;i++)
    {
    n1++;
     
    Table_sinusoide[j] =get_adc_value(3);
    delay_us(997);
    j++;
    }
    mini = 1023;
    maxi =1;
    for(j=0;j<n1;j++)
    {
    M=Table_sinusoide[j];
    if (mini>M) 
    {
    mini=M;
    }
    if(maxi<M)
    {
    maxi=M;
    }
     
    } 
     
    lcd_gotoxy(1, 1); 
    printf(lcd_putc, "min : %04ld ",mini);
    lcd_gotoxy(1, 2); 
    printf(lcd_putc, "max : %04ld",maxi);
     
     
    p2p = maxi - mini ;
    Voltage = (float)p2p * (448/260.1) ;
    //at 448mv from hall effet sensor I am getting 260.1 p2p value
    So I fixed this as constants
     
    lcd_gotoxy(1, 3); 
    printf(lcd_putc, "p2p: %04ld",p2p);
     
    lcd_gotoxy(1, 4); 
    printf(lcd_putc, "voltage:%06.2f ",Voltage);

    my idea is simple for 20 ms time(50hz line freq) I am taking 20 samples the finding min and max values
    p2p = maxi-mini.
    I am getting exact result for resistive loads, my hall effect sensor produces 100mv / amp
    For inductive loads such as motors the value shown is In accurate, I also increased the sampling rate for 20ms I took 600 samples but the result is same. for 4 amps motor load my hall effect sensor outputs 400mv measured in multimeter but in pic I am getting in accurate results why so kindly help I want to measure accurate ac current for both inductive and resistive loads.
    Regards
    Kalyan.
    Last edited by BradtheRad; 9th November 2015 at 07:22. Reason: added code formatting

    •   AltAdvertisement

        
       

  2. #2
    Super Moderator
    Points: 52,941, Level: 56

    Join Date
    Apr 2011
    Location
    Minneapolis, Minnesota, USA
    Posts
    12,948
    Helped
    2580 / 2580
    Points
    52,941
    Level
    56

    Re: problem in inductive current measrement with acs712 hall effect sensor

    Quote Originally Posted by raman00084 View Post
    I am having problem in measuring inductive load current
    Could this be a power factor issue? An inductive load tries to draw excessively high Amperes during low times in the voltage waveform.

    When you apply power factor correction, you reduce Ampere draw.

    Simulation demo:



    1 members found this post helpful.

--[[ ]]--