Regulate temperature to shower by regulating hot water

Hey there,

I have been looking around the Internet and can't really find what I'm looking for, maybe I can get some help here.

Here is what I want to do. I want to have a stepper or servo motor directly coupled to a water valve on the hot and cold lines going to a shower. Then at the push of a button have both valves open full. Then right after the two valves, the water ling converge to a single water ling that goes to a shower head. A the point where the two lines "mix", I will have a temp sensor like a tm35 or something similar bonded to the pipe using thermal epoxy or similar. It will read the temp and send that to an arduino which will reduce the HOT valve to maintain a temperature set by an up/down button on a panel near the shower.

Upon proof of concept, I would add saved presets for different users.

Further development would include selecting different shower head by way of manifold mounted solenoids.

I am a plumber/gas fitter and have to problem mounting the actuators to the valves, but as far as programming goes, I need help.

Thanks, I would love to make this happen. Cheers

I have been looking around the Internet and can't really find what I'm looking for

By that do you mean you have not found a project that you can copy?

The concept is right but the implementation is non trivial. It involves a feedback loop and you need the correct loop response. Too fast and it will oscillate and too slow and it take a long time to respond to external changes.
Basically you need a PID control system.

In essence yes. Most of the time when you need a device to make some roll you simply need a wheel, no point in trying to reinvent the wheel, it's already been done, just adapt it to your purpose.

I mentioned that I am a newbie to this so looking for an existing project seemed logical.

I have seen a mention or two of pid control, sounds good. Where do I start? Just because it sounds involved is no reason to abandon the project.

Where does one go to learn all about this pid control ?

Where does one go to learn all about this pid control

Well googling
arduino pid temperature control
is a good start.

michaeli:
Hey there,

I have been looking around the Internet and can't really find what I'm looking for, maybe I can get some help here.

Here is what I want to do. I want to have a stepper or servo motor directly coupled to a water valve on the hot and cold lines going to a shower. Then at the push of a button have both valves open full. Then right after the two valves, the water ling converge to a single water ling that goes to a shower head. A the point where the two lines "mix", I will have a temp sensor like a tm35 or something similar bonded to the pipe using thermal epoxy or similar. It will read the temp and send that to an arduino which will reduce the HOT valve to maintain a temperature set by an up/down button on a panel near the shower.

Upon proof of concept, I would add saved presets for different users.

Further development would include selecting different shower head by way of manifold mounted solenoids.

I am a plumber/gas fitter and have to problem mounting the actuators to the valves, but as far as programming goes, I need help.

Thanks, I would love to make this happen. Cheers

Can i suggest you look for a DS18B20 Stainless Steel on EBAY - this is a digital temp sensor that is encased in Stainless probe and can be inserted directly in the water stream - there is no point in having a PID setup and then measuring the temperature of the pipes and the lag between the change in temp of the water and that of the pipe will be significant and more so the longer the shower runs.

By inserting the probe in the actual water stream you will get a much more responsive feel.

I would also suggest that you look at inserting water flow meters into each pipe as this will give you a better idea of the flow rates and hence help you get the temp closer. Lastly i would also suggest you look at putting a seperate temp probe into each water stream - both the hot and cold as well as the combined - by doing this you can much more closely control the temperature and adjust on the feedback loop.

i.e. you know the hot water starts being delivered at 40c and ramps to 55c once the pipes are heated along the way - you know the cold water is coming in at 15c - you can have a simple table that will tell you where to set each solenoid/stepper motor to start with and then make micro adjustments from there

Craig

Checked out that sensor, looks brilliant.

Just wanted to link this producer here to show what it is exactly I am trying to do here. http://www.riobel.ca/Photo/Specification/9570C-WEN.pdf

This is what I want to make myself, as this sells for an amount in the thousands. And I don't have that.

So I figure I can probably make it myself, with some help of course.

I can see the whole process in my mind, just don't know how to do it with a micro controller and some servos to actuate valves.

I love the DS18B20 but in it's default configuration it takes almost a whole second to take each temperature sample at a resolution of hundredths of a degree F. The good news is, you can easily adjust the configuration to sample 10 times per second at 1°F resolution, which should be perfect for this application.

