Skip to content

Heater continues heating after reaching target temperature #5

@Marco-rc

Description

@Marco-rc

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions