0% found this document useful (0 votes)
17 views65 pages

Batch 1

The document is a project report on the 'Smart Hydro System,' developed by students of Jawaharlal Nehru Technological University, Kakinada, under the guidance of Dr. N. Sambasiva Rao. It outlines the design and implementation of an automated water level monitoring and control system using a Raspberry Pi Pico, ultrasonic sensor, and motor pump, aimed at optimizing water management and reducing wastage. The report includes sections on system overview, components, software implementation, and future enhancements, emphasizing the project's potential for IoT integration and real-time monitoring.

Uploaded by

Rachana Rachana
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views65 pages

Batch 1

The document is a project report on the 'Smart Hydro System,' developed by students of Jawaharlal Nehru Technological University, Kakinada, under the guidance of Dr. N. Sambasiva Rao. It outlines the design and implementation of an automated water level monitoring and control system using a Raspberry Pi Pico, ultrasonic sensor, and motor pump, aimed at optimizing water management and reducing wastage. The report includes sections on system overview, components, software implementation, and future enhancements, emphasizing the project's potential for IoT integration and real-time monitoring.

Uploaded by

Rachana Rachana
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 65

JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY,

KAKINADA

A Project Report on

SMART HYDRO SYSTEM


By
PASAM TEJASWI
21KN1A0245
NARENDRA RACHANA PACHIGOLLA S J N MALLESWARI
21KN1A0241 21KN1A0243
GUDIVADA KARUN KIRAN DASARI VIJAYA RAJU
21KN1A0224 21KN1A0215

Under the Esteemed Guidance of


Dr. N. SAMBASIVA RAO, B.Tech,M.Tech,Ph.D
Professor & Head Of The Department

DEPARTMENT OF ELECTRICAL & ELECTRONICS ENGINEERING


NRI INSTITUTE OF TECHNOLOGY
(Approved by A.I.C.T.E &Affiliated to JNTUK, Kakinada)
(An ISO 9001:2015 Certified Institution)
Agiripalli, Krishna District-521212, Andhra Pradesh,
2021-2025

1
SMART HYDRO SYSTEM
A Project Report
Submitted in partial fulfillment of the required for the award of the degree of

BACHELOR OF TECHNOLOGY
IN
ELECTRICAL AND ELECTRONICS ENGINEERING

By
PASAM TEJASWI 21KN1A0245
NARENDRA RACHANA 21KN1A0241
P S J N MALLESWARI 21KN1A0243
GUDIVADA KARUN KIRAN 21KN1A0224
DASARI VIJAYA RAJU 21KN1A0215

Under the Esteemed Guidance of


Dr. N. SAMBASIVA RAO,B.Tech,M.Tech,Ph.D
PROFESSOR & HEAD OF THE DEPARTMENT

Department of Electrical & Electronics Engineering

NRI INSTITUTE OF TECHNOLOGY


(Approved by A.I.C.T.E & Affiliated to JNTUK, Kakinada)
(An ISO 9001:2015 Certified Institution)
Agiripalli, Krishna Dist –521212, Andhra Pradesh
2021-2025

2
NRI INSTITUTE OF TECHNOLOGY
(An ISO 9001:2015 Certified Institution)
Agiripalli, Krishna Dist – 521 212
Department of Electrical & Electronics Engineering

CERTIFICATE

This is to certify that the Project report entitled “SMART HYDRO SYSTEM” that is a bonafide
record of work done by PASAM TEJASWI (21KN1A0245), NARENDRA RACHANA
(21KN1A0241), PACHIGOLLA S J N MALLESWARI (21KN1A0243), GUDIVADA
KARUN KIRAN (21KN1A0224), DASARI VIJAYA RAJU (21KN1A0215) submitted in partial
fulfillment of the requirements for the award of degree of Bachelor of Technology in Electrical and
Electronics Engineering to the JNTUK during the academic year 2024-25. The results embodied in
this project report have not been submitted to any other University or Institute for the award of any
degree or diploma.

Date:

Signature of Guide Signature of HOD


Dr.N.SAMASIVARAO B.Tech,M.Tech,Ph.D Dr.N.SAMBASIVARAO B.Tech,M.Tech,Ph.D
Professor & HOD Professor& HOD

EXTERNAL EXAMINER

3
ACKNOWLEDGEMENT

All the success in every step of my Project involves great efforts of the masters who guided
me all through the way, forbidding many obstacles and making me to achieve this project a grand
success.

With the sense of gratitude, I wish to express profound regards to my head of the
department Dr. N. SAMBASIVA RAO, Professor and Head, Electrical & Electronics
Engineering Department and my project guide Sri Dr. N. SAMBASIVA RAO, Professor and
Head of the Department for his supervision in framing my project in an outstanding manner and
for his remarkable guidance and encouragement throughout the project.

I would like to sincerely thank to the Principal of NRI Institute of Technology


Dr. C. NAGA BHASKAR for providing necessary facility to carry out my project work
successfully

I am extending my sincere and honest thanks to the Chairman, Dr. R. VENKATARAO


& Secretary, Sri K. SRIDHAR for their continuous support in completing the project work.

A special note of thanks to all the faculty members of Electrical and Electronics
Engineering department, for sharing their years of experience and adding momentum to my project.
Project Associates
PASAM TEJASWI 21KN1A0245

NARENDRA RACHANA 21KN1A0241

P S J N MALLESWARI 21KN1A0243

GUDIVADA KARUN KIRAN 21KN1A0224

DASARI VIJAYA RAJU 21KN1A0215

4
TABLE OF CONTENTS

CHAPTER NO TITLE PAGE NO

ABSTRACT 8
CHAPTER 1 INTRODUCTION 10 - 11
1.1 INTRODUCTON
1.2 OBJECTIVE
CHAPTER 2 OVER VIEW OF SYSTEM 13-15
2.1 OVER VIEW OF THE SYSTEM
2.2 WATER LEVEL SENSOR
2.3 CONTROL UNIT
2.4 WATER PUMP
2.5 DISPLAY UNIT

CHAPTER 3 KEY FEATURES 17


