ATmega8 with ADE7753, display on 4 digit seven segment

Go To Last Post
55 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

hey, hi.

can I get any kind of help?

 

I'm usnig ATmega8 with ADE7753, display on 4 digit seven segment. I already read the register's bits n display register's default value on 7-segment.

 

and now I want to display, current, voltage, frequency, KWh, Wh, power factor.

 

so can you please, guide me that what should I do.

 

Means, how can i start?

 

Thanks.

Last Edited: Tue. Jul 26, 2016 - 07:18 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Manish Kumar wrote:
Means, how can i start?

40+ hits on these forums for "ade7753".

30+ hits on these forums for "ade7754".

20+ hits on these forums for "ade7758".

 

(all three of these models use a similar communication structure)

 

Have you exhausted the information in those 100 threads?  At least a dozen will have much information.  I've posted my "driver" and detailed discussion of communication "tables" before.  Search it out.

 

 

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

ya, actually I,m new here and in R & D field as well.

Can you, please give me direct link regarding ADE7753 (Convert read register's values into actual values; register's value into voltage or current or power factor) or where should i found eject post, which can help me because I fade up of searching and reading many posts.

 

As, I already mentioned that, I read register's value (No issue with SPI and displayed on 4-digit seven segment), just want to tutorial (ADE7753) kind of, because datasheet is also quite confusing for me.

Can i get the selected data in form of theory (like read this resister than make calculation with this value and the result will come out, Actual voltage or current; n about calibration also), i will work on code own my own else code sample can also help.

so...

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Manish Kumar wrote:
or where should i found eject post, which can help me because I fade up of searching and reading many posts.

How do you think >>I<< would find the most important threads?

 

Keep fading...

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

glad to get your replay.

 

thanks...

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

He only played it once I thought?

 

Imagecraft compiler user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

bobgardner wrote:

He only played it once I thought?

 

@Manish,

 

Bob is trying to improve your English.

 

"replay" is both a noun and a verb. The verb means to "do again". The noun means "a repeated event".

 

"reply" is also both a noun and a verb. The verb means "to answer a question". The noun means "the answer".

 

So you should have said "glad to get your reply"

 

Hope that helps you in the future. It is interesting that many, many of your fellow countrymen make this same mistake. Perhaps you all had the same teacher who does not know the difference between the two words and their use.

 

Cheers,

 

Ross

 

Ross McKenzie ValuSoft Melbourne Australia

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

@valusoft

I appreciate, what you said.

 

But seriously, I didn't expect...the person as like you and joined in this forum; trying to make laugh to other which can not write English properly.

 

You Know, English is not our mother tongue. And I know the difference between two, you were trying to explain (thanks for that) and I'm not sure but as I'm a fresher in this filed (AVR, Electronics) and there is limited time to complete this project so, that was just mistake because I couldn't notice before going to those link, sent by @theusch (and most of time, I use shorthand typing). You can say, making lame excuses; but seriously, it doesn't make any difference to me. I'm not here to show myself that I'm superior to anyone, even I'm here, just for taking help.

 

You tell, can you read, write, speak and understand single line in Hindi and Sanskrit, can you talk to me in my language as I'm doing with you.

Just use google to find the importance, still you don't know and I can explain here but I'm not as like you and also I'm not here to say anything, as you said in your last 2 lines because I'm not as great as you are. 

 

Might be, you will get my more mistakes here and will connect to those to, all and country. But I'm, as capable as I can take help and give help to others in your language, globally.

 

I'm Proud To Be Born Indian.

 

Thank You

 

You should see this...

https://www.youtube.com/watch?v=...

 

Cheers'

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

valusoft wrote:

 

@Manish,

 

Bob is trying to improve your English.

 

"replay" is both a noun and a verb. The verb means to "do again". The noun means "a repeated event".

 

"reply" is also both a noun and a verb. The verb means "to answer a question". The noun means "the answer".

 

So you should have said "glad to get your reply"

 

