Introduction: Water Path Selector

About: I am an electrical engineer graduated at Budapest University of Technology and Economics. Besides my work I also like to do simple DIY electrical projects at home and I decided to share these projects with the…

In my apartment I have some plants on the balcony in separated flower pots, and I decided to make an automatized watering system for them. The idea was to be able to water them separately based on the moisture of the ground in the pot, since these plants like different amount of water.

To realize my idea I need as many moisture sensors as many pots I have, I can not spare with them. But I can save money with the water pump, one pump could satisfy my expectations. So the question is:

How can I use only one water pump to water my plants separately?

For this idea I definitely need an electrically controllable device, that makes able to change the path of the water. I haven’t found such a device for this purpose yet, and I don’t even know how to name it. So let’s call it Water path selector, since it selects a path for the water. But how could I create such a device?

Supplies

  • 3D Printer
  • Mini Water Pump
  • Rubber Band

For first design:

  • ~0.2 mm Copper Wire
  • 8x2 mm Neodymium magnet

For second design:

  • SG-90 Micro Servo

Step 1: Concept

So the problem is given. I need a device (or more), that has one input on that the water comes in, and as many outputs as many plant pots I have. It makes able to control the path of the water, by electrically selecting one output from many, on that the water will go out. This way I will be able to select a plant (that actually needs water), and watering only that one. If more plants need water at the same time, others can wait some seconds :).

Somehow I have to make free only one path of the water, and block all the others, so I need something that is electrically movable.

Idea 1: My first idea (1st image) was to use a small magnet, and move it with electromagnets. Although it worked and looked much more scientific, but had some limitations and was not so cheap if I wanted to have many outputs. But if you need to have only a few outputs (2 or 3), it might be a good choice.

Idea 2: My second idea (2nd image) was to use a small micro servo. It could rotate a 3D printed shape, that allows to flow the water in one direction only, and blocks other outputs. Above of that it is cheap, easy to control and makes able to provide multiple outputs with only one servo. Besides the micro servo I don’t need any special component, only a 3D printer.

Since my first idea has some limitations and is not so cheap, I will introduce it in short first. I also made a video for that, which contains a step-by-step guide. My second idea has more possibilities and is easier to create and control, so I describe it in details after that. But the creation steps are similar for both ideas.

The original plan that requires these components, the automated watering system is not done yet but I’m sure that I will introduce it in another post as soon as I finish it.

Step 2: From Plan to Reality

Draft on paper

For me it always helps to create a draft on paper before I start to design anything. Measure all the necessary sizes and record them on the paper. This way you don’t have to measure and calculate during design phase again and again. It doesn’t matter if the scale factors are not so precise, the goal is to know what you need exactly at the end. It will be much easier to design it with a CAD software based on the draft.

I made a draft on paper for both versions. Although they are not professional plans, I will show and introduce them shortly below.

Modeling in Fusion 360

To create a 3D model I used Fusion 360. It is a great software to design any 3D model to print, but it has many other features too (e.g. simulation). Although, I used it only for modeling until now, I am totally satisfied with it. It is easy to learn, there are many supports on the web (including tutorial videos), and it helps a lot during the design phase. So I can recommend it.

I made a 3D model for both versions in Fusion 360 software. I will make a step-by-step guide below for the second idea only, but I share both project files.

3D Model Slicer

To make the model printable for to 3D printer, you will need a slicer tool. I used Ultimaker Cura slicer for this purpose. When you design a model that you want to print, it is very important to take care from the beginning that it should be easily printable. So you have to think about the followings at the beginning:

  • How many parts does the model consist of.
  • How will you hold these parts together.
  • Which side will be the bottom of the part when printing it.
  • Printing quality, precision (noozle size, layer height).
  • Type and direction of forces that the component have to endure during normal usage.

3D Printing

I have a Creality Ender-3 3D printer that I used to print my components. My experience is that you will have to spend some time with your 3D printer before having the first good print. You have to know a lot of parameters your printer have, that will affect the print quality at the end. You also have to keep in mind these settings and calculate with them during design phase.

Step 3: My First Idea - Draft, Proof of Concept

The main idea was to create a device that has one input and branches to two outputs. It contains a small magnet too, that can move inside and block one or the other output. The movement of the magnet can be controlled with electromagnets. I planned to have one electromagnet located on each side, and they will exert a force in the opposite direction during contol. This way one electromagnet will attract, wile other will repel the permanent magnet at the same time. With 2 electromagnets I can double the force that will be distributed more homogeneously.