CHAPTER 4 COMPONENT 19 - 30
4.1 PC BOARD
4.2 MICRO CONTROLLER
4.3 BLUETOOTH MODULE
4.4 ULTRASONIC SENSOR
4.5 TEMPATURE SENSOR MODULE
4.6 LCD DISPLAY
4.7 WATER PUMP MOTOR
4.8 TIP122 TRANSISTOR
4.9 RESISTOR
4.10 CONNECTING WIRES

CHAPTER 5 SOFTWARE IMPMRNTATION 32 - 37


5.1 SOFTWARE/PROGRAMMING LANGUAGE

5.2 LIBRARIES USED

5
5.3 LOGIC

5.4 PROGRAMMING CODE

CHAPTER 6 BLOCK DIAGRAM 39 - 43

6.1 BLOCK DIAGRAM

6.2 WIRING THE COMPONENTS

6.3 EXPLAINATION OF BLOCK DIAGRAM

CHAPTER 7 WORKING PRINCIPLE 45 – 47


7.1 CIRCUIT
7.2 CIRCUIT OPERATION

CHAPTER 8 ADVANTAGES 49 – 51

CHAPTER 9 APPLICATIONS 53 – 55

FUTURE IMPLIMENTATION 56 – 57

CHAPTER 10 CONCLUSION 59

CHAPTER 11 BIBLIOGRAPHY 61 – 62

CHAPTER 12 REFERENCES 64 – 65

6
LIST OF FIGURES PAGE NO

Fig 2.1 : Over View of the System 13


Fig 4.1 : PC Board 19
Fig 4.2 : Raspberry Pi Pico 20
Fig 4.3 : Bluetooth Module 21
Fig 4.4 : Ultrasonic Sensor 23
Fig 4.5 : NTC Thermistor 24
Fig 4.6 : 16*2 LCD Display 25
Fig 4.7 : Micro Water Pump Motor 26
Fig 4.8 : Tip 122 Transistor 28
Fig 4.9 : Resistors 29
Fig 4.10 : Connecting Wires 30
Fig 6.1 : Block Diagram.1 39
Fig 6.2 : Wiring Diagram 41
Fig 6.4 : Block Diagram.2 43
Fig 7.1 : Circuit 46

7
ABSTRACT
SMART HYDRO SYSTEM

Water management is a crucial aspect of daily life, and improper monitoring often
leads to wastage and resource depletion. With the increasing demand for efficient
water usage, automation plays a vital role in optimizing water consumption. This
project presents an automatic water level indicator and control system using the
Raspberry Pi Pico, an ultrasonic sensor, and a water motor. The system continuously
monitors the water level in a tank and automatically controls the motor to maintain an
optimal level.

By preventing over flow and dry-run conditions, this solution enhances efficiency and
conserves water. The integration of automation in water level monitoring reduces
human intervention, making it an effective and smart water management system.The
system not only ensures uninterrupted water supply but also helps in reducing
electricity consumption by operating the motor only when necessary.

Furthermore, the proposed system can be enhanced with IoT capabilities for remote
monitoring and control, making it a scalable solution for residential, industrial, and
agricultural applications. With minimal cost and easy implementation, this project
offers a sustainable and reliable approach to water management, helping to mitigate
water wastage and promote environmental conservation

8
CHAPTER – 1

9
INTRODUCTION
1.1 INTRODUCTION:

Water is a vital resource, and its efficient management is crucial for both domestic
and industrial applications. Traditional water level monitoring and pump control
systems often rely on manual intervention or basic mechanical mechanisms, which
can be inefficient, prone to errors, and lack real-time monitoring capabilities. With
the advent of modern microcontroller-based systems, it is now possible to automate
water management processes, ensuring precision, reliability, and remote
accessibility.

This project focuses on designing and implementing an *automated water pump


controller with a water level display* using a *Raspberry Pi Pico*
microcontroller. The system integrates various components, including an*ultrasonic
sensor* for water level measurement, an *LCD display* for real-time feedback, a
*micro motor pump* for water control, and an *HC-05 Bluetooth module* for
wireless communication. Additionally, an*NTC thermistor*is included to monitor
environmental temperature, adding an extra layer of functionality.

The ultrasonic sensor measures the distance to the water surface, providing accurate
water level data. Based on predefined thresholds, the Raspberry Pi Pico controls the
motor pump via a *TIP122 Darlington transistor*, ensuring efficient water
management. The LCD display offers a user-friendly interface, while the Bluetooth
module enables remote monitoring and control via a smartphone or PC. This
combination of hardware and software creates a robust, scalable, and cost-effective
solution for water management.

10
1.2 OBJECTIVE:

 To monitor the water level in a tank using an ultrasonic sensor:


o The system employs an ultrasonic sensor to measure the distance between the
sensor and the water surface, providing accurate real-time data on water levels.
o This ensures a continuous and precise assessment of water availability in
the tank.

 To automatically control the water motor based on the detected


water level:
o When the water level drops below a predefined threshold, the system triggers
the motor to pump water into the tank.
o Once the water reaches the desired upper limit, the system deactivates the
motor, preventing overflow and unnecessary energy consumption.
o This automated process eliminates the need for manual intervention, ensuring
efficiency and reliability.

 To provide real-time water level indication:


o The system continuously updates and displays the water level status.
o Visual indicators (LEDs, LCDs, or buzzer alerts) cannot if users of different
water levels.
o This real-time feedback helps users stay informed about their water usage and
storage levels.

 To prevent water over flow and motor dry-run conditions:


o The system prevents excessive water usage by turning off the motor when
the tank is full, avoiding spillage and wastage.
o It also safe guards the motor from running in dry conditions, which can lead
to damage or failure.
o By implementing these preventive measures, the system enhances the
lifespan of the water motor and reduces maintenance costs.

11
CHAPTER - 2

12
OVER VIEW OF THE SYSTEM

2.1 OVER VIEW OF THE SYSTEM:

Fig 2.1: Over View of the System

13
2.2 WATER LEVEL SENSOR:

The water level sensor in this project is an *ultrasonic sensor*, which is used to
measure the distance between the sensor and the water surface in a tank or reservoir.
It operates by emitting ultrasonic waves that bounce off the water surface and return
to the sensor. The time taken for the waves to travelback is used to calculate the
water level. The ultrasonic sensor is mounted at the top of the water tank.

 It sends ultrasonic pulses downward, which reflect off the water surface.
 The sensor calculates the distance to the water surface based on the time taken
