How to make your own water level sensor for hydroponics. Getting ready for automatic water supply using solenoid valves.

We are going to try hydroponics using PVC pipes on one wall of the room.
The water is stored in a water tank and circulated through the PVC pipe by a pump, but as the vegetables grow and evaporate naturally, the amount of water in the tank diminishes (I haven’t reached that point yet, but…).
(I haven’t reached that level yet, but…) To prevent moss growth, the water tank is covered with a light-shielding aluminum sheet, so you can’t see the amount of water in the tank at a glance.
In such a case, it would be nice if there was a system to automatically supply water as the water level decreases.

A water level sensor is necessary for the automatic water supply system you dream of.
You don’t need it yet! If you say, “You don’t need it yet!” that’s as far as I’ll go, but since I’m going to go out of my way, I decided to make one myself.
The materials needed to make the sensor are quite expensive, but each part is pretty cheap, so I think you can make it yourself at a reasonable price.
To watch the video, click on the link below.

Here you go.

Prepare the parts necessary for making your own water level sensor.

First, let’s prepare the materials.
Water level sensor module

KK moon 9V-12V AC/DC センサモジュール 水コントロールモジュール 水位検知センサー 排水ポンプ水コントロールモジュール 液体レベルコントローラー
There seem to be many types of water level sensor modules, but I bought this one because I felt like I could use any of them.
Electrician’s Pliers
These are used for stripping plastic cords and wires, and for snapping terminals on copper wires.
If you’re doing electronics work, it’s a good idea to have one.
I bought mine at Home Depot, and they are the same electric pliers as in the link.
AC adapter and DC jack cable
This product itself is very cheap, but it takes a long time to arrive, probably because it is shipped directly from China or something.
You might want to buy a few extra so you can use them when you get the urge to make your own.
Various other things
There are many other things you can do, but you should be able to find most of them at a home improvement store.
You can buy male plugs, female plugs, bar terminals, ring terminals, insulation caps, vinyl cord, wire, bolts and nuts, etc., depending on what you want to make.

Process the vinyl cord so that it forms a T-shape.

The white female plug on the left of the picture is connected to the device you want to turn on and off depending on the water level, and the white male plug on the right is connected to the outlet.
Let’s modify it so that it looks like this.

Split the vinyl cord.

Cut the vinyl cord to the appropriate length and split it to the left and right.
Make a “split and united” cord that is about the same length as the cord stretched to the left and right.

Peel off the vinyl cord sheathing.

We will use electric pliers to strip the cord insulation.
Strip the cord in six places: two on the left, two on the right, and two on the bottom.
It can be done with scissors or cutters, but it’s a pain.

Clamp the ring terminal to the copper wire that came out after peeling.

Peel off the coating to reveal the copper wire.
Insert the copper wire into the ring terminal and tighten it with electric pliers.
The ring terminals are just for easy connection to the male and female plugs on the left and right sides, and you don’t need them to twist the copper wire.

Screwing the ring terminal to the plug

Put the plug screw in the hole of the ring terminal and tighten it as you go.
Connect both the left and right plugs and put the lid back on.

Attach the bar terminal to the water level sensor connection.

Slightly split the vinyl cord on the bottom side to make a two-way connector.
As with the ring terminals, put a stick terminal on each copper wire and put an insulating cap on the terminals to prevent them from touching each other.
If the copper wire is stranded (a bunch of thin copper wires), it is likely to come loose when connected to the water level sensor, so I decided to use a bar-shaped terminal this time.

Connecting the processed vinyl cord to the water level sensor

Connect the vinyl cord to which you just connected the stick terminal to the number 2 and 3 of the water level sensor.
The screws are small, so I used a precision screwdriver to tighten them.
I wonder if there is such a thing as which one to plug into which.
In my case, I plugged the cord extending from the male plug side into number 2 and the cord from the female plug into number 3, and it worked fine.

Connecting the colored wires to the water level sensor

Attach the wire sensor, which measures the water level by placing it directly into the water, to the blue part on the other side of the vinyl cord.
For each color, all you have to do is strip off the coating of the part to be connected, and attach the stick terminal and insulation cap, so the work is the same as for the cord.
In the picture above, the black wire indicates the lowest water level, the red wire is the highest water level, and the yellow wire is the junction to start feeding power to the device or not.

Connect the AC adapter to the DC jack cable and connect it to the water level sensor.

Attach a stick terminal and an insulating cap to the end of the DC jack cable as shown in the photo above so that it can be connected to the water level sensor.

Plug the DC jack cable into the photo area.
The water level sensor itself will be powered by this AC adapter.

I drilled holes in the plastic case to fix the main unit.
I also drilled holes in the side of the case and threaded the various cables through.
I’m sure I’m explaining how I fixed it quickly, but this was the hardest part of the whole process…

Creating the sensor part, connecting the devices and checking the operation.

Create the sensor part that is actually put into the water.
The part that senses the lowest water level is the longest straw, the junction where the power supply starts is in the middle, and the line that stops the power supply is the shortest straw part.
Pass each wire through the mouth of the straw and leave the tip of the stripped wire sticking out from the end of the straw.
Now let’s check the operation.
Plug the AC adapter, which is the power source for the water level sensor, and the male plug of the vinyl cord into the outlet.
Connect the female plug of the vinyl cord to the male plug of the device you want to move depending on the water level.

Let’s put the wire sensor into the water.
It is a little difficult to see in the picture, but the black and yellow wires are submerged in the water.
The tip of the yellow wire in the middle, which is the branch point, is submerged in water (indicating that the water level is not decreasing), so the rear light is not being powered.

I lifted the sensor by hand.
The sensor is usually fixed in place, but since this was an energized experiment, I didn’t mind.
I lifted up the sensor by hand, that is, I intentionally made the water level low, but as soon as the yellow wire, which is the junction point, came out of the water, the power started to flow and the light came on.
As soon as the yellow wire, which is the junction point, came out of the water, the power was turned on and the light came on. When the yellow wire was submerged again in this state, the power remained on.
When the red wire, which detects the highest water level (overflow prevention), is submerged, the power stops.
The plan for the future is to connect the male plug of the solenoid valve connected to the water supply to the female plug of the vinyl cord, and sink the wire sensor into the water tank.
The end of the hose of the solenoid valve is inside the water storage tank, and when the water level in the tank drops below the middle of the wire sensor, the solenoid valve will open and water will be supplied automatically.
The water level in the tank rises as the water is supplied, and when it reaches the top sensor, the water supply is stopped… It’s very dreamy.
At this point, the water level sensor has not been used yet, and I feel like I’m getting ahead of myself, but I’m happy to say that I succeeded.