3 way mixing valve

Hello.
I need your help.I want simple automation with ESPhome,mixing valve which is controlling my underfloor heating.Mixing valve opening time from 0 to 90 degree in 120 sek.I want control temperature from 20 to max 35 degree celsius in HA.I want to use temperature sensor for water measuring, nodemcu and 2 relays for opening and closing mixing valve.Any suggestion.
Thank you

1 Like

Sounds like a PID controller is what you are aiming for:

Hi!
Also have the same question, and no the PID controller will not do the work. The PID controller have a float out put. I think we both need something that have two output (open/close) and the time for open and close is depending on the error of the temperature desired.

Is there a reason just a thermostat wouldn’t work?

I’m also curious, why are 2 relays needed? I’m admittedly not very familiar specifically with underfloor heating systems, but in general, controllable valves are usually normally open or closed and you just command them to the opposite as needed.

Maybe I’m missing something, but it seems you would either have a valve that can only be fully opened or closed (and thus use the thermostat) or an adjustable valve (and use the PID).

It is a motor controlling the valve, one relay for opening and one valve to close. It is not on/off valve it is a shunt but controlled via a motor, it takes more than 100 s for fully open to fully closed.

I think you’ll still want to use the thermostat, but just specify a switch for each relay and control them similar to this example from the docs:

climate:
  - platform: thermostat
    name: "Thermostat Climate Controller"
    sensor: my_temperature_sensor
    min_cooling_off_time: 300s
    min_cooling_run_time: 300s
    min_idle_time: 30s
    cool_action:
      - switch.turn_on: air_cond
    idle_action:
      - switch.turn_off: air_cond

So replace cool_action with heat_action and have the relays do what you need in there. Can even specify minimum times as in the example to avoid it cycling too frequently.

If the 3-way valve hade a accurator that could be controlled by a float (0-100%) the PID controller would be grate. My 3-way valve are controlled by a motor that open or close the valve and no feedback of position. If the error is grate the motor (relay) should operate for a longer time, if the error are smal the motor should operate a shorter time.

Are you saying that the current controller adjusts the motor runtime based on the temperature differential (setpoint vs actual) or that that’s your idea of how it should ideally operate?

The reason I ask, is I don’t think it would be advisable to change how the system currently operates (versus just automating it/connecting it to HA). This could lead to adverse effects on the boiler in particular, if it’s not designed for it.

In this case I dont have a controller only the accurator :slight_smile:

Today I manual control the valve, and the boiler have system to stop if the temperature is to high.

When i get this to work the next thing is to optimize the temperature in to the boiler according to the fuel gas temperature