Hope that helps you in the future.

 

 

Definitely, this will help Manish or anyone else (who makes similar mistake) in future.  

 

valusoft wrote:

 

It is interesting that many, many of your fellow countrymen make this same mistake. Perhaps you all had the same teacher who does not know the difference between the two words and their use.

 

 

As Manish has already said, is it necessary to say this?

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Manish Kumar wrote:
Can you, please give me direct link regarding ADE7753 (Convert read register's values into actual values; register's value into voltage or current or power factor)

How about the device Datasheet?

 

And how about visiting the device manufacturer's website for support, application notes, examples, etc ... ?

 

http://www.analog.com/en/product...

 

 

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

hey theusch.

I hope you got my sense (glad to get your replay).

 

Hmmm...

 

Ya, actually, still I'm confused, to read actual value of voltage.

what i did...

 

I read VRMS register (0x17) with AC supply voltage 200V and got 14083 value.

now, in program

 

while (1)
    {
        data = ade7753_read_reg(0x17, 3);  //uint32_t ade7753_read_reg(unsigned char address, unsigned char numberOfBits) 
        _delay_ms(10);

       volt = ((200 * data) / 14083);
        brk_up(volt);                                    //void brk_up(uint32_t integerValue); used for display 4 digit's integer value on 7-Segment.
        _delay_ms(100);
        
    }

 

What is problem here, Is there anything to read/ write before to display?

I just need of steps to follow, like (for reading Voltage, Current, Power Factor) send this value in this register then read this register and then calculate with this value to get actual value, kind of.

 

Thank You.

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks for giving me link.

 

Actually I got confused after reading, many posts, datasheet and application notes.

And as I mentioned in theusch post that (after code)

"I just need of steps to follow, like (for reading Voltage, Current, Power Factor) send this value in this register then read this register and then calculate with this value to get actual value, kind of."

 

So, is there anything for help?

 

Thank You.

Last Edited: Tue. May 24, 2016 - 01:54 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Note that the ADE7753 is not an Atmel product - so you should really be going to the actual manufacturer (Analog Devices) for support with their product.

 

See the 'Support' tab at the top of the ADE7753 page.

 

https://ez.analog.com/welcome

 

Have you got the Analog Devices Evaluation Kit?  Have you looked at the associated software?

 

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

One problem with an open ended question like 'I want to do something that requires several steps and each step requires prerequisites. How can I start?' is we dont know if you are a rather prolific c programmer, and just need to know some detail of the chip protocol, or are perhaps a total beginner. I think you want to build a 'power meter' using the chip and an lcd display, and I hope you have a batchelors degree in electrical engineering, so you are already familiar with vrms, power, kilowatt hours. If we have to teach you c programming and electrical engineering all in this message thread, I think it might be as long as the books on c programming and electrical engineering. I know everyone thinks we are rude and condescending when we suggest that all the information on the power chip is in the manufacturers datasheet, but I always wonder how something so obvious needs an explanation. I guess there are stll folks who dont know how to look for stuff on a computer after 30 years. Amazing but true evidently.

My suggestion: Get an arduino uno and a text lcd shield and write a c program to display volts and amps and watts with some dummy values on the lcd. Next write a program to read parameters from the power chip, convert and scale them to the proper form for display. I suggest you dont try to write your own lcd display routines from a blank piece of paper. This would be like writing your own c compiler to get the program written. Submit your c program here if you get stumped and need debugging help.

 

Imagecraft compiler user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

bobgardner wrote:
we dont know if you are a rather prolific c programmer, and just need to know some detail of the chip protocol, or are perhaps a total beginner.

Indeed. Although he did say in #3:

I'm new ... in R & D field 

But that still doesn't get us very far.

 

Is "R & D field" supposed to suggest that this is work - rather than a hobbyist question?

 

 

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
Last Edited: Tue. May 24, 2016 - 06:49 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

Manish Kumar wrote:

I didn't expect...the person as like you and joined in this forum; trying to make laugh to other which can not write English properly.

