Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[PIC] Ade7753 vrms and irms problem.

Status
Not open for further replies.

Nikhil24

Newbie level 4
Joined
Mar 16, 2017
Messages
5
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
56
Hello, I am using ade7753 for my college project, I almost read all default register successfully. but I am facing very unique problem while reading VRMS an IRMS . when I gave input to Voltage Channel and current channel then i get proper voltage at VRMS but IRMS channel got stuck at 16385 (d) constant value . whatever load i applied it never change . and when i applied input to current chaanel only that time i found tremendous increment in VRMS even though input to that channel is not connected.please help me to troubleshoot this problem:bang:

Thanks In Advance...:-o
 

Hi,

Show us your hardware and your code.

Klaus
 

Hi,

Show us your hardware and your code.

Klaus

for the current channel, I followed ade 7753 evaluation board ckt diagram with CT. and same for voltage. rest of the ckt I made according to the data sheet of ade 7753. no change at all as they said I followed.



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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
# include<stdio.h>
#include"lcd.h"
#include"display.h"
#include"spi.h"
#include"timer.h"
 
void init_ports()
{
        TRISE = 0x00;               //LCD control signals as output
        ADCON1 = 0x06;          // Disable analog pins on PORTA 
        TRISD = 0x00;               //LCD Data pins as output
}
 
 
void vtg_current()
{
    for(i=0;i<2;i++)
    {
        spi_read(0x17,1);           //Read data from VRMS Register
        vtg = value/10000;
        vtg = vtg*111;
        vtg = (vtg/100) + 5;
        display('V');           //Display VRMS value on LCD
        __delay_ms(3000);       //To display VRMS for 10sec
 
        spi_read(0x16,2);
        display('I');           //Display VRMS value on LCD
        crt = value/10000;
        crt = crt*1000;
        crt = crt/500;
        __delay_ms(3000);       //To display VRMS for 10sec
    }
 
    //spi_read(0x02,3);
//  pwr = value/100;
//  display('E');
 // __delay_ms(2000);
}
 
void display_energy()
{
    spi_read(0x02,3);           //Read data from AENERGY Register
    pwr = value/100;
    display('E');
}
 
void display(unsigned char cas) 
{
    lcd_cmd(0x01);
    lcd_cmd(0x80);          
    switch(cas)
    {
        case 'V':lcd_string("Vrms");            
                lcd_cmd(0xc0);
                sprintf(buff,"%ld v",vtg);          //send value of VRMS to LCD.
                lcd_string(buff);
                break;
 
        case 'I':lcd_string("Irms");
                lcd_cmd(0xc0);
                sprintf(buff,"%ld ma",crt);         //send value of IRMS to LCD.
                lcd_string(buff);
                break;
        
        case 'E':lcd_string("AEnergy");                     //send value of Active energy to LCD.
                lcd_cmd(0xc0);  
                sprintf(buff,"%ld w/hr",pwr);
                lcd_string(buff);
                break;
    }   
}
 
void output()
{
    while(!TMR1IF);
            TMR1IF=0;
        
        TMR1H = 0X00;
        TMR1L = 0X00;
        TMR1ON = 1;
 
        /*if(++s_count==16)
        {
            s_count = 0;
            display_clock();
        }*/
        if(++m_count==916)
        {
            m_count = 0;
            minute++;
            lcd_cmd(0x8A);
            sprintf(buff1,"%d min",minute);         //send value of IRMS to LCD.
            lcd_string(buff1);
        //  display_energy();
        }
        else if(++h_count==5722)
        {
            h_count = 0;
            display_energy();
        }
}

 
Last edited by a moderator:

Hi,
I followed ade 7753 evaluation board ckt diagram

In the past I've read this sentence many times...

But when the schematic was posted we saw differences in more than 50%.

Klaus
 

Hi,

There's no ADE7753 at all.

Klaus
 

Hi,

There are no ADE7753 at all.

Klaus
I used 10 pin headers to represent ic ... I had a plan to solder IC on some IC base and I found one so according to that I designed this circuit.i have attached the image of my IC base so you can understand more clearly. IMG-20170217-WA0000 (2).jpg
 

Looking at your code, does your 'spi_read' function do some magic with the 'value' variable?
I'm not sure what computer (and therefore runtime library) you are using but I would suggest that it is very wrong to have the 'spi_read' function update a global variable (which we can't see declared anywhere in your code) rather than returning the value directly.
Susan
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top