+ Post New Thread
Results 1 to 11 of 11
  1. #1
    Full Member level 6
    Points: 3,903, Level: 14

    Join Date
    Dec 2006
    Location
    Delhi , India
    Posts
    323
    Helped
    10 / 10
    Points
    3,903
    Level
    14

    Reading ade7758 registers for vrms , irms ,active energy kwh ?

    Hi friends ,

    I am reading AVRMS register directly.The values are increasing as follows :


    I am using Variac to increase/decrease AC voltage magnitude.
    Low -----------> High Voltage AC .
    32767 --->65535----->131071----->262143---->524287.....and so on till 2097151 in decimal.

    It is actually doubling instead of incrementing .
    Please suggest the steps required to correct the problem.....

    Thhe starting value of AVRMS register is coming to be 32767.
    I want to know what should be done to effectively and precisely ready Vrms voltage on Phase.

  2. #2
    Super Moderator
    Points: 72,553, Level: 65
    Achievements:
    7 years registered
    Awards:
    Most Frequent Poster 3rd Helpful Member

    Join Date
    Apr 2014
    Posts
    14,744
    Helped
    3367 / 3367
    Points
    72,553
    Level
    65

    Re: Reading ade7758 registers for vrms , irms ,active energy kwh ?

    Hi,

    What can we do for you? ....with the given informations.

    I hope you know that we can't see your circuit and the communication...

    Klaus
    Please donīt contact me via PM, because there is no time to respond to them. No friend requests. Thank you.



    •   AltAdvertisment

        
       

  3. #3
    Full Member level 6
    Points: 3,903, Level: 14

    Join Date
    Dec 2006
    Location
    Delhi , India
    Posts
    323
    Helped
    10 / 10
    Points
    3,903
    Level
    14

    Re: Reading ade7758 registers for vrms , irms ,active energy kwh ?

    Hi am able to. Establish communication spi. But I m a not sure how to read the AVRMS, BVRMS, CVRMS Registers.... And when to read them....

    I tried to read them on power on, getting 32767 as default value On nearly 0V AC. And this value doubles on increasing voltage instead of incrementing......

    I guess I am missing something crucial......



    •   AltAdvertisment

        
       

  4. #4
    Super Moderator
    Points: 72,553, Level: 65
    Achievements:
    7 years registered
    Awards:
    Most Frequent Poster 3rd Helpful Member

    Join Date
    Apr 2014
    Posts
    14,744
    Helped
    3367 / 3367
    Points
    72,553
    Level
    65

    Re: Reading ade7758 registers for vrms , irms ,active energy kwh ?

    Hi,

    Don't you think it's a good idea to show us your schematic, wiring, scope pictures of the communication, documented code, additional information..that enables us to help you.

    Klaus
    Please donīt contact me via PM, because there is no time to respond to them. No friend requests. Thank you.



    •   AltAdvertisment

        
       

  5. #5
    Full Member level 6
    Points: 3,903, Level: 14

    Join Date
    Dec 2006
    Location
    Delhi , India
    Posts
    323
    Helped
    10 / 10
    Points
    3,903
    Level
    14

    Re: Reading ade7758 registers for vrms , irms ,active energy kwh ?

    Hi Thx, I will. Be posting the scope pictures, code, schematic day after tomorrow on reaching workplace.

    Well I would like to update that I was able to read the temp register . It was changing on applying hot air to IC.

    I want to know what is the procedure to read vrms register values and match to real world values.....

    Will. Upload details. Soon.



  6. #6
    Super Moderator
    Points: 28,814, Level: 41
    andre_teprom's Avatar
    Join Date
    Nov 2006
    Location
    Brazil
    Posts
    8,587
    Helped
    1087 / 1087
    Points
    28,814
    Level
    41
    Blog Entries
    6

    Re: Reading ade7758 registers for vrms , irms ,active energy kwh ?

    Quote Originally Posted by jit_singh_tara View Post
    I am reading AVRMS register directly.The values are increasing as follows :

    I am using Variac to increase/decrease AC voltage magnitude.
    Low -----------> High Voltage AC .
    32767 --->65535----->131071----->262143---->524287.....and so on till 2097151 in decimal.
    Providing the result read from the intput voltage A register without mentioning what was injected into the corresponding input, is a meaningless information; One could say that your device is working correctly as long as you were doubling the voltage injected at input A aswell. Next time, provide a map of the voltage applied at phase A and the value read at this condition.
    --------------------------------------------------------------------------------------------------
    Part of the world that you live in, You are the part that you're giving ( Renaissance )



  7. #7
    Full Member level 6
    Points: 3,903, Level: 14

    Join Date
    Dec 2006
    Location
    Delhi , India
    Posts
    323
    Helped
    10 / 10
    Points
    3,903
    Level
    14

    Re: Reading ade7758 registers for vrms , irms ,active energy kwh ?

    Quote Originally Posted by andre_teprom View Post
    Providing the result read from the intput voltage A register without mentioning what was injected into the corresponding input, is a meaningless information; One could say that your device is working correctly as long as you were doubling the voltage injected at input A aswell. Next time, provide a map of the voltage applied at phase A and the value read at this condition.
    HI Andre,
    I will. Share the details of my setup and coding part, scope images tomorrow.

    In the meantime plz clarify my doubt.
    1. Does AVRMS, BVRMS, CVRMS Registers store the Rms value of the waveform or the instantaneous value of waveform according to adc output. How is the value of these registers to be interpreted.... And when should one read these registers, after setting some other registers like AVRMSOS, BVRMSOS, CVRMSOS.

    At present level I need to read Rms voltages of 1 phase, other 2 will be similar.



  8. #8
    Super Moderator
    Points: 72,553, Level: 65
    Achievements:
    7 years registered
    Awards:
    Most Frequent Poster 3rd Helpful Member

    Join Date
    Apr 2014
    Posts
    14,744
    Helped
    3367 / 3367
    Points
    72,553
    Level
    65

    Re: Reading ade7758 registers for vrms , irms ,active energy kwh ?

    Hi,

    1. Does AVRMS, BVRMS, CVRMS Registers store the Rms value of the waveform or the instantaneous value of waveform according to adc output.
    Can there be a doubt?
    The naming "AVRMS" is very clear and the datasheet explains it more detailed.

    Klaus
    Please donīt contact me via PM, because there is no time to respond to them. No friend requests. Thank you.



    •   AltAdvertisment

        
       

  9. #9
    Full Member level 6
    Points: 3,903, Level: 14

    Join Date
    Dec 2006
    Location
    Delhi , India
    Posts
    323
    Helped
    10 / 10
    Points
    3,903
    Level
    14

    Re: Reading ade7758 registers for vrms , irms ,active energy kwh ?

    hi ,

    As discussed sharing the standard circuit diagram of the datasheet.
    Click image for larger version. 