You are mistaken. I was not attempting to make any joke at your expense, simply pointing out a common occurrence and questioning a possible cause. In my country, there is a current plague of the misuse of the word "think" when "thing" is actually needed. I correct this among my peers just as enthusiastically so please don't think that I have singled your mistake out for special treatment.

Ross McKenzie ValuSoft Melbourne Australia

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

@valusoft

Just because of this-

You said...

 

"Perhaps you all had the same teacher who does not know the difference between the two words and their use."

 

Now just come off it.

I don't want to talk about this, anymore because it depends on person to person and their mentality. 

Last Edited: Wed. May 25, 2016 - 07:45 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

@awneil

No, I don't have  Analog Devices Evaluation Kit.

I made it, with the help of datasheet and Internet.

 

I'm able to read/ write values of/ in registers but confused in reading the actual values (V, I, P.F.).

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

@bobgardner

Thanks for motivating reply.

 

First of all, I want to clear something that

I have bachelor degree in "Electronics and Communication" and I'm not prolific c programmer. 

And I want to built Power Meter with ATmega8 and 4-Digit Seven Segment. And I'm using IDE AVR Studio7.

 

My SPI communication with ADE7753 and ATmega8 is working fine. I can read/ write values of/ in registers with 24 bit (also value display on 7-Segment). But now I got stuck to read actual values of parameters (Voltage, Current, Power Factor and so on).

Is there any lengthy process or steps to get and display actual value on segments, means for reading actual value of voltage I have to configure MODE register before then read VRMS register (0x17), something like this?

I just need steps to follow to get actual value of V, I, P. F. and so on with ADE7753 registers.

I hope you got my issue...!

Here is my code, which is not giving correct value of voltage.

 

I read VRMS register (0x17) with AC supply voltage 200V and got 14083 value.

now, in program

 

while (1)
    {
        data = ade7753_read_reg(0x17, 3);  //uint32_t ade7753_read_reg(unsigned char address, unsigned char numberOfBits) 
        _delay_ms(10);

       volt = ((200 * data) / 14083);
        brk_up(volt);                                    //void brk_up(uint32_t integerValue); used for display 4 digit's integer value on 7-Segment.
        _delay_ms(100);
        
    }

 

???

 

Last Edited: Wed. May 25, 2016 - 07:49 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

There are 2 ways to drive a 4 digit 7 segment display.... static and refreshed. Static means you have 4 8 bit latches. Just put the data on the pins and shake the latch line. It will stay there until the power goes off. Refreshed means you put data on 1 digit at a time and change every 4x70->280 times a sec, about 3ms. So you just need a table with the segment values for 10 digits. Lets say one of the registers in the chip is volts. Lets say its 14 bits, so it holds 0-16383. Full scale might mean 240 volts, so you can get volts from the binary value by multiplying by 240 then dividing by 16384. You now have to convert this binary number, lets say its 234 (held in a 2 byte int) into 4 binary digits. There are several algorithms for doing this that were invented in the 50s during the heyday of computers, but just using the functions that have been in the c standard library since 1970 will work fine. Read about printf (print formatted) and sprintf (print formatted to a string). the string will be ascii characters ready to print to a terminal, but that's ok. ascii 0,1,2,3 are 0x30,0x31,0x32,0x33, so just subtract 0x30 and you have that digit in binary. Use this to index into the segment table to get the segments for this digit. That's about it. Give it a try and come back and ask for debugging advice. Good luck.

 

Imagecraft compiler user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Manish Kumar wrote:
I'm able to read/ write values of/ in registers but confused in reading the actual values (V, I, P.F.).

In what way(s) are you "confused" ?

 

Which part(s) don't you understand ?

 

How can people clarify it for you when we don't know what you're finding unclear?

 

Again, this has nothing to do with AVR or Atmel - if you have specific questions about how to use a particular Analog Devices product, and/or require clarification of Analog Devices documentation, then you really should be asking Analog Devices! 

 