Since there is a potential here for human harm (scalding), please remember to enable the watchdog and take care that your code has failsafes and sanity checks (i.e., every loop(), do another check of the output temperature outside of and in addition to the PID loop, and shut things down if the temperature is excessive).

The "pressure balanced" noted in the 9570C-WEN.pdf is something to not overlook, too. A sudden pressure surge/sag from a toilet or washing machine could subvert mere temperature sensing by sending a larger volume of HOT water through the line before the temperature can be read and react to it.

JohnHoward:
The "pressure balanced" noted in the 9570C-WEN.pdf is something to not overlook, too. A sudden pressure surge/sag from a toilet or washing machine could subvert mere temperature sensing by sending a larger volume of HOT water through the line before the temperature can be read and react to it.

You're absolutely right. I'd highly recommend just using a commercial off-the-shelf pressure-balanced or even "dumb" (mechanical) thermostatic shower valve. (Dumb thermostatics, as I'm sure as a plumber michaeli knows, are widely available. Hansgrohe makes a really nice one -- their iBox is way cool.) Then use the Arduino + sensors + servo to turn the handle of the commercial unit.

Ok, this is starting to make way more sense then. I should use a cheap mixing valve which has a built in pressure balancing. Then use a servo to control that. This way I get the safety of a commercial mixer, under the control of arduino.

So where does a guy learn how to turn a servo one way for hotter, the other way for colder?

michaeli:
I have been looking around the Internet and can't really find what I'm looking for, maybe I can get some help here.

It might be just a question of getting the nomenclature right

http://www.ebay.com.au/itm/G1-2-Thermostatic-Mixer-Mixing-Valve-For-Bidet-Spray-Shower-Faucet-Tap-/111004455218?pt=AU_Building_Materials&hash=item19d8619132

michaeli:
So where does a guy learn how to turn a servo one way for hotter, the other way for colder?

How is the Arduino going to know what temperature it is trying to achieve?

(Is this going to involve some sort of waterproof manually-operated control in the shower cubicle, by any chance?)

PeterH:
How is the Arduino going to know what temperature it is trying to achieve?

(Is this going to involve some sort of waterproof manually-operated control in the shower cubicle, by any chance?)

A temp sensor right after the mixer would give feedback to the Arduino. I am thinking a regular pressure balancing mixing valve coupled with a gear reduced stepper motor could replace the normal handle. This way a simple control near the shower could remember user temp settings and maintain a prefect temp.

Ps, I know that is is not like curing cancer or solving a major need in the world, I just want to do it.

michaeli:

PeterH:
How is the Arduino going to know what temperature it is trying to achieve?

(Is this going to involve some sort of waterproof manually-operated control in the shower cubicle, by any chance?)

A temp sensor right after the mixer would give feedback to the Arduino. I am thinking a regular pressure balancing mixing valve coupled with a gear reduced stepper motor could replace the normal handle. This way a simple control near the shower could remember user temp settings and maintain a prefect temp.

Ps, I know that is is not like curing cancer or solving a major need in the world, I just want to do it.

I want to see you pull it off as i would then combine this with a time profile for certain small individuals (children) in my house to limit the length of their showers !!

Craig

If there was a flow sensor inline somewhere, water management is a poopssible feature also. Maybe even audible alarm indicating supply temp drop to inform you of impending cold shower.

The ideas are plenty. I want to start simple first tho, maybe ver 2.0 can have other features.

:slight_smile:

michaeli:
If there was a flow sensor inline somewhere, water management is a possible feature also. Maybe even audible alarm indicating supply temp drop to inform you of impending cold shower.

I don't think a flow sensor is necessary. As output temp drops, your servo will move the handle towards the hot setting to compensate. When your servo reaches a setting that's almost-full-hot, you can signal the user.

Good point. This is why collaborative discussions are great. Thanks

try this link https://www.instructables.com/id/Arduino-Compatible-Bathtub-controller/

Maybe in 5 more years I will have the technology to remotely reach out and shock people that ignore the dates on old threads.