can any body tell that how can i use ADE7754 with PIC18F2520.....to make an WATT METER....????
Below is a link to the evaluation board user guide manual for ADE7754:
If you have not seen this before, I would recommend you to browse through this, to see if it helps.
Have you visited the communication section (from page 28) of the datasheet? This section would address the protocol to be used, register details and SPI working details.
If you still have concerns, feel free to post your questions here. Have you written a MCU code already to communicate with the ADE7754 chip? If so, what issues are you facing?
thanks for your suggestion........................iam following SPI of PIC18F2520........in inbuilt SPI read and write codes re available...........i have write the code for SPI.......but now stuck at the communication registers access.......
SPI write function-----:
void spidis(unsigned char a)
SPI Read Function---:
data[i] = ReadSPI();
what is the algorithm to access the communication registers of 7754........????
The below figure represents a SPI read and a SPI write to the ADE7754.
The details on communication register which controls the writing/reading of all on-chip registers can be found below.
To read an on-chip register:
1. Make a write to the communication register with MSB as 0 and bits [5:0] representing the address of the register whose value needs to be read. For example, to read AENERGY register, the value 0x01 (0000 0001b) must be sent to through the DIN pin.
2. Then the value corresponding to the AENERGY register is read back from the DOUT pin.
To write to an on-chip register:
1. Make a write to the communication register with MSB as 1 and bits [5:0] representing the address of the register which needs to be written. For example, if OPMODE register needs to be written to a different value, then send 0x8A through the DIN pin.
2. Follow it up by writing the new value to the OPMODE register by sending the new data through the DIN pin.
The below figure shows the timing specifications that must be met during the above operations:
The actual values of the timing specs are:
Let me know if this help you.
thaks dear...it is very helpful for me.....i am able to read and write through SPI.....but i donot know which register to be configure to take energy directly.....
i have write the code for ADE7754:
spi_wrt(0x8A); //OPMODE register address write
Delay10TCYx(2); //delay upto 10 micro seconds
spi_wrt(0x84); //value write in OPMODE register
spi_wrt(0x8D); //WATTMODE configure
after that i cant understand which register an what value to be write and read for taking output energy to be display???
is there any calculation required on MCU end or i can get direct 8 or 16 or 24 bit value for Energy....????
which register will give the direct value of energy???
i am using 1:2300 current transformer.......to read the current and 220V AC supply for load....
There are dedicated energy registers that will show you the energy consumption (both active and apparent) over a certain period of time. AENERGY and VAENERGY registers will accumulate energy values over time. So, if you read them multiple times with a constant V and I, you can observe the energy accumulating( increasing) over time. Once this register overflows, it resets to zero again and continues to accumulate like before. RAENERGY and RVAENERGY will give you the energy values as well, but the difference with these registers is that after you read them every time, the register resets to zero. LAENERGY and LVAENERGY are line cycle accumulation energy registers, which can be programmed to update once every time a certain number of half-line cycles has been completed. Every update replaces the previous register value. So, if you have constant V and I inputs and you read for a certain number of half-line cycles, you can expect to read the same energy value in the registers every time. Page 22 of the datasheet has more info on this register's usage. All these registers are 24-bit registers. You will need to find the conversion constant such as Wh/LSB or VAh/LSB, during the calibration of the meter. Then using this constant, you can convert the register reading to read world energy values such as in Wh or VAh, using the MCU.
Thanks for helpful suggestion.......
i am using constant V and I. for single phase.(known load of 15 Watt single phase).......as per your suggestion i have to use these certain registers or any other else......
To be write.....................
1) OPMODE (0x8A) (0x04)
2) MMODE (0x8B) (0x10)
3) WATMODE (0x8D) (0x04)
4) LINCYC (0x93) (0xFFFF)
after writing these....from which register i can get the energy value......???
AENERGY OR RAENERGY OR LAENERGY...........??
is there any value to be write in GAIN register or not????
right now i am not using interrupt and status registers......
i am simply write the values in above mentioned registers only.....
can u tell me the name of registers to be write and read, which will be used in energy display......
i will be tankful to you....
Your register settings will make sure that the active energy is accumulated over line cycle accumulation method and can be measured by reading LAENERGY register.
The bit 2 of the gain register can be set to 1, if you wish to accumulate the active energy in an absolute mode i.e., even negative active power will be considered positive while accumulation.
Setting bit 3 of the gain register to 1, will disable the no-load detection scheme.
If you do not wish to use these features, you can leave the GAIN register at its default value itself.
Poll the LENERGY bit of the STATUS register ( or enable its interrupt) to know when the line cycle accumulation result is available in the LAENERGY register.
Let me know how your experiment turns out.
ok sir........now i am reading the 24 bit register then how can i convert these value in decimal to display on LCD............?????
some problem i am facing...
1)-- in reading Vrms register of 24 bit in infinite loop...value on display will varry on each read....
2)-- in reading Irms register of 24 bit in infinite loop...value on display will varry on each read....
3)-- in reading energy from 0x0A AENERGY register some value will display and MCU will not give any other value from this register
writeSPI(0x2c); // writeSPI(0x29);
vrms=((unsigned long)val1<<16)|((unsigned long)val2<<8)|((unsigned long)val3);
how can i convert this data in decimal to be display on LCD......???
please give urgent solution for this......reply as soon as possible...i am waiting for your response......
There are a couple of points I would like to address here:
1. Converting register values to real-world numbers (like Vrms,Irms and Wh):
In order to convert register values to numbers that you can relate to, gain calibration needs to be done. The weight of each LSB in the register is figured out as a result of this, providing you a Vrms/LSB or Irms/LSB or Wh/LSB conversion constant. This constant can then be used to convert corresponding register readings to real-world values. The concept of gain calibration is to provide known inputs to the chip and equate that to the register values obtained. Page 6 of the Calibration App Note AN-624 will provide instructions on how to gain calibrate the active energy register and active energy CF output. For RMS gain calibration,
a) Apply known voltage and current inputs to the chip. ( eg: I= 5Arms; V=230Vrms)
b) Note down the Vrms and Irms register measurements.( eg: Vrms = 6710886d; Irms=8388607d)
c) Divide the applied value by the register reading to get Vrms/LSB and Irms/LSB constants. (eg: 5.96047*10^-7 Irms/LSB; 3.42727*10^-5 Vrms/LSB)
Then, in MCU, you can use these constants to convert register readings to comprehensible values.
2. Reading AENERGY register:
I believe you wanted to read LAENERGY register to display values, right? Because if you wish to use AENERGY register as well, you will need to adjust the WATMODE register accordingly.
great......i got it....
it gives me......voltage and current........
for reading voltage and current.....which network i have to use....in voltage hardware section like....1M:1K,,,is it ok..?
in current section what is the value of RB..i am using 1:2300 current transformer...???
Yes. For voltage channel, 1000:1 attenuation, using resistor divider, is common. So, it is fine. Please make sure that, even when the line voltage is at its absolute maximum value, it doesn't cause the input to the chip to exceed +500mVpeak.
For burden resistor value calculation, kindly refer to a Q&A in page 4 of the AN-639 document.
sir, i am getting the value from 0x2c register i.e, 1048575 for 213 volts.......is it ok?????
as per your example......(213 volts value) 1048575 x 0.0000342727 = 35.9......
if it is ok then your value will not gve the exact displayable value on lcd........
The conversion constant that I provided was just an example, to help explain how the conversion works. It can be different for your setup. Kindly repeat the steps on your meter setup and use the constant that you obtain, to display the parameters on the LCD.
ok i got it.........now fo watt reading....i am using abs register for absolute value...in gain register...
now how to display the watt value....by which register
You can compute average power over a period of time, from LAENERGY register measurement itself.
Average_Active_Power = Active_Energy_in_Wh / accumulation_time_in_hrs
ok.......you mean to say....i have to read only LAENERGY register........it gives abs value of energy....for 80 seconds.......after then it will reset......??
Yes! If you enable the ABS bit in the Gain register, then the LAENERGY register will be accumulated in the absolute mode. Every time the time period corresponding to the number of half-line cycles- set by LINCYC register- passes by, the register will get updated with the new accumulated value, replacing the older value.
how can i made that value in displayable form....???
Just like I referred before, use the AN-624 document (page 6) to guide you through the gain calibration steps of the chip. Equations 7 and 8 show how to get the Wh/LSB constant from the input settings and register readings. Multiply this constant with further register measurements to get energy values in Wh.
i am able display these value on lcd not on led.........i have a demo piece of watt meter using ADE7754 on led.......i am not able to reach at that accuracy....in it renesas 16 bit mcu used......is here any programming fault at my end will be possible....??
How do you determine the accuracy of the CF frequency output? Do you have a counter to record the frequency while you are testing? What active energy frequency output do you get with full-scale current input and how does it change with lower current values? Did you calibrate the CF output?
i am not using CF output....i am directly communicate with SPI....
Can you let me know what readings you get when you measure energy registers? Were you able to calibrate and calculate the Wh/LSB constant, as I mentioned before? Kindly vary input current signal amplitudes and measure line cycle accumulated energy readings in each case. Let me know the accumulation time you set,as well.
Some of the most common sources for accuracy issues:
1. Inaccuracies( non-linearities) in voltage attenuation network and current sensor circuitry.
2. Improper calibration- not following the steps sequentially and properly.
3. Not accumulating enough bits in the registers ( or in other words, using very low LINCYC register values can lead to errors in the energy measurements)
So, if you can provide me as much information as possible with respect to the above points, we can resolve the issue quicker.
thanx buddy...now i have completed my project......with vrms+irms+ energy reading..........but facing a little error....in hardware circuit...
i am describing it in parts....
ERROR:---->1) when i start my apparatus with load then my circuit will work properly.....
2) when i will start my apparatus without load then it will show abnormal values......
3) when i will change the load after switching OFF the apparatus....and then again turn it ON...it
will work properly
4) when i will change the load without switching OFF the apparatus....then...it will hangup and showing abnormal values.....
can you suggest me what is happening...with it..??
Glad to know that you have completed your project! I will be able to help you resolve the issue that you are observing now.
ERROR CASE 1: when i will start my apparatus without load then it will show abnormal values......
When you say without load, what does it mean? Do you keep your current inputs floating and provide just voltage inputs? Or do you not provide even voltage input? What erroneous results do you observe? Can you look at the current and voltage signals going into the meter setup and the ADE chip? Can you try grounding the current inputs at the ADE chip pins and repeating the experiment to see if the results are better?
ERROR CASE 2: when i will change the load without switching OFF the apparatus....then...it will hangup and showing abnormal values.....
This can be due to the start-up or value-change behavior of the load. Again, watching for any transients entering the chip/meter will be useful in debugging this. What load are you using? Try using any other simple load to confirm that the issue is caused due to the load used. Let me know which readings are faulty and what is the measurement taken.
On a general note, if you can share your schematic, I will be able to review it and look for any possible points of concern. Also, when you say that the readings are faulty, did you try to ensure that the readings coming out of the ADE chip is by itself faulty ( on the communication lines) ?
this is the schematic......
i am using 15 watt bulb and 40 watt bulb........my project is to show the energy change on adding or rmoval of lamp load in running load....but in running condition...device will hangup on changing the load...this will may be cause by...flicker spike, which is generated by.....change of load....please give me tips to remove this error....
I would be able to help you better if you provide me details on how you say that the chip will "hang up" when the load changes. Is the value reported by the ADE chip faulty? Or does the ADE chip go blank and gives all 0s? (Try checking the ADE chip communication lines for this) Do you check the Reference pin (pin 12) to see if the chip is powered-up properly at that point? Also, try monitoring the VDD to see if there is any glitch in the supply. Does resetting the chip bring back good results?
Some schematic changes that I recommend are:
1. Add ferrite beads after the burden resistors and before the anti-alias filtering on the current channel input.
2. Use any over-voltage protection diodes ( or any other circuitry ) in front of the current input channel to limit the signal going in to + 6 V ( Take care so that the input signals within + 0.5Vpeak isn't affected by this circuitry). If you cannot do this, try monitoring the current input pins on scope while you make the load change so that we can find out if there is any large spike observed.
3. I see that you have used two different grounds for AGND and DGND. Make sure to connect them together in schematic. The crystal ground must also be tied to this common ground. This common ground must be isolated from the MCU ground so that the PC is protected from high voltage signals.
On a high level, is it difficult for you to use a load where you can change the load current without removing/re-connecting the load itself?
you mean to say..........all the grounds of ADE chip must be common....but isolated from MCU......??
presently i have connected all the grounds of ADE chip with MCU ground.......
i have the problem in SPI communication......this will break on changing of load or switch ON/OFF the auxilliary mains or any sudden change in mains...SPI communication will break...and MCU will display 000 volts or 500 volts or 3.000 ampere current or 7721 wattage.....these are abnormal value will display generally on any disturbance in mains.......like any other machine is running on mains will create this disturbance in these readings......
Hmani is away but I would be more than happy to help you with your questions.
Adding to what Hmani had said, do you have ferrite beads directly after your +CT and -CT connection points?
All grounds of the ADE chip must be a common ground, DGND and AGND must be shorted together. This can be the same as the MCU ground, it is just important that if you have a computer connected to the MCU that there be isolation either between the MCU and computer or MCU and ADE chip to protect your computer from the high voltage line.
Do you have any oscilloscope screen shots of this disturbance when it happens?
If I understand you correctly, you are switching loads by unplugging one then plugging in the other. This means that the current reading will go to zero when you unplug one load but then something happens when the new load is connected which gives unusable readings for the chip, is this correct?
When the chip becomes unresponsive, are the registers equal to 0000 or FFFF or are they just random values that no longer make sense? Could you send me the register names and their values before and after an event where it stops working?
thanks for understanding me.......
yes i can provide you the values i am getting....
@ 230 VAC, 15 watt load take 70 mA of current.......
i am able to display ac line voltage by reading 0x2C register......
i am able to display ac line current by reading 0x29 register......
i am able to display ac line energy by reading 0x02 register......@1100 msec delay
these are the images......first image: when i turn ON the setup....
second: when in running condition i will add the load and give it to mains....voltage will display but current and energy will not display....
third: i unplug the auxiliary ac mains and again turn it on...
fourth: i just reset the MCU
and if i will add or remove certain load in running condition then display will show ::::::V=200, I=3.256,W=7221....for a while and after that it will show all zero value for infinity like first image....
Message was edited by: virender kumar
here is the program in c laguange by using MPLAB IDE and C18 compiler....
spi_wrt(0x80 | 0x0A); //OPMODE
spi_wrt(0x80 | 0x0B); //MMODE
spi_wrt(0x80 | 0x0D); //WATMODE
spi_wrt(0x80 | 0x18); //GAIN
spi_wrt(0x80 | 0x13); //LINCYC
spi_wrt(0xC8); //SET TO 200
spi_wrt(0x80 | 0x0F); //IRQEN
spi_wrt(0x80); //SET TO 1024 for energy
spi_wrt(0x11); //RSTATUS REGISTER
temp = spi_rd();
temp1 = spi_rd();
spi_wrt(0x02); //AENERGY read
la1 = spi_rd();
la2 = spi_rd();
la3 = spi_rd();
spi_wrt(0x2C); //voltage read
val1 = spi_rd();
val2 = spi_rd();
val3 = spi_rd();
spi_wrt(0x29); //current read
cur1 = spi_rd();
cur2 = spi_rd();
cur3 = spi_rd();
vrmsd=((unsigned long)val1<<16)|((unsigned long)val2<<8)|((unsigned long)val3);
irmsd=((unsigned long)cur1<<16)|((unsigned long)cur2<<8)|((unsigned long)cur3);
wenergy=((unsigned long)la1<<16)|((unsigned long)la2<<8)|((unsigned long)la3);
dec2ascii(wenergy,3); //energy byte display
dec2ascii(irms,2); //current display
dec2ascii(vrms,1); //voltage display
I see that in your schematic, you have iap, ibp and icp shorted and vap, vbp and vcp shorted. Have you tried doing this test with just one phase connected (iap and vap) then shorting the other inputs to ground?
Have you looked at the actual registers to see whats going on? It seems like the VRMS stays good but IRMS and Power go to zero, I am interested to see how this looks in the actual registers of the part.
sorry for delayed response...but with a gud news...i have sort out the problem...problem was in the SPI programming....
1) now i want to display the power factor....... how can i do this......
2) how can i display the mains input frequency....
3) is this ADE7754 IC can display 2000watt maximum...???
4) if i want to go for higher value then which IC to be prefer
ok...thanks for your suggestion.........
i really thankful to you budy.....
my specs are: 220V input and 10Amp maximum.......for that i am using 1:2300T CT with 56ohm burden register......
is there any calculation doc file for power factor......???
and how can i calculate leading and lagging of power factor?
I think this can help you, on Page 23 and 24 of the ADE7754 Data Sheet it explains the Reactive Power Calculation of the ADE7754. Then the last paragraph of the "Reactive Energy Accumulation Selection" section explains how to get the actual Reactive Energy measurement with its sign. If the sign of the reactive power is positive then the voltage leads the current, and the other way around for if its negative.
With these Apparent Power and Active Power readings you can take, Power Factor = (Active Power/Apparent Power).
One thing about your burden resistance, it would be good to look at Page 4 of http://www.analog.com/static/imported-files/application_notes/AN-639.pdf. Currently for your maximum current, turns ratio and burden, you would be going above the +/-500mV peak range of the current input channel. With a 56 Ohm single burden, the max current would be more in the range of 7 or 8 Amps.
i have already read the AN-639.......and tried the PF calculation.....just like this.....
but this will gives me only 1.......if i put an inductive load again result will be 1.....if i have applied lower inductance with power factor 0.5 then result will be 0 on lcd.......
how can i put this ration in accurate form to display.......
I can fill-in for DLath and help you further with this thread.
One correction in the formula that I would suggest is that you use LVAENERGY instead of VAENERGY. For computing the PF using energy results, use the line cycle accumulated energies for stable results.
What is the input signal applied? Over how many LINCYC do you collect energy data? Can you monitor energies and PF computed in code for various input signals applied? Try testing the code to confirm if the PF variable can indeed hold decimal point values. Also check if there is any issue with LCD segment setup (that the LCD has the capability to display decimal values).
i have applied sin signal......ac mains amplitude of 230 VAC.......with 50 Hz frequency....
i am reading LAENERGY register...on LINCYC of 200.......as mentioned in AN-624....
that gives me a decimal value........but i need...float......
for example..::::::: if LAENERGY=40
LVAENERGY is near about greater than 40 for capacitive load......then PF should be 0.5 on a sample meter......then how can i calculate this float value .....where the ration of these energies is decimal....???
I am not sure that I am understanding your issue correctly. From what I can gather, I assume that you need a rounded value for PF which just says 0,1 or 0.5 based on whichever is closer and not accurately state the result, say 0.866 for example. Am I right? If not, kindly elaborate with examples. Because if this is the issue, then this is something that has to be done on the MCU after the PF is calculated based on the above formula.
Also, I would say that the LSB count of 40 for the energy result is very small. I think the current level is very low. Try to increase the LINCYC value to get more LSBs and hence more accurate results.
for 200 LINCYC..........i am getting 400 LSBs for energy value of (40 watt)..............it is sufficient for any calculation??
and in the calculation of Power factor..........formula using the decimal values of LAENERGY and LVAENERGY regisers
on dividing of these values......i want to get float value instead of decimal.....because PF value is less the 1 the how can i convert and display that float value in C language variable.....that will be vary in between 0 to 1....
The number of LSBs you need to accumulate depends on your accuracy requirement. A FAQ on page 9 of AN-639 App note addresses this question.
LVAENERGY result will always be equal to or greater than LAENERGY result. So, dividing latter by the former will give value between 0 and 1. Based on the number of significant figures you need, you will have to declare the 'power factor' variable accordingly (like "%.2f"). If you are talking about rounding it up/down, floorf and ceilf functions can do the trick. Does this help?
after long time..i need your help again........i have made the single phase energy meter with vrms, irms and line freq display........
some pieces was sold ........now customer feedback comes......all things are ok except vrms display........
there are vrms value variation in display.......how can i stabilize it.........i am simply read the vrms register and convert it to displayable format.......with 1 volt resolution........how can i stabilize the vrms register value,,,,,where as all resistor capacitor placed correctly..........
please help me....its final step for my product......
I can definitely help you with this. I need to know how frequently do you need to update your voltage rms value in the application. I would suggest taking 100 readings over a period of 1 second and displaying the average value. This is the recommended method for current rms as well. I do not understand why only your voltage rms is having fluctuations. Are you sure that the line voltage is stable? If you still see errors, kindly share your schematic.
thanks hmani....now all my values are stable...and clearly displayble......
but a small error still there ....... a mul-functioning error.........
meter working is ok,,, but in between reading......the line frequency will suddenly show a garbage or zero value for a moment and energy goes suddenly high for a moment.......
i can't understand why this is happening........the ration of this moment is 1:10 readings......in every 10 readings this is happening for one single time.....
please solve this final issue.....
Here are some troubleshooting steps that you should try:
1. Please make sure that the input conditions are completely stable throughout (during the time you take your measurements)- To do this, monitor the voltage and current signals before entering the IC, and report their amplitude/phase/period information
2. Apply the same set of voltage and current signals and keep reading all measurement registers, in a loop.(Sometimes, writing a simple code just to do this, is helpful.) Kindly report the register readings as and how you read them, in the same order. We can use this data to confirm if the entire data set is corrupted or just frequency and energy. We can also see the pattern for ,say 100, consecutive set of readings and confirm if the bad reading is always the 10th or the 11th reading. As per point 1, keep measuring the input signals throughout. We should be able to verify if the inputs are good when we get bad readings.
3. If the above two steps do not yield anything useful, try monitoring power supply and crystal frequency output stability during the entire data capture window.
You had said (in one of your earlier posts) that customer sampling was done with this design. So, I wanted to confirm- Is this something new that you are observing or had you not looked for it before? Also, do you see this issue with multiple ICs and multiple boards?
yes...i had told tat customer sampling is done.................but as i mentioned...this problem not occur on every time.....such as 1:100 readings....
but now i have resolve it as per your suggestion of average reading concept.....
another thing i have observe now.....that in running condition if i change the AC load by band switch then my lcd data will wash off......after that i have to reset of swith the power OFF and then ON......
or i can say the meter system will hangup...on change of load in running condition.....can you let me know....what is the reason behind it........
because till now i have test it on steady load...not variable load.......this is the complaint from customer end.....please help what can i do....
Can you explain your setup a little bit more? When you change the load, do you mean that you increase/decrease the current applied to the current sensor, from a source? Do you monitor the current signal entering the IC when the load changes? Also, it will be good to check the supply voltage. May be there is some effect on the power supply circuitry when the load changes. If possible, try powering the board with a battery (or external power supply unit).
Also, other than the LCD display clearing itself, do you see any other issues with the ADE7754 IC itself? Can you try and read registers from the IC after this event occurs?
when switch on the device and no voltage apply on 7754 then default voltage is 3 or 4 volts, not zero on no input apply.
when load and supply will applied then on changing load by toggle switches, display will wash off i.e, MCU+7754+lcd all will hang up. in programming in opmode register i have enabled both of the HPFs and LPFs.....
i am stucking with this kind of problem......i am using 16x2 HD77480 base lcd, this will also hangup in many of my projects, where the switching or toggling will occur...
help me out in this
Thanks for sharing your schematic! But I still do not see how you have connected the voltage and current inputs to the ADE7754IC.
Please look at the below picture for a typical 4-wire wye connection.
The attenuation network and VN pin connection is illustrated here:
Please make sure that you have the grounds set up like this. The neutral must be grounded as shown. If the connections are made in such a way, adjusting the load shouldn't have any impact on the voltage channel or the supply voltage.
Regarding query1, there will be some inherent DC offset in the voltage channel and there is no HPF in the signal path. VRMS is actually a mean absolute value measurement and is accurate (within 0.5% error typically) upto FS/20. Are you able to meet this spec? With regards to the offset, if you can characterize it over mutiple parts and over temperature, you can come up with a way to compensate for it. Are you planning to do something like this? It is to be noted that the current channel has the HPF in its signal path; so, the power/energy computations will not be affected by the DC present on the voltage channel.
Regarding Query2, please check your schematic based on my figures (above). It is fine to have the HPFs and LPFs turned on (which is the default anyways). As per my earlier request, try to monitor the current, voltage and supply as you change the load. This will help you figure out if the load change is affecting any of the other signals. If you scope the SPI lines when the LCD "freezes", do you see any communication going on? This would help you figure out if it is only the LCD that is getting affected.
i got your point its really helpful......
query 2.........i have place the attenuation network between Vp and Vn point and provide direct supply 220VAC at the network input.....by that the neutral will directly short to Vn and my MCU GND..........there will be a resistance...but what will be the value of that register between Vn and neutral..(as shown in your fig no. 2)..??
and in calculation of frequency by the help of reading period.....the frequency will disturb when the voltage is less than 10 volts...what is the reason behind this...???
now in the query 1: i know that is the offset error, but it is not linear at all the stages.......means if default is 3 or 5 V then if i provide 10 V and on an average sample i will read it then display will be accurate as per the input with in 0.5%........
now i don't have any idea to remove this offset by programming.......??? how can i do this...i have reaad about the offset register...but not getting the appropriate path to use this...
1. VN shouldn't be tied to ground (or neutral) directly. It should be tied to ground via a RC filter, like I have shown in my post. The resistor and capacitor values must be the same as what you have used in other voltage legs VAP, VBP and VCP and in current channels (IAP-IAN, IBP-IBN, ICP-ICN). Based on your figure, the resistor should be 1kohm.
2. The frequency calculation is done via voltage channel zero-crossings. The zero-crossings are not very well recorded when the voltage signal is small. So, that is why you are observing a bad result with low voltage values. In the application, the line voltage is usually around the nominal value (110Vrms/220Vrms). With a 1000:1 attenuation on voltage channel, the voltage signal entering the ADE IC will be 110mVrms or 220mVrms. This is very close to the fullscale of the ADCs and hence you should not have a trouble in those cases. Do you have any specific reason why you might need to monitor frequency values at low voltages? Is that an expected application scenario?
3. VRMS results are accurate till a dynamic range of 20:1, which is 17.67mVrms at the ADE IC inputs. I am assuming you are able to get good rms results above this voltage level. If not, offset calibration can be done to get accurate results within this dynamic range. Do you need to accurately report lower voltages as well? If so, what is the lowest and highest voltage value that you need to accurately report? May be you can change your attenuation network to accomodate this range.
Doing offset calibration to get accurate results below this 20:1 dynamic range, may not be very useful. However, the method to do offset calibration is explained in page 17 of ADE7754 datasheet and page 9 of AN624 app note.
Let me know if you have further questions.
query1: you mean to say that Vn shouldn't be directly tied to neutral or ground signal.......it means i have to short neutral and ground directly. and Vn will be attenuated through a RC network...??
query2: i can ignore this error....because very less usage of frequency in the application.....
query3: i can read and display the Vrms accurately......upto this range.....above from 8 or 10 Vrms input.....but if i provide no input....still an offset voltage will be display in the lower end.....i have read the page 17 of AN624......there is calculated value for AVrmsOS is -5....is this writable value in AVRMSOS (0x32) register????......
Q1: Correct! Just a clarification: I wouldn't agree with the term "Vn will be attenuated through a RC network". There is no attenuation network as such- just a parallel RC filter, with ground reference, is connected to VN pin as shown in figure (in one of my previous posts in this thread).
Q3: AVRMSOS is a 12-bit signed register, with bit 11 (MSB) as sign bit. You will have to represent -5 in 2's complement form. So, -5 will be 0xFFB.
yes, sorry for that....it is RC filter.....but you not justify the second last line of Q1;;;??? i have to short neutral and ground directly??
Q1: because....i have place a RC filter at Vn and Neutral.(as mentioned in one of your previous post connection diagram)....the problem reduces, but not remove.......
Q2:..AVRMSOS....i will try this...
need verification about (RB) burden resistor value.........is it correct value (56E) for 10A current..........on single channel......
waiting for your response.....thanks...
Yes. Please ground neutral directly and connect a RC filter to VN. Refer to my earlier diagram in this thread. There should be a ground symbol on the neutral wire.
Regarding the burden resistor value, if 10Arms in the max current in your application, kindly choose 22 ohm differential burden resistors, instead of 56 ohm.
So, (10/2500)*(22+22) would become 0.176Vrms. This is nearly Full-scale/2 for the IC, which is a good place to set your maximum current level.
i got all the points and clear it completely.........
but i cannot understand one point in three phase case.....
in single phase the energy will store in a single register.........if i will use this ic in 3 phase case, then the total energy of all three phases will accumulate in that single register...how can i separate out that energies to display separately....example:
PHASE-A LOAD=1000 WATT
PHASE-B LOAD=2000 WATT
PHASE-C LOAD=1500 WATT
THEN TOTAL VALUE = 4500 HOW CAN I SEPARATE OUT THESE IN SUCH WAY TO DISPLAY....
i have rtead the 18 page watsel register function....but can't setup my logic for display all the vrms, irms and energies of all phases....
You are correct in saying that there is just a single energy register for all three phases' energies put together (Note that there are two different sets of active energy registers though- AENERGY/RENERGY and LENERGY).
To continuously monitor the energies in all three phases, it is necessary to monitor the total active energy (sum of all phases). But if you can afford to monitor individual phases' energies one by one, then ADE7754 has necessary configuration options to help you do that.
In the table snippet attached below, you can see that by setting one or more of the LWATSEL bits, you can include one or more phases into the active energy computation. The WATMOD options help with using different formulae for use in different 3-phase configurations.
With respect to RMS results, there are individual current and voltage RMS registers for all phases (Address: 29h to 2Eh). So, that shouldn't be a problem for you.
I just wanted to point out that a lot of our recent ICs have independent energy registers for all three phases, along with a lot of other feature and performance improvements. So, if you still haven't narrowed in on an IC for your application, it will be worth considering some polyphase ADE ICs such as ADE7758, ADE7878A, ADE7880, etc..
This is very informative thread, it helped me alot.
I am facing problem with Active Energy calculation, i have 3-phase know load with following parameters
Current A=8amp, Current B=8.1amp, Current C=7.9amp
Voltage A=230, Voltage B=227, Voltage C=234,
Active power on ref meter : 5521Watts.
the value which i get in LAEnergy: 2688
and LVAEnergy: 918
registers configuration is following.
Can you please guide me how to make it correct.
Based on your input conditions and register results, it seems like there is a disconnect. What is the power factor condition? Looking at the register results, I would assume a PF of ~0.8. Is that correct?
By default, there is a scaling factor of 3.657 between Apparent and active power register results. Refer to the table first column below.
The reference meter is showing the total active power as sum of active power of all 3 phases and that denotes PF of 1. Are the voltage and current inputs fairly accurate? Or do you expect large variation from actual values? Can you look at the amplitude and phase of the signals entering the metering IC? Because, that would help us understand what the ADE7754 IC is actually seeing.
I am assuming you were also talking about only these issues. If you had other questions in mind, please ask.
You are absolutely right, Pf is in the range of 0.8. You resolved one of my problem i.e. scaling factor 3.657.
Voltages and currents are close enough.
My question is that how to calculate Active power?
Tell me if i am wrong, LAEnergy contains the active power for one phase at a time and we need to add LAEnergy for all of three phases to get total active power?
As you have enabled all three terms of LWATSEL bits in WATMODE register, the LAENERGY register shows the sum of active energy of all three phases. So, you should be fine.
Thanks alot for your kind support.
I am trying to debug the problem, if i have something, your kind help will be required.
Sir I want to know how to calculate W/h in meter because i want to increase my reading on the basis of avg W/h.
Retrieving data ...