water temp sensor for PVC pipe

I need to sense approximate water temperature flowing in a PVC pipe, usable in a temp range that includes about 60F - 100F. I'm aware of the simple and inexpensive TMP36 temperature sensors, and I suppose I could glue one directly onto the pipe and insulate its wires from the elements. But this will involve the control of a pool pump used with rooftop solar water heater collectors, basically providing a way to turn off the pump if the water is already at an acceptable temp.

It would be best if I could find something that I could screw or glue into a hole drilled into the pipe, so that it would directly be sensing the real water temperature. Most of the sensors I find like this at reasonable prices (like $10 USD or less) are for automotive use (radiator water temp or oil temp). The problem there is that most of these are intended for temps above 140F. I need to measure temps more in the range of measuring human comfort. Any product suggestions much appreciated.

It's only a pool pump, and I suspect you are looking for a complicated solution to a simple problem.
It should be quite sufficient to bond a DS18B20 to the exterior of the pipe in a blob of silicon, and have a length of insulation over it. The latter is as much for security as anything else. A thermistor would probably suffice, but I think the DS18B20 is easier to use, particularly if, as is likely, you want more than one.

There are plenty of waterproof DS18B20 sensors on ebay. The catch is they are not threaded. On the other hand you can also pick up a thermowell which is threaded. Then either stick the prefab DS18B20 in it or purchase the bare sensor and wire it yourself.

For approximate temperatures (with a slow response) just attach to outside of PVC pipe, then insulate that
section of pipe with pipe insulation. Even with approximate you should have good repeatability which is probably
all you care about.

For more accuracy/speed use a short section of metal pipe, again with sensor and pipe run insulated.

For best speed and accuracy use a section of copper pipe and a thin-film thermistor element glued to it,
that should have a sub-second time constant. A TO92 encapsulated sensor is speed limited by the thermal
mass of the housing and lead-frame.

adwsystems:
There are plenty of waterproof DS18B20 sensors on ebay. The catch is they are not threaded. On the other hand you can also pick up a thermowell which is threaded. Then either stick the prefab DS18B20 in it or purchase the bare sensor and wire it yourself.

@adwsystems - Thanks! I hadn't seen those DS18B20 units that already come mounted in a metal tube! Thanks. Some look better made than others, but I think even without the threads I could make one of those work. I'll only be dealing with about 30PSI at most (maybe some higher short surges), so I'll bet a reasonably close fit hole with a bead of silicone all around would work. Plus, it seems it would be removable/replacable without too much fuss.

MarkT:
For approximate temperatures (with a slow response) just attach to outside of PVC pipe, then insulate that
section of pipe with pipe insulation. Even with approximate you should have good repeatability which is probably
all you care about.

For more accuracy/speed use a short section of metal pipe, again with sensor and pipe run insulated.

@MarkT - Thanks. I'm a little leery about how well a sensor just mounted to the outside of a PVC pipe would work. And these pipes are usually either 1-1/2" or 2", and I don't think I've seen pipe insulation for pipes that large. Plus, replacing a section with a piece of metal pipe is a major undertaking, and definitely not an inexpensive solution in either time or money.

Good grief, Peter! Bubble wrap makes wonderful insulation. Cover it with tape to pretest from UV.

Paul

There is also a thermal inertia. On other words you may never measure the current temperature, but a past one. The response time of the sensor adds to the inertia of the material on which is mounted (copper, PVC whatever).

You may either calibrate the sensor to calculate current temperature from the measured one, or feel happy with what you get.

You may experiment using the sensor, a piece of pipe, warm water and a alcohol thermometer.

I think you may reduce the inertia by helping heat to dissipate by wrapping (generous) copper stripes before and after the section of the sensor. And use processor heat conductive oil (the one used to fix the radiator to the processors in desktop PC) to fix the senor to the pipe.

PeterPan321:
I don't think I've seen pipe insulation for pipes that large.

You clearly haven't been looking hard enough but wrapped packing foam will suffice, fits any diameter, and absolves you from buying a long length of the real thing. Having the sensor on the outside of the pipe is common practice.

I appreciate everyone telling me ways to simply attach a sensor outside the pipe and insulate it. The idea of not having to cut into the pipe sounds nice. But on the other hand, even though this is a DIY arduino project for my own use right now, I like to consider ways to make things so they could be actual reliable products, and try to learn from what other companies are doing. So far, all of the companies I found doing what I'm planning all seem to embed sensors in the actual moving water, with a sensor like the DS18B20 units already recommended (probably better ones). None of them measure the temp on the outside of the pipe.

