MycilaJSY 13.0.0
Arduino / ESP32 library for the JSY1031, JSY-MK-163, JSY-MK-193, JSY-MK-194, JSY-MK-227, JSY-MK-229, JSY-MK-333 families single-phase and three-phase AC bidirectional meters from Shenzhen Jiansiyan Technologies Co, Ltd.
|
Public Member Functions | |
float | thdi (float phi=0) const |
Compute the total harmonic distortion percentage of current (THDi). This assumes THDu = 0 (perfect voltage sin wave). See: https://fr.electrical-installation.org/frwiki/Indicateur_de_distorsion_harmonique_:_facteur_de_puissance. | |
float | resistance () const |
Compute the resistance of the load in ohms (R = P / I^2). | |
float | dimmedVoltage () const |
Compute the dimmed voltage (V = P / I). | |
float | nominalPower () const |
Compute the nominal power of the load in watts (P = V^2 / R). | |
void | clear () |
bool | operator== (const Metrics &other) const |
bool | operator!= (const Metrics &other) const |
Metrics & | operator+= (const Metrics &other) |
void | operator= (const Metrics &other) |
Data Fields | |
float | frequency = NAN |
Frequency in hertz (Hz). | |
float | voltage = NAN |
Voltage in volts (V). | |
float | current = NAN |
Current in amperes (A). | |
float | activePower = NAN |
Active power in watts (W). Can be positive or negative. | |
float | powerFactor = NAN |
Power factor. Positive value between 0 and 1. | |
float | apparentPower = NAN |
Apparent power in volt-amperes (VA). Always positive. | |
float | reactivePower = NAN |
Reactive power in volt-amperes reactive (VAr). Can be positive or negative. | |
uint32_t | activeEnergy = 0 |
Active energy in watt-hours (Wh). | |
uint32_t | activeEnergyImported = 0 |
Active energy imported in watt-hours (Wh), going to the load, when activePower > 0. | |
uint32_t | activeEnergyReturned = 0 |
Active energy returned in watt-hours (Wh), coming from the load, when activePower < 0. | |
uint32_t | reactiveEnergy = 0 |
Reactive energy in volt-amperes reactive-hours (VArh). | |
uint32_t | reactiveEnergyImported = 0 |
Reactive energy imported in volt-amperes reactive-hours (VArh), going to the load, when reactivePower > 0. | |
uint32_t | reactiveEnergyReturned = 0 |
Reactive energy returned in volt-amperes reactive-hours (VArh), coming from the load, when reactivePower < 0. | |
uint32_t | apparentEnergy = 0 |
Apparent energy in volt-amperes-hours (VAh). | |
float | phaseAngleU = NAN |
voltage phase angle in degrees (°). | |
float | phaseAngleI = NAN |
current phase angle in degrees (°). | |
float | phaseAngleUI = NAN |
voltage - current phase angle displacement in degrees (°). | |
float | thdU = NAN |
total harmonic distortion of voltage (THDu), as a percentage (%). | |
float | thdI = NAN |
total harmonic distortion of current (THDi) as a percentage (%). | |
Definition at line 125 of file MycilaJSY.h.
void Mycila::JSY::Metrics::clear | ( | ) |
Definition at line 22 of file MycilaJSYMetrics.cpp.
float Mycila::JSY::Metrics::dimmedVoltage | ( | ) | const |
Compute the dimmed voltage (V = P / I).
Definition at line 18 of file MycilaJSYMetrics.cpp.
float Mycila::JSY::Metrics::nominalPower | ( | ) | const |
Compute the nominal power of the load in watts (P = V^2 / R).
Definition at line 20 of file MycilaJSYMetrics.cpp.
|
inline |
Definition at line 280 of file MycilaJSY.h.
Mycila::JSY::Metrics & Mycila::JSY::Metrics::operator+= | ( | const Metrics & | other | ) |
Definition at line 66 of file MycilaJSYMetrics.cpp.
void Mycila::JSY::Metrics::operator= | ( | const Metrics & | other | ) |
Definition at line 83 of file MycilaJSYMetrics.cpp.
bool Mycila::JSY::Metrics::operator== | ( | const Metrics & | other | ) | const |
Definition at line 44 of file MycilaJSYMetrics.cpp.
float Mycila::JSY::Metrics::resistance | ( | ) | const |
Compute the resistance of the load in ohms (R = P / I^2).
Definition at line 16 of file MycilaJSYMetrics.cpp.
float Mycila::JSY::Metrics::thdi | ( | float | phi = 0 | ) | const |
Compute the total harmonic distortion percentage of current (THDi). This assumes THDu = 0 (perfect voltage sin wave). See: https://fr.electrical-installation.org/frwiki/Indicateur_de_distorsion_harmonique_:_facteur_de_puissance.
phi | The phase shift angle in degrees (°) (0 for resistive load) |
Definition at line 9 of file MycilaJSYMetrics.cpp.
uint32_t Mycila::JSY::Metrics::activeEnergy = 0 |
Active energy in watt-hours (Wh).
Definition at line 176 of file MycilaJSY.h.
uint32_t Mycila::JSY::Metrics::activeEnergyImported = 0 |
Active energy imported in watt-hours (Wh), going to the load, when activePower > 0.
Definition at line 183 of file MycilaJSY.h.
uint32_t Mycila::JSY::Metrics::activeEnergyReturned = 0 |
Active energy returned in watt-hours (Wh), coming from the load, when activePower < 0.
Definition at line 190 of file MycilaJSY.h.
float Mycila::JSY::Metrics::activePower = NAN |
Active power in watts (W). Can be positive or negative.
Definition at line 149 of file MycilaJSY.h.
uint32_t Mycila::JSY::Metrics::apparentEnergy = 0 |
Apparent energy in volt-amperes-hours (VAh).
Definition at line 216 of file MycilaJSY.h.
float Mycila::JSY::Metrics::apparentPower = NAN |
Apparent power in volt-amperes (VA). Always positive.
Definition at line 162 of file MycilaJSY.h.
float Mycila::JSY::Metrics::current = NAN |
Current in amperes (A).
Definition at line 143 of file MycilaJSY.h.
float Mycila::JSY::Metrics::frequency = NAN |
Frequency in hertz (Hz).
Definition at line 131 of file MycilaJSY.h.
float Mycila::JSY::Metrics::phaseAngleI = NAN |
current phase angle in degrees (°).
Definition at line 228 of file MycilaJSY.h.
float Mycila::JSY::Metrics::phaseAngleU = NAN |
voltage phase angle in degrees (°).
Definition at line 222 of file MycilaJSY.h.
float Mycila::JSY::Metrics::phaseAngleUI = NAN |
voltage - current phase angle displacement in degrees (°).
Definition at line 234 of file MycilaJSY.h.
float Mycila::JSY::Metrics::powerFactor = NAN |
Power factor. Positive value between 0 and 1.
Definition at line 155 of file MycilaJSY.h.
uint32_t Mycila::JSY::Metrics::reactiveEnergy = 0 |
Reactive energy in volt-amperes reactive-hours (VArh).
Definition at line 196 of file MycilaJSY.h.
uint32_t Mycila::JSY::Metrics::reactiveEnergyImported = 0 |
Reactive energy imported in volt-amperes reactive-hours (VArh), going to the load, when reactivePower > 0.
Definition at line 203 of file MycilaJSY.h.
uint32_t Mycila::JSY::Metrics::reactiveEnergyReturned = 0 |
Reactive energy returned in volt-amperes reactive-hours (VArh), coming from the load, when reactivePower < 0.
Definition at line 210 of file MycilaJSY.h.
float Mycila::JSY::Metrics::reactivePower = NAN |
Reactive power in volt-amperes reactive (VAr). Can be positive or negative.
Definition at line 169 of file MycilaJSY.h.
float Mycila::JSY::Metrics::thdI = NAN |
total harmonic distortion of current (THDi) as a percentage (%).
Definition at line 246 of file MycilaJSY.h.
float Mycila::JSY::Metrics::thdU = NAN |
total harmonic distortion of voltage (THDu), as a percentage (%).
Definition at line 240 of file MycilaJSY.h.
float Mycila::JSY::Metrics::voltage = NAN |
Voltage in volts (V).
Definition at line 137 of file MycilaJSY.h.