-
Notifications
You must be signed in to change notification settings - Fork 6
Description
Hello.
I was able to put together the circuit and I have it running out of a 12V PC power supply.
I did the auto tune and the parameters I got are as follows:
#define KP 13.69
#define KI 0.12
#define KD 385.05
#define SMOOTHING_WINDOW 5
#define MOSFET_GATE_PIN 3
#define THERMISTOR_PIN A6
#define KY040_CLK 9
#define KY040_DT 8
#define KY040_SW 2
#define KY040_STEPS_PER_NOTCH 2
bool heaterOn = false, pOnM = false;
double pwmOut, curTemp, setTemp = 0;
NTC_Thermistor* thermistor = new NTC_Thermistor(THERMISTOR_PIN, 99800, 100000, 25, 3950);
I am using a larger resistor with the thermistor.
The circuit works well execpt that the heater continues heating even after it reaches the target temperature.
If I press the rotary button it stops and the temperature gows down, as expected. The LED turns on once the target temperature is reached, goes of once it is surpassed. So the program seems to be OK, but why doesn´t the heater stop heating after reaching the target?
Any advise on what I should check?
Thank you!