Example 08 zero calibration does not affect displayed Amps value
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 78/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- arduino, cpp
- Lĩnh vực
- embedded-iot
Hướng nghiên cứu
Bắt đầu trong Example08_DiagnosticTool tại doZeroCalibration và các trình xử lý lệnh z/r; so sánh đường dẫn zeroOffset cục bộ với mySensor.getCurrentA(amps). Xác minh rằng các API hiệu chuẩn của thư viện được sử dụng nhất quán và rằng sau khi đưa về zero hoặc đặt lại, Amps được hiển thị và các trường raw phản ánh hiệu chuẩn.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- C++
- Star
- 1
- Fork
- 0
- Merge trung bình
- 1 phút
- Pull request đã merge (30 ngày)
- 1
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của sparkfun/SparkFun_ADE7953_Arduino_Library
-
sparkfun/SparkFun_ADE7953_Arduino_Library#2 · 1 người được giao ·
Tất cả issue của sparkfun/SparkFun_ADE7953_Arduino_Library
Issue tương tự
-
Website Doc Typo Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 92/100
-
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 92/100
autowarefoundation/autoware_universe#13413 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
-
automated-analysis bug memory-safety
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100