To achieve such control I have to take care on the direction of rotation and the current flow in the coil. It will define whether one electomagnet attracts or repels the permanent magnet. Since I used the same copper wire for each electromagnets the current flow is fix, I had to play with direction of wire rotation.

But before I started to design the final idea, I made a prototype version for proof of concept. This way I was able to calculate some parameters for the final design, like followings:

  • How many turns do I need from copper wire on electromagnets.
  • How far should I place the electromagnets.
  • And the main question: Does it even work? Yes, it worked.

Screws will have more purpose at the same time:

  • It will hold the different parts together.
  • It will enlarge the magnetic field around the coil.
  • It will attract and hold the permanent magnet when coil is not driven.

One more important thing that I wanted to have is the expandability. Since one device could have 2 outputs only, I designed to be the input and one output compatible, to be able to connect 2 or more devices easily together. But unfortunately if you need to have N outputs, you will need N-1 devices, which is not so efficient.

Step 4: My First Idea - Design

I designed this model also in Fusion 360, and planned to make it from 2 main parts. The bottom part branches the path of the water, and contains a hole where the permanent magnet fits exactly. When the magnet moves, it will cover one or the other hole. The top part contains the 2 outputs and holders for the coils on the 2 sides. I used the same trick with the rubber as before to stop the water leak at the join of 2 parts.

I already upgraded these parts since the draft version, so they looks a bit different. I attached these new 3D model files, so you can download them.

Step 5: My First Idea - Result

Although the design worked well, it has some limitations compared to my next idea that I will introduce more detailed. This device is able to branch the input to two outputs only, and if you need more outputs, you need to have multiple devices. Unfortunately the control of the component is not so easy as well, since it needs a H-bridge to be able to change the direction of the current.

Based on these limitations above, I decided to think about an other solution, that is much more easy to manufacture and control.

Step 6: The Second Idea

Draft on paper

The plan was to create this component from 3 separated parts: bottom, top and a rotary part between them. The bottom part contains the connectors for input, outputs and a cylindrical hole in the middle. This hole will hold the rotary part that is connected to the micro servo. By rotating this element in the hole, it will enable water to flow out always on one output only. Above of these parts comes the top piece, that covers them and holds the servo in a stable position. To keep these parts together I used 4 screws.

Sizes

The size of input and output connectors were given, they will have the same size as the connector on the water pump: 5 mm inner diameter, 7.4 mm outer diameter, and 10 mm length.

I wanted to have 5 outputs, since I have 5 plant pots currently. This 5 output holes shall comfortably fit on one quarter of a circle. It is because if I use the outermost output, the rotary part shall not block the input (only other outputs). It also means that these holes will be 90° / 5 = 18° from each other.
So if I place these outputs ~7.5 mm far from each other, and they are located within one quarter of the inner circle, the radius of this circle should be at least: r = (5 * 7.5 * 4) / (2 * π) ≈ 24 mm.

The size of the rotary part is 0.2 mm less from each direction, to prevent it to be too tight. To heave enough space for screws, the device will be 58 mm width and at least 58 mm long. Although it will be larger because of the circular shape on the side, where outputs are located. To have enough space between the connectors, I planned to locate them on a circular side with 36 mm radius from the center.

The size of the servo and the screw are also given and the most relevant sizes can be seen on the image. Some sizes are unknown during this paper work, but they will be calculated by the CAD software based on constraints.

Step 7: 3D Modelling - Bottom Part - Base

The base of the part can be created from a rectangle and an arc which center points are the same. I fixed the size of the rectangle, the radius of the arc and used the Coincident constraint for the endpoints of the arc. After that I removed the unnecessary lines and extruded the shape by 2 mm. The component doesn’t have to be too resistant, so 2 mm thickness is enough.

On the top of this body I created a sketch with 2 circles. The smaller one will hold the rotary part in a stable position, its diameter is a bit larger then the screw for the servo, 3.6 mm. The larger circle will be the base of the hole in the middle. Its diameter is 48 mm as I calculated in a previous section. After that I extruded the smaller circle by 1 mm, and the outside of the larger circle by 10 mm. It will be the height of the inner area, where the rotary part will rotate. It could be smaller, but shall be at least 5 mm as the diameter of the pipes.

Step 8: 3D Modelling - Bottom Part - Pipe Connectors