for the pulses to return.
 This data is sent to the Raspberry Pi Pico, which processes it to
determine the water level and control the pump accordingly

2.3 CONTROL UNIT:

The*Raspberry Pi Pico, a low-cost, high-performance micro controller board based


on the RP2040 microcontroller chip. It serves as the brain of the system, processing
data from sensors and controlling the operation of the water pump and other
components. Data Processing*: Receives input fromthe ultrasonic sensor (water
level) and NTC thermistor (temperature).

 Pump Control: Activates or deactivates the micro motor pump via the
TIP122 transistor based on water level data.
 Display Management: Sends water level and temperature data to the LCD
display for real-time monitoring.
 Bluetooth Communication: Communicates with the HC-05 Bluetooth
module for remote monitoring and control.

14
2.4 WATER PUMP:

The *micro motor pump* is a key component of the system, responsible for
moving water based on the water level detected by the ultrasonic sensor. It is
controlled by the Raspberry Pi Pico via a *TIP122transistor*This pump ensures
efficient water management, preventing overflow or dry running, and is a reliable
component for automated water control systems.

2.5 DISPLAY UNIT:

The *display unit* inthis project is an *LCD (Liquid Crystal Display)*screen,


which provides real-time visual feedback on the system's status, including water
level. It serves as a local interface for users to monitor the system without needing
remote access.

Functions of the Display Unit:

 Water Level Indication: Shows the current water level in the tank,
helping users understand when the pump is active or idle.

15
CHAPTER - 3

16
KEY FEATURES
SMART HYDRO SYSTEM
{Smart Water Pump Controller with Water Level Display}

This innovative system features a smart water pump controller that monitors and
displays real-time water levels, ensuring efficient water management.

Key features include:

• Water level sensors for tank and source monitoring

• LCD display for real-time data visualization

• Low water level alarm for preventing pump damage

• Buzzer alert for critical conditions (high/low water levels)

• Remote monitoring via loT-based communication for smart

phone/web interface control

17
CHAPTER - 4

18
COMPONENTS
4.1 PC BOARD:

Fig 4.1: PC Board

A Printed Circuit Board (PC Board) is a crucial component in electronic devices,


providing mechanical support and electrical connections for various electronic
components. Here’s an overview of its structure, functions, and applications.

Structure
Base Material:
Typically made from fiber glass or epoxy resin, providing durability and insulation.
Copper Layer:
Thin layers of copper are etched to create conductive pathways for electrical signals.
Solder Mask:
A protective layer applied over the copper traces to prevent short circuit and
corrosion, usually green in colour.
Silkscreen Layer:
Contains printed labels and symbols that indicate component placement and
connections.
Functions:
Electrical Connections: Provides pathways for electrical signals to connect various
components like resistors, capacitors, and integrated circuits.
Mechanical Support: Holds components securely in place, ensuring stability and
durability in operation.

19
4.2 MICRO CONTROLLER (RASPBERRY PI PICO):

Fig 4.2: Raspberry Pi Pico

Raspberry Pi Pico is a compact micro controller board developed by the Raspberry


Pi Foundation. It is designed to be affordable, versatile platform for a wide range of
electronics projects, especially those requiring GPIO (General Purpose
Input/Output) pins for interfacing with sensors, motors, and other hardware.
Key Features:
Memory:

264 KB of RAM.

2MB of onboard flash memory for storing programs and data.

GPIO Pins:

26multi-function GPIO pins, which can be used for various purposes such as digital
input/output, PWM, I2C, SPI, and UART communication.

Connectivity:

USB support for programming and power.

No built-in wireless connectivity (Wi-Fi or Bluetooth), but external modules can be


connected.

Low Power Consumption:

Suitable for battery-powered projects due to its efficient design.

Programmable in Multiple Languages:

Supports C/C++ and Micro Python, making it accessible for beginners and
experienced developers a like.
20
4.3 BLUETOOTH MODULE (HC-05):

Fig 4.3: Bluetooth Module

HC-05 is a Bluetooth module which is designed for wireless communication. This


module can be used in a master or slave configuration. Bluetooth serial modules
allow all serial enabled devices to communicate with each other using Bluetooth.

It has 6 pins:

 Key/EN-NC
 VCC to Connect 5V power
 GND to power Ground
 TXD to Arduino Nano Rx (DO)
 RXD to Arduino NanoTx (D1)
 State-NC
 HC-05 module Information

HC-05 has red LED which indicates connection status, whether the Bluetooth is
connected or not. Before connecting to HC-05 module this red LED blinks
continuously in a periodic manner. When it gets connected to any other Bluetooth
device, its blinking slows down to two seconds.

• It operates on a 3.3V-5V power supply.

• It uses Bluetooth SPP (Serial Port Protocol) for transparent data transfer.

21
• It can be configured using AT commands.
• Common applications include wireless communication with micro controllers
like Arduino.
• The HC-05 module is an upgrade of the HC-06.
• It has 6pins.
• The pairing code is1234

HC-05 Bluetooth Module Information:


HC-05 has red LED which indicates connection status, whether the Bluetooth is
connected or not. Before connecting to HC-05 module this red LED blinks
continuously in a periodic manner. When it gets connected to any other Bluetooth
device, its blinking slows down to two seconds.

Functions:
Wireless Connection: Links the system to your phone or computer.

Remote Monitoring: Lets you check water level sand temperature from a distance.

Control: Allows you to turn the pump on or off remotely.

This makes the system convenient and user-friendly!

22
4.4 ULTRASONIC SENSOR:

Fig 4.4: Ultrasonic Sensor

The *ultrasonic sensor*measures the water level in the tank without touching the
water. It sends sound waves toward the water surface, and when the waves bounce
back, it calculates the distance to the water. This data helps the Raspberry Pi Pico
decide when to turn the pump on or off, ensuring efficient water management.
Ultrasonic sensors have two main components: the transmitter (which emits the
sound using piezo electric crystals) and the receiver (which encounters the sound
after it has travelled to and from the target).

The sensor emits an ultrasonic pulse (sound wave) from the *Trig* pin. The pulse
reflects off the water surface and returns to the sensor's *Echo*pin. The time taken
for the echo to return is used to calculate the distance to the water surface using the
formula:

