Using digipot to control water temperature

hi guys,
complete new here, appreciate all the help. I took up a project to control temperature in a household water heater.
I am looking to control a 240V 3.6kw water heating element in a water heater to be exact.

I want to control the water temperature by using digital potentiometer. For example, If the temperature in the tank goes down than the required degree, the RTD Sensor activates the digital potentiometer depending on the required degree the Digipot activates heating element with required voltage to boil the water to desired temperature.
The temperature varies from 20 to 80 degrees. with a step size of 5ohms.

My question is:
1)Can I use and how to use a digipot for this setup?
2)what kind of digipot is required?

Hi, @akhilreddy963
Welcome to the forum.

Please read the post at the start of any forum , entitled "How to use this Forum".

Depending on the type of controller you are going to use to control the 240V supply to the heater.

It can be done, but you need a way of isolating the low voltage Arduino control form the 240Vac power.

Can you please tell us your electronics, programming, arduino, hardware experience?

If you are looking at a Household heater, then just ON/OFF control should be enough.

Tom.. :smiley: :+1: :coffee: :australia:

How does the RTD know the water temperature?

Hai Paul,
Thank you for replying
I will be using DS18B20 Digital Temperature Sensor for detecting the temperature.

And how do you have it installed?

If you can use pulses, 2ms on and off total, then save money and use a high efficiency Logic-level MOSFET (T for transistor, buy at least 10 for better price) to switch current on and off.
FETs are great at 100% open or 100% closed, >90% efficient.

The older BJT is great as an analog valve but is current-limited due to heat and less efficient.

Haven't installed. just Researching how to do it.

We assume the heating element is in a well in the tank. Do you have another well to put the temperature sensor in? Or are you going to try to get it in direct contact with the hot water?

What does exact mean to you?

Is this a project to use a digipot in a cool application?

The temperature varies from 20 to 80 degrees. with a step size of 5ohms.

Temperature is not in ohms so there is more to the conversion.

Thoughts as you think of an approach:

  1. The arduino and circuitry MUST be isolated from the 220VAC
  2. You must have a fail safe feature so if your circuit/sensor goes haywire the heater will shut off rather than lock on. Perhaps the current system set at above you desired set point may serve this safety function.
  3. To get better temperature regulation you will likely have to PWM the power to the heater. The best way is to turn on for a number of 50Hz cycles then turn off for a different number of cycles.

Others have been helpful here. I just want to make helpful comments/tips

  1. You need to think of "hysteresis" and add it into your code. Otherwise the controller could be switching on and off very quickly when the temperature is at the "trigger point". Hysteresis is how traditional thermostats etc work and have done for years.
    I would say you need 2 or 3 degrees of hysteresis, but you'll have to experiment, as your closed-loop will have its own characteristics.
    What I mean by hysteresis is to turn the heater on when the water drops to X degrees, and switch off when you reach X+{hysteresis value}. Thus the controller will not be rapidly turning on and off .
    You could use a time delay, but hysteresis is a better way to go.

  2. Unless you really need a digipot, a standard rotary potentiometer would work probably equally as well.

  3. But why use a pot anyway? You could incorporate a small display (like a 0.96" OLED) and use up and down buttons to control the set temperature. You could add other buttons like 'override on', and 'override off'.
    There are also 4 channel garage-door type remote control modules (EV1527) that could be a alternative way to do all this. You can get a cheap 4 button remote, and a receiver module and you'd be pot-and-button-free. Coupled with a display it could be a nice project.

  4. the DS18B20 is a good choice here. It could be strapped to the hot water outlet pipe. I know there is a difference in the temperature between the water in the heater and the pipe but it will be insignificant in practice.
    You can use the waterproof-type DS18B20 as that is sealed with a cable. And you could always wrap pipe insulation around the assembly.

  5. Most importantly, SAFETY is a primary consideration. You MUST isolate the mains from the arduino and the human. I would use a relay module for this, not mosfets. There are relay modules out there that will do the job.
    Do not use a metal box or metal buttons. Make sure there are no conductive parts in the human-interface. A plastic project box is best. Any and all metal parts must be properly earthed, including the body of the DS18B20 sensor.

If you don't know what you are doing - get an electrician to help. A good one will also do a PAT test on the finished project to test safety.

If you are unsure of how to SAFELY make this project, then (sorry) forget it and build something else.

I hope this helps

So digipot is to control current through heating element to heat up to required temperature? Don’t think this is good design, you normally control water heating by duration heating element is on

Sorry, but the concept of using a "digipot" in this application is simply complete nonsense. :roll_eyes:

The misunderstanding of what a "digipot" is appears here from time to time and the (im)possibility of using one to control a mains dimmer is explained.

A "digipot" is a device used a a volume control in audio applications; it operates at audio levels up to a few volts.

In fact, in the overwhelming majority of heating applications, even phase control is not required, you usually cycle the AC on and off over a period of several seconds. You probably want to control over integral numbers of (full) AC cycles, so over a 2 second period with 60 Hz mains, you have a value of zero to 120 cycles which should be a quite adequate control range.

Looking back:

OK, so that is 50 Hz mains I gather and sounds like Australia/ New Zealand.

The on/ off cycle for that application I would guess could conservatively be over a period of about 1 second per litre.