Heater for threaded program
Dependents: LEX_Threaded_Programming
Diff: Heater.h
- Revision:
- 24:6debc2fb9ff3
- Parent:
- 23:947850bbf325
- Child:
- 25:09a315a59956
diff -r 947850bbf325 -r 6debc2fb9ff3 Heater.h --- a/Heater.h Wed Aug 07 16:37:10 2019 +0000 +++ b/Heater.h Thu Aug 15 10:34:55 2019 +0000 @@ -16,13 +16,13 @@ #define N_ROLL_AVG 1 // rolling average for R values #define ALL_CH 15 //value of convst bus to read all chanels simultaneosly -#define Kp 8.0f //proportional gain -#define Ti 0.3f //Integration time +#define Kp 4.0f //proportional gain +#define Ti 0.5f //Integration time #define Kd 0.1f //Differentiator gain #define WIND_UP_LIMIT 0.1f //The change in error which turns off the integral term #define PWM_PERIOD 5 //Period of Pwm for the motor in us -#define LOG_LIM 30 //Number of reads before the result is logged -#define GUARD_PWM_RATIO 0.1 //Ratio of guard duty cycle to heater duty cycle +#define LOG_LIM 10 //Number of reads before the result is logged +#define GUARD_PWM_RATIO 0.25 //Ratio of guard duty cycle to heater duty cycle class Heater