# All topics related to AD7758

Status
Not open for further replies.

#### gravi

##### Full Member level 2
MODERATOR ACTION: all topic related to AD7758 merged into one topic Fragrance

Hi
I have been working on Energy meter ADE7758 interfaced with Pic18LF8722, can anybody help in calibrating Energy and power factor. Im able to read Current and Voltage on each phase properly.

Thankyou
Ravi.

#### mmohdnor

##### Newbie level 5

I'm interested to know more about your project. I've been wanting to build one for myself too.

Anyway, I found this website which posts some stuff on DIY watt meter.
I don't know if that helps.

* Is it okay for me to post links ?? .. this is my first post

#### roozbeh_s

##### Newbie level 5

Hi
I made a multi transducer with this energy meter ,

mfd.0989

### mfd.0989

Points: 2

#### ABHIVYAKTI

##### Newbie level 1

i am also working on an energy meterusing ade7758, but i am not able to understand how to calculate RMS voltage after reading the RMS voltage register.
can anyone help me? same for current RMS also

#### makfa

##### Newbie level 3

ABHIVYAKTI said:
i am also working on an energy meterusing ade7758, but i am not able to understand how to calculate RMS voltage after reading the RMS voltage register.
can anyone help me? same for current RMS also

hi
you shod divide the reading form rms register to full scale of register then mult the result with maximom of your voltage or current.

for example max voltage of your circuite is 300v ( as vmax)
full sacle of v register is "1d38..."(use datasheet)(as fsc)
reading of register is "34d" as (vre)
result=vmax *(vre/fsc)

#### Prabakaran

##### Full Member level 3

hello
the calibration of the voltage and Current which not leads u to accuracy. Go for Phase calibration for calculating the instantaneous Three powers.

The file what i attached may useful for u. Let me know ur doubts and feedback. if ur facing problem still.

#### oneshotnike

##### Newbie level 3

I have tried to work with this chip ADE7758 but have failed in each attempt. I tried to make chip talk with the MC68HC11, PIC28, & FPGA. MC68HC11 was the worst one, where the programing was the matter. PIC28 - I fried this one the first time. And the FPGA - I did succeeded with the programing, but here the chip was not getting caliburated with the output, where I am getting repeatedly 'FFFF' in the 7segment output.

Hence, I request any of them who know or have done their project to come forward and help, regarding this failur that I have faced.

I will appreciate your help, feed back or even I will buy/pay for your time or the whole project.

Feel free to email at pm_kle@yahoo.co.uk
thanks

#### Prabakaran

##### Full Member level 3

Hi oneshotnike.

Here with i attached the file for interfacing the ADE7758. Go through with this. i didnt complete the Full
interfaced.

Laxmi Kant Tiwari

### Laxmi Kant Tiwari

Points: 2

#### Sanath Embedded

##### Member level 3
p89v51rd2bn

Hi guyz

I am currently working on a three phase project based on ADE7758 ( Three phase multi-functional Energy chip) with P89V51RD2BN Controller. So please help me out to clarify the following things.

1. In Datasheet it is given that the (APCF )Active and VARCF (reactive power )pulse outputs have been provided to enable quick calibration, and also to be able to monitor the energy consumed by counting the number of pulses issued. But as I tested in my basic circuitry of ADE 7758 (without any calibration) using LED's I haven't got any pulsed o/p from that :?:

2. For the Testing purpose can I make use of Single phase 240V rather than three phase. :|

#### bobcat1

Hi

Thest that the chip is working by checking the clock oscillator, current consumption , volatge applied , IO status at reset , SPI access etc

Whether all the test apply - you probebly have software or set up problem

All the best

Bobi

#### shoaibali

##### Member level 1

It might be possible that the Frequency of output signal is very very low. You will need to configure the frequency control regsiter to get high frequency even for low loads. Try increasing the load

#### Ugurkirbac

##### Newbie level 1
mc9s08ll16

I am currently working on a project , designing 3-phase energy meter with ADE7758 measurement IC.
I am looking for an appropriate MCU to interface with ADE7758.
MC9S08LL16 seems to be sufficient for my purpose, it's simple and easy-to-programme. Nevertheless, I want it to be more cheaper and versatile.
What about 8-bit Atmel-AVR versus MC9S08LL16 ?
I need some suggestions about possible MCU's for this project.
If any opinions come up, i would appreciate for that.

Thanks

#### alberto1683

##### Junior Member level 3

I developed a Thesis project with ADE7754 IC and 18F4550 Microchip microcontroller.
The entire project functioned perfect.

Regards,
Albert

#### Hanskarl2000

##### Newbie level 3