The input and output pipe connectors will be located at half of the height of the created hole, therefore I created a Midplane construct for this purpose. To create holes in the base body, I created 5 + 1 lines on a sketch, that starts from the middle point and ends at the edge of the base body. Fix the start point and the angle, and use the Coincident constraint on the other end of the line. After that I used the Pipe tool to cut 5 mm (inner diameter of the pipe) holes from the body around these lines.

To create the connectors that will hold the pipes I used the Revolve tool. I made the profile and the axis on a sketch in the middle and revolved it with 360°. I used these sizes, because my water pump has the same sizes to hold the pipe. As a next step I moved/rotated the newly created body as a copy to the position of the other holes as well.

Step 9: 3D Modelling - How to Prevent Water Leak

To prevent the leak of water from the component, I used a rubber band between the bottom and top component. To hold these parts and the rubber in a stable position, I created an edge around the hole. It is 0.6 mm height and 2.4 mm width, since the rubber has the same width. I used the Offset tool to create its base on sketch. The top part will have the opposite of this, in where the rubber will fit.

Step 10: 3D Modelling - Rotary Part - Base, Walls

Base

The base of the rotary part is a circle with 47.6 mm diameter, which is 0.2 mm less than the hole. To lift it also by 0.2 mm I used the Offset plane Construct on that I created the sketch. This small offset from each direction is necessary to prevent the rotary part being too tight in the hole. I extruded the profile by 2 mm, which will be the height of the base.

Center and walls

In the center of the base, I created a cylinder with 5 mm radius. The servo will be connected to the rotary part through this body.

And here comes a very important part of the whole component, the walls. To allow the water flow into one hole only, I created walls on the edge of the base, except in the middle. This way only one hole will be free, and others will be closed by the walls.

Step 11: 3D Modelling - Rotary Part - Servo

To connect the servo to this rotary part I cut a toothed hole from the center, which is necessary to prevent slip during rotation. Fusion 360 provides a very nice feature to achieve such a shape: Circular pattern Tool.

I created a circle, and an arc on it and used this tool to make pattern from the arc along the whole circle. The only thing I had to do is the holes for the screw that holds this part together with the servo.

Step 12: 3D Modelling - Top Part - Base, Servo

Base

The base shape of the top part is the same as for the bottom part. I created the hole where the rubber will fit in. Its depth is 2.2 mm, since the rubber that I will use is 1.8 mm width. So together with the 0.6 mm height edge on the bottom part the rubber will fit snugly into the hole, that hopefully will block the water leak.

Servo holder

I used a very commonly used SG-90 type micro servo to control the rotary part. Its dimensions can be found on the datasheet but I also attached an image at the beginning. I created a hole on the top part according to the sizes of the servo, and made some extrusions to be able to hold the servo in a stable position. On the top of that I made 2 holes for the screws as can be seen on the last image.

Step 13: 3D Modelling - Top Part - Screws

I used 4 piece M6x12 screws to hold the top an bottom parts together, so I made the proper holes for them at the end. To hold the nuts stable and tight, I used the Circumscribed Polygon Tool on a sketch to draw a polygon, and cut 4 holes from the bottom part according to this.

Step 14: 3D Modelling - Result

After I finished all parts, I made some refinements on edges using the Fillet Tool. Then I double-checked some main sizes to search for any possible mistake before printing it.

You can download these 3D Model parts and the Fusion 360 Project file.

Step 15: Printing 3D Components

I used the Ultimaker Cura slicer to generate a file for my printer. I printed these components from a green PETG filament with 0.4 mm nozzle, so I had the following settings:

  • Layer Height: 0.2 mm
  • Infill Density: 20 %
  • Generate Support: Yes
  • Support Placement: Touching Build plate
  • Build Plate Adhesion: Brim

To have better result and increase build plate adhesion, I decreased the print speed for the initial layer to 10 mm/s, and increased the flow to 110 % on the first layer.

Step 16: Assembling 3D Components

To assemble the 3 printed parts are quite easy. Firstly I inserted the rubber band into the hole of the top part and I stabilized the micro servo on the top with screws. After that comes the rotary part: make sure that at about 90° position of the servo, the hole on the rotary part is at front. To join the top and bottom part, use 4 piece of M6x12 screws.

Step 17: Arduino Control

Although the automated watering system is not done yet, I wanted to try my device, so I implemented a demo application for Arduino to control it. The only thing you have to do is to select a proper pin on the Arduino and connect the servo control signal to it (PB0 in my case). After enabling the 5V power the device changes the selected output and delays for some seconds (2s based on the code) in each cycles.

See Arduino Source code attached.