Nol.A SDK Library 26.11.2
For IoT System Software Development
Loading...
Searching...
No Matches
AcCurrentSensor Class Reference

Peak-sampling AC current estimator. Call Sense() to update the public readings. More...

#include <AcCurrentSensor.hpp>

Public Member Functions

 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.

Public Attributes

float voltageRMS = 0.0
 Last estimated RMS voltage in volts; initially zero.
float Current = 0
 Last estimated RMS current in amperes; initially zero.

Detailed Description

Peak-sampling AC current estimator. Call Sense() to update the public readings.


The documentation for this class was generated from the following file: