I’ve been working on creating a combo automotive oil and air temperature gauge, and in the process have found a need to adapt the TO92 size sensors such as the 18B20 and Temp36 to the Arduino. I had the idea to house them in existing brass automotive sensors. A very common unit is the 1/8 NPT with one or two terminals on top. In my case, I needed one for a 3/8 NPT opening. Here’s what I did, and I’ll attach some pics to show progress.
I cut of the terminal end of the 1/8 sensor and used a drill to gut it. The sensor part is about 8mm OD or 5/16". A TO92 will easily fit inside with room to spare. These sensors can be had new on eBay for around $5.
One thing I noticed was that the sensor tip on these is generally too long to place in a smaller diameter fitting, such as a 1/8 tee. To deal with this, I measured the existing fitting and then calculated an optimal length so the sensor would be in the flow but not overly obstruct the flow. Using a 1/8 pipe plug, you could drill it out to .250" and insert a brass rod. McMaster sells these reasonably priced. I calculated the center hole at 5mm for just the sensor. The remainder of the hole could be larger to accommodate the wires and heat shrink. The optimal length I found for these was .875".
For the 3/8 sensor, I cut off the 1/8 sensor and turned down the hex with a file using my drill press to spin the sensor. It was a great fit into a 3/8 NPT plug. These can be found online or at a local auto parts or hardware store. I used some silver solder and a propane torch (see pic) and it withstood over 100 PSI using my air compressor. This could also be shortened as needed. I estimate an optimum length would be about 1.125".
While I did not make a 1/4 NPT unit, it would not be difficult to buy a .3125" brass rod from McMaster, drill it as detailed above, and then silver solder it to the plug. Optimum length was estimated at 1.065".
I think pipe bushings could be used for this as well, you’d want the next size up- such as 1/4 to 1/8 for a 1/4 sensor.
The other pic here is the 3/8 sensor housing, a 1/4 to 1/8 NPT bushing, and the gutted 1/8 housing with 18B20 inserted.
I used an 18B20 and some 22 gauge automotive grade TXL wire I bought on eBay. I would not use low-quality wire here, as automotive grade is made to take the heat in an engine bay. I soldered three wires to the sensor, and used some small diameter heat shrink (see pic). I then slipped it inside the cut off 1/8 housing. The heat shrink held it in place. I plan on sealing the assembly with either some RTV silicone or JB Weld. I’m going to add a short piece of Viton o-ring above the sensor to keep any sealant from getting into the tip. Another possibility would be to apply the RTV and let it semi-set, then place it in the housing. The goal of course is to not have any sealant between the sensor and the housing.
With the wires being outside the sensor, it would be easy to solder in a resistor if one were needed, and then seal everything up. I also experimented with placing a resistor in the sensor and while it could be done, I think external mounting would make more sense and allow for a change if needed.
While I don’t plan on using the 18B20 for my oil temp due to limited upper range, it did better than expected. It specs at 85 C or 185F, with a high temp version good to 125 C or 257F. I tested it using a breadboard with basic temperature sketch and soldering gun to heat the brass housing. It stopped responding at 262.29F. I then allowed it to air cool for a minute and placed it in some ice water. It dropped to about 43 degrees in under a minute.
I’ll try to post updates as I make more progress on this idea.