There must be a good reason. Maybe several. But most companies want to save time and money too, and I think it pays to consider whats been proven to work for a given application. It could be because the thick walled PVC pipe used with pool pumps conduct the heat poorly, it could be because mounting on the outside might be too susceptible to false readings, for example if the area of the pipe with the sensor was sitting out in the Florida sun in mid summer. Or, it might just be that the installation might look ugly. I don't know.

PeterPan321:
I like to consider ways to make things so they could be actual reliable products,

And you're the guy that said
".... I'll only be dealing with about 30PSI at most (maybe some higher short surges), so I'll bet a reasonably close fit hole with a bead of silicone all around would work........."

I think it pays to consider whats been proven to work for a given application.

And you might start by considering what is practical - along with what you really need. A good place to do that will be a pool heating installer's catalogue. You can get DS18B20s that screw in for wet application, along with several other types that may be quite practical for the pipe sizes you are using, but I think you will find they are all metal thread and you will be faced with cobbling up something in order to fit it into PVC. Good luck with finding an off-the-shelf adapter, but they may be around.
Another option is to use thermowells, again a common practice in industry, but I have never known of one for installation in PVC, and I guess the same problems apply. I never found a thermowell suitable for DS18B20 so I made my own out of copper and brass. This made some sense as it is for 20mm water service at 120psi. I made four. Only one is actually in service, as having the sensor on the outside as described clearly works just as well.

Nick_Pyner:
And you're the guy that said
".... I'll only be dealing with about 30PSI at most (maybe some higher short surges), so I'll bet a reasonably close fit hole with a bead of silicone all around would work........."And you might start by considering what is practical - along with what you really need. A good place to do that will be a pool heating installer's catalogue. You can get DS18B20s that screw in for wet application, along with several other types that may be quite practical for the pipe sizes you are using, but I think you will find they are all metal thread and you will be faced with cobbling up something in order to fit it into PVC. Good luck with finding an off-the-shelf adapter, but they may be around.
Another option is to use thermowells, again a common practice in industry, but I have never known of one for installation in PVC, and I guess the same problems apply. I never found a thermowell suitable for DS18B20 so I made my own out of copper and brass. This made some sense as it is for 20mm water service at 120psi. I made four. Only one is actually in service, as having the sensor on the outside as described clearly works just as well.

The thermo-wells seem kind of pricey. Though they obviously offer the convenience of being able to remove the sensor in a pressurized system, right?

A threaded fitting just seems like something that would fit tighter. It may be just optimistic thinking, but it seems to me that if I could find a sensor that already had a screw in-thread, I ought to be able to find a drill size tight enough to use as a starting point, and use a tap if I had to to make the threads. But I've not found any like that so far, so if you come across any DS18B20s in threaded mounting cases, wired and ready to go :-), please let me know.

I appreciate your obvious experience. I WILL try and see what the pipe outside temp is, and how it changes with the day. My gut tells me that given the environment of our radiant sub tropical sunshine, the temp on the outside of the pipe might be deceiving. But I may be over thinking it. :slight_smile:

PeterPan321:
The thermo-wells seem kind of pricey. Though they obviously offer the convenience of being able to remove the sensor in a pressurized system, right?

Correct. It's the way the big boys play the game. I guess one reason for their price is that they are typically one piece casting with close machining, and thin walls around the actual well.

A threaded fitting just seems like something that would fit tighter. It may be just optimistic thinking, but it seems to me that if I could find a sensor that already had a screw in-thread, I ought to be able to find a drill size tight enough to use as a starting point, and use a tap if I had to to make the threads. But I've not found any like that so far, so if you come across any DS18B20s in threaded mounting cases, wired and ready to go :-), please let me know.

As I said, threaded DS18B20s exist. They are about six times the price as the normal metal encapsulated ones. You can get PT500 sensors with 1/4BSP for about $5, but you are still faced with screwing metal into plastic pipe. I have installed PTs at two sites but I just don't think they are worth using when you have DS18B20s, and they just serve as expensive plugs.

My gut tells me that given the environment of our radiant sub tropical sunshine, the temp on the outside of the pipe might be deceiving. But I may be over thinking it.