[{Distance}=\frac{{Speed of Sound}\times{Time}}{2}\]

The water level is then determined by subtracting this distance from the total
height of the tank.

Functions:

Sends Sound Waves: Shoots sound waves at the water.

Listens for Echo: Waits for the sound to bounce back.

Calculates Distance: Uses the echo to figure out how far the water is.

Controls Pump: Helps the system know when to start or stop the pump.

This makes the system smart and automated!

23
4.5 TEMPERATURE SENSOR MADULE (NTC THERMISTOR):

Fig 4.5: NTC Thermistor

NTC (Negative Temperature Coefficient Thermistor) is an electronic component


whose resistance decreases while the temperature increases.

This is a temperature sensor that measures the water temperature. It works by


changing its resistance according to the temperature, which is then converted to a
temperature reading by the Raspberry Pi Pico.

The thermistor is part of a voltage divider circuit. A known resistor is placed in


series with the thermistor. The voltage across the thermistor is read by the Raspberry
Pi Pico's ADC (Analog-to-Digital Converter) pin.

Functions:

Senses Heat: Detect show hot the system is.

Sends Data: Tells the Raspberry Pi Pico the temperature.

Prevents Overheating: Helps keep the system safe by stopping it from getting too
hot.

This ensures the system runs safely and efficiently!

24
4.6 LCD DISPLAY:

Fig 4.6: 16*2 LCD Display

A 16x2 LCD display is very basic module and is very commonly used in various
devices and circuits. A 16x2 LCD means it can display 16 characters per line and
there are 2 such lines. In this LCD each character is displayed in 5x7 pixel matrix.

A16x2 LCD display is used in a smart water pump controller to show real-time water
level status, pump operation mode, and alerts. It provides a clear, user-friendly
interface, allowing users to monitor water levels efficiently. It enhances automation
by displaying system updates and ensuring smooth operation.

Functions:

Shows Info: Displays water level and temperature.

Easy to Read: Provides clear, real-time updates.

Local Monitoring: Lets you check the system status at a glance.

This makes the system user-friendly and convenient

25
4.7 WATER PUMP MOTOR:

Fig 4.7: Micro Water Pump Motor

A water pump motor used in a water pump controller is a crucial element that
enables the automation and regulation of water flow in various applications, such as
irrigation, water supply systems, and drainage. Here’s an in-depth look at how these
motors function with in a controller system, their types, applications, and
considerations for integration.

The micro water pump is that it uses a brushless motor to rotate an impeller, which
increases the pressure of a liquid and transfers it. This DC 3-6 V Mini Micro
Submersible Water Pump is small in size Submersible Pump Motor which can be
operated from a 2.5 ~ 6V power supply. It can take up to 120 liters per hour with a
very low current consumption of 220mA. Just connect tube pipe to the motor outlet,
submerge it in water and power it.

micro water pump work?


The working principle of a small water pump is based on centrifugal force.When the
motor starts, the impeller begins to rotate and generate centrifugal force. The
centrifugal force sucks water into the pump body and then discharges it
through the outlet.

Functions:

Automation: The water pump motor operates under the control of a water pump

26
controller, which uses sensors to monitor water levels and trigger the motor
accordingly.

On/Off Control: The controller turns the motor on when the water level falls below
a predetermined low level and turns it off when the water level reaches a high
threshold.

Feedback Mechanism: Sensors provide real-time feedback to the controller,


allowing for precise control over water level sand preventing issues like over flow or
dry running.

Remote Operation: Many modern controllers allow for remote monitoring and
control, providing convenience and flexibility

27
4.8 TIP122 TRANSISTOR:

Fig 4.8: Tip 122 Transistor

The Darlington NPN transistor-like TIP122 includes Darlingt onbraces & it works
like a normal transistor however includes a Darlington pair. This transistor includes a
decent collector current like 5A&the gain is approximately1000. This kind of
transistor bears 100 volts in the region of both the emitter & collector terminals
because it can be utilized mainly for high loads.

The TIP122 is a Darlington NPN transistor and it is very popular for its high current
gain& high current. As the name suggests, the term Darlington means when the two
transistors are available in a single pack for enhancing the gain at the o/p. The
manufacturing of this transistor can be done like a switch& amplification purposes

Pin Configuration:
 Pin1(Base): This pin controls the transistor biasing.
 Pin2(Collector): The flow of current will be there throughout this pin.
 Pin3(Emitter): This pin is used to drain the current.
The *TIP122 transistor*acts as a switch to control the micro motor pump. It
allows the Raspberry Pi Pico to turn the pump on or off based on the water level
detected by the ultrasonic sensor.

Functions:

Switches Pump: Turns the water pump on or off.


Controls Flow: Manages water flow automatically.
Protects System: Handles high current safely, ensuring the pump works without
damaging the Raspberry Pi Pico.

28
4.9 RESISTORS:

Fig 4.9: Resistors

Resistors play several crucial roles in water pump controllers, contributing to the
overall functionality and performance of the system.

They protect components like LEDs, sensors, and the micro controller from
receiving too much current, which could damage them.

Functions:

Limits Current: Reduces the amount of electricity flowing to sensitive parts.

Protects Components: Prevents damage by ensuring the right amount of current


reaches each part.

Stabilizes Circuit: Helps the system work smoothly and safely.

Resistors keep the system safe and reliable!

29
4.10 CONNECTING WIRES:

Fig 4.10: Connecting Wires

Connecting wires is used as controllers and ensuring the system operates


effectively.*Connecting wires*are used to link all the components (like the
Raspberry Pi Pico, sensors, pump, and display) together, allowing electricity and data
to flow between them.

Roles of Connecting Wires


 Power Supply: Connecting wires deliver electrical power from the source to
the pump, controller, and other components.
 Signal Transmission: Wires carry control signals between sensors,
switches, relays, and the pump controller, allowing for automated
operations based on various inputs.
 Grounding: Proper grounding wires help ensure electrical safety by providing
a path for fault currents, reducing the risk of electric shock and equipment
damage.
 Functions:

Connects Parts: Links all the pieces of the system.


Transfers Power and Data: Carries electricity and information between
components.
Keeps It Working: Ensures everything communicates and functions as a single unit.
Without wires, the system wouldn’t work!

30
CHAPTER - 5