Name:	ade7758 test circuit.jpg 
Views:	4 
Size:	47.0 KB 
ID:	148065

    Well i have connectes all the 3 phases only.
    Reading AVRMS register.The image of sclk and dout interface on oscilloscope is shown as below .
    Click image for larger version. 

Name:	Image 1.jpg 
Views:	4 
Size:	471.5 KB 
ID:	148066


    I have pulled up the dout pin on ic with Vdd.


    The input waveform of the Ac phase A is as shown below . Between Neutral and at pin VAP.
    Click image for larger version. 

Name:	WAVEFORM ON PIN VAP wrt neutral ..jpg 
Views:	2 
Size:	485.9 KB 
ID:	148067

    It is showing 267mv rms at the pin VAP wrt to Neutral after the attenuation resistor network.......



    Regarding the coding :
    //---------------------------------------------------------------------------------------------------------------------------------------------------------------


    void main()
    {


    //initialization
    /*
    .......
    .......
    .......






    */






    write8bits(OPMODE,0b00000100);delay_ms(1);
    write16bits(AVRMSOS,0x0000);delay_ms(50);

    while(1)
    {
    ss++;

    value_read1 = read24bits(AVRMS);delay_ms(100);



    if(ss >= 2)
    {
    ss=0;
    Lcd_Out(1,1,"R:");
    LongWordToStr(value_read1,txt);Lcd_Out(1,4,txt);
    }


    }




    }


    //---------------------------------------------------------------------------------------------------------------------------------------------------------------

    - - - Updated - - -

    Hi friends ,



    I just tried to read the LCYCMODE REGISTER on power on. Not able to read properly .
    Getting 0x7f instead of 0x78(default value) .Not able to read properly.....The dout pin is not driving out proper data ?
    Last edited by jit_singh_tara; 23rd July 2018 at 08:44.



  10. #10
    Full Member level 6
    Points: 3,903, Level: 14

    Join Date
    Dec 2006
    Location
    Delhi , India
    Posts
    323
    Helped
    10 / 10
    Points
    3,903
    Level
    14

    Re: Reading ade7758 registers for vrms , irms ,active energy kwh ?

    Well figured out one problem :

    My set up is like this : uc(3.3V) ----- DIgital isolator ADUM2402--------ADE7758(Energy meter Ic).

    When i power ADE7758 with 3.3 V it is displaying correct register value (LCYCMODE):120 in decimal(default power on value).
    But when i power it with 5V supply , then dout pins doesnt give proper data output.

    Well i tried with shifting mcu pins level to 5V by using 74HC245 but problem still persists ....still working on...






    1. when i connect



  11. #11
    Full Member level 6
    Points: 3,903, Level: 14

    Join Date
    Dec 2006
    Location
    Delhi , India
    Posts
    323
    Helped
    10 / 10
    Points
    3,903
    Level
    14

    Re: Reading ade7758 registers for vrms , irms ,active energy kwh ?

    Well Now iam able to read registers properly...Apologise for the confusing details given earlier. Actuall my spi communication read on dout pin was not proper.



    Now I am reading AVRMS register : 24850d. (last 3 digits are still fluctuating from 24600d to 24900d). at 2 V AC.

    But it increases now to 1273476d(last 4digit fluctuating from 1273000d to 1282000d) at 272 V AC.



    AVRMSOS : 0x0000; // not used in this reading.



    Please suggest how to proceed further.What value should i use for Offset register to make voltage match with real world.



--[[ ]]--