The whole point of getting the manufacturer's dev kit is precisely to provide you with a known-good, working example of how to use the part - if you can't work it out from the datasheet and/or all the other documents on the AD site, you really should get the Dev Kit and look at that.

 

 

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Manish,

 

When I read this:

Can you, please give me direct link regarding ADE7753 (Convert read register's values into actual values; register's value into voltage or current or power factor) or where should i found eject post, which can help me because I fade up of searching and reading many posts.

I sounds like:

Post a direct link to the information I need because I am not going to bother to search the internet myself.

Anyone who answers is going to have to do an internet search themselves. Doing an internet search is the most basic and necessary skill that anyone in any technical field should master. That being said, if you posted something like this:

I have read the data sheet for this device (post link here) and am having trouble reading these registers. I have also looked at this page (post link here). And this is the code I have: (post code here) Can you suggest what I am doing wrong.

You will likely get a much better response.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

@bobgardner

hello.

Ya actually, I already made the function to break integer value (e.g. 1234) into 4 digit and display on 4 digit Seven segment with the help of Timer1 Interrupt of 5ms, working fine.

 

Every thing is ready to go, but now I'm little confused with ADE7753 registers, how to calibrate or get actual value (of Voltage, Current, Power Factor and so on) .

And as I told you before about my coding

 

For reading Voltage actual value, I did...

Directly, I read VRMS register (0x17) with AC supply voltage 200V and got 14083 value.

now, in program

 

while (1)
    {
        data = ade7753_read_reg(0x17, 3);  //uint32_t ade7753_read_reg(unsigned char address, unsigned char numberOfBits) 
        _delay_ms(10);

       volt = ((200 * data) / 14083);
        brk_up(volt);                                    //void brk_up(uint32_t integerValue); used for display 4 digit's integer value on 7-Segment.
        _delay_ms(100);
        
    }

 

I'm getting some value but garbage, so please let me know where I'm wrong?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

@Someguy22

Hello.

Actually, I don't need any code, I already built my code own my own. And SPI communication between AVR and ADE7753 is working fine, no issue of read/write with 24 bit registers and display part is also working well.

I'm just confused with ADE7753 registers to get actual value as I ask to bobgardner in last post and sent code for actual value of voltage.

If, is there anything to do, which I missed, so Please tell me. 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Manish Kumar wrote:
If, is there anything to do, which I missed, so Please tell me. 

As already told:

  • Look at all the Analog Devices documentation: in addition to the datasheet, there is a Reference Design and a FAQ document and the Evaluation Kit with its code & documentation.
  • Explain how, exactly, you are "confused" about the ADE7753 registers - what, exactly, do you find unclear?

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

@awneil

Hi.

 

Hardware and software parts are OK. Function for read/ write (SPI) of ade7753 with MCU also OK.

 

I don't have Evaluation Kit and its code.

 

And my problem is, after reading many posts related ADE77xx, datasheet and  app notes I got confused that how can I get actual values with the help of ADE7753 registers.

 

Like, I tried to get main Voltage's actual value and display on 4-digit 7-Segment and when I'll give the supply to my controller board through Variac (like between 100V - 240V AC) so voltage value (by MCU and ADE7753) should be display on 7-segment according to variac's voltage value.

 

So I directly read ADE7753 VRMS register (0x17) for that and at 200V AC then I read VRMS register's value, that is 14083 in decimal.

then what I did...I just keep this value, like this.

 

while (1)
    {
        data = ade7753_read_reg(0x17, 3);  //uint32_t ade7753_read_reg(unsigned char address, unsigned char numberOfBits) 
        _delay_ms(10);

       volt = ((200 * data) / 14083);
        brk_up(volt);                                    //void brk_up(uint32_t integerValue); used for display 4 digit's integer value on 7-Segment.
        _delay_ms(100);
        
    }

 

Is it wrong? because I got garbage value. Is there any step, which I skip. Like do something with MODE register before reading VRMS, kind of.