31
SOFTWARE IMPLEMENTATION

5.1 SOFTWARE/PROGRAMMING LANGUAGE:

The programming language used in Smart Hydro System is MICRO PYTHON


Micro python is a light weight version of the Python programming language
designed to run on micro controllers like the Raspberry Pi Pico. It makes it easy
to write code for small, embedded systems without needing complex
programming

Key Features:

1. Simple and Easy: Uses Python syntax, which is beginner-friendly.

2. Optimized for Micro controllers: Runs efficiently on devices with


limited resources.
3. Interactive: Allows real-time coding and testing via a REPL(Read-Eval-Print
Loop).
4. Hardware Control: Provides libraries to easily control GPIO pins,
sensors, displays, and more.
5. Cross-Platform: Works on various micro controllers like Raspberry Pi
Pico, ESP32, and others.

32
5.2 LIBRARIES USED:

In Micro Python programming, libraries are collections of pre-written code (modules


and packages) that provide specific functionalities, making it easier to develop
applications for microcontrollers by reusing common tasks and functionalities.

Libraries Used: machine, time, utime

machine Library:

 Purpose: Controls hardware components like pins, ADC(Analog-to-Digital


Converter), PWM (Pulse Width Modulation), and UART (Bluetooth
communication).
 Usage: Used to interact with the ultrasonic sensor, NTC thermistor, pump,
and Bluetooth module.

time Library:

 Purpose: Handles time-related functions like delay sand timing.


 Usage: Used for creating delays (e.g: time.sleep())and measuring pulse
duration for the ultrasonic sensor.

utime Library (if used):

 Purpose: Similar to time, but provides more precise timing functions


for microcontrollers.
 Usage: Can be used for high-precision timing if needed.

33
5.3 LOGIC:

Logic:
Read ultrasonic sensor values.
Compute water level.
Compare with threshold levels.
Control the relay module accordingly.

Read Ultrasonic Sensor Values:


 The *ultrasonic sensor*sends sound waves toward the water surface and
measures the time it takes for the waves to bounce back.
 The Raspberry Pi Pico reads this time value using the machine library
and calculates the distance to the water surface.

Compute Water Level:


 The distance measured by the ultrasonic sensor is converted into the*water
level* in the tank.

Compare with Threshold Levels:


 If the water level is below the low threshold, the pump needs to be turned on. If
it’s above the high threshold, the pump should be turned off.

Control the Relay Module Accordingly:


 The *TIP122 transistor*(or a relay module) acts as a switch to control the

*micro motor pump*.

 Based on the water level comparison, the Raspberry Pi Pico sends a signal
to the transistor/relay to turn the pump on or off.

34
5.4 PROGRAMMING CODE:

CODE:

from machine import Pin, UART


import utime
from gpio_lcd import GpioLcd

#Set up pins for ultrasonic sensor and motor


trigger = Pin(14, Pin.OUT)
echo=Pin(15,Pin.IN)
m = Pin(7, Pin.OUT)
uart=UART(0,baudrate=9600)

#Initialize LCD
lcd=GpioLcd(rs_pin=Pin(9),
enable_pin=Pin(8),
d4_pin=Pin(5),
d5_pin=Pin(4),
d6_pin=Pin(3),
d7_pin=Pin(2),
num_lines=2,num_columns=16)

lcd.putstr('WATERLVLCTRL')
MAX_DISTANCE_CM = 25.0

def ultra():
trigger.low()
utime.sleep_us(5)

35
trigger.high()
utime.sleep_us(10)
trigger.low()

while echo.value() == 0:
signaloff=utime.ticks_us()
while echo.value() == 1:
signalon=utime.ticks_us()

timepassed = signalon - signaloff


distance=(timepassed*0.0343)/2 return
distance

whileTrue:
try:
#lcd.putstr('WATER ')
distance = ultra()
if distance>=MAX_DISTANCE_CM:
percentage = 0
elif distance <= 0:
percentage=100
else:
percentage=((MAX_DISTANCE_CM-distance)/MAX_DISTANCE_CM)
*100

# Update LCD
lcd.move_to(0, 1)
lcd.putstr("Distance: ")
lcd.move_to(10, 1)
lcd.putstr(str(round(percentage,2))+"%")

36
# Send data over UART
uart.write(f"water:{percentage}%\n")

#Controlmotorandsendalerts if
percentage < 5:
print('water low')
uart.write('water low\n')
m.value(0)
elif percentage > 85:
print('water high')
uart.write('water high\n')
m.value(1)

utime.sleep(1)

except Exception as e:
print(f"Error: {e}")

37
CHAPTER - 6

38
BLOCK DIAGRAM

6.1 BLOCKDIAGRAM:

Fig 6.1: Block Diagram.1

39
6.2 WIRING THE COMPONENTS:

1. Raspberry Pi Pico:
a. Connect the 3.3V pin to the HC-05 VCC and ultrasonic sensor VCC.
b. Connect the GND pin to the HC-05 GND, ultrasonic sensor GND,
LCD GND, and motor pump GND.
c. Use GPIO pins for communication with the HC-05 (TX/RX), ultrasonic
sensor (Trigger/Echo), and LCD (I2C or parallel pins).
2. HC-05 Bluetooth Module:
a. Connect VCC to 3.3V, GND to GND, TX to a GPIO RX pin, and RX to
a GPIO TX pin (with a voltage divider for level shifting).
3. Ultrasonic Sensor:
a. Connect VCC to 3.3V, GND to GND, Trigger to a GPIO pin, and Echo
to another GPIO pin.
4. LCD Display:
a. Connect VCC to 3.3V, GND to GND, and SDA/SCL pins to the Pico's
I2C pins (if using I2C).
5. Micro Motor Pump:
a. Connect one terminal to the collector of theTIP122 transistor and the
other to the power supply.
b. Connect the emitter of the TIP122 to GND and the base to a GPIO pin
via a resistor.
6. NTC Thermistor:
a. Connect one end to 3.3V and the other to a GPIO pin (with a pull-down
resistor).
7. TIP122 Transistor:
a. Connect the base to a GPIO pin via are transistor, the collector to the
motor pump, and the emitter to GND.
8. Power Supply:

