Example 08 zero calibration does not affect displayed Amps value
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 2/5
- Tempo estimado
- 1-3 horas
- Facilidade para iniciantes
- 78/100
- Tipo de issue
- Bug
- Clareza
- Claramente especificada
- Status de atividade
- Ativa
- Stack de tecnologia
- arduino, cpp
- Domínio
- embedded-iot
Direção de pesquisa
Comece em Example08_DiagnosticTool, em doZeroCalibration e nos manipuladores dos comandos z/r; compare o caminho local de zeroOffset com mySensor.getCurrentA(amps). Verifique se as APIs de calibração da biblioteca são usadas de forma consistente e se, após zerar ou redefinir, os Amps exibidos e os campos brutos refletem a calibração.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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.
- Linguagem predominante
- C++
- Estrelas
- 1
- Forks
- 0
- Merge médio
- 1min
- PRs com merge (30d)
- 1
Guia de contribuição
Nenhum guia de contribuição indexado para este repositório
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de sparkfun/SparkFun_ADE7953_Arduino_Library
-
sparkfun/SparkFun_ADE7953_Arduino_Library#2 · 1 responsável ·
Todas as issues de sparkfun/SparkFun_ADE7953_Arduino_Library
Issues semelhantes
-
Website Doc Typo Aberta
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 92/100
-
Dificuldade 1/5 1-3 horas Facilidade para iniciantes 92/100
autowarefoundation/autoware_universe#13413 ·
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 88/100
-
automated-analysis bug memory-safety
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 88/100