Open raineth opened 2 years ago
Thanks for bringing this up. You're absolutely correct. The documentation & code comments needs to be updated/corrected. I'm sorry that it tripped you up initially!
I believe I'm going to end up running into this exact issue with my own SCT-024 200A clamps and the recommended 4x gain as per comments in https://github.com/CircuitSetup/Split-Single-Phase-Energy-Meter/blob/master/Software/examples/Home_Assistant_MQTT/Home_Assistant_MQTT/Home_Assistant_MQTT.ino
I think I understand the software fix:
In theory, should I be able to multiply my current constants by 4 (to factor out the 4x gain) and then divide by 3 (to scale to the correct value for the post-read multiplication)? I very much do not want to pull the CT clamps back off the feeders, but pulling the ESP32 out and making those adjustments would be trivial. Have I understood this correctly and completely?
Howdy,
I recently picked up some of the SCT-024 200A CTs from your shop. I spent this evening debugging some weird measurement behavior where low currents (below 20-30A) were accurate, but higher currents started to look distorted and the readings would top out around 40-45A despite measuring 65A+ with a separate clamp meter. After some research and testing, I think I've root-caused the problem to a mis-read of the datasheet which has implications for both the single-phase and 6ch meters.
In the documentation and store pages for the 2ch, 6ch, and 6ch expansion boards, a maximum CT output of 720mA is specified (the docs for the 6ch board also mention a 1V maximum). The M90E32AS datasheet (sec 6.1) specifies a maximum ADC differential input of 720mV RMS, which means the maximum CT output (with the stock burden resistor) is only 720mV / 12Ω = 60mA RMS (or, tautologically, 0.72V RMS). The current revision of the boards will reach that at around 120A using the 200A CTs you currently sell and the lowest PGA gain of 1X.
Speaking of the PGA gain, that was the other half of my problem: the 2ch version of EmonESP has poor guidance in energy_meter.h, which led me to start out with a 4X PGA gain. Since the PGA sits before the ADC, the voltage after the PGA scaling must be ≤720mV RMS (reiterated in the M90E32AS application note, 4.2.4), so the 4X gain was effectively limiting me to 15mA of range. That would have hypothetically limited me to 30A, so I guess the IC can still make some sense of those out-of-spec voltages on the current-sensing inputs, but the response outside of the spec looks pretty non-linear to me.
Finally, after correcting my PGA gain to 1X, I discovered that the M90E32AS reports all currents as a 16-bit number of mA and therefore tops out at 65.535 amps. If higher range is needed, the measurement accuracy section (6.2.2) of the datasheet recommends e.g. halving the calibration value and doubling the current/energy register values. I am currently using esphome, so this was easy enough to implement with filters; however, afaict the EmonESP software does not support setting a multiplier to apply to the current/energy values for users needing >65.5A on a single channel.
So, here's what I'm proposing:
What do you think? Am I way off base here?