40
a. Ensure all components receive appropriate voltage levels (3.3V for
Pico, HC-05, and sensors; higher voltage for the motor pump if needed).
This set up provides a reliable and efficient water pump control system with real-time
monitoring and remote control capabilities.

Fig 6.2: Wiring Diagram

41
6.3 EXPLAINATION OF BLOCK DIAGRAM:

SMART HYDRO SYSTEM

The circuit diagram illustrates a water level control system using an Raspberry Pi
Pico, Bluetooth module HC05, an HC-SR04 ultrasonic sensor, a relay module, and a
water pump. The system is designed to automatically control the water level in a tank
by switching the water pump on and off based on the distance measured by the
ultrasonic sensor.

 Raspberry Pi Pico:
This is the microcontroller that will manage all the tasks for the system. It is
connected to the other components, processes sensor data, and makes decisions based
on the inputs from the water level and temperature sensors.
It has a range of GPIO (General Purpose Input/Output) pins, which will be used to
control the motor, read sensor data, and communicate withthe Bluetooth module.
 HC-05 Bluetooth Module:
This module allows the Raspberry Pi Pico to communicate with a smart phone or
computer wirelessly.
The Bluetooth module is connected to the Pico through the serial communication pins
(TX/RX) and will allow you to remotely control the pump (turn it ON or OFF) via
commands sent from your phone.

 LCD Display(16x2):
The LCD screen will display the current water level and water temperature

 Micro Motor Pump:


This is the pump that will be activated by the Raspberry Pi Pico when the water level
is low.
The pump will be controlled via a TIP122 Transistor (which acts as a switch), using
the GPIO pin of the Raspberry Pi Pico.
 NTC Thermistor:

42
A Negative Temperature Coefficient (NTC) thermistor is used to measure the
temperature of the water in the tank.
The resistance of the thermistor changes with temperature, so we can use it in a
voltage divider circuit to determine the water temperature.

 TIP122 Transistor:
This transistor is used to switch on or off the motor pump because the Raspberry Pi
Pico can't supply enough current to run the pump directly.
The TIP122 acts as a switch that is controlled by a GPIO pin of the Raspberry Pi Pico
to turn the motor on or off.

 Resistors:
Resistors are needed for components like the thermistor in the voltage divider and for
current limiting on GPIO pins.

Fig 6.4: Block Diagram.2

43
CHAPTER - 7

44
WORKING PRINCIPLE

- The ultrasonic sensor is placed at the top of the water tank to measure the
distance to the water surface.
- The Raspberry Pi Pico processes the distance data and calculates the water level
percentage.
- Based on predefined threshold levels:

- If the water level is below the minimum threshold, the motor turns ON to fill
the tank.
- If the water level reaches the maximum threshold, the motor turns OFF to
prevent overflow.
- LED indicators or a buzzer can be used to notify users of different water levels,
providing real-time alerts.
- The system continuously monitors the water level and updates the motor’s
status accordingly, ensuring efficient water manage

The *SMART HYDRO SYSTEM* uses an ultrasonic sensor to measure water


levels. When the water is low, the Raspberry Pi Pico activates the motor pump via a
TIP122 transistor. The water level is shown on an LCD display and can be checked
remotely using the HC-05 Bluetooth module. An NTC thermistor ensures the system
doesn’t overheat. This setup automates water pumping, saves energy, and provides
real-time monitoring.

45
7.1 CIRCUIT:

The ultrasonic sensor's Trigger and Echo pins are connected to GPIO pins of the
Raspberry Pi Pico.
The relay module is connected to another GPIO pin to control the water motor.
The power supply is provided as per the motor and Raspberry Pi Pico requirements.

Fig 7.1: Circuit

9.2 Circuit Operation:

1. Distance Measurement: micro controller sends a short pulse to the trigger pin of
the HC-SR04, which emits an ultrasonic burst. The sensor then listens for the echo on
its echo pin.

2. Time Calculation: Microcontroller measures the duration of the echo pulse,


which is proportional to the distance to the water surface.

3. Data Processing: microcontroller calculates the distance using the formula:


distance (time * speed of sound) /=2.

4. Relay Control: Based on the measured distance, the microcontroller determines


whether to turn the pump on or off. If the water level is low (distance is high), the
Arduino activates the relay, which closes the circuit and turns on the water pump.

46
When the water level reaches the desired level (distance is low), the microcontroller
deactivates the relay, stopping the pump.

5. Bluetooth Communication: HC-05 module enables wireless data


transmission, possibly for monitoring or control purposes.

The *Water Pump Controller with Water Level Display* operates by


integrating multiple components to automate water pumping based on real-time water
level measurements. The ultrasonic sensor emits sound waves that travel to the water
surface and reflect back. The time taken for the echo to return is used by the Raspberry
Pi Pico microcontroller to calculate the water level. If the water level falls below a
predefined threshold, the Pico sends a signal to the TIP122 transistor, which acts as a
switch to activate the micro motor pump. Once the water level reaches the upper
threshold, the pump is turned off, ensuring efficient water usage. The NTC thermistor
monitors the system's temperature to prevent overheating, enhancing safety. Real-time
water level and system status are displayed on the LCD screen, while the HC-05
Bluetooth module enables remote monitoring and control via a smartphone or
computer. This system combines automation, energy efficiency, and user-friendly
features to provide a reliable solution for water management in domestic, agricultural,
and industrial applications.

47
CHAPTER - 8

48
ADVANTAGES OF SMART HYDRO SYSTEM

1. Automation and Efficiency:

- system automates water level monitoring and pump control, reducing manual
intervention and ensuring efficient water usage.

- Prevents overflows and dry running, which can damage the pump and waste
water.

2. Real-Time Monitoring:

- The ultrasonic sensor provides accurate and real-time water level measurements,
displayed on the LCD for easy visualization.

- Users can instantly see the water level status without physical inspection.

3. Remote Control and Monitoring:

- The HC-05 Bluetooth module enables wireless control and monitoring via a
smartphone or PC, adding convenience and flexibility.

- Users can operate the system from a distance, making it ideal for hard-to-reach
locations.

4. Temperature Monitoring:

- The NTC thermistor ensures the system operates within safe temperature ranges,
preventing overheating or freezing.

- Adds an extra layer of protection for the pump and other components.

5. Compact and Cost-Effective Design:

