Peak-sampling AC current estimator. Call Sense() to update the public readings.
More...
#include <AcCurrentSensor.hpp>
|
|
| AcCurrentSensor (int, float, float, int, int) |
| | Bind an analog input and its conversion factors. The arguments are the analog pin, ADC full-scale voltage in volts, ADC full-scale count, burden resistance in ohms, and transformer turns ratio, respectively. The count and resistance must be nonzero; no pin configuration is performed.
|
|
void | Sense () |
| | Sample dataNum readings synchronously and estimate RMS from the peak. Updates voltageRMS and Current using a sinusoidal peak-to-RMS factor of 1.414.
|
|
|
float | voltageRMS = 0.0 |
| | Last estimated RMS voltage in volts; initially zero.
|
|
float | Current = 0 |
| | Last estimated RMS current in amperes; initially zero.
|
Peak-sampling AC current estimator. Call Sense() to update the public readings.
The documentation for this class was generated from the following file: