diff --git a/Mk2_3phase_RFdatalog_temp/calibration.h b/Mk2_3phase_RFdatalog_temp/calibration.h index 04a7440..082ffeb 100644 --- a/Mk2_3phase_RFdatalog_temp/calibration.h +++ b/Mk2_3phase_RFdatalog_temp/calibration.h @@ -31,7 +31,7 @@ // powerCal is the RECIPROCAL of the power conversion rate. A good value // to start with is therefore 1/20 = 0.05 (Watts per ADC-step squared) // -inline constexpr float f_powerCal[NO_OF_PHASES]{ 0.05000F, 0.05000F, 0.05000F }; +inline constexpr float f_powerCal[NO_OF_PHASES]{ 0.042911F, 0.043631F, 0.042157F }; // // f_phaseCal is used to alter the phase of the voltage waveform relative to the current waveform. // The algorithm interpolates between the most recent pair of voltage samples according to the value of f_phaseCal. diff --git a/Mk2_3phase_RFdatalog_temp/config.h b/Mk2_3phase_RFdatalog_temp/config.h index 7bea63d..6938ee3 100644 --- a/Mk2_3phase_RFdatalog_temp/config.h +++ b/Mk2_3phase_RFdatalog_temp/config.h @@ -35,7 +35,7 @@ //-------------------------------------------------------------------------------------------------- // constants which must be set individually for each system // -inline constexpr uint8_t NO_OF_DUMPLOADS{ 2 }; /**< number of dump loads connected to the diverter */ +inline constexpr uint8_t NO_OF_DUMPLOADS{ 1 }; /**< number of dump loads connected to the diverter */ #ifdef EMONESP inline constexpr bool EMONESP_CONTROL{ true }; @@ -50,7 +50,7 @@ inline constexpr bool OVERRIDE_PIN_PRESENT{ false }; /**< set #endif inline constexpr bool WATCHDOG_PIN_PRESENT{ false }; /**< set it to 'true' if there's a watch led */ -inline constexpr bool RELAY_DIVERSION{ false }; /**< set it to 'true' if a relay is used for diversion */ +inline constexpr bool RELAY_DIVERSION{ true }; /**< set it to 'true' if a relay is used for diversion */ inline constexpr bool DUAL_TARIFF{ false }; /**< set it to 'true' if there's a dual tariff each day AND the router is connected to the billing meter */ // ----------- Pinout assignments ----------- @@ -71,8 +71,8 @@ inline constexpr bool DUAL_TARIFF{ false }; /**< set it to 'true' if th // D12 is MISO // D13 is SCK -inline constexpr uint8_t physicalLoadPin[NO_OF_DUMPLOADS]{ 5, 7 }; /**< for 3-phase PCB, Load #1/#2/#3 (Rev 2 PCB) */ -inline constexpr uint8_t loadPrioritiesAtStartup[NO_OF_DUMPLOADS]{ 0, 1 }; /**< load priorities and states at startup */ +inline constexpr uint8_t physicalLoadPin[NO_OF_DUMPLOADS]{ 5 }; /**< for 3-phase PCB, Load #1/#2/#3 (Rev 2 PCB) */ +inline constexpr uint8_t loadPrioritiesAtStartup[NO_OF_DUMPLOADS]{ 0 }; /**< load priorities and states at startup */ // Set the value to 0xff when the pin is not needed (feature deactivated) inline constexpr uint8_t dualTariffPin{ 0xff }; /**< for 3-phase PCB, off-peak trigger */ @@ -83,7 +83,7 @@ inline constexpr uint8_t watchDogPin{ 0xff }; /**< watch dog LED */ inline constexpr uint8_t tempSensorPin{ 0xff }; /**< for 3-phase PCB, sensor pin */ -inline constexpr RelayEngine relays{ { { 0xff, 1000, 200, 1, 1 } } }; /**< config for relay diversion, see class definition for defaults and advanced options */ +inline constexpr RelayEngine relays{ { { 8, 1000, 200, 1, 1 } } }; /**< config for relay diversion, see class definition for defaults and advanced options */ inline constexpr uint8_t ul_OFF_PEAK_DURATION{ 8 }; /**< Duration of the off-peak period in hours */ inline constexpr pairForceLoad rg_ForceLoad[NO_OF_DUMPLOADS]{ { -3, 2 } }; /**< force config for load #1 ONLY for dual tariff */ @@ -92,9 +92,6 @@ inline constexpr int16_t iTemperatureThreshold{ 100 }; /**< the temperature thre inline constexpr TemperatureSensing temperatureSensing{ 0xff, { { 0x28, 0xBE, 0x41, 0x6B, 0x09, 0x00, 0x00, 0xA4 }, - { 0x28, 0xED, 0x5B, 0x6A, 0x09, 0x00, 0x00, 0x9D }, - { 0x28, 0xDB, 0x6D, 0x6A, 0x09, 0x00, 0x00, 0xDA }, - { 0x28, 0x59, 0x1F, 0x6A, 0x09, 0x00, 0x00, 0xB0 }, { 0x28, 0x1B, 0xD7, 0x6A, 0x09, 0x00, 0x00, 0xB7 } } }; /**< list of temperature sensor Addresses */ inline constexpr uint32_t ROTATION_AFTER_CYCLES{ 8UL * 3600UL * SUPPLY_FREQUENCY }; /**< rotates load priorities after this period of inactivity */ diff --git a/dev/cal_CTx_v_meter/main.cpp b/dev/cal_CTx_v_meter/main.cpp index ce87d15..554ed6c 100644 --- a/dev/cal_CTx_v_meter/main.cpp +++ b/dev/cal_CTx_v_meter/main.cpp @@ -127,7 +127,7 @@ constexpr int16_t ADCDuration{ 104 }; // Time in microseconds for one ADC conve // powerCal is the RECIPR0CAL of the power conversion rate. A good value // to start with is therefore 1/20 = 0.05 (Watts per ADC-step squared) // -inline constexpr float f_powerCal[NO_OF_PHASES]{ 0.050000F, 0.050000F, 0.050000F }; +inline constexpr float f_powerCal[NO_OF_PHASES]{ 0.042911F, 0.043631F, 0.042157F }; // f_phaseCal is used to alter the phase of the voltage waveform relative to the // current waveform. The algorithm interpolates between the most recent pair