killee / Sauna-controller

Sauna Controller with esp8266 ESPHome for a integration in Home Assistant
GNU General Public License v3.0
26 stars 1 forks source link

Fine regulation with ac_dimmer #1

Open eldarmusin opened 2 years ago

eldarmusin commented 2 years ago

I would like to contribute for those who cares in 4 steps.

T Sensor For an experimental purpose, a used a DHT22 than switched for a 18ds20. Kept in code for the better comprehension.

T Regulator I have used the same pid component for the regulation, but as output used the ac_dimmer component. To set up the PID values Kp, Kd, Ki please see below.

Dimmable Output I used the ac_dimmer component because of the triac hardware. The main advantages are:

Set up PID I referred to the file [Russian] .

  1. Set Kp = 100, Kd = Ki = 0 and let the system heat
  2. You will see a Temperature curve of your sensor like this image
  3. After 4-5 oscillations, calculate the values as follows and report them to the code:
    • Kp = 1.2 * DeltaT
    • Ki = 1.5 * Tau
    • Kd = 0.2 * Tau

Here is my code sensor:

output:

climate:

killee commented 2 years ago

Hi @eldarmusin

Thanks for your suggestions!

I didn't think about a triac control. The power losses will be better and the power control is better.

Private people has also no responsibility about a not in Phase current.

I don't like this kind of triac power control, but that's my issue 😉. Can you hear some line noise?

Why didn't you use the auto PID tune from esphome?

Regards

eldarmusin commented 2 years ago

Yes I'm hearing a regulation noise. But after some time, just ignoring it.

The Auto PID hasn't worked for me for some reason. Had to find another solution.