Hello,
I am new here and this is my first post. I try to provide all the information that I have so far and where I am stuck. Please let me know if further clarification is needed to get support from the community.
I am working on the following project. I want to be able to control the volume and the temperature of water that is dispensed out of a tank. The reason why I think this is a bit more complicated than controlling the temperature in a water tank to the desired value and then dispensing the needed amount, is that I don't want the long pre-heating times. Instead I want to be able to dispense the desired water within a few seconds. The device of my choice is a Flow Through Heater (FTH). Please see in the sketch below my desired system setup:
Desired Temperatures: Room Temperature (or water in the Tank Temperature) to 100deg C (ideally +0/-3degC, to never dispense too hot) Desired Volume: 30ml to 500ml (+-1ml) Desired Flowrate: I don't have a flowrate target but the dispensing time should be no longer than 20 seconds. Which means that the max. flowrate would be 3.0L/min (based on 500ml in 10 seconds) Desired Timing: The FTH could preheat the liquid already inside the device (3.5ml) before starting the dispensing
Please see the specs. sheets (that I have) of the components below:
Now to the part, where I am lacking understanding / got stuck. I figured that I will need a PID control for the FTH, as it is a heating element and won't be able to react quickly to changes it seems that the best way to go with a Burst Fire control.
So my question now is which component could I utilize for the "PWM Control" in my sketch? And I would highly appreciate your feedback and to what else I should pay attention to.
Welcome! You have an interesting problem. One of the things missing is temperatures, tolerances, timing and rates of flow. It looks similar to a vending machine. I am assuming it is potable water flowing from a gravity tank. PWM rates will be slow as it is dependent on the AC frequency. Generally this is done with a triac or SCR. Both once gated will not turn off until the current falls below its holding current rating or about zero. There are other solid state relays that use other electronics that do not depend on the zero cross. What helps a lot is links to technical information on the different devices and eventually you will be asked for them. Generally market places such as amazon do not have the needed details.
Sure let me provide the missing values (I will also edit my original post for everyone who joins this topic later).
Desired Temperatures: Room Temperature (or water in the Tank Temperature) to 100deg C (ideally +0/-3degC, to never dispense too hot) Desired Volume: 30ml to 500ml (+-1ml) Desired Flowrate: I don't have a flowrate target but the dispensing time should be no longer than 20 seconds. Which means that the max. flowrate would be 3.0L/min (based on 500ml in 10 seconds) Desired Timing: The FTH could preheat the liquid already inside the device (3.5ml) before starting the dispensing
I wouldn't say its portable, but lets just say it is a stationary water dispenser that allows you to select the volume and the temperature of the water and cuts the heating time significantly (e.g. kettle)
Please see the specs. sheets (that I have) of the components below:
A quick check gives me this from your link to the pump: ""Max water temperature 20°C / 68°F". Since you are using alliexpress check for "solid state relay", they have many that will do what you want for less then $5 US. Interesting heater, if you keep it below the outlet you can keep it warm when the system is idle. Your stand pipe will cool, not sure it is enough to cause problems. As soon as water goes through it it will warm up. I need to get back later as I have another commitment.
Good catch with the pump. I will search a bit more to find one that allows for up 30degC. As the pump is placed before the heating element, that should be fine. I am not that worried about the temperature rating to be honest. I will have a look at the Solid State Relays. Thank you
Personally I would consider a PID heat control scheme rather than a PWM. Either way I would use SSR for power to my heater. Next using an inline heater is fine but since you have thermocouples both upstream and downstream of your heater you may want to consider not only flow rate but your thermocouple response times. A Google of Arduino PID should get you a dozen code examples and hits.
I think I am a bit confused regarding PID and PWM. My understanding is the PID control adjusts the output based on the error between the setpoint and the process variable, PWM control adjusts the average voltage applied to a load by switching the voltage on and off at a high frequency. However I thought I can use the PID (so output based) to then quickly switch the voltage on and off depending on the error etc. Maybe my terminology is a bit of...
Very fair point! And no your calculation is perfectly fine! I shall adjust the dispensing time requirement accordingly.
I tested my coffee machine now and figured out that it dispenses with 7.15ml/s, which is probably a good target. So instead of going for the time as I initially did in my first post, lets aim for a similar flowrate
Desired Flowrate: 7.15ml/s
which actually still exceeds the 1200Watt. I guess I will need to make that flowrate variable depending on the required volume and temperature
PID-wise, the temperature at the thermocouple in the outlet pipe in your diagram will lag the temperature at the heater more (and variably) if you make the flowrate variable.
1200W /(7.15g/s*4.184J/gK) = +40K If you could preheat to 60°C, it could keep up. Perhaps when idle, you could divert warmed water from the output back into the input tank until you reach 60°C.
What I meant was make it variable for each filling process. Not variable within one dispensing cycle. I could e.g. evaluate what a reasonable flowrate would be based on the input and dispense constant at that rate.
Yes preheating the tank would help, however changing the temperature of the water in the tank is not an option as I want to be able at any time dispense at room temperature (once the FTH has cooled down, or I cool it just by dispensing at 0W)
What is missing from this discussion is realistic performance data.
Buy the heater and experiment with it at full power, to learn more about how long the heater block itself takes to come to temperature or cool back down to RT, and the temperature rise for a given water flow rate.
I would say this is much harder than it looks ( too hard ?) the lag of the heater warming up is the biggest issue I foresee and the consequential time to stabilise a temperature . Maybe a microwave ???
You could maybe have the heater on all the time and control the flow rate to give the desired temperature .
The easiest is to have a reservoir of hot water and mix with cold in a nozzzle to give the temperature , or knowing the hot and cold temperatures , dispense known volumes of each to give the desired temperature in the receptacle
Rather than look at flow rate function you may want to look at a flow totalizer function. Flow meters have a "K" Factor which is just how many pulses per unit of measure. Rather than rate of flow you look at totalized flow. You want to dispense 750 mL Get a 750 mL marked container. A 1.0 Liter container marked at 250 mL increments. Using your pump open and close a valve like a ball valve. Count the pulses while filling to the 750 mL mark. That will tell you your total pulse count for 750 mL of liquid. Example measure 500 mL or less taking several measurements. 500 mL, 750 mL and 1,000 mL add the total pulses and then divide by 3 for an average mean K factor. Using a totalizer function rather than a rate function may give you more accurate results. When dispensing it is a count to N and halt where you call out N.
I see your concern and the deeper I dig the more problems I come across. However as this is the intended use case of the FTH and therefore should be possible (maybe as not as precise as wanted but fairly close). I will try to get some more data on the performance of the part to see how accurate and quick it actually works.
I also thought about mixing two liquids at different temperatures, but again that would mean I need a tank with warm water, which is not an option.
How will you control the flow rate?
If you stop the pump, does the flow stop if you have a head of water in the supply tank?
If you got to 100C, then you have boiling water, a mix of steam and water and an increase in outlet pressure.
So your inlet flow will be okay, but your outlet flow will be "spitting" steam.