Hi! I builded 3 of 3way mixing valves controlled with esp32 and relay modules.Here is my config:```

sensor:
 - platform: dallas
    address: 0x813c01f0968d2628
    dallas_id: dallas_hub_23
    name: "Porandapealevoolutemp"
    id: "porandapealevoolutemp"
    icon: mdi:arrow-down-bold
  - platform: dallas
    dallas_id: dallas_hub_23
    name: "Pelletipealetemp"
    id: "pelletipealetemp"
    address: 0x570117b2b3e9ff28
    filters:
      filter_out: nan

switch:
#PORANDA3TLAHTI
  - platform: gpio
    name: poranda3Tlahti
    id: poranda3tlahti
    restore_mode: RESTORE_DEFAULT_OFF
    icon: mdi:water-boiler
    pin:
      pcf8574: ssr
      number: 2
      mode: OUTPUT
      inverted: True

################################################
#PORANDA3TKINNI
  - platform: gpio
    name: poranda3Tkinni
    id: poranda3tkinni
    restore_mode: RESTORE_DEFAULT_OFF
    icon: mdi:water-boiler
    pin:
      pcf8574: ssr
      number: 3
      mode: OUTPUT
      inverted: True
climate:
#PÕRANDAKLIIMA 
  - platform: thermostat
    name: Põrandakontuur
    id: porandakontuur
    icon: mdi:heater
    visual:
      min_temperature: 20 °C
      max_temperature: 50 °C
      temperature_step: 0.1 °C
    min_idle_time: 1s
    min_heating_run_time: 1s
    min_cooling_run_time: 1s
    min_heating_off_time: 1s
    min_cooling_off_time: 1s
    set_point_minimum_differential: 1
    
    heat_overrun: 0.0
    heat_deadband: 0.0
    cool_overrun: 0.0
    cool_deadband: 0.0
    sensor: porandapealevoolutemp
    heat_action:
      - script.execute: porandakolmteekraanlahti
      - switch.turn_off: poranda3tkinni
    cool_action:
      - script.execute: porandakolmteekraankinni
      - switch.turn_off: poranda3tlahti
    idle_action:
      - script.stop: porandakolmteekraanlahti
      - script.stop: porandakolmteekraankinni
      - switch.turn_off: poranda3tkinni
      - switch.turn_off: poranda3tlahti
    preset:
      - name: küte
        default_target_temperature_low: 20 °C
        default_target_temperature_high: 45 °C 
script:
#PÕRANDA3T
  - id: porandakolmteekraanlahti
    then:
    - repeat:
        count: 100
        then:
          - switch.turn_on: poranda3tlahti
          - delay: 1s
          - switch.turn_off: poranda3tlahti
          - delay: 35s
  - id: porandakolmteekraankinni
    then:
    - repeat:
        count: 100 
        then:    
          - switch.turn_on: poranda3tkinni
          - delay: 1s
          - switch.turn_off: poranda3tkinni
          - delay: 35s

From what your describing, am I correct to assume the original intent of the system was for the 3-way valve to be fully open to the floor heat exchanger or fully open returning back to the boiler versus somewhere in between?

And what do you mean when you say you want to “optimize the temperature in to the boiler according to the fuel gas temperature”. Did you mean flue gas?

I apologize in advance if I come across as nosey, I’m definitely not trying to tell you what to do, but as a mechanical engineer I know it’s very easy to do a lot of damage by making what seems like minor tweaks (if it wasn’t designed with that in mind). I’d hate for your boiler to get damaged.

I will do some translating and try this one, where do you set the wanted temperature?

No, the original intend is to controll the valve to open/close so much that the temperature in to the boiler will get the correct temperature out of the boiler to 90°C. When the fuel is geting used (wood boiler) the flue gas temperature will drop and the temperature out of the boiler will drop so before that the temperature in to the boiler must increase.
I’m also a mechanical engineer with heat and combustion speciality so now how to trim a boiler and what problems low or to high temperatures will do to the boiler.
An O2 sensor to control the flue gas fan should be the next step :slight_smile:

Sounds like you got it under control then! :slight_smile:

Whereabouts in the world are you? I grew up with a wood boiler and yours already sounds significantly more complex than any I’ve ever come across, much less if you start measuring O2 as well!

Good luck!

I have worked with biomass energy for more than 30 years, but with larger boilers (district heating, combined heat and power plants) Now with HA and ESP is possible to make some nice controll system even on small boilers.
I realize that i bought wrong accurator (ESBE ARA600). I bought a “standard” 3 point accurator but they have a 2-10 V (4-20 mA) :frowning:

if you see my yaml.so there is climate.There is a target temp low and target temp high.Also you can change the temperature depending of outside temperature

Have ylou solved the problem with the “wrong mixer” I think there should be a way to make a so called 3-point Step controller which triggers the Direction of the 3-way ESBE Valve. This is the typical way the heating controller control this mixer valves. I’m alos loking for this kind of control output for the ESPhome Climate control, but seems they do not support this out of the box?

You need two relais as there is a neutral and a OPEN and CLOSE direction for the Valve where the motor turns in one or the other direction. I’m also looking for a solution like this to control a normal Heating Mixer with such 3-Point Step output

Still not seeing how the normal thermostat won’t get you what you need:

Just define which relays it activates at the various conditions with cool_action, heat_action and idle_action. Can easily keep it from cycling too frequently with the min run time settings or even define separate ‘heat’ and ‘cool’ setpoints simultaneously.

climate:
  - platform: thermostat
    name: "Thermostat Climate Controller"
    sensor: my_temperature_sensor
    min_cooling_off_time: 300s
    min_cooling_run_time: 300s
    min_heating_off_time: 300s
    min_heating_run_time: 300s
    min_idle_time: 30s
    cool_action:
      - switch.turn_on: air_cond
    heat_action:
      - switch.turn_on: heater
    idle_action:
      - switch.turn_off: air_cond
      - switch.turn_off: heater

No, the problem is not solved