Example 08 zero calibration does not affect displayed Amps value
未關閉
適合新手
還沒有人認領這個 Issue。
評估
- 難度
- 2/5
- 預估耗時
- 1-3 小時
- 新手友好度
- 78/100
- Issue 類型
- 缺陷
- 描述清晰度
- 描述清楚
- 活躍度
- 活躍
- 技術堆疊
- arduino, cpp
- 領域
- embedded-iot
研究方向
從 Example08_DiagnosticTool 中的 doZeroCalibration 和 z/r 命令處理常式開始;比較本機的 zeroOffset 路徑與 mySensor.getCurrentA(amps)。確認函式庫的校正 API 使用一致,並確認歸零或重設後,顯示的 Amps 和 raw 欄位反映校正結果。
由索引模型根據 Issue 內容生成。
描述
uint32_t corrected =
(rawIrms > zeroOffset) ? (rawIrms - zeroOffset) : 0;
In Example 08 (`Example08_DiagnosticTool`), the `z` command calculates a local
`zeroOffset` from raw IRMS readings. That offset is applied to the displayed
`Corrected` and `Averaged` raw values as above.
However, the displayed current in amps is obtained independently using:
mySensor.getCurrentA(amps);
Consequently, zero calibration does not affect the Amps field. For example,
after zeroing, Corrected may be near zero while Amps continues to show the
original no-load value.
Also, linear subtraction of two RMS magnitudes is not generally the correct
noise-floor correction. The library already provides autoCalibrateA(), which
performs the correction in the squared/RMS domain.
Would you consider changing the z command to use the library calibration?
For example:
void doZeroCalibration()
{
const uint16_t NUM_SAMPLES = 50;
Serial.println(
F("\nZero calibration - keep the CT connected with no current flowing."));
if (mySensor.autoCalibrateA(NUM_SAMPLES) != ksfTkErrOk)
{
Serial.println(F("Zero calibration failed!"));
return;
}
resetBuffer();
Serial.println(F("Channel A zero calibration complete.\n"));
}
The r command could correspondingly call:
mySensor.clearCalibration();
This would make the zero operation affect getCurrentA(amps) directly and
would avoid having two independent calibration paths in the example.
- 主要語言
- C++
- 星號
- 1
- 分支
- 0
- 平均合併
- 1 分鐘
- 30 天內合併 PR
- 1
貢獻指南
這個儲存庫沒有索引到貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
sparkfun/SparkFun_ADE7953_Arduino_Library 的其他 Issue
-
sparkfun/SparkFun_ADE7953_Arduino_Library#2 · 已指派 1 人 ·
查看 sparkfun/SparkFun_ADE7953_Arduino_Library 的全部 Issue
相似的 Issue
-
Website Doc Typo 未關閉
難度 1/5 1 小時以內 新手友好度 92/100
-
難度 1/5 1-3 小時 新手友好度 92/100
autowarefoundation/autoware_universe#13413 ·
-
難度 2/5 1-3 小時 新手友好度 88/100
-
automated-analysis bug memory-safety
難度 2/5 1-3 小時 新手友好度 68/100
-
難度 2/5 1-3 小時 新手友好度 88/100