- PID to control temperature of flowing water - 4 Updates
Schlappo22 <lukas.po...@gmail.com>: Apr 03 07:56AM -0700
Hello PID Group,
glad I found this group here and was hoping to get a bit of feedback /
input regarding a project that I am working on.
I am working on a water cycle which I want to use to dispense water at a
certain temperature between room temperature and (around) 95degC. In my
application I don't want to heat the water in the tank but rather use a
"flow through heater" to heat the water instantaneously to the desired
temperature. There a lot of heaters out there that are able to heat small
amounts of water when flowing through without the need of preheating.
See my rough sketch below.
[image: 2023-04-03 16_53_34-Formula_Makr.drawio - diagrams.net.png]
As you can see, I will have a Thermocouple on the inlet and on the outlet
side, which I intend to use for the PID. I have started with the Arduino
Library by Brett and was wondering if anyone has some advice when
approaching this project. I hope that I can keep you posted on progress and
showstoppers once components arrive.
Regards, Lukas
Steve Edmonds <st...@edmondsfamily.co.nz>: Apr 03 12:43PM -0700
Do you have variable flow rate, what temperature deviation is acceptable?
I have a wax melter project where I found for various reasons straight PID
was not the best option and I resorted to energy balance control. It was
not until I started running various tests and logging the data that I found
this.
I started with a thermocouple, but because I could not insert it in the
melter water jacket that response was far too slow, so I changed to a thin
film RTD bonded to the outer jacket.
My thermal lag is about 5-7 minutes, long enough to input enough heat to
boil the water jacket before I see any temperature rise, and as I ideally
need to run the melter at 91-93C my biggest issue is not boiling the water
jacket.
In your case with low flow not boiling the water during a heating cycle. To
solve this I ran some tests to determine thermal response and losses so I
could limit heat input during any heating cycle to an amount calculated to
be less than that required to boil the water.
You may be able to use some similar energy calculations to limit heat input
and possibly scale the PID output control based on flow and temperature
differential.
On Tuesday, 4 April 2023 at 02:56:06 UTC+12 Schlappo22 wrote:
Steve Edmonds <st...@edmondsfamily.co.nz>: Apr 03 05:19PM -0700
I also had issues with the proportioning of the relay output when run in
the main loop, initial heating for me is at 100% but steady state
requirement when the wax has melted is about 7.5%. I moved the
proportioning into a timer interrupt routine where the interrupt runs every
0.1s and gained better control. With a 20 second control window 0.5%
equates to half a cycle of the AC power controlled by the solid state relay.
On Tuesday, 4 April 2023 at 07:43:41 UTC+12 Steve Edmonds wrote:
Schlappo22 <lukas.po...@gmail.com>: Apr 04 12:31AM -0700
Thanks very much for your reply.
I think a variable flowrate will overcomplicate the application. So I will
start with a set flowrate and maybe tackle that problem a bit later. So for
now, lets assume constant flow rate.
Interesting application you have there! The thermal lag that you have
should not be such a big problem for me. And if, I need to fix it. If I
need 5-7 minutes to heat up my flow through heater, than the whole
application does not make any sense.
To answer you question regarding the deviation, I don't know what is going
to be achievable, but I am aiming for as small as possible. And would
generally allow larger deviations with rising temperatures. When it comes
to temperatures below 40degC. it has to be within the +-1degC bracket.
I intend to use this Flow Through Heater: FTH II from Ferro Techniek
<https://www.ferrotechniek.com/wp-content/uploads/2021/03/FTH-II-Single-sheet-v4.pdf> (so
you know what I mean when I talk about FTH).
The heater has two power circuits (400W and 800W) that combined and spread
across 5 phases will provide up to 1200W. So switching them on / off at the
zero crossings, is how the intended use case looks like. They also mention
a constant flow-rate, so we will keep it that way.
Is that how you control your system as well?
You received this digest because you're subscribed to updates for this group. You can change your settings on the group membership page.
To unsubscribe from this group and stop receiving emails from it send an email to diy-pid-contr...@googlegroups.com.
Relay Pin: HIGH --- VALUES: Input: 58.12 --- Setpoint: 40.00 --- Output: 0.00 --- Relay HIGH for: 102s
Relay LOW for: 16 --- NTC Temperature: 63.84 degC --- FTH Control Temp. = 37.50 degC --- Water Outlet Control Temp. = 48.75 degC
Input: 63.84 --- Error: -23.84 --- Delta Input: 5.72 --- OutputSum Ki added: 0.00 --- OutputSum Kp added: 0.00 --- myOutput: 0.00
Relay Window shifted
Relay Pin: HIGH --- VALUES: Input: 63.84 --- Setpoint: 40.00 --- Output: 0.00 --- Relay HIGH for: 103s
Relay LOW for: 15 --- NTC Temperature: 79.41 degC --- FTH Control Temp. = 39.25 degC --- Water Outlet Control Temp. = 63.75 degC
Input: 79.41 --- Error: -39.41 --- Delta Input: 15.57 --- OutputSum Ki added: 0.00 --- OutputSum Kp added: 0.00 --- myOutput: 0.00
Relay Window shifted
Relay Pin: HIGH --- VALUES: Input: 79.41 --- Setpoint: 40.00 --- Output: 0.00 --- Relay HIGH for: 102s
Relay LOW for: 16 --- NTC Temperature: 91.48 degC --- FTH Control Temp. = 41.25 degC --- Water Outlet Control Temp. = 90.50 degC
Input: 91.48 --- Error: -51.48 --- Delta Input: 12.07 --- OutputSum Ki added: 0.00 --- OutputSum Kp added: 0.00 --- myOutput: 0.00
Relay Window shifted
Relay Pin: HIGH --- VALUES: Input: 91.48 --- Setpoint: 40.00 --- Output: 0.00 --- Relay HIGH for: 102s
Relay LOW for: 15 --- NTC Temperature: 97.49 degC --- FTH Control Temp. = 43.75 degC --- Water Outlet Control Temp. = 92.00 degC
Input: 97.49 --- Error: -57.49 --- Delta Input: 6.01 --- OutputSum Ki added: 0.00 --- OutputSum Kp added: 0.00 --- myOutput: 0.00
Relay Pin: HIGH --- VALUES: Input: 97.49 --- Setpoint: 40.00 --- Output: 0.00 --- Relay HIGH for: 103s
Relay LOW for: 15 --- NTC Temperature: 98.24 degC --- FTH Control Temp. = 45.50 degC --- Water Outlet Control Temp. = 90.75 degC
Input: 98.24 --- Error: -58.24 --- Delta Input: 0.76 --- OutputSum Ki added: 0.00 --- OutputSum Kp added: 0.00 --- myOutput: 0.00
Relay Window shifted
--
You received this message because you are subscribed to a topic in the Google Groups "DIY PID Control" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/diy-pid-control/ooqO6HDhm1M/unsubscribe.
To unsubscribe from this group and all its topics, send an email to diy-pid-contr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/diy-pid-control/bc17891a-4391-4ca6-93b3-4015052551e7n%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/diy-pid-control/82afcfb3-d0c5-424d-b082-b4cd2961cf0an%40googlegroups.com.
13:42:05.261 -> Volume: 0ml --- NTC Temperature: 26.25 degC --- FTH Control Temp. = 26.25 degC
13:42:05.261 -> Relay Window shifted --- Setpoint: 70.00 --- Output: 0.00 --- Relay OFF --- Time: 1043ms
13:42:05.293 -> Volume: 0ml --- NTC Temperature: 26.25 degC --- FTH Control Temp. = 26.25 degC
13:42:05.293 -> Relay Window shifted --- Setpoint: 70.00 --- Output: 100.00 --- Relay OFF --- Time: 1057ms
13:42:05.293 -> Volume: 0ml --- NTC Temperature: 26.25 degC --- FTH Control Temp. = 26.25 degC
13:42:05.293 -> Relay Window shifted --- Setpoint: 70.00 --- Output: 100.00 --- Relay OFF --- Time: 1072ms
13:42:05.293 -> Volume: 0ml --- NTC Temperature: 26.25 degC --- FTH Control Temp. = 26.25 degC
13:42:05.326 -> Relay Window shifted --- Setpoint: 70.00 --- Output: 100.00 --- Relay OFF --- Time: 1087ms
13:42:05.326 -> Volume: 0ml --- NTC Temperature: 26.25 degC --- FTH Control Temp. = 26.25 degC
13:42:05.326 -> Relay Window shifted --- Setpoint: 70.00 --- Output: 100.00 --- Relay OFF --- Time: 1101ms
13:42:05.326 -> Volume: 0ml --- NTC Temperature: 26.25 degC --- FTH Control Temp. = 26.25 degC
13:42:05.359 -> Relay Window shifted --- Setpoint: 70.00 --- Output: 100.00 --- Relay OFF --- Time: 1116ms
13:42:05.359 -> Volume: 0ml --- NTC Temperature: 26.25 degC --- FTH Control Temp. = 26.25 degC
13:42:05.359 -> Relay Window shifted --- Setpoint: 70.00 --- Output: 100.00 --- Relay OFF --- Time: 1131ms
13:42:05.359 -> Volume: 0ml --- NTC Temperature: 26.25 degC --- FTH Control Temp. = 26.25 degC
13:42:05.359 -> Relay Window shifted --- Setpoint: 70.00 --- Output: 100.00 --- Relay OFF --- Time: 1145ms
13:42:05.392 -> Volume: 0ml --- NTC Temperature: 26.25 degC --- FTH Control Temp. = 26.25 degC
13:42:05.392 -> Relay Window shifted --- Setpoint: 70.00 --- Output: 100.00 --- Relay OFF --- Time: 1160ms
13:42:05.392 -> Volume: 0ml --- NTC Temperature: 26.25 degC --- FTH Control Temp. = 26.25 degC
13:42:05.425 -> Relay Window shifted --- Setpoint: 70.00 --- Output: 100.00 --- Relay ON --- Time: 1213ms
13:42:05.458 -> Volume: 0ml --- NTC Temperature: 26.25 degC --- FTH Control Temp. = 26.00 degC --- Relay ON --- Time: 1222ms
13:42:05.458 -> Volume: 0ml --- NTC Temperature: 26.25 degC --- FTH Control Temp. = 26.00 degC --- Relay ON --- Time: 1232ms
13:42:05.458 -> Volume: 0ml --- NTC Temperature: 26.25 degC --- FTH Control Temp. = 26.00 degC --- Relay ON --- Time: 1242ms
13:42:05.490 -> Volume: 0ml --- NTC Temperature: 26.25 degC --- FTH Control Temp. = 26.00 degC --- Relay ON --- Time: 1251ms
13:42:05.490 -> Volume: 0ml --- NTC Temperature: 26.25 degC --- FTH Control Temp. = 26.00 degC --- Relay ON --- Time: 1260ms
13:42:05.490 -> Volume: 0ml --- NTC Temperature: 26.25 degC --- FTH Control Temp. = 26.00 degC --- Relay ON --- Time: 1269ms
13:42:05.490 -> Volume: 0ml --- NTC Temperature: 26.25 degC --- FTH Control Temp. = 26.25 degC --- Relay ON --- Time: 1280ms
13:42:05.523 -> Volume: 0ml --- NTC Temperature: 26.25 degC --- FTH Control Temp. = 26.25 degC --- Relay ON --- Time: 1289ms
13:42:05.523 -> Volume: 0ml --- NTC Temperature: 26.25 degC --- FTH Control Temp. = 26.25 degC --- Relay ON --- Time: 1298ms
13:42:05.523 -> Volume: 0ml --- NTC Temperature: 26.25 degC --- FTH Control Temp. = 26.25 degC
13:42:05.556 -> Relay Window shifted --- Setpoint: 70.00 --- Output: 100.00 --- Relay ON --- Time: 1312ms
13:42:05.556 -> Volume: 0ml --- NTC Temperature: 26.25 degC --- FTH Control Temp. = 26.25 degC --- Relay ON --- Time: 1323ms
13:42:05.556 -> Volume: 0ml --- NTC Temperature: 26.25 degC --- FTH Control Temp. = 26.25 degC --- Relay ON --- Time: 1332ms
13:42:05.556 -> Volume: 0ml --- NTC Temperature: 26.25 degC --- FTH Control Temp. = 26.25 degC --- Relay ON --- Time: 1341ms
13:42:05.589 -> Volume: 0ml --- NTC Temperature: 26.25 degC --- FTH Control Temp. = 26.25 degC --- Relay ON --- Time: 1350ms
13:42:05.589 -> Volume: 0ml --- NTC Temperature: 26.25 degC --- FTH Control Temp. = 26.25 degC --- Relay ON --- Time: 1359ms
13:42:05.589 -> Volume: 0ml --- NTC Temperature: 26.25 degC --- FTH Control Temp. = 26.25 degC --- Relay ON --- Time: 1370ms
As you can see, in the beginning something is wrong but it seems to regulate itself.
Note that the pump was not connected in this trial, so no change in temp. nor in volume.
Any suggestions?
To view this discussion on the web visit https://groups.google.com/d/msgid/diy-pid-control/1d664e1b-d08b-48e6-bc23-e31ab63a1073n%40googlegroups.com.
You received this message because you are subscribed to the Google Groups "DIY PID Control" group.
To unsubscribe from this group and stop receiving emails from it, send an email to diy-pid-contr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/diy-pid-control/CABKR0R%2BVXeBAs%3DttRn_btxmYkeeRiwWDS_2P_%2BMYtGeSyuoUbg%40mail.gmail.com.
17:48:41.919 -> Volume: 0ml --- NTC Temperature: 26.11 degC --- FTH Control Temp. = 27.00 degC
17:48:41.919 -> Relay Window shifted --- Setpoint: 70.00 --- Output: 0.00 --- Relay OFF --- Time: 1038ms
17:48:41.919 -> Volume: 0ml --- NTC Temperature: 26.11 degC --- FTH Control Temp. = 27.00 degC
17:48:41.919 -> Relay Window shifted --- Setpoint: 70.00 --- Output: 0.00 --- Relay OFF --- Time: 1044ms
17:48:41.952 -> Volume: 0ml --- NTC Temperature: 26.25 degC --- FTH Control Temp. = 27.00 degC --- Relay OFF --- Time: 1050ms
17:48:41.952 -> Volume: 0ml --- NTC Temperature: 26.11 degC --- FTH Control Temp. = 27.00 degC --- Relay OFF --- Time: 1055ms
17:48:41.952 -> Volume: 0ml --- NTC Temperature: 26.25 degC --- FTH Control Temp. = 27.00 degC --- Relay OFF --- Time: 1060ms
To view this discussion on the web visit https://groups.google.com/d/msgid/diy-pid-control/CAL-R9VYsNVxq-BAnYEFYGoK5KmSUaX95pShQCMXxLEqFw2%3Dd4A%40mail.gmail.com.
Serial.println("");Summary
--
You received this message because you are subscribed to the Google Groups "DIY PID Control" group.
To unsubscribe from this group and stop receiving emails from it, send an email to diy-pid-contr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/diy-pid-control/CABKR0R%2BVXeBAs%3DttRn_btxmYkeeRiwWDS_2P_%2BMYtGeSyuoUbg%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "DIY PID Control" group.
To unsubscribe from this group and stop receiving emails from it, send an email to diy-pid-contr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/diy-pid-control/CAL-R9VZpNd0%3DN6sX%3DdpiLSo1Des68fw%3DcuOBFDf0uxCkNFU7EQ%40mail.gmail.com.
You received this message because you are subscribed to the Google Groups "DIY PID Control" group.
To unsubscribe from this group and stop receiving emails from it, send an email to diy-pid-contr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/diy-pid-control/CABKR0R%2BVXeBAs%3DttRn_btxmYkeeRiwWDS_2P_%2BMYtGeSyuoUbg%40mail.gmail.com.
Volume: 5ml --- NTC Temperature: 26.65 [C] --- FTH Control Temp. = nan[C]
Relay Window shifted --- Setpoint: 36.00 --- Output: 0.00 --- Relay OFF --- Time: 8166 ms
Current dispensed weight: -0 [g] --- Motor ON
Volume: 11ml --- NTC Temperature: 26.25 [C] --- FTH Control Temp. = nan[C]
Relay Window shifted --- Setpoint: 36.00 --- Output: 250.00 --- Relay OFF --- Time: 8957 ms
Current dispensed weight: 0 [g] --- Motor ON
Volume: 15ml --- NTC Temperature: 26.93 [C] --- FTH Control Temp. = nan[C]
Relay Window shifted --- Setpoint: 36.00 --- Output: 0.00 --- Relay OFF --- Time: 9486 ms
Current dispensed weight: 0 [g] --- Motor ON
Volume: 19ml --- NTC Temperature: 26.11 [C] --- FTH Control Temp. = nan[C]
Relay Window shifted --- Setpoint: 36.00 --- Output: 250.00 --- Relay OFF --- Time: 10014 ms
Current dispensed weight: 0 [g] --- Motor ON
Volume: 24ml --- NTC Temperature: 26.11 [C] --- FTH Control Temp. = nan[C]
Relay Window shifted --- Setpoint: 36.00 --- Output: 250.00 --- Relay OFF --- Time: 10543 ms
Current dispensed weight: 0 [g] --- Motor ON
Volume: 28ml --- NTC Temperature: 26.11 [C] --- FTH Control Temp. = nan[C]
Relay Window shifted --- Setpoint: 36.00 --- Output: 250.00 --- Relay OFF --- Time: 11070 ms
Current dispensed weight: 0 [g] --- Motor ON
Volume: 32ml --- NTC Temperature: 26.11 [C] --- FTH Control Temp. = nan[C]
Relay Window shifted --- Setpoint: 36.00 --- Output: 250.00 --- Relay OFF --- Time: 11598 ms
--
You received this message because you are subscribed to a topic in the Google Groups "DIY PID Control" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/diy-pid-control/ooqO6HDhm1M/unsubscribe.
To unsubscribe from this group and all its topics, send an email to diy-pid-contr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/diy-pid-control/CAL-R9VbES%3Dw4BiMnOY7OQuxauTCQPZ9ue%2BHPq%2BpcsLu5B3gDjw%40mail.gmail.com.