Close
0%
0%

Smart Water Tap Leakage Controller IoT Project

This is a smart IoT project that uses a motion detector to detect motion and open and close a water valve automatically.

Similar projects worth following
A Smart Water Tap Leakage Controller IoT project is an IoT device that uses a motion detector to detect motion at a distance of fewer than 60 centimeters from the water tap and open and close the water tap valve in a period of 30 seconds if it doesn’t continue detecting motion. If it happens that a water tap user either accidentally or intentionally leaves it open, the water tap will automatically be closed in less than 30 seconds and save this finite resource on the planet. Many people in our communities have a tendency to deliberately leave their water taps open and wait for their buckets to be fully filled while doing something else somewhere far away from the tap. This innovative project will help address issues of water scarcity and water quality on our planet. Water, as a basic need, needs to be used sparingly and protected from being wasted.

Smart Water Tap Leakage Controller IoT Project

Loss of water through water taps that are either left unclosed is a problem that the world has been confronted with for many years. A Smart Water Tap Leakage Controller IoT Project is a solution.

Smart Water Tap Leakage Controller IoT Project

                                                                    Main Project Photo

Story

Smart Water Tap Leakage Controller IoT Project

Water is a very scarce resource that needs to be used sparingly by everyone. Many people around the world go for days without this fundamental need. Many liters of water are lost through water taps that are either left unclosed or not properly closed every day, which is a concern for the world at large. Due to climate changes and other factors, we are gradually running out of underground water and the rain no longer falls as it used to do without the negative impact of climate changes. Everyone has a duty to save water and save lives. Using technology, we can make this a reality.

Demo video

                                                                                          Demo Video

The demo video above shows how the final installation of the Smart Water Tap Leakage Controller IoT project works. The person in the video is a 30-year-old farm trainee fetching water after his launch. When he leaves the water tap open and walks away, it automatically closes the 12V water flow selenoid valve and saves water. When he comes back to the tap to fetch another cup of water, it automatically opens when the PIR motion detector sensor detects his motion near the water tap. This motion detector sensor can detect motion at an angle of 120 degrees, which I didn't want. I covered the bottom part of the sensor in order to reduce the angle so that it does not detect the motion of people passing by.

Project Planning

Figure 1

                                                                              Figure 1

The image above (Figure 1.) shows the Fritzing Breadboard with components that I have used to build a circuit that detects the motion of people near the water tap and switches ON and OFF the 12V water flow valve. I used an 80K0960 general-purpose switching transistor to control the 12V relay. The ON and OFF states of the relay are indicated by a 5mm LED connected to the Collector of the Bipolar Junction Transistor (80K0960).

Internet of Things (IoT) and its benefits

The Internet of Things is a new technology that enables billions of connected devices to communicate with one another in many areas such as homes, cities, industries, etc. IoT is the main driving force in the Fourth Industrial Revolution (4IR). These connected devices collect sensor data such as temperature, humidity, air quality, etc., and send it to the cloud where it is stored in a secure database and analyzed to help different organizations make informed decisions. By so doing, these informed decisions minimize loss and maximize profit. The positive impact of IoT on the way people live their lives today will soon be seen in their homes. Home appliances will soon be able to communicate their states of operation and what is in the houses via the following licensed communication technologies: 

1. Bluetooth Low Energy

2. Wi-Fi, Zig Bee

3. Cellular Networks

4. Unlicensed Communication Technologies like Sig Fox, etc. 

Since these devices do not only use Local Wireless Communication Networks but...

Read more »

Current & Future Solution architecture.pdf

Adobe Portable Document Format - 14.70 kB - 07/03/2023 at 12:26

Preview

smartwatertapleakagecontrolleriotproject_fzz_o3nGG9DYuJ.zip

Zip Archive - 2.58 MB - 07/03/2023 at 09:27

Download

  • 1 × Thingy:53 Nordic Semiconductor Nordic Thingy:53
  • 1 × PIR Motion Sensor (generic)
  • 1 × TaydaElectronics DC POWER JACK 2.1MM BARREL-TYPE PCB MOUNT
  • 1 × USB Cable, USB Type C Plug
  • 1 × SparkFun USB Type A Female Breakout