- The Raspberry Pi Pico is a low-cost, powerful micro controller that keeps


the system affordable and compact.

49
- The use of standard components like the ultrasonic sensor, LCD, and TIP122
transistor makes the project economical.

6. Energy Savings:

- The system optimizes pump operation, reducing unnecessary power consumption


and extending the pump's lifespan.

- Prevents energy wastage by turning off the pump when the water level is
adequate.

7. User-Friendly Interface:

- The LCD display provides a clear and intuitive interface for real-time system
status.

- Easy to understand and operate, even for non-technical users.

8. Scalability and Customization:

- The system can be easily modified or expanded to include additional features,


such as data logging, alarms, or integration with IoT platforms.

- Suitable for various applications, including residential water tanks, agricultural


irrigation, and industrial water management.

9. Reliability and Durability:

- The use of robust components like theTIP122 transistor and ultrasonic sensor
ensures reliable and long-lasting performance.

- Designed to operate in diverse environmental conditions.

10. Prevents Water Wastage:

- By maintaining optimal water level sand automating pump control, the system
minimizes water wastage, contributing to water conservation efforts.

11. Low Maintenance:

50
- The automated system reduces the need for frequent manual checks and
maintenance, saving time and effort.

12. Educational Value:


- This project serves as an excellent learning tool for students and
hobbyists interested in electronics, programming, and IoT applications.

51
CHAPTER - 9

52
APPLICATIONS OF SMART HYDRO SYSTEM

This project has a wide range ofpracticalapplications across various domains due to its
automation, real-time monitoring, and remote control capabilities. Below are some
key applications:

*Residential Water Tank Management*


o Automatic Water Level Control: Ensures water tanks are filled to the
desired level and prevents overflow or dry running.
o Remote Monitoring: Home owners can monitor and control water levels
via Bluetooth using a smartphone, eliminating the need for manual checks.
o Energy and Water Savings: Optimizes pump operation ,reducing electricity
and water wastage.

*Agricultural Irrigation Systems*

o Efficient Water Usage: Automates irrigation by controlling water pumps


based on tank levels, ensuring crops receive adequate water without wastage.
o Remote Control for Farms: Farmers can monitor and control water pumps from
a distance, especially useful for large farms or remote fields.
o Precision Farming: Integrates with other sensors (e.g. soil moisture sensors)
for advanced irrigation management.

*Industrial Water Management*

o Cooling Systems: Monitors and controls water levels in cooling towers or


reservoirs used in industrial processes.

53
o Boiler Feed Systems: Ensures optimal water levels in boilers to
prevent damage and improve efficiency.
o Waste water Treatment: Manages water levels in treatment tanks or
reservoirs, ensuring smooth operation of treatment plants.

*Aqua culture and Fish Farming*

o Water Level Maintenance: Ensures fish tanks or ponds maintain optimal


water levels for healthy aquatic life.
o Automated Water Exchange: Controls pumps for water exchange or
aeration systems, improving water quality.
o Remote Monitoring: Allows farmers to monitor water levels and pump
status remotely, reducing manual labour.

*Swimming Pools and Water Features*

o Automatic Filling: Maintains water levels in swimming pools, fountains, or


decorative water features.
o Leak Detection: Alerts users to sudden drops in water levels,
indicating potential leaks.
o Energy Efficiency: Reduces pump runtime by automating water level
control, saving energy.

*Rain water Harvesting Systems*

o Tank Level Monitoring: Tracks water levels in rainwater storage tanks


and controls pumps for distribution.
o Automated Usage: Ensures harvested rainwater is used efficiently
for gardening, cleaning, or other non-potable purposes.
o Overflow Prevention: Prevents tanks from over flowing during heavy rainfall.

54
*Commercial and Public Facilities*

o Water Supply Management: Manages water levels in storage tanks for


schools, hospitals, or office buildings.
o Fire Safety Systems: Ensures water tanks for firefighting systems are always at
optimal levels.
o Remote Maintenance: Facility managers can monitor and control
water systems remotely, improving operational efficiency

*Remote and Off-Grid Locations*

o Solar-Powered Water Systems: Integrates with solar-powered pumps


for remote or off-grid water supply system.
o Minimal Human Intervention: Reduces the need for frequent manual checks in
hard-to-reach locations.

*Disaster Relief and Emergency Water Supply*

o Portable Water Management: Used in temporary water storage systems


during disaster relief operations.

55
FUTURE ENHANCEMENT

Future Enhancements for the Smart Hydro System:

The current system is functional and efficient, but there are several enhancements that
can be implemented to improve its capabilities, scalability, and user experience.
Below are some potential future enhancements:

1. *IoT Integration*

o Cloud Connectivity: Integrate the system with IoT platforms (e.g.AWS IoT,
Google Cloud, or Think Speake) for remote monitoring and control via the
internet.
o Data Logging: Store water level, temperature, and pump status data in
the cloud for historical analysis and trend monitoring.
o Mobile App: Develop a dedicated mobile app for real-time notifications,
alerts, and control.

2. *Advanced Sensors*

o Water Quality Monitoring: Add sensors to measure pH, turbidity, or


dissolved oxygen levels for applications like aquaculture or drinking water
systems.
o Flow Rate Sensor: Monitor water flow to detect leaks or measure water
usage accurately.
o Multiple Ultrasonic Sensors: Use multiple sensors for larger tanks or
reservoirs to improve accuracy and coverage.

3. *Energy Efficiency Improvements*

o Solar Power Integration: Add a solar panel and battery system to make
the project eco-friendly and suitable for off-grid locations.

56
o Low-Power Mode: Implement sleep modes or low-power operation for the
Raspberry Pi Pico and peripherals to reduce energy consumption.

4. *Enhanced User Interface*

o Touch screen Display: Replace the LCD with a touch screen for a
more interactive and user-friendly experience.
o Voice Control: Integrate voice assistants like Alexa or Google Assistant
for hands-free control.
o Graphical Visualization: Display water level trends and pump activity
in graphical form on the LCD or mobile app.

5. *Automation and AI*

o Predictive Maintenance: Use machine learning algorithms to predict


pump failures or maintenance needs based on historical data.
o Smart Scheduling: Automate pump operation based on time of day,
weather conditions, or water usage patterns.
o Adaptive Control: Adjust pump speed or operation based on real-time
water demand.

