Example 08 zero calibration does not affect displayed Amps value
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 78/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- arduino, cpp
- Área
- embedded-iot
Línea de trabajo
Comienza en Example08_DiagnosticTool, en doZeroCalibration y los manejadores de comandos z/r; compara la ruta local de zeroOffset con mySensor.getCurrentA(amps). Verifica que las APIs de calibración de la biblioteca se utilicen de forma coherente y que, después de poner a cero o restablecer, los Amps mostrados y los campos sin procesar reflejen la calibración.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- C++
- Estrellas
- 1
- Forks
- 0
- Merge medio
- 1 min
- PR fusionados (30 d)
- 1
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de sparkfun/SparkFun_ADE7953_Arduino_Library
-
sparkfun/SparkFun_ADE7953_Arduino_Library#2 · 1 asignado ·
Todos los issues de sparkfun/SparkFun_ADE7953_Arduino_Library
Issues similares
-
Website Doc Typo Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 92/100
-
Dificultad 1/5 1-3 horas Aptitud para principiantes 92/100
autowarefoundation/autoware_universe#13413 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
-
automated-analysis bug memory-safety
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100