An improved moisture sensor


An improved moisture sensor

Hello everyone
This is my first Comment/How-to hope you like it.

English is not my first language please help me improve if you notice grammar mistakes.

I needed a soil moisture sensor but the ones I can buy are not very resistant nor high quiality looking, at least not for what I intended so I decided to make an improvement because originally also I needed to measure temperature on the exact same spot where the moisture probe was going to be placed.

So... why not both in the same probe?

Tried to search something similar to my idea without succes, so it is time to build it!

Step 1:


  1. This kind of garden lamp its the best, the cheaper the better, we will only use the metallic pipe, the rest can still be used elsewhere.

Well, altough I said this kind of sensors were ugly the module sensor still works pretty fine so we will use one of them:

Pricing in US DLS, most of the items bought from AliExpress

1 Moisture sensor - Less than 1$

1 DS18b20 Water resistant probe - 2$

3 m. of 4 lines cable - 2$

An unused garden solar lamp - 2$ If you already have the stainless steel pipe that serves as a base for the solar lamp, thats all you need I bought mine form Walmart, otherwise you should consider buy stainless steel pipe.

5 centimeters long of stainless steel round bar (I used 4.5 mm in diameter) - 10$ for 3 meters


GX12 type connector of 4 pin - 2$

Step 2:


First we need to cut the stainless steel pipe from the solar lamp to the desired lenght, in my case I used one pipe for two sensors so cut in half resulting in 67 mm long.

The other thing we need to cut is the stainless steel bar (the one 4.5 mm in diameter) 50 mm long

I used a moto tool with cut disc for the Pipe.

Step 3:

Dissasemble the DS18b20 probe sensor

  1. We need to remove these plastic between the cable and the metal

Lets disassemble the Temp probe, but we need to be careful because I have encountered that some of this waterproff probes aside from the plastic that's between the metal and the plastic to keep the together they add Epoxy inside the metal probe to keep the DS18b20 inside and isolated, these cant be used for our goal.

Use some cutter knife to remove the plastic and the sensor will come out smothly, just be careful not to cut yourself.

Step 4:

Make some notch

We need some way to use the pieces of metal that we already have as electrodes for our probe so we will adapt them, simply make a cut with the moto tool in the metallic bar near the end of it, just be carefull not to cut trough.

For the Temperature probe we will use the one obtained from the DS18b20 water proff probe.

In this case we will only cut half way trough.

See the photos.

Step 5:

3D print a guide

I printed the guide for both electrodes to fit inside the pipe, the file is atached if it helps.

Insert both electrodes from the end we previously made the cuts into the 3D printed part.

It should fit with the help of a few hammer hits.

The result should look like the ones in the pictures.

Everything should fit nicely.

Step 6:

Put everything togheter

Solder everything as shown

The electrodes should be connected with wire around the one solid (the one that is only metal) make a ring of wire around the round cut we did, then solder it like if it was a ring, the more thigh the better connection and less failure. The tin solder should fill all the space left in the notch where the wire is wraped.

Do the same for the electrode that fits the DS18b20, but instead of wrapping it around, get the wire trough the notch we cut.

The red wire of the DS18b20 to the VCC of the module

The black wire of the DS18b20 to the GND of the module

Make sure the DS18b20 is isolated before siliding it inside.

Isolate everything and make it fit inside the stainless steel pipe.

Step 7:

Almost done

There is still some work left

I will fill the inside of the pipe with epoxy resin.

You can test it via arduino, I attached some example you can use in Arduino.



Add a Comment

Sign in to comment.