I'm sure you are doing exactly that. The temperature of the pipe reflects the temperature of the water flowing through it. Your hand should tell you that. If the water is picking up or losing ambient heat through the pipe, that is a legitimate part of the system and should be measured anyway. The sealant ensures decent thermal transfer, the most important thing is keeping air out of the game. The insulation over the union protects against moving air and radiant heat. I have used PC heatsink compound Arctic Cooler, but I submit that ordinary silicon goo is quite sufficient and has better adhesive qualities.

From my (limited) experience, in practice things are different from the paper plans in thousand different ways :-).

Myself I always work in steps. So, first I would buy any cheap sensor I can find (a thermoresiztor may suffice). Then actually put it on the pipe, fix it with duct tape, write the code and start varying the water temperature.

PeterPan321:
The thermo-wells seem kind of pricey. Though they obviously offer the convenience of being able to remove the sensor in a pressurized system, right?

That depends on your definition of pricy. Is $8 pricey? $8 thermo well ($14 inc S&H)

Nick_Pyner:
threaded DS18B20s exist

Do you have a link to any? I found three on eBay a few years back and haven't found any since then. I've taken to making my own, but they don't seal or read the temperature nearly as well as the pro fab versions.

adwsystems:
I found three on eBay a few years back and haven't found any since then.

They are probably the ones I was alluding to. I quickly lost interest, particularly in the light of the price, as I would have had to make up a fitting for them. In that event I might as well make a thermowell, get exactly what I want, and use the sensors I already have.

Nick_Pyner:
They are probably the ones I was alluding to. I quickly lost interest, particularly in the light of the price, as I would have had to make up a fitting for them. In that event I might as well make a thermowell, get exactly what I want, and use the sensors I already have.

Thanks again. While my project has some controlling strategies I believe are unique, adding a cutoff feature for water temp is actually an add on to my project, basically to include the strategies existing products are using in addition to my own. So I'm going to have to do a little investigation to see exactly what these other companies are using for that functionality. At the very least it will "set a bar", so to speak, so I know what expense and quality others have used. Or, thinking optimistically, it may clue me in to an existing part or mounting method I had not even considered. :slight_smile:

Nick_Pyner:
I'm sure you are doing exactly that. The temperature of the pipe reflects the temperature of the water flowing through it. Your hand should tell you that. If the water is picking up or losing ambient heat through the pipe, that is a legitimate part of the system and should be measured anyway. The sealant ensures decent thermal transfer, the most important thing is keeping air out of the game. The insulation over the union protects against moving air and radiant heat. I have used PC heatsink compound Arctic Cooler, but I submit that ordinary silicon goo is quite sufficient and has better adhesive qualities.

hmmm... then maybe one of these might be wroth experimenting with?

https://www.ebay.com/itm/121098644409?ViewItem=&item=121098644409

Thermistors are pretty easy to work with, though I'd feel better if it had coax cable to reduce AC pickup, I'm sure I can filter it out. It might not be the final thing I'd use if I ever try to productize my project, but it seems this would offer the possibility of either strapping it to the surface with a simple ZIP tie, or screwing it into the pipe with a copper plated screw and washer, and a dab of silicone, to directly compare the difference with the direct water contact added. Thoughts?

PeterPan321:
Thoughts?

Not many favourable ones....
This is a digital world and a thermistor is an analogue device. About 90% of the cost of this one is in the packaging, and so the price advantage evaporates. The advantage of having the sensor dry is in not having to cut the pipe, so considering sinking a screw into plastic rather defeats the purpose, and I would install it in the same way as I would an DS18B20.

There is some personal preference here, but I would need some pretty persuasive reasons to take a thermistor over a DS18B20, and the advantage of thermistors is that they are supposed to be cheap, so idea of paying more money for it as well is faintly absurd. In the unlikely event that I would use a thermistor, it would be a thin film one.

The metal encapsulated DS18B20 comes with up to 5m of shielded cable, and they can be extended with suitable cable. I don't know if cable is critical with thermistors.

If you want the intellectual exercise in comparing dry with wet sensors, far be it for me to disparage the idea, but this is just a pool system and I can't see the need to do that. It is not as if you have a great mass of PVC to measure through. Standard DWV50 pipe is 2mm wall thickness, and I imagine the stuff you would use is about the same.

Nick_Pyner:
It is not as if you have a great mass of PVC to measure through. Standard DWV50 pipe is 2mm wall thickness, and I imagine the stuff you would use is about the same.

This pipe is about 3.7mm for the 1-1/2" type, and about 4.1mm for the 2" pipe.