Hi makfa
I want to use ADE7758 for an embedded application.
I don't succeed in reading the WFORM register. Whatever I select in WAVMODE, I get 0x000000 in WFORM.
Can you give me a hint?

Thanks
Hans

#### FvM

##### Super Moderator
Staff member

It's not exactly said in the datasheet, but I guess it may be necessary to reset the interrupt status register to allow acquisition of a new waveform sample.

#### Alphan

##### Newbie level 2

I have made energy meter which using in the train, I chose ADE7753 and MEGA32 for it, if you need, I can post c code of interface. The calibration are quite complex, so I programed a software work on PC to finish, then download data into FRAM by usb or uart.

#### abhishek99in

##### Newbie level 1

hi
even i am working on ade7758. i need some help regarding the measurement of voltage and current. is it necessary to read the VRMS and IRMS registers after zero crossing take place??

#### tinku123

##### Junior Member level 3

dear all,

i am using ade7758 for energy metering applications. i successfully completed communication establishment between ade7758 and my renesas microcontroller(r8c/25) using spi protocol.
when i am reading default data stored in the on-chip registers i received stored values correctly.

In my application i want to use ade7758 for measuring phase wise voltages and currents, active power, apparent power and power factor. BY following the data sheet i am not able to set onchip register settings required for my application.

can u please mail me breifly about the register settings required for my application

in my application i want to measure
1. Vrms for each phase
2. Irms for each phase
3. active energy
4. apparent energy
5. power factor.

if possible can u pls mail me the sample code.

i even had the calibration datasheet. and application notes like an 639,an559 etc

#### yasirali

##### Newbie level 6

hello

atmega 32 .i am unable to communicate these two microcontrollers ics.

///--------------------MAIN file-----------------------------

#include <avr/io.h>
#include <avr/pgmspace.h>
#include <util/delay.h>
#include <avr/delay.h>
#include <inttypes.h>
#include "lcd_lib.h"

#define F_CPU 11059200UL
char text[] = { 'Y','A','S','I','R',' ','A','T','E','E','Q','8','\n'};
//Strings stored in AVR Flash memory
//delay 1s
void delay_ms(unsigned int ms)
{
while(ms)
{
_delay_ms(1);
ms--;
}

}

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

int main(void)
{
LCDinit();//init LCD bit, dual line, cursor right
LCDclr();//clears LCD

unsigned char result;
spi_init();

while(1) //loop demos
{
ade7753_write_to_reg(0x93,0x31); //the register is 0x13 in write mode;
delay_ms(50);

LCDsendChar(result);
delay_ms(1000);
LCDsendChar('A'); //this is a 4-bit lcd write function

while(1); //--stop here do not do any thing

}
return 0;
}

#include<avr/io.h>
#include <avr/pgmspace.h>
#include <util/delay.h>
#include <avr/delay.h>
#include <inttypes.h>

#define F_CPU 11059200UL

{

spi_start();
//write address to communication register first

//_delay_us(0.05); //---t7 in the datasheet
_delay_us(0.5); //---but i have given delay very greater than t7=50ns
spi_tx(value);//value to be written to register
spi_end();
}

{
unsigned char regval;

spi_start();

//_delay_us(4) ;i have given grater delay than 4us so that no doubt.
_delay_us(100);
regval= spi_rx();
return regval;
}

void spi_init(void)
{
/*set MOSI out ; SCK out ; SS out ;*/
DDR_SPI = DDR_SPI | (1 << MOSI) | (1 << SCK) | (1 << SS);
/*Set MISO in */
DDR_SPI = DDR_SPI & ~(1 << MISO);
/*Enable SPI; set Master mode; SPI Mode = 3; f' = f/16 */

SPCR = (1 << SPE) | (0 << DORD) | (1 << MSTR) | ( 0 << CPOL) | ( 1 << CPHA) | (0 << SPR1) | (1 << SPR0);
//DORD indicates that the MSB is transmitted first .
return;
}

void spi_tx(unsigned char data)
{
/* Start transmission */
SPDR = data;

/* Wait for transmission complete */
while(!(SPSR & (1<<SPIF)));

return;
}

unsigned char spi_rx(void)
{
delay_ms(100); //this delay is critical as when we send data from slave to master
/*Send a dummy character */
SPDR = 0x32;
/* Wait for reception complete */
while(!(SPSR & (1<<SPIF)));
/* Return data register */

return SPDR;
}

void spi_start(void)
{
/*End, if any, previous session */
spi_end();
/*Set SS low - start a new session */
PORT_SPI = PORT_SPI & ~(1 << SS);

return;
}

void spi_end(void)
{
/*Set SS high */
PORT_SPI = PORT_SPI | (1 << SS);

return;
}

Laxmi Kant Tiwari

Points: 2