View all 21 components

  • 1
    Step 1

    The Project Build

    Figure 2

                                                                       Figure 2

    The image in Figure 2 shows the solder side of the prototyping PCB having been mounted on a transparent stand with 5mm spacers.

    Figure 3

                                                                      Figure 3

    The image in Figure 3 shows both the prototyping PCB and the plastic enclosure of the Nordic Thingy:53 Bluetooth Low Energy Prototyping Platform mounted on a stand. I made two holes on one side of the enclosure in order to mount the Thingy:53 onto the stand.

    Figure 4

                                                                      Figure 4

    The image in Figure 3 is a component side of the prototyping PCB with all the components soldered onto the Printed Circuit Board. The red 5mm LED with a 4.7K current limiting resistor indicates power ON of the 12V power adapter with a 2A current which can output 24W of power to the whole project. Even though the Thingy:53 is battery-powered, I also included a 5V fixed-voltage regulator to charge it. The 24W of power is enough to supply the two power-hangry output devices, i.e. 12V relay and 12V selenoid water valve.

    Figure 5

                                                                        Figure 5

    Figure 5 shows both the component side of the prototyping PCB and the top side of the open enclosure of the Thingy:53 with a 3.7V Lithium Polymer battery. Connected to the SIL connector on PCB is a 4-way JST cable with black, yellow, green, and red wires. It connects to the I2C Grove port of the Nordic Thingy:52. In this project I used both as General Purpose Input Output pins (pin 4 and pin 5 of Port 0 in the nRF5340 SoC ) to control the PIR motion detector sensor and the 12V relay.

    Figure 6

                                                                Figure 6

    The image in Figure 6 shows 4 way JST cable connected to the enclosed Thingy:53. When the thingy:53 is enclosed like this, the only thing you can on the top side is a programmable user button.

    Figure 7

                                                                  Figure 7

    Figure 7 in the above picture shows a PIR motion detector sensor mounted onto a piece of plastic with a conduit pipe attached to it to help install it on the water tap. This motion detector sensor is powered by a 5V fixed voltage regulator with Max output current of 1000mA.

    Figure 8

                                                                Figure 8

    The image in Figure 8 shows the 12V selenoid water valve with the two-wire cable attached to it. It is DC 12V 0.02-0.8Mpa insulated selenoid valve. The only problem I noticed with this 12V water flow selenoid is that it quickly gets hot when it is being switched ON and OFF at a fast speed. However, this is not a big problem in this application because it is normally closed and it is opened only when the PIR motion detector sensor detects motion in front of the water tap.

    Figure 9

                                                              Figure 9

    The image in Figure 9 shows a 12VDC, 2A power adapter that converts 220VAC mains supply voltage into 12VAC and rectifies this 12V alternating current voltage into 12V direct current voltage. The maximum output power of this power adapter is 24 watts.

    Figure 10

                                                             Figure 10

    Figure 10 is a 220mm long Type C USB cable that I have used to charge the 3.7V Lithium Polymer battery of the Thingy:53. This cable is of the right length given the distance from the Type C USB port on the Nordic Thingy:53 and the Type A USB connector on the prototyping PCB.

    Figure 11

                                                                  Figure 11

    The above image (Figure 11) shows all the components connected together to make a complete working project with the top cover of the Thingy:53 enclosure removed. The lit red 5mm LED indicates that the project is ON.

    Figure 12

                                                                 Figure 12

    The image in Figure 12 shows the fully-functioning Smart Water Tap Leakage Controller IoT project installed on a water tap on the back side view of a small house on a local Non-Profit Organisation Agriculture Training Farm. When there the PIR motion detector sensor does not detect any motion near in front of the water tap, the 12V water flow selenoid remains closed. This means that water does not flow out of the tap. If it happens that you leave it ( water tap) open, the Nordic Thingy:53 will immediately trigger (energize) the 12V relay and close the water.

  • 2
    Step 2

    The Programming Part

    Figure 13

                                                         Figure 13

    The above picture (Figure 13) is an nRF Connect for Desktop app with all the apps. In this project, I only used the apps in the below images.

    Figure 14

                                                         Figure 14

    The above image (Figure 14) is a Toolchain Manager app that shows the buttons that are used to open Microsoft Visual Studio Code Integrated Development Environment in which I wrote the main program that runs on the nRF5340 Silicon on Chip Cortex M33 processor.

    Figure 15

                                                            Figure 15

    The image in Figure 15 shows the opened Microsoft VS Code building a whole Zephry RTOS project. The output of the build process can be seen in the Terminal window of the VS Code. The build process takes time because the Zephry RTOS configures the project first and it has many files to include in the system build process. In this project, I used the machine learning sample as my template code I also want to include embedded machine learning and artificial intelligence that work with Edge Impulse Studio.

    Figure 16

                                                             Figure 16

    The image in the above Figure shows the app_signed.hex file loaded in the Programmer app. The programmer app has an MCUBootloarder that is used to program the hex file onto the nRF5340 SoC of the Thingy:53. The write button is disabled when there is no hex or zip loaded. It is enabled immediately after loading the hex/zip file.

    Figure 17

                                                                Figure 17

    The image in Figure 17 shows the successful writing of the app_signed.hex of the program onto the Thingy:53 prototyping platform. The green color in the middle of the image shows the program space occupied by the app_signed.hex in the nRF5340 Cortex M33 processor.

    ==================================================================================================================================================================================================================================

View all instructions

Enjoy this project?

Share

Discussions

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates