Post Go back to editing

ADE7933/ADE7978 Current Readings inconsistent between power cycles

Category: Hardware
Product Number: ADE7933 and ADE7978ACPZ
Software Version: N/A

Hardware description:

Our hardware design utilizes a 0.5mili ohm surface mount sense resistor on a heavy (a total of 6 x 2oz) multi-layer copper PCB laminate for managing peak currents up to 150A inrush for a single-phase device. The kelvin nodes for sensing the voltage drop across this initial device are not ideal, which resulted in some unit-to-unit variance when solder quantity was not sufficient. Soldering corrections were specified to be convex with silver solder to reduce the error introduced by standard paste low solder quantities. This assembly change mitigated some variance across board assemblies and has tested well, but this has been difficult to quantify for this different issue.

 

The process that exposes this issue:

  1. Unit is tested fully for performance. Once completed, it will be sent on to calibration:
  2. Initial calibration consists of running a 10A calibrated constant-current load through the unit, reading the RAW Current RMS value from the chipset as “#.#####”.
  3. Calculate and apply the calibration value multiplier found during this process to the raw value to produce the final value of “10.0A” We save that value in EEPROM. (Calculated by comparing the RAW reading to the expected reading for a 10A load)
  4. If the power is not cycled on the unit, a variety of different current loads all provide accurate results over the normal operating current range. The readings behave normally and as expected for long periods of time under a variety of use cases and thermal conditions.
  5. Power-cycling the unit (and thus resetting the chipset) will sometimes result in a different RMS Current RAW value. The same calibration value we entered previously is used, resulting in significant error. Sometimes as much as 20%. This then stays consistent as long as the power is not cycled.
  6. Power-cycling the unit a few more times can result in returning to the state of the initial calibration, and the value is correct again. This suggests the problem is not in the hardware.
  7. Power-cycling some of the units more results in the error manifesting in 3 different states. Error above, on calibration, and error below the initial calibration. The RAW rms value varying by the same degree before calibration values are applied.
  8. Few units do not exhibit this issue at all across power cycles.

 It is difficult to blame the hardware design when the readings remain consistent as long as the power does. Also, if the power is cycled enough times, it can return to the calibrated state. What we don’t know is which states could be the “error” states, so we could be performing the initial calibration on some units in the “error” state, and others in the “normal” state and wind up with a variety of outcomes.

During initial bring-up we did experience some odd behavior with the isolated AD converters when we were attempting to mitigate EMI by inserting ferrite beads into the input and output power paths to control noise. We found that was a Bad Idea for performance as readings would become inconsistent (large errors). The attached circuit is what we have in-place now, no ferrite beads. We do wonder if that could be related to something in the isolated power path we do not know to look for.

 We have seen a similar thread on Engineering Zone:

ADE7933/ADE7932 input circuit - Q&A - Energy Monitoring and Metering - EngineerZone (analog.com)

 We would appreciate any insight into what may be causing this, where and how to look for the root cause of the issue. Is the problem in initialization of the device, a sequence of events that may be triggering a bad setup of the device? Right now, we are open to any ideas how to track this down and resolve it.