6. *Multi-Tank Support*

o Expand to Multiple Tanks: Modify the system to monitor and control


water levels in multiple tanks simultaneously.
o Priority-Based Pumping: Implement logic to prioritize water pumping based on
tank levels or usage requirements.

57
CHAPTER - 10

58
CONCLUSION
The *SMART HYDRO SYSTEM* project is a smart, efficient, and easy-to-use
solution for managing water levels and pump operations. Using a Raspberry Pi Pico,
sensors, and Bluetooth, it automates water control, saves energy, and prevents water
wastage. It’s perfect for homes, farms, industries, and more.

The project’s compact design, cost-effectiveness, and ease of use make it accessible
to a wide audience, from hobbyists and students to professionals and farmers. With
future enhancements like IoT integration, advanced sensors, and smart automation,
this system has the potential to evolve into a cutting-edge solution for modern water
management challenges.

This project is affordable, compact, and user-friendly, making it great for


beginners and experts alike. With future upgrades like IoT connectivity and advanced
features, it can become even more powerful.

In a world where water is precious, this system helps us use it wisely.


It’s a small step toward smarter water management and a greener future!

In simple:

This project provides an efficient solution for automatic water level monitoring and
control, ensuring optimal water usage. The integration of Raspberry Pi Pico and
ultrasonic sensing makes the system cost-effective and reliable.

59
CHAPTER - 11

60
BIBLIOGRAPHY

Raspberry Pi Foundation. Raspberry Pi Pico Documentation. Raspberry Pi

Press, 2021.

Arduino.cc. Using Ultrasonic Sensors for Distance Measurement,2020.

Texas Instruments. TIP122 Darlington Transistor Data Sheet, 2019.

HC-05 Bluetooth Module. User Manual, Version2.1, 2018.

IEEE Transactions on Industrial Electronics. IoT-based Smart Water Management


Systems, 2021.

International Journal of Embedded Systems. Automated Water Level Monitoring


Using Ultrasonic Sensors and Microcontrollers, 2020.

Harvard University. Fundamentals of Embedded Systems, 2021.

National Renewable Energy Laboratory. Energy-Efficient Water Pumping


Solutions, 2022.

Micro Python.org. Micro Python Documentation, 2023.

Raspberry Pi Press. Getting Started with Raspberry Pi Pico,2021.

Maxim Integrated. NTC Thermistor Applications in Water Monitoring Systems,


2020.

Journal of Smart Technology. Integration of Bluetooth-Based Monitoring in


Water Systems, 2019.

Atmel Corporation. Microcontroller Programming and Applications,2022.

Electronic Components Datasheet Archive. HC-SR04 Ultrasonic Sensor


Specifications, 2021.

61
Embedded Computing Design. Real-Time Water Level Monitoring Using IoT and
Microcontrollers, 2021.

Science Direct. Smart Water Conservation Techniques for Sustainable


Development, 2020.

Journal of Renewable Energy Systems. Solar-Powered Water Pumping


Technologies, 2022.

Analog Devices. Design and Implementation of Low-Power IoT-Based Monitoring


Systems, 2023.

MIT Press. Advances in Sensor Technology for Environmental Monitoring, 2021.

Springer Science. Wireless Communication and Automation in Water


Management, 2022.

National Instruments. Digital Signal Processing for Embedded Systems, 2021.

Wiley Publications. Smart Farming and Agricultural Water Management Systems,


2023.

Elsevier. IoT-Based Water Quality and Quantity Monitoring, 2021.

American Water Works Association. Best Practices for Water Distribution


Automation, 2022.

Google Cloud IoT Solutions. Cloud-Based Remote Monitoring for Smart Water
Systems, 2023.

62
CHAPTER - 12

63
REFERENCES
Wang, Y., & Kumar, R. (2022). IoT-Based Smart Water Management Systems: A
Review. IEEE Access.

Li, J., & Zhao, H. (2021). Wireless Sensor Networks for Water Level Monitoring in
Smart Cities. Elsevier.

Kumar, P., & Singh, A. (2020). Optimization of Energy-Efficient Water Pumps for
Smart Agriculture. Springer.

Johnson, M., & White, R. (2019). Embedded System Design for Water
Conservation. MIT Press.

Patel, S., & Sharma, V. (2022). Integration of IoT with Smart Water Control
Systems. Science Direct.

Gupta, R., & Bose, T. (2023). Advancements in Ultrasonic Sensors for Water
Monitoring. Journal of Emerging Technologies.

Ramesh, D., & Nair, P. (2020). A Comparative Study on Water Pump Control
Mechanisms. IEEE Transactions.

Choudhury, B., & Das, K. (2021). Bluetooth-Based Remote Water Pumping


System. International Journal of Embedded Systems.

Adams, L., & Smith, J. (2023). Microcontroller-Based Automation in Water


Management. Wiley.

Wilson, C., & Ahmed, M. (2019). Renewable Energy Solutions for Smart Water
Pumps. Journal of Renewable Energy.

Davis, K., & Anderson, H. (2021). Low-Power IoT Sensors for Smart Water
Monitoring. Elsevier.

64
Roberts, J., & King3, P. (2022). Cloud-Based Water Monitoring: A Case Study.
Springer.

Kumar, R., & Verma, A. (2023). Artificial Intelligence in Water Conservation


Systems. IEEE Journal on AI Applications.

Jackson, L., & Patel, R. (2020). Real-Time Data Acquisition for Water Level
Control. Journal of Intelligent Systems.

Martin, D., & Lee, K. (2021). Smart Homes and Water Management: Challenges
and Innovations. Science Direct.

Thompson, G., & Rogers, B. (2022). Sensor Calibration Techniques for Water
Monitoring Devices. MIT Press.

Gomez, F., &Richards, T. (2020). Wireless Connectivity in Smart Hydro Systems.


Journal of Wireless Networks.

Edwards, S., & Taylor, M. (2021). Future Trends in IoT-Based Water


Management Solutions. Springer.

National Institute of Water Resources. (2022). Best Practices for Sustainable


Water Use in Smart Cities. Government Publication.

United Nations Water Report. (2023). Smart Water Management for Global
Sustainability. UN Publications.

65

You might also like