/** * @file config.h * @author Jake G * @date 15 June 2024 * @brief File contains the project configuration values * * This file contains the user changable parameters. Most the values are * constants that will change the behavior of the system. * * For these changes to take affect you must recompile/rebuild the project * after you have changed the values. */ #ifndef CONFIG_H #define CONFIG_H #include #define ADC_LOAD1 4 #define ADC_LOAD2 5 #define ADC_LOAD3 6 /** * @brief Positive Zero Crossing Trigger Value * The 10 bit value at which the program triggers the ISR to handle * the zero crossing event. * * You can adjust this to change when the program will start the timer. */ const uint16_t TriggerValue = 512; /** * @brief Triac Gate Pulse Quantity * * Contains the number of pulses that the micro-controller will send to the * gates of the triac. * * This number should match the quantity of timings inside the pulse/duration * array. */ const int GatePulsesQty = 5; /** * @brief Gate Pulses Array * * The gate pulses array holds the duration of pulses in microseconds for the * triacs gates. The length of the array must be matched with the * GatePulsesQuantity parameter. */ const uint16_t GatePulses[5] = {250, 500, 750, 1000, 1250}; /** * @brief The time constant. */ const double Tau = 8250; /** * @brief The upper Hystersis value.(Override) * This is the upper bound of the digital/boolean hysteresis curve. It * takes presidence over the value in `/src/load.h` * * If the input is below low it always sets the output high. * If the input is between high and low with the output high it stays high. * If the input is above high and the ouput is high it's set low. */ #define HYSTERESIS_HI 900 /** * @brief The lower Hystersis value.(Override) * This is the upper bound of the digital/boolean hysteresis curve. It * takes presidence over the value in `/src/load.h` * * If the input is below low it always sets the output high. * If the input is between high and low with the output high it stays high. * If the input is above high and the ouput is high it's set low. */ #define HYSTERESIS_LO 700 #endif //CONFIG_H