Thank you.

  • Are you waiting for reset done before writing the registers? 

    You are calculating IGAIN VGAIN for each channel. When thing are wrong is IGAIN and VGAIN correct? try reading back registers after writing do they match ? 

    You may be writing to early or depending on where you store your data you may be reading back incorrectly. 

    This could be hardware but I think software timing is most likely. 

    Dave

  • Thank you for your reply.

    Yes, our software follows all 6 steps of "POWER UP PROCEDURE" and all 12 steps of "INITIALIZING THE CHIPSET" on page 84 of the datasheet.  We wait first for IRQ1 to go low, then we wait for the RSTDONE bit to be set before we initialize the SPI interface.  Only after all this do we write to any gain registers.

    We do not calculate IGAIN or VGAIN for any channels.  We do not use these registers at all.  During chipset initialization a value of zero is written to all of them.  When we read the gain registers back, we always read zero as expected.  All values written to all registers during initialization are static and do not change between restarts of the system.  We were careful to write the final register three times to push it through the two-stage pipeline.

    The calculation which converts the value read from the AIRMS register into a number in RMS amperes and apply our calibration factor is performed entirely in our CPU, outside of the ADE7978.  This is why all of the gain registers, including AIGAIN, are initialized to zero.

    Our measurement of RMS amperes is only correct when the value reported by the AIRMS register is correct.  When the RMS measurement is wrong, the value in AIRMS is wrong by the same percentage.  In other words, for a given current, sometimes the ADE7978 reports one value in AIRMS, and other times, it reports another totally different value.

    Here is some example data from a test conducted in the lab:

    Measurement During Correct Behavior During Incorrect Behavior
    Current (RMS amperes) 16.70 16.70
    Voltage (RMS volts) 104.3 104.3
    AIRMS Register 762077 1186560
    AVRMS Register 863832 864725
    AIGAIN Register

    0

    0
    AVGAIN Register 0 0

    Please notice that while AIRMS has increased by 56%, AVRMS has remained reasonably constant.

  • Some more points of reference to help track this issue down...

    We instrumented the isolated line-side of the ADE7933ARIZ to look at VDDISO and REF in respect to GNDISO to see if there is any correlation between the "error state" and the "working state". We were not able to make any correlation. The startup and power waveforms are identical between the two states.

    However, the startup waveform on VDDISO does have a significant sag during power-up the data sheet does not indicate on Figure 107. This is despite a stiff 3.3V power source for the device and plenty of vitamin C (over 3300uF) on VDD. The variance from the reference design is LDO and REF has 10uF and 0.1uF per pin vs. the datasheet 4.7uF and 0.1uF per pin.

    Is this typical behavior? This is a 1-second startup window. Yellow trace is VDDISO, and the cyan trace is REF. The 60Hz ripple is an artifact of our test setup.
    Of note, VDDISO mostly idles at 3V vs 2.8V.

    There is a possibility the bypass on the REF and LDO supplies is too great. I'm not certain why we went this path with larger caps apart from this was designed during part shortages.

  • I have not seen this before you are the first. 

    It is possible the cap size could be an issue but we are not sure it is the ADC or the ADE7978 that is the problem. 

    On startup the vdd iso will climb to about 2.8V then I think the ldo and ref turn on. If the 10uf caps are empty they will draw a lot off current and cause the dip you are seeing . The datasheet spec 4.7uf for both ldos and ref. Try changing the caps to 4.7uf and see if it helps. If you don't have 4.7uf try putting 2 10uf in series.

    Leave the 10uf on vddiso

    Is it possible the high pass filter is getting shut off in the config register? 

    There is also a swap bit in the config register. 

    setup meter test meter swap bit test meter. 

    try to get data for good and bad using swap. 

    Does swap cause the problem to move from current to voltage ? Do you now have 2x voltage on one channel? 

    Dave

  • We did manage to solve the problem, and it was an interesting one:

    1. We were originally going to use the V2P input to validate the quality of Earth ground on a system under load, so we initially set up the isolated A2D converter to look at voltage not temperature on this channel. We wound up not using this, but the code never reverted back to temperature.

    2. We didn't think we would need the temperature compensation of the shunt on this channel, so we left it at defaults. We don't need the high accuracy.

    3. We discovered that the temperature register result value used in the shunt compensation equation is not initialized with a default value on power-up. It instead is a "random" value. It does not get initialized if the A2D converter is repurposed to the V2P input before a temperature reading is complete. Interestingly, depending on the unit, the value will toggle between 1 - 4 distinct random values between 0 and 2^24 per power cycle leading to confusion.

    4. When the temperature coefficient of 50ppm is initialized in the shunt compensation formula, 0 degrees C is used for the calibrated value, and the current temperature is some random value between 0x00000 -> 0x1FFFFFF, the error gets rather large.

    The fix was to implement temperature in the compensation formula. We could have set the temperature coefficient of the resistor to 0ppm to disable compensation, but may as well use the feature while we were there.

    That is why error only existed on the current channel.