Emile666 / stc1000_stm8

STC1000p for the STM8 microcontroller (HW version WR-032)
GNU General Public License v3.0
45 stars 10 forks source link

PID for heating, bang-bang for cooling #16

Open guestisp opened 1 year ago

guestisp commented 1 year ago

Is possible to use the PID mode just for the heating output (a heating cable) and standard bang-bang mode for the cooling device (a peltier cell that wouldn't work in PID mode) ?

Emile666 commented 1 year ago

I think I did that for the W3230 firmware, but currently not for the STC-1000 firmware. The stc-1000 firmware now checks the TS (sample-time) parameter. If that is 0, then the temperature control is called, otherwise the pid-control is called. In order for your request to work, both control functions need to be called. I will make a new software version.

For the W3230 firmware, I modified the code to: // Thermostat control and PID-control temperature_control2(temp); // Run thermostat control logic if (ts == 0) // PID Ts parameter is 0? pid_out = 0; // Disable PID-output else pid_control(temp); // Run PID controller in parallel with thermostat

guestisp commented 1 year ago

Oh, great. So, as I have to buy an STC1000 trying to have a PID control for the heater and a standard bang-bang for the cooling, if you are planning to release this feature in the next firmware, i'll buy one controller.

Which one do you suggest (from amazon) ?