# How can I seal a temperature sensor against water?

I have some DS18B20temperature sensors around and was wondering how can I seal them and use them in a water tank. The sensor must include a small resistance (140 k or so).

Is there a simple DIY way to do it? it need to be something with a small thermal resistance/capacity.

• Since You asked for DYI solutions I'll just add as a comment. the best solution would be parylene, very thin, very high quality film (30 KV withstand), low thermal mass. V expensive and hard to handle in a DYI environment. – placeholder Feb 25 '13 at 0:36

There are some DIY options along the lines of potting and conformal coating:

1. Conformal coating. Attach your sensor assembly to the end of the wire. Dip the assembly into epoxy. Let it cure. Dip and cure several times to avoid leaks through the defects in the epoxy. Consider using the type of epoxy, which is used for boats; not all epoxies are water-resistant.
2. Same as 1. but with silicone instead of epoxy. RTV silicone can be used for this.
3. Same as 1. but with urethane.
4. Same as 1. but with thermally conductive epoxy.
5. Potting. Attach your sensor assembly to the end of the wire. Put the sensor assembly inside of the metal tube (copper or aluminium). Fill the inside of the tube with heat sinking grease for better thermal conductivity. Seal the tube with epoxy.
6. edit: Heat shrink. I'll second the other respondents, who have mentioned heat shrink. It can be simple heat shrink filled with glue. The are also specialized heat shrink tubes lined with adhesive and/or wax.

DS18B20 comes in IC packages (TO-92, and others), which are made of epoxy. By itself that introduces thermal resistance. If having a small thermal mass and resistance is paramount, consider using a different sensor such as a thermocouple, thermistor, RTD, diode sensor in a metal case.

I'd vote for glue-lined heat-shrink.

Alternative, if you can live with making holes in the tank or not fully submerging the sensor, would be to use automotive engine coolant temperature sensors - these, by definition, are sealed when screwed into a hole in the engine block with coolant flowing past. The external connector is not always guaranteed submersible (but many are, modern GM stuff uses AMP/Tyco weatherseal connectors for example) but they can be sealed easily enough, and the sensors are very robust, designed for high temperature, chemicals/oils, vibration, etc.

I've had success with heat-shrink tubes filled with Loctite ECL30 epoxy, reinforcing the ends with adhesive lined marine heat shrink tubing. Loggers built with sensor chains of DS18b20 sensors have survived more than four months at 10m depth.

The epoxy is a bit gooey to work with & the trick is filling the HS tubing with one end sealed first, and then using the contraction of the tubing itself to squeeze the bubbles out as you work towards the other end. More details on the process here.

I have actually done just this with a DS18B20 TO-92 sensor I used in a DIY etching tank.

I used some clear PVC tubing for it and the wires, then filled the area around the TO-92 package with some clear silicone, then epoxied the end of the tube to seal it. I then epoxied the tube to the bottom of the etching tank and ran the tube through an epoxied hole in the tank to a PIC16F that is used for controlling the heater/LCD/buttons.

It's worked just fine having been submerged in Ferric Chloride for over a year.

• Off-topic question; how often do you change the Ferric Chloride solution? – abdullah kahraman Feb 25 '13 at 9:35
• @abdullahkahraman - I rarely use it nowadays, but IIRC, I would change if whenever the etching time increased by around 50% or more. So for example when it took longer than 7-8 minutes (with fresh solution, etching times are around 5 minutes in this tank) – Oli Glaser Feb 25 '13 at 10:26

I've used a heat shrink tube and some hot glue. That worked very good.