I just need to know the steps, to follow to get actual value if it is possible.

i hope, now you got my concern!

Last Edited: Sun. May 29, 2016 - 08:52 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

If the read_reg function works, then the problem must be in the brk_up_volt function. Lets see that one. How come you don't have a 'display this number on the display' function?

 

Imagecraft compiler user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

@bobgardner

Hello

 

I already read/ write ADE7753 register's bits n display register's default value on 7-segment (e.g. I read MODE (0x09) register's default hex value (0x000C) and displayed on 4-digit 7 segment like 0012 in decimal). 
 Means there is no issue with SPI communication, read/ write register's value (24 bit) and 4-digit 7 segment (no issue with brk_up() function)...all are working fine  with code.
 
As now I want to display actual value of Current, Voltage, Frequency, KWh, Wh, Power Factor.
 
So how to use ADE7753 registers to get actual value (calibrated) of Current, Voltage, Frequency, KWh, Wh, Power Factor.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Manish Kumar wrote:
I don't have Evaluation Kit 

Why not??

 

Clearly, that would be the simplest way to answer all these questions!!

 

As already noted, this is precisely what Evaluations Kits are for, and why manufacturers take the time to produce them!!

 

Quote:
and its code.

Surely, you can get the code (and other documentation) even if you don't have the actual kit hardware?

 

Like, I tried to get main Voltage's actual value and display on 4-digit 7-Segment

So what, exactly, did you try?

 

Show your working: not code - show the method of your calculation.

 

Are you sure that your 7-segment display is working correctly, and not "corrupting" the value? How have you proven that?

 

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
Last Edited: Mon. May 30, 2016 - 09:39 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

@awneil

I don't need Evaluation Kit because I already designed my hardware that's why don't have code.

 

I already read/ write ADE7753 register's bits n display register's default value on 7-segment (e.g. I read MODE (0x09) register's default hex value (0x000C) and displayed on 4-digit 7 segment like 0012 in decimal). I'm using Timer1 Interrupt of 5ms for 4-Digit Seven Segment.

Means there is no issue with SPI communication, read/ write register's value (24 bit) and 4-digit 7 segment...all are working fine with code.
 

As now I want to display actual value of Current, Voltage, Frequency, KWh, Wh, Power Factor.
So how to use ADE7753 registers to get actual value (calibrated) of Current, Voltage, Frequency, KWh, Wh, Power Factor?

 

I don't need any code. I just need steps to follow.

 

What I did, I just directly read VRMS register's value at 200V AC is 14083 and then_

 

while (1)
    {
        data = ade7753_read_reg(0x17, 3);  //uint32_t ade7753_read_reg(unsigned char address, unsigned char numberOfBits) 
        _delay_ms(10);

       volt = ((200 * data) / 14083);
        brk_up(volt);                                    //void brk_up(uint32_t integerValue); used for display 4 digit's integer value on 7-Segment.
        _delay_ms(100);
        
    }

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I asked to see the breakupvolts function. You seemed to ignore this request (msg 28). You keep saying the read regs function works. There is only one other function in the loop. Lets see it.

 

Imagecraft compiler user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Manish Kumar wrote:
I don't need Evaluation Kit because I already designed my hardware

Well, rather clearly you do need it!!

 

An Evaluation Kit is not just about hardware - it also gives you supported, known working code to demonstrate how to use the chip!!

 

That is exactly what you need!

 

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

@bobgardner

Yes break_up() function is also working. I can send and display any no. between 0000-9999 on 4 digit seven segment.

 

Like if I write-

break_up(789); or break_up(0x0315);          /*789 (decimal) = 0x0315 (hex)*/

so it will display 0789 at 4-digit seven segment (display in decimal)

 

and also if I pass any variable with some value that also display properly, like-

uint16_t data = 6549; or uint16_t data = 0x1995;      /*6549 (decimal) = 0x1995 (hex)*/

break_up(data);

so it display "6549" at 4-digit Seven Segment (display in decimal).

 

Means everything is fine, I just need steps to follow to display actual value of Voltage, Current, Power Factor and so on...with the help of ADE7753 registers.

 

So how to configure ADE7753 registers and which steps should I follow to get actual values of required parameters?

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

@awneil

So, you mean that without this kit and its code I can't do anything with my hardware and code as now I done around 60% plus work on this project.

My hardware is OK, my coding is ready to read/ write any value with ADE7753 registers and display on 4-digit seven segment.

 

I'm just confused with ADE7753 registers that how to configure them to get actual values like Voltage, Current, Power Factor and so on.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

This is nutty. Surely the value in the registers in the power chip is a 14 or 15 or 16 bit binary representation of one of the units being measured by the chip. If you can read any register correctly and display any number correctly, then the problem is converting the register units to SI units. Surely the datasheet says what units the registers contain... millivolts perhaps. Oooh! Ooooh! I know how to convert millivolts to volts! (I learned that in 3rd grade when they taught me how to move the decimal point 3 places...). Up to this point I have been resisting the obvious esp whammy being beamed at me to read the datasheet, find the answer, and type it into a forum, but that wouldnt help, because the problem is that reading whats in the datasheet hasn't been read yet.

 

 

Imagecraft compiler user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

@bobgardner

Ya, you are saying right. Actually I read datasheet but couldn't understand, as datasheet has many difficult terms and technical as well and I'm also from Electrical Field, that's why datasheet is little tough to understand me.

Now I got it, no one will help me at this stage, I think.

 

I'll try...

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Somehow, I think the dudes at Analog Devices wrote the datasheet knowing that electrical engineers would be reading it. I can assure you you are not the first ee to ever learn whats in that datasheet. Pick out one thing thats unclear, post the page number its on, I'll dl the ds tonite at home and try to help. OK, I dled the ds. Ask away. How to read volts? There is a gain register, and the result looks like 2 million something max. Its on page 25 out of 60 in the rev c ds.

.

 

Imagecraft compiler user

Last Edited: Wed. Jun 1, 2016 - 01:42 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Manish Kumar wrote:
So, you mean that without this kit and its code I can't do anything

I'm not saying that it is impossible at all - just the you - by your own admission - don't seem to be able to manage it!

 

I'm just confused with ADE7753 registers that how to configure them to get actual values like Voltage, Current, Power Factor and so on

And the Dev Kit, with its associated code, would give you a working example of how to do that!

 

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Manish Kumar wrote:
 datasheet has many difficult terms and technical 

You said you had a Bachelor's degree?

 

Anyhow, again, don't just moan about "many difficult terms" - how can we help you based on that??

 

You need to say what terms, exactly, you don't understand!

 

And have you tried googling those terms, or looking them up in a technical dictionary or textbook?

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hello

 

Sorry for late reply. 

Thankx bobgardner and awneil

I have displayed Volt and AMP at my hardware (4-digit Seven Segment). But now I got stuck in Power Factor.

Can I get Power Factor by this (read ADE7753 reg. values directly and place in this formula)-

 

PF = (LAENERGY * 0.848) / LVAENERGY;

 

Or did I miss something, like configure MODE reg. or other register, which I should have configured before applying above formula?

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Manish Kumar wrote:
PF = (LAENERGY * 0.848) / LVAENERGY;

 

Would that not always be = 0.848???

 

Edit:  Never mind, I missed the "V" in the denominator!  I need more caffeine!!!

 

Click Link: Get Free Stock: Retire early! PM for strategy

share.robinhood.com/jamesc3274
get $5 free gold/silver https://www.onegold.com/join/713...

 

 

 

 

Last Edited: Thu. Jun 16, 2016 - 01:54 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

@ki0bk

Edit:  Never mind, I missed

 

I couldn't get you, properly

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

And can I get Power Factor directly with this-

 

PF = sign(LVARENERGY) * LAENERGY/ LVAENERGY

 

???

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hello

 

I have read "CALIBRATING AN ENERGY METER BASED ON THE 
ADE7753" from page 38 to page 47

 

I have some queries regarding ADE7753 programming.

 1. Is it sufficient study to program ADE7753 with microcontroller to get the actual values V, I, Power Factor and so on?

 

2. What does it mean Accurate Source (I have two "variable transformer" to give fixed 220V and 10A to my hardware, as in example. So "variable transformer" is a mean of Accurate Source?)?

 

3. Can I use same values of V = 220V & I = 10A (as in example) to calibrate my ADE7753?

 

4.How can I reset interrupt status register (fig. 81, page 41) "RESET THE INTERRUPT STATUS READ REGISTER ADDR. 0x0C", reading 0x0C register is sufficient to reset this register

(like uint16_t variable = ade7753_read_reg(0x0C, 2)   //uint32_t ade7753_read_reg(unsigned char stradd, unsigned char no. of byte))?,

means I'm confused that how can I read this register to reset interrupt status register?

 

Anyone can help me, please.

 

Thanks

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Again, it is an Analog Devices part - not an Atmel (nor Microchip) part.

 

For specific questions about Analog Devices products & documentation, you should go to Analog Devices for help & support!

 

http://www.analog.com/en/product...

 

https://form.analog.com/form_pag...

 

https://ez.analog.com/community/...

 

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Manish Kumar

 

Have you actually gone to the Analog Devices website and created an account and logged into the community and forums and asked questions there?  It has been said several times this is not an Microchip/Atmel part.  Is this for a commercial product?  If it is then I would expect that your firm would have the proper equipment that would be needed to calibrate this meter you are making as well as the knowledge of what the terms and formulas in the datasheet mean.  For calibration an "Accurate Source" usually means a power supply that has been calibrated and certified by some sort of traceable standard.  Since you do not seem to have one of these then I can make a few suggestions on how you can per form some rudimentary setup.

 

To create a 'reasonably accurate' source:

 

Get a good multimeter....I have a Fluke 117 whose AC voltage accuracy is +/- 1% and AC current accuracy is +/- 1.5%

 

Get a high wattage power resistor that can handle at least 1500 watts,   44 ohm resistance.  This will give you a 5 amp load with a 220vac supply.

 

Step #1:  Use the multimeter(set it to volts AC) and adjust your transformer to give you 220vac

Step #2: Use the multimeter(set it to amps) and connect the load resistor to the transformer through the multimeter and measure the current through the resistor - If the resistor is exactly 44 ohms, then you should read 5amps on the meter.

Since most resistors are not going to read EXACTLY just take the meter reading and write it down somewhere.

 

By doing this you now have a basic reference to calibrate your circuit to for both voltage and current.

 

Now go through the datasheet and use the formulas to determine what values from the device you should see for 220vac and for whatever current you measures in step #2 above. 

 

Since there is no schematic of your circuit connecting up your invention is anyone's guess.

 

Quite honestly this thread has dragged on longer than it should have.  You have not shown that you have made any effort to contact Analog Devices to get them to work with you on their part, and you yourself admit you 'fade out' searching for answers that are right there.  That is called Research and is the first half of R & D.

 

Jim

I would rather attempt something great and fail, than attempt nothing and succeed - Fortune Cookie

 

"The critical shortage here is not stuff, but time." - Johan Ekdahl

 

"Step N is required before you can do step N+1!" - ka7ehk

 

"If you want a career with a known path - become an undertaker. Dead people don't sue!" - Kartman

"Why is there a "Highway to Hell" and only a "Stairway to Heaven"? A prediction of the expected traffic load?"  - Lee "theusch"

 

Speak sweetly. It makes your words easier to digest when at a later date you have to eat them ;-)  - Source Unknown

Please Read: Code-of-Conduct

Atmel Studio6.2/AS7, DipTrace, Quartus, MPLAB, RSLogix user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The above steps assume a perfect transformer with perfect load regulation. But if the OP does not recognise that fact, he is unlikely to be able to identify any other issues either.

Ross McKenzie ValuSoft Melbourne Australia

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

jgmdesign

 

thanks for reply. 

 

And yes, I already created account on ez.analog.com and asked  question regarding this, I just got mainly reply form one of them that study this->  "CALIBRATING AN ENERGY METER BASED ON THE ADE7753" section, I studied this then I asked my doubt here.

And I know ADE7753 is not an atmel part. Actually I'm using ADE7753 with MCU ATmega8.

 

And I build my Accurate Source but rest of questions are same out of 4 including this, Is there any need except "CALIBRATING AN ENERGY METER BASED ON THE ADE7753" section, like ON-OFF Integrator, LPF, HPF during configuring and calibrating ADE7753 for getting actual values of V, I, Power Factor and so on.

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Manish Kumar wrote:
 I studied this then I asked my doubt here.

So why did you ask it here??

 

Why did you not ask it there??!

 

It's their product and their documentation - not Atmel's - so you need to ask them - not Atmel!!

 

Actually I'm using ADE7753 with MCU ATmega8.

But none of your questions have anything to do with the ATmega - they are specific to the ADE7753 and entirely unrelated to the microcontroller.

 

 

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

jgmdesign wrote:
 Is this for a commercial product? 

 

That is a very good question - it deserves an answer!

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I am moving this to the General Electronics forum as it has nothing to do with the Mega8.  If it changes I can move it again.  Maybe someone else might be able to move this albatross along.

 

I am also putting a limit on this nonsense as well.  51 posts not counting this one and all that is happening is the OP is begging for help on a part that is not an Atmel part, and the OP does not want to read/search through the 100 or so threads Lee pointed out, and the OP also admits that he/she does not understand the nomenclature in the datasheet, or the alleged answers they received in the Analog Devices forums.

 

And all the rest of us have basically doing is continually repeat to go ask Analog Devices.

 

And the fact that this 'invention' might be connected to a mains feed from a utility company to ones home scares the buhjeeberz out of me as well.

 

Enough is enough.

 

If Manish_K cannot start showing what he/she has done on paper, or PC regarding this device then there is no reason to keep going.  And for the rest of you if you cannot answer a question - If there really is ONE, then stop posting to go somewhere else.  Point made.

 

Jim

I would rather attempt something great and fail, than attempt nothing and succeed - Fortune Cookie

 

"The critical shortage here is not stuff, but time." - Johan Ekdahl

 

"Step N is required before you can do step N+1!" - ka7ehk

 

"If you want a career with a known path - become an undertaker. Dead people don't sue!" - Kartman

"Why is there a "Highway to Hell" and only a "Stairway to Heaven"? A prediction of the expected traffic load?"  - Lee "theusch"

 

Speak sweetly. It makes your words easier to digest when at a later date you have to eat them ;-)  - Source Unknown

Please Read: Code-of-Conduct

Atmel Studio6.2/AS7, DipTrace, Quartus, MPLAB, RSLogix user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

awneil

I appreciate  your replies and links.

 

But I don't understand, sometime why the people say, what you said in your last reply, please don't mind.

If they don't want to Answer, so I think they should not waste their time to reply me, simple. 

 

As you know, I think many time in this forum already discussed about ADE7753 / 58 (you can check), and I got this forum after googling, regarding ADE7753 that's why, I asked my doubt here.

And I already asked more than 3 time to Analog Inc, but due to no reply or late reply I also asked my doubt here.

 

And It's not any commercial product for me, It's challenge for me and working on this independently, so.

 

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

jgmdesign

 

Thanks for your patience.

And now I don't need any help here.

 

I 'll surely do it on my own.

Last Edited: Tue. Jul 26, 2016 - 06:25 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Manish Kumar wrote:

And now I don't need any help here.

 

I 'll surely do it on my own.

 

Excellent. Time to lock this thread.

 

Ross McKenzie ValuSoft Melbourne Australia

Topic locked