ADE7763 Part-6 (first system test)

Just started the first system testing of the ADE7763. What I mean is rather than just working on the SPI or other subsystems, I am using the chip as it would be in real life. I have the voltage and current channels of the ADE7763 connected to real sensors.In the case of voltage, it is a simple voltage divider from the 12 volt end of a transformer. This gives me a +- 0.250 VAC signal to the ADE. For the current, I am using a 30 Amps CT I purchased from Sparkfun some time ago. On a scope, the voltage and current inputs look very nice. There is some high frequency noise, and as per the datasheet I will be adding a low pass filter to remove this fuzz.

So the first tests were very positive. The Vrms register stays fairly constant over time. There is some ripple but I think that is because I have yet to implement measurements at the zero crossing points. The Irms register also has some ripple, but tracks very closely to the load I put on the CT. I have a 200 and a 150 watt light bulbs I can switch in and out. Even at 350 watts the current is only about 3 amps or only 10% of the CT’s range. Yet, the linearity of the watts to register value are very nice.

Testing started to go down hill went I went to read the power (watts) register and discovered that there was none. To read the watts, you need to select that point in the processing chain for Sample Mode. I set the bits for that location and read the Sample register and … nothing. Re-read the datasheet and found that you need to set a bit in the Interrupt Enable Register to enable sampling. But when you do that you start to get hammered by a steady 3.5K interrupts per second at the lowest sample rate you can select. That rate is well beyond what my little Arduino can deal with.

So I disabled interrupts and simply read the waveform register to get the watts value. I think I can have interrupts enabled for other things and simply enable the sample mode from the main loop and than inside the ISR turn it off again. That way I can avoid the firestorm of interrupts.

The watts value also looked good with the 0, 150, 200, and 350 watt test values. And then I went to look at the energy register. This is the time integration of watts to give you your kilowatt-hour value that is used as a measure for paying your electric bill. What I found was a negative value!

Not sure how the ADE can determine what is positive (outlet feeding the bulbs) or negative (bulbs sending power to the utility). Since the voltage and current are in phase, the product of V and I will be positive. Integrating a positive number should result in a positive number, but in my case it does not.

Some magic is going on here as the datasheet clearly indicates that you can get a negative energy. I have sent a query of to Analog devices to get some input from them.

Of course this is not the end of the world. I could simply multiply by negative one and the problem would be solved, but mysteries like this drive me nuts.

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

7 Responses to ADE7763 Part-6 (first system test)

  1. Felix Rusu says:

    Sounds like your current/voltage signals are in phase (did you check on scope?) and Irms/Vrms readings from the ADE are what you expect (both positive?), but anyway here’s a random thought – did you check if the current coil sensors are the “right way” around your mains? I know some or maybe all current sensors have to be placed in a certain way (some have arrows to indicate which side towards load) to give you the expected reading.

    • Skye Sweeney says:

      Although I never did mention this in the blog, I did find that some of the time my energy would be positive and other times it would be negative. In those cases, it was indeed because I had the current probe on backwards.

      But at other times, the apparent and active energy were of different signs. This is still puzzling, but has dropped of my radar. With the current system design, I am more interested in Prms rather than the integral (energy).

  2. usman says:

    pls i need urgent happy.i have been able to communicate with my ade7763 by reading some registers and temperature but have not been able to read energy or power,the code am using is not working.pls help.am too submit this project next tommoro

    • Skye Sweeney says:

      I am sorry that you are unable to read your ADE7763. By the time I read your post, It was already past “tomorrow”. If you still want to get your system working, then please post back and I can see what i can do to help you.

  3. usman says:

    pls help me with the rite code to read energy on my ade7763

  4. Bhaskar says:

    Hey, Sweeney! Great blog I must say.

    I am working on an energy-metering project myself. I have order ADE7763 and should arrive in a couple of days. I plan to use ACS712 to sense the load current.
    My question is will ACS712 be compatible with the ADE? And how to make it compatible?

    • Skye Sweeney says:

      The ADE is designed to accept any small voltage signal that is proportional to the current flow. A quick look at the ACS712 would seem to match that capability.

      A Hall effect sensor like the ACS was one option I was looking at early on. But my town electrical inspector would not allow such a device inside my circuit panel box. He would allow current transformers and that is the way I went. I found some very small cheap(ish) devices that were UL/CE certified and were approved for this type of use.

      Good luck on your project.

Leave a Reply

Your email address will not be published. Required fields are marked *

Blue Captcha Image
Refresh

*