Skip to content

Commit

Permalink
Final
Browse files Browse the repository at this point in the history
  • Loading branch information
FredM67 committed Aug 23, 2024
1 parent d20caef commit 60bb85b
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Mk2_3phase_RFdatalog_temp/calibration.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.043513F, 0.044825F, 0.044351F };
//
// 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.
Expand Down
2 changes: 1 addition & 1 deletion Mk2_3phase_RFdatalog_temp/processing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ float f_upperEnergyThreshold; /**< dynamic upper threshold */
// for improved control of multiple loads
bool b_recentTransition{ false }; /**< a load state has been recently toggled */
uint8_t postTransitionCount; /**< counts the number of cycle since last transition */
constexpr uint8_t POST_TRANSITION_MAX_COUNT{ 3 }; /**< allows each transition to take effect */
constexpr uint8_t POST_TRANSITION_MAX_COUNT{ 2 }; /**< allows each transition to take effect */
// constexpr uint8_t POST_TRANSITION_MAX_COUNT{50}; /**< for testing only */
uint8_t activeLoad{ NO_OF_DUMPLOADS }; /**< current active load */

Expand Down
2 changes: 1 addition & 1 deletion Mk2_3phase_RFdatalog_temp/processing.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ inline constexpr uint8_t sensorV[NO_OF_PHASES]{ 0, 2, 4 }; /**< for 3-phase PCB,
inline constexpr uint8_t sensorI[NO_OF_PHASES]{ 1, 3, 5 }; /**< for 3-phase PCB, current measurement for each phase */
// ------------------------------------------

inline constexpr uint8_t PERSISTENCE_FOR_POLARITY_CHANGE{ 2 }; /**< allows polarity changes to be confirmed */
inline constexpr uint8_t PERSISTENCE_FOR_POLARITY_CHANGE{ 1 }; /**< allows polarity changes to be confirmed */

inline constexpr uint16_t initialDelay{ 3000 }; /**< in milli-seconds, to allow time to open the Serial monitor */
inline constexpr uint16_t startUpPeriod{ 3000 }; /**< in milli-seconds, to allow LP filter to settle */
Expand Down
2 changes: 1 addition & 1 deletion dev/cal_CTx_v_meter/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.043513F, 0.044825F, 0.044351F };

// 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
Expand Down

0 comments on commit 60bb85b

Please sign in to comment.