ADE7763 Part-3

Managed to get some time to play with the ADE7763 over the weekend. During testing of the SPI interface I found numerous problems with timing that I corrected. I am now fairly confident that the underlying digital interface to the chip is correct.

My next activity was to provide a zero volt signal to the V and I channels and insure that the IRMS and VRMS registers would read close to zero. They did not. I even enabled the DISCH1 and DISCH2 bits in the mode register to internally short the ADC inputs. But I still found that the values were not close to zero. I then noticed that If rather than shorting the inputs to ground if I connected them to a wiper on a 100K pot across Vcc that the IRMS and VRMS values would change. This counters my concept of a differential amplifier/DAC input. I sent in a request to Analog and hope to hear back soon.

This entry was posted in Home Energy Monitor, Projects. Bookmark the permalink.

4 Responses to ADE7763 Part-3

  1. ril3y says:

    Looking forward to hearing what happens. Just a thought but what if you tossed a resistor between GND and then take the readings? BTW, I am not sure I am following your problem exactly. So if that comment makes not sense you will know why. I am interested however in the ability to read mains voltages and output readings to a uC. That is just awesome.

    I was looking at writing a custom MSP/ARM/AVR firmware that would take all of these samples and be able to avg them on the fly to do calculate outputs. I too read that you were looking at doing that too. Do you have your algorithms you used for the AVR work you posted about? I would like to take a look at the code.


    • Skye Sweeney says:

      I just reread this comment and realized you asked about the “AVR work you posted about”. I would assume you are thinking about the work I did to computer RMS voltage and current using an Arduino. I may have that code still, but it is very simple. In a tight loop or several hundred samples, I would read the two ADC channels (V and I) and multiply them together to get power. I would then square power, and add it to an accumulator. After the loop, I would divide by the loop counter and then take the square root to get RMS power.

      I had also put a pulse of a digital IO pin so that I could see how many samples a second I was processing. As I mentioned in my other post it was barely above Nyquist and the samples were not taken at the same time. Chips like the ADE7763 solve these problems by sampling at a much higher rate and both channels at the same time.

  2. Skye Sweeney says:

    I got an email back from Analog indicating that what I am seeing may not be a problem at all. That given a zero volt differential input to the ADC you may not get a zero ADC value out. The fact that the two channels had greatly different values can be explained by the fact that the two computation chains are different. One uses a 24 bit value the other just 16.

    When I started this project I considered just sampling the voltage (via a voltage divider) and current (via a current transformer) using the ADCs on an Arduino. My initial testing indicated that the conversion rate was only just marginal for this application (barely twice the 60 Hz line frequency). That is why I am looking at various chips to do the RMS calculations for me. I can then sample from the Arduino at a much lower rate.

    You should look at the MSP430 micros as they have one that does power/energy computations. I did not go that way for several reasons that I can’t seem to remember. But the ADE7763 looks like it will be almost perfect for what I want.

    Tonight I will not likely get time to work on this, but soon I hope to prove what Analog said in the email. Rather than a ground, I should be able to apply a calibrated voltage reference and see the ADC count values increase the appropriate amount. Keep reading for more updates!

    I would be happy to share code with you, but at the moment, the code I have is to talk to the debug the ADE7763 interface. Unless you are going that direction, the code would be useless.

    • Iago says:

      SkyeI have no idea about the details of your precjot so my idea may be crap. Perhaps some type of watchdog timer circuit would be an alternate solution. You could set up your watch dog timer circuit to trigger after bootup time plus 30 seconds. Then if the application gets stuck on the splash screen your watch dog timer circuit can kick in and reboot your application.Russ

Comments are closed.