You are on page 1of 71

SMART AQUACULTURE MONITORING SYSTEM

A project report submitted in partial fulfillment of requirements to


JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY KAKINADA
For the award of the degree of
BACHELOR OF TECHNOLOGY
in
ELECTRONICS AND COMMUNICATION ENGINEERING
Under the esteemed guidance of
Mr.D.SEKHAR, MTech, Ph.D
Professor, Department of ECE.
Submitted By

AGASTI CHANDRA SEKHAR (20A21A0406)


ANISETTI YESU BABU (20A21A0411)
AVANIGADDA DINDU GOVINDA RAJU (20A21A0413)

DEPARTMENT OF ELECTRONICS & COMMUNICATION ENGINEERING


SWARNANDHRA COLLEGE OF ENGINEERING & TECHNOLOGY
(AUTONOMOUS)
Accredited by NAAC with ‘A’ Grade
(Approved by A.I.C.T.E & permanently Affiliated to JNTU Kakinada)
Seetharampuram, Narsapur-534 280, West Godavari Dt., A.P
2020-2024
SWARNANDHRA COLLEGE OF ENGINEERING AND
TECHNOLOGY
(AUTONOMOUS)

Accredited by NAAC with ‘A’ Grade

Approved by A.I.C.T.E & permanently affiliated to JNTUK Kakinada


Seetharampuram, Narasapur -534280, West Godavari (Dt.), A.P

Department of

ELECTRONICS AND COMMUNICATION ENGINEERING

BONAFIDE CERTIFICATE
This is to certify that this project report “SMART AQUACULTURE SECURITY
MONITORING SYSTEM ” the bonafide work of AGASTI CHANDRA SEKHAR
(20A21A0406), ANISETTI YESUBABU (20A21A0411), AVANIGADDA DINDU
GOVINDARAJU (20A21A0413), in partial fulfillment of the requirements for the
award of the degree of BACHELOR OF TECHNOLOGY in Electronics and
Communication Engineering JNTUK, Kakinada of during the academic year 2023-
2024.

PROJECT GUIDE HEAD OF DEPARTMENT

EXTERNAL EXAMINER
ACKNOWLEDGEMENT

A project is teamwork that is supported by a large number of well-wishers without any


exception to this, we would like to thank a few people who have helped us to convert our dream
to reality.

We extend our heartfelt gratitude to the almighty with profound gratitude, respect, and
pride, we express our sincere thanks to the management of Swarnandhra College of Engineering
&Technology Sri K.V.Satyanarayana, Chairman, Sri.K.V.Swamy, Treasurer, and
Sri.A.SriHari, Director for providing necessary arrangements to carry out of this project.

We wish to express our gratitude to Dr.S.SURESH KUMAR, Principal of


Swarnandhra College of Engineering and Technology, Seetharampuram, for giving
permission to carry out the project.

We would like to express our sincere thanks to Dr. B. SUBRAHMANYESWARA


RAO, M.Tech, Ph.D, Professor & Head of the Department of ECE for offering their
sincere support throughout the project work.

Our deep gratitude to internal Guide Mr. D.SEKHAR, M.Tech, Ph.D, Professor,
Project Guide, and Department of ECE. We thank him for his dedication, guidance, counsel,
and keen interest at every stage of the project.

We would like to extend thanks to all the other staff member both teaching and non–
teaching, for their timely help. Last but not least we owe our sincere thanks to our parents and
all or friends, without whose encouragement our achievement would not have been possible.

PROJECT ASSOCIATES

A.CHANDRA SEKHAR (20A21A0406)

A.YESU BABU (20A21A0411)

A.DINDU GOVINDA RAJU (20A21A0413)


DECLARATION

I certify that
a. The Major project work has been done under the guidance of my
supervisor.
b. The work has not been submitted to any other university for the
award of any degree or diploma.
c. The guidelines of the university are followed in writing the thesis.

Date:

Place:

Reg. No Name of the Student Signature

20A21A0406 A.CHANDRA SEKHAR

20A21A0411 A.YESU BABU

20A21A0413 A.DINDU GOVINDA RAJU


ABSTRACT

Aquaculture is one of the most promising industries in the agricultural sector and fish is
considered a substantial source of protein for people around the world. Traditional aquaculture
practices often face challenges such as resource utilization, environmental impact, and labor-
intensive operations. These current evaluation methods of water quality are laboratory-based
tests that require fresh supplies of chemicals, qualified staff, and water samples. In this study, an
innovative real-time water quality monitoring system for aquaculture applications is proposed.
The system utilized electronic sensors, microcontrollers, and IoT technology for notification
purposes. There are five parameters, monitored namely: pH, turbidity, and water level. The
proposed system continuously monitors the water quality parameter using sensors, the detected
information is conveyed to the aqua-farmer mobile. Accordingly, actions will be taken in time to
reduce the losses and improve the productivity of aquatic animals.
LIST OF CONTENTS

ABSTRACT (i)

LIST OF FIGURES (ii)

LIST OF TABLES (iii)

CHAPTER DESCRIPTION PAGE NO.

1 INTERNER OF THINGS (IOT) 1

1.1 INTRODUCTION TO IOT 2

1.2 CHARACTERISTICS OF IOT 3

1.3 APPLICATIONS OF IOT 4

1.4 HISTORY OF IOT 5

2 LITERATURE SURVEY 6

3 INTRODUCTION TO PROJECT 8

3.1 OBJECTIVES 9

3.2 BLOCK DIAGRAM 10

3.3 WORKING 11

4 HARDWARE COMPONENTS 12

4.1 POWER 13

4.2 ARDUINO UNO 16

4.3 MICROCONTROLLER 23
4.4 PH SENSOR 28

4.5 TURBIDITY SENSOR 33

4.6 FAN SETS 36

4.7 AMMOINA SENSOR 39

4.8 INLET OUTLET MOTORS 42

4.9 BLUETOOTH MODULE 46

5 SOFTWARE DEVELOPMENT 53

5.1 INTRODUCTION TO ARDUINO 54

5.2 INSTALLATION 55

6 EXPERIMENTAL RESULTS 64

6.1 RESULT 65

7 ADVANTAGES AND APPLICATIONS 67

7.1 ADVANTAGES 68

7.2 APPLICATIONS 69

8 CONCLUSION AND FUTURE SCOPE 70

8.1 CONCLUSION 71

8.2 FUTURE SCOPE 71

REFERENCES 72

9 APPENDIX 73

SOURCE CODE 74
Smart Aquaculture Monitoring System

CHAPTER 1

INTERNET OF THINGS(IoT)

Swarnandhra College of Engineering and Technology 1


Smart Aquaculture Monitoring System

1.1 INTRODUCTION TO IoT

IoT stands for Internet of Things. Which is the interconnectedness of physical devices,
such as appliances and vehicles, that are embedded with software, sensors, and connectivity
which enables these objects to connect and exchange data. This technology allows for the
collection and sharing of data from a vast network of devices, creating opportunities for more
efficient and automated systems.

Internet of Things (IoT) is the networking of physical objects that contain electronics
embedded within their architecture in order to communicate and sense interactions amongst
each other or with respect to the external environment. In the upcoming years, IoT-based
technology will offer advanced levels of services and practically change the way people lead
their daily lives. Advancements in medicine, power, gene therapies, agriculture, smart cities,
and smart homes are just a few of the categorical examples where IoT is strongly established.

IOT is a system of interrelated things, computing devices, mechanical and digital machines,
objects, animals, or people that are provided with unique identifiers and its ability to transfer
the data over a network requiring human-to-human or human-to-computer interaction

Swarnandhra College of Engineering and Technology 2


Smart Aquaculture Monitoring System

1.2 CHARACTERISTICS OF IoT

The Internet of Things (IoT) is characterized by the following key features that are
mentioned below.
Connectivity
Connectivity is an important requirement of the IoT infrastructure. Things of IoT should be
connected to the IoT infrastructure. Anyone, anywhere, anytime can connect, this should be
guaranteed at all times.
Intelligence and Identity
The extraction of knowledge from the generated data is very important. For example, a sensor
generates data, but that data will only be useful if it is interpreted properly. Each IoT device
has a unique identity. This identification is helpful in tracking the equipment and at times
for querying its status.
Scalability:
The number of elements connected to the IoT zone is increasing day by day. Hence, an IoT
setup should be capable of handling the massive expansion. The data generated as an
outcome is enormous, and it should be handled appropriately.
Dynamic and Self-Adapting (Complexity):
IoT devices should dynamically adapt themselves to changing contexts and scenarios.
Assume a camera meant for surveillance. It should be adaptable to work in different
conditions and different light situations (morning, afternoon, and night).
Architecture:
IoT Architecture cannot be homogeneous in nature. It should be hybrid, supporting different
manufacturers' products to function in the IoT network. IoT is not owned by anyone
engineering branch. IoT is a reality when multiple domains come together.
Safety:
There is a danger of the sensitive personal details of the users getting compromised when all
his/her devices are connected to the internet. This can cause a loss to the user. Hence, data
security is the major challenge. Besides, the equipment involved is huge. IoT networks may
also be at risk. Therefore, equipment safety is also critical.

Swarnandhra College of Engineering and Technology 3


Smart Aquaculture Monitoring System

Self-Configuring
This is one of the most important characteristics of IoT. IoT devices are able to upgrade
their software in accordance with requirements with a minimum of user participation.
Additionally, they can set up the network, allowing for the addition of new devices to an
already-existing network.

Interoperability
IoT devices use standardized protocols and technologies to ensure they can communicate
with each other and other systems. Interoperability is one of the key characteristics of the
Internet of Things (IoT). It refers to the ability of different IoT devices and systems to
communicate and exchange data with each other, regardless of the underlying technology
or manufacturer.

APPLICATIONS OF IOT
IoT applications bring a lot of value in our lives. The Internet of Things provides objects,
computing devices, or unique identifiers and people's ability to transfer data across a
network without the human-to-human or human-to-computer interaction. The
applications are
Wearables: fit bits, Heart rate monitors, smartwatches.

Smart Home Applications: security systems, Smart lighting, Temperature control

Health care: Smart inhalers, Remote parent monitoring, Smart wheelchairs

Agriculture: Monitoring Climatic conditions, Crop management

Swarnandhra College of Engineering and Technology 4


Smart Aquaculture Monitoring System

1.3 HISTORY OF IoT

Although examples of interconnected electronic devices exist as far back as the early
19th century, with the invention of the telegraph and its ability to transmit information by
coded signal over distance, the origins of the IoT date to the late 1960s. It was then that a
group of prominent researchers began exploring ways to connect computers and systems. A
prime example of this work was ARPANET, the network created by the Advanced Research
Projects Agency (ARPA) of the U.S. defence department this network was a forerunner of
today’s Internet. In the late 1970s businesses, governments, and consumers began exploring
ways to connect personal computers (PCs) and other machines to one another. By the 1980s
local area networks (LANs) provided an effective and widely used way to communicate and
share documents, data, and other information across a group of PCs in real time.

By the mid-1990s the Internet extended those capabilities globally, and researchers
and technologists began exploring ways that humans and machines could better connect. In
1997 British technologist Kevin Ashton, cofounder of the Auto-ID Centre at MIT, began
exploring a technology framework, radio-frequency identification (RFID), that would allow
physical devices to connect via microchips and wireless signals, and it was in a speech in
1999 that Ashton coined the phrase “the Internet of Things.” Within a few years
smartphones, cloud computing, advancements in processing power, and improved software
algorithms had created a framework for collecting, storing, processing, and sharing
data in a more robust way. At the same time, sophisticated sensors appeared that could
measure motion, temperature, moisture levels, wind direction, sound, light, images,
vibrations, and numerous other conditions—along with the ability to pinpoint a person or a
device through geolocation. These developments made possible the ability to communicate
with both digital devices and physical objects in real time. For example, by adding a tracking
chip, such as an Apple Air Tag to an object such as a wallet or suitcase, it is possible to view
its location. The same chip built into a digital device can track its whereabouts if lost or
stolen. Then, with the widespread adoption of mobile devices.

Swarnandhra College of Engineering and Technology 5


Smart Aquaculture Monitoring System

Chapter-2

LITERATURE SURVEY

Swarnandhra College of Engineering and Technology 6


Smart Aquaculture Monitoring System

EXISTING SYSTEM
In the existing system, traditional methods for aquatic environment monitoring involve:
Manual sampling: This method involves collecting water samples at specific intervals for
laboratory analysis. It is time-consuming, labor-intensive, and provides limited data points
determining the appropriate sampling depth to capture relevant data can be challenging,
especially in systems with vertical gradients in temperature, oxygen, and nutrient levels.
The factors such as pH, Turbidity, Salinity, Temperature and water level monitoring are
not interfaced together with an Arduino

LIMITATIONS
Time Consumption: Both manual sampling and fixed-station monitoring methods
consume considerable time, impacting operational efficiency.
Limited Monitoring: These methods may fail to capture real-time changes in aquatic
conditions, potentially missing critical events or trends.
High Cost: Implementation and maintenance costs for equipment, personnel, and
infrastructure are significant, posing financial constraints.
Inaccuracy: Due to the limitations in data collection frequency and spatial coverage, the
results obtained may not fully represent the dynamic nature of aquatic environments, leading
to potential inaccuracies in analysis and decision-making.

Swarnandhra College of Engineering and Technology 7


Smart Aquaculture Monitoring System

CHAPTER-3

INTRODUCTION TO PROJECT

Swarnandhra College of Engineering and Technology 8


Smart Aquaculture Monitoring System

3.1 OBJECTIVES

As of late commercial aquaculture is facing numerous challenges because of abrupt


environmental condition variations that end up in changes in water quality parameters.
As of now, aqua-farmers use manual check strategies for knowing the parameters of
water. This will take longer and is not correct since water quality parameters could change
with respect to time. In order to avoid this downside, innovation should be involved in
aquaculture that improves the potency and limits the losses by constant checking of water
quality parameters.
The goal of this project is to design and execute a distributed system for aquaculture
water quality care through remote observation of turbidity, temperature, salinity, water
level, and pH. This work will contribute remote monitoring framework through IoT to
screen water quality in ponds. The system is portable, modular, low cost, versatile, and
permits the sharing of data through the cloud that can be used for the advancement and
improvement of aquaculture-related activities.

Swarnandhra College of Engineering and Technology 9


Smart Aquaculture Monitoring System

3.2 BLOCK DIAGRAM

Fig:3.2.1 Block diagram

Swarnandhra College of Engineering and Technology 10


Smart Aquaculture Monitoring System

3.3 WORKING

This project centers around utilizing the Internet of Things (IoT) technology to identify the
water quality parameters utilizing sensors that give remote, persistent, and continuous data of
pointers related to water quality. All the parameters like pH, turbidity, and water level are
measured with the help of several sensors like pH sensor, and turbidity sensor, and the
collected data is given to the aqua farmer to maintain the pond. The continuously detected
information is sent directly to the aqua farmer through the app.
Recently IoT has reached the top level with its application to farmers. many papers in the
literature survey focus on how actually aquatic life gets distracted because of modifications in
water quality parameters with respect to time, and how IoT technology is employed to overcome
the problems. Moreover, sending and storing the information in the cloud helps users analyze
the data by data analytics, which might facilitate us to take proactive measures before the
modification in water quality parameters. The- designed system is energized with the assistance
of municipal electricity with a battery. However, aquafarmers face power cuts and this problem
has to be addressed. Our proposed model will give a solution to the aqua farmer before the
damage is done to the aquatic animals and the aquafarmer will get an alert message if the
parameters of the aqua pond exceed the specified threshold range.

A diode can be used as a rectifier. There are various types of diodes. However,
semiconductor diodes are very popularly used as rectifiers. A semiconductor diode is a solid-
state device consisting of two elements: an electron emitter or cathode, the other an electron
collector or anode. Since electrons in a semiconductor diode can flow in one direction only-
form emitter to collector-the diode provides the unilateral conduction necessary for
rectification.
The rectified Output is filtered for smoothening the DC, for this purpose capacitor is used
in the filter circuit. The filter capacitors are usually connected in parallel with the rectifier
output and the load. The AC can pass through a capacitor but DC cannot, the ripples are thus
limited and the output becomes smoothed. When the voltage across the capacitor plates tends
to rise, it stores up energy back into voltage and current. Thus, the fluctuation in the output
voltage is reduced considering

Swarnandhra College of Engineering and Technology 11


Smart Aquaculture Monitoring System

CHAPTER 4

HARDWARE COMPONENTS

Swarnandhra College of Engineering and Technology 12


Smart Aquaculture Monitoring System

4.1 POWER SUPPLY

The Power Supply is a Primary requirement for the project work which power up the
Arduino unit using power supplied from the computer via a USB cable or by using external
power sources. 1. Using a USB cable The USB port of the Arduino Uno can be connected
to a desktop/laptop. If the connection is enumerated, i.e. the computer recognizes the device,
the current supplied to the board is 500mA at 5V.

4.2 ARDUINO UNO

The Arduino Uno is a microcontroller board based on the AT mega328. It has 14 digital
input/output pins (of which 6 can be used as PWM outputs), 6 analog inputs, a 16 MHz
ceramic resonator, a USB connection, a power jack, an ICSP header, and a reset button. It
contains everything needed to support the microcontroller; simply connect it to a computer
with a USB cable or power it with an AC-to-DC adapter or battery to get started.

The Uno differs from all preceding boards in that it does not use the FTDI USB-to-serial
driver chip. Instead, it features the Atmega16U2 (Atmega8U2 up to version R2)
programmed as a USB-to-serial converter. The Uno board has a resistor pulling the 8U2
HWB line to the ground, making it easier to put into DFU mode.
The board has the following new features:
pinout: added SDA and SCL pins that are near the AREF pin and two other new pins
placed near the RESET pin, the IOREF that allow the shields to adapt to the voltage
provided by the board. In the future, shields will be compatible with both the board that uses
the AVR, which operates with 5V, and with the Arduino Due which operates with 3.3V. The
second one is a not connected pin, that is reserved for future purposes.

1.Stronger RESET circuit.


2.AT mega 16U2 replace the 8U2.
"Uno" means one in Italian and is named to mark the upcoming release of Arduino 1.0. The
Uno and version 1.0 will be the reference versions of Arduino, moving forward. The Uno is
the latest in a series of USB Arduino boards.

Swarnandhra College of Engineering and Technology 13


Smart Aquaculture Monitoring System

Arduino pin Diagram:

Fig:4.2.1 Arduino Uno

Pin diagram

Fig:4.2.2 Pin diagram of Arduino Uno

Swarnandhra College of Engineering and Technology 14


Smart Aquaculture Monitoring System

Description:

Microcontroller ATmega328

Operating Voltage 5V

Input Voltage
7-12V
(recommended)

Input Voltage (limits) 6-20V

Digital I/O Pins 14 (of which 6 provide PWM output)

Analog Input Pins 6

DC Current per I/O Pin 40 mA

DC Current for 3.3V Pin 50 mA

32 KB (ATmega328) of which 0.5 KB


Flash Memory
used by bootloader

SRAM 2 KB (ATmega328)

EEPROM 1 KB (ATmega328)

Clock Speed 16 MHz

Length 68.6 mm

Width 53.4 mm

Weight 25 g

Power:

The Arduino Uno can be powered via the USB connection or with an external power
supply. The power source is selected automatically. External (non-USB) power can come
either from an AC-to-DC adapter (wall-wart) or battery. The adapter can be connected by
plugging a 2.1mm centre-positive plug into the board's power jack. Leads from a battery can
be inserted in the Gnd and Vin pin headers of the POWER connector.

Swarnandhra College of Engineering and Technology 15


Smart Aquaculture Monitoring System

The board can operate on an external supply of 6 to 20 volts. If supplied with less than 7V,
however, the 5V pin may supply less than five volts and the board may be unstable. If using
more than 12V, the voltage regulator may overheat and damage the board. The
recommended range is 7 to 12 volts.
The power pins are as follows:

Vin:The input voltage to the Arduino board when it's using an external power source (as opposed to
5 volts from the USB connection or other regulated power source). You can supply voltage through
this pin, or, if supplying voltage via the power jack, access it through this pin.
5V:This pin outputs a regulated 5V from the regulator on the board. The board can be supplied with
power either from the DC power jack (7 - 12V), the USB connector (5V), or the VIN pin of the board
(7-12V). Supplying voltage via the 5V or 3.3V pins bypasses the regulator, and can damage your
board. We don't advise it.
3V3: A 3.3 volt supply generated by the on-board regulator. Maximum current draw is 50 mA.
GND: Ground pins.
IOREF: This pin on the Arduino board provides the voltage reference with which the
microcontroller operates. A properly configured shield can read the IOREF pin voltage and select
the appropriate power source or enable voltage translators on the outputs for working with the 5V or
3.3V.
Memory:
The ATmega328 has 32 KB (with 0.5 KB used for the bootloader). It also has 2 KB of
SRAM and 1 KB of EEPROM (which can be read and written with the EEPROM library).
Input and Output:
Each of the 14 digital pins on the Uno can be used as an input or output, using pinmode
digitalwrite and digital read functions. They operate at 5 volts. Each pin can provide or
receive a maximum of 40 mA and has an internal pull-up resistor (disconnected by default)
of 20-50kOhms. In addition, some pins have specialized functions:

Swarnandhra College of Engineering and Technology 16


Smart Aquaculture Monitoring System

Serial: 0 (RX) and 1 (TX) Used to receive (RX) and transmit (TX) TTL serial data. These
pins are connected to the corresponding pins of the ATmega8U2 USB-to-TTL Serial chip.
External Interrupts: 2 and 3. These pins can be configured to trigger an interrupt on a low
value, a rising or falling edge, or a change in value. See the attachInterrupt () function for
details.
PWM: 3, 5, 6, 9, 10, and 11. Provide 8-bit PWM output with the analogWrite() function.
SPI: 10 (SS), 11 (MOSI), 12 (MISO), 13 (SCK). These pins support SPI
communication using the SPI library.
LED: 13. There is a built-in LED connected to digital pin 13. When the pin is HIGH value,
the LED is on, when the pin is LOW, it's off.

The Uno has 6 analog inputs, labelled A0 through A5, each of which provide 10 bits
of resolution (i.e. 1024 different values). By default they measure from ground to 5 volts,
though is it possible to change the upper end of their range using the AREF pin and the
analogreference function. Additionally, some pins have specialized functionality:
TWI: A4 or SDA pin and A5 or SCL pin. Support TWI communication using the Wire
library.
There are a couple of other pins on the board:
AREF. Reference voltage for the analog inputs. Used with analog Reference.
Reset. Bring this line LOW to reset the microcontroller. Typically used to add a reset
button to shields which block the one on the board.
See also the mapping between Arduino pins and ATmega328 ports. The mapping for
the Atmega8, 168, and 328 is identical.

Swarnandhra College of Engineering and Technology 17


Smart Aquaculture Monitoring System

Automatic (Software) Reset:

Rather than requiring a physical press of the reset button before an upload, the Arduino
Uno is designed in a way that allows it to be reset by software running on a connected
computer. One of the hardware flow control lines (DTR) of the ATmega8U2/16U2 is
connected to the reset line of the ATmega328 via a 100 nanofarad capacitor. When this line
is asserted (taken low), the reset line drops long enough to reset the chip. The Arduino
software uses this capability to allow you to upload code by simply pressing the upload
button in the Arduino environment. This means that the bootloader can have a shorter
timeout, as the lowering of DTR can be well-coordinated with the start of the upload.

This setup has other implications. When the Uno is connected to either a computer
running Mac OS X or Linux, it resets each time a connection is made to it from software (via
USB). For the following half-second or so, the bootloader is running on the Uno. While it is
programmed to ignore malformed data (i.e. anything besides an upload of new code), it will
intercept the first few bytes of data sent to the board after a connection is opened. If a sketch
running on the board receives one-time configuration or other data when it first starts, make
sure that the software with which it communicates waits a second after opening the
connection and before sending this data.

The Uno contains a trace that can be cut to disable the auto-reset. The pads on either
side of the trace can be soldered together to re-enable it. It's labeled "RESET-EN". You may
also be able to disable the auto-reset by connecting a 110 Ohm resistor from 5V to the reset
line; see this forum thread for details.

Swarnandhra College of Engineering and Technology 18


Smart Aquaculture Monitoring System

4.3Microcontroller (ATmega328):

FIG:4.3 Microcontroller of at mega328


The Atmel AVR® core combines a rich instruction set with 32 general purpose working
registers. All the 32 registers are directly connected to the Arithmetic Logic Unit (ALU),
allowing two independent registers to be accessed in a single instruction executed in one
clock cycle. The resulting architecture is more code efficient while achieving throughputs
up to ten times faster than conventional CISC microcontrollers. The ATmega328/P provides
the following features: 32Kbytes of In-System Programmable Flash with Read-While-Write
capabilities, 1Kbytes EEPROM, 2Kbytes SRAM, 23 general purpose I/O lines, 32 general
purpose working registers, Real Time Counter (RTC), three flexible Timer/Counters with
compare modes and PWM, 1 serial programmable USARTs , 1 byte-oriented 2-wire Serial
Interface (I2C), a 6- channel 10-bit ADC (8 channels in TQFP and QFN/MLF packages) , a
programmable Watchdog Timer with internal Oscillator, an SPI serial port, and six software
selectable power saving modes. The Idle mode stops the CPU while allowing the SRAM,
Timer/Counters, SPI port, and interrupt system to continue functioning. The Power-down
mode saves the register contents but freezes the Oscillator, disabling all other chip functions
until the next interrupt or hardware reset. In Power-save mode, the asynchronous timer
continues to run, allowing the user to maintain a timer base while the rest of the device is
sleeping. The ADC Noise Reduction mode stops the CPU and all I/O modules except
asynchronous timer and ADC to minimize switching noise during ADC conversions. In
Standby mode, the crystal/resonator oscillator is running while the rest of the device is
sleeping. This allows very fast start-up combined with low power consumption. In Extended
Standby mode, both the main oscillator and the asynchronous timer continue to run.

Swarnandhra College of Engineering and Technology 19


Smart Aquaculture Monitoring System

4.3.1Block diagram

Fig:4.3.1 Block diagram of microcontroller


The device is manufactured using Atmel’s high-density non-volatile memory technology.
The On-chip ISP Flash allows the program memory to be reprogrammed In-System through
an SPI serial interface, by a conventional nonvolatile memory programmer, or by an On-
chip Boot program running on the AVR core. The Boot program can use any interface to
download the application program in the Application Flash memory. Software in the Boot
Flash section will continue to run while the Application Flash section is updated, providing
true Read-While-Write operation. By combining an 8-bit RISC CPU with In-System Self-
Programmable Flash on a monolithic chip, the Atmel ATmega328/P is a powerful
microcontroller that provides a highly flexible and cost effective solution to many embedded
control applications. The ATmega328/P is supported with a full suite of program and system
development tools including: C Compilers, Macro Assemblers, Program
Debugger/Simulators, In-Circuit Emulators, and Evaluation kits.

Swarnandhra College of Engineering and Technology 20


Smart Aquaculture Monitoring System

4.3.2Pin diagram

Fig:4.3.2 pin diagram of microcontroller

Pin Description Vcc


Digital supply voltage.
GND
Ground.
Port B ( PB[7:0]) XTAL1/XTAL2/TOSC1/TOSC2
Port B is an 8-bit bi-directional I/O port with internal pull-up resistors (selected for each bit).
The Port B output buffers have symmetrical drive characteristics with both high sink and
source capability. As inputs, Port B pins that are externally pulled low will source current if
the pull-up resistors are activated. The Port B pins are tri-stated when a reset condition
becomes active, even if the clock is not running. Depending on the clock selection fuse
settings, PB6 can be used as input to the inverting Oscillator amplifier and input to the
internal clock operating circuit. Depending on the clock selection fuse settings, PB7 can be
used as output from the inverting Oscillator amplifier. If the Internal Calibrated RC
Oscillator is used as chip clock source, PB[7:6] is used as TOSC[2:1] input for the
Asynchronous Timer/Counter2 if the AS2 bit in ASSR is set
.Port C (PC[5:0]) Port C is a 7-bit bi-directional I/O port with internal pull-up resistors

Swarnandhra College of Engineering and Technology 21


Smart Aquaculture Monitoring System

(selected for each bit).


The PC[5:0] output buffers have symmetrical drive characteristics with both high sink and
source capability. As inputs, Port C pins that are externally pulled low will source current if
the pull-up resistors are activated. The Port C pins are tri-stated when a reset condition
becomes active, even if the clock is not running.
PC6/RESET
If the RSTDISBL Fuse is programmed, PC6 is used as an I/O pin. Note that the electrical
characteristics of PC6 differ from those of the other pins of Port C. If the RSTDISBL Fuse is
unprogrammed, PC6 is used as a Reset input. A low level on this pin for longer than the
minimum pulse length will generate a Reset, even if the clock is not running. Shorter pulses are
not guaranteed to generate a Reset. The various special features of Port C are elaborated in the
Alternate Functions of Port C section.
Port D (PD[7:0])
Port D is an 8-bit bi-directional I/O port with internal pull-up resistors (selected for each bit).
The Port D output buffers have symmetrical drive characteristics with both high sink and source
capability. As inputs, Port D pins that are externally pulled low will source current if the pull-
up resistors are activated. The Port D pins are tri-stated when a reset condition becomes active,
even if the clock is not running. 5.2.7. AVCC A VCC is the supply voltage pin for the A/D
Converter, PC[3:0], and PE[3:2]. It should be externally connected to VCC, even if the ADC is
not used. If the ADC is used, it should be connected to VCC through a low-pass filter. Note that
PC[6:4] use digital supply voltage, VCC.
AREF
AREF is the analog reference pin for the A/D Converter.
ADC[7:6] (TQFP and VFQFN Package Only)
In the TQFP and VFQFN package, ADC[7:6] serves as analog inputs to the A/D converter.
These pins are powered by the analog supply and serve as 10-bit ADC channels.

Swarnandhra College of Engineering and Technology 22


Smart Aquaculture Monitoring System

Configuration Summary

Swarnandhra College of Engineering and Technology 23


Smart Aquaculture Monitoring System

4.4pH Sensor
A pH sensor is a device used to measure the acidity or alkalinity of a substance. It
typically consists of a probe that contains a glass electrode and a reference electrode. The
glass electrode generates a voltage that is proportional to the hydrogen ion concentration
in the solution, which is then converted into a pH value. pH sensors are commonly used
in various industries including agriculture, water treatment, food and beverage
production, and scientific research.

Fig:4.4 pH sensor

Working of pH Sensor
The pH amplifier inside the handle is a circuit which allows the standard combination
pH electrode to be monitored by a lab interface. The cable from the pH amplifier ends in
a BTA plug. The pH Sensor will produce a voltage of approximately 1.75 volts in a pH 7
buffer. The voltage will increase by about 0.25 volts for every pH number decrease. The
voltage will decrease by about 0.25 volts/pH number as the pH increases. The Vernier
gel-filled pH Sensor is designed to make measurements in the pH range of 0 to 14. The
gel-filled reference half cell is sealed; it cannot be refilled.

Swarnandhra College of Engineering and Technology 24


Smart Aquaculture Monitoring System

A pH meter is a scientific instrument that measures the hydrogen-


ion activity in water-based solutions, indicating its acidity or alkalinity expressed as pH .
The pH meter measures the difference in electrical potential between a pH electrode and
a reference electrode, and so the pH meter is sometimes referred to as a "potentiometric
pH meter". The difference in electrical potential relates to the acidity or pH of the solution.
Testing of pH via pH meters (pH-metry) is used in many applications ranging from the
laboratory experimentation to quality control.

Fig:4.4.1 pH scale

pH Sensor Module with Electrode Probe


Being measured, the electrode must be calibrated with a standard buffer solution of known
pH value. In order to obtain more accurate results, the known pH value should be reliable,
and closer to the measured one. When the measurement is completed, the electrode
protective sleeve should be put on. A small amount of 3.3mol / L potassium chloride
solution should be placed in the protective sleeve to keep the electrode bulb wet. The
leading end of the electrode must be kept clean and dry to prevent short circuits at both
ends of the output, otherwise, it will lead to inaccurate or invalid measurement results.
After long-term use of the electrode, if you find that the gradient is slightly inaccurate,
you can soak the lower end of the electrode in 4% HF (hydrofluoric acid) for 3-5 seconds,
wash it with distilled water, and then soak in potassium chloride solution to make it new.

Swarnandhra College of Engineering and Technology 25


Smart Aquaculture Monitoring System

Fig:4.4.2pH sensor electrode probe


A pH sensor probe is the physical component of a pH sensor that comes into direct
contact with the solution being measured. It typically consists of a glass electrode and a
reference electrode housed within a protective casing.
Glass Electrode: The glass electrode is the primary sensing element of the probe. It is
composed of a thin glass membrane that selectively interacts with hydrogen ions in the
solution. When immersed in a solution, the glass membrane develops a potential difference
(voltage) relative to the reference electrode, which is proportional to the pH of the solution.
The glass electrode is sensitive to changes in pH and generates a voltage signal accordingly.
Reference Electrode: The reference electrode provides a stable reference voltage against
which the potential of the glass electrode is measured. It is typically made of a stable metal
immersed in a solution with a known and constant pH. Common reference electrodes use a
silver/silver chloride (Ag/AgCl) electrode immersed in a potassium chloride (KCl) solution.
The reference electrode ensures the accuracy and stability of the pH measurement.
Junction: The probe may also have a junction, which is the point where the internal
reference electrolyte contacts the solution being measured. The junction allows ions to flow
between the internal electrolyte and the solution, maintaining electrical contact and
facilitating the measurement process.

Swarnandhra College of Engineering and Technology 26


Smart Aquaculture Monitoring System

Protective Casing
The probe is enclosed in a protective casing to shield the electrodes from damage and
contamination. The casing is typically made of materials such as plastic or epoxy, which are
chemically resistant and non-reactive with the solution being measured. It also helps
maintain the integrity of the electrodes and ensures accurate and reliable measurements over
time.

Specifications
The specifications of a pH sensor can vary depending on the manufacturer, model, and
intended application. However, here are some common specifications you might find for pH
sensors:
Measurement Range: The pH range over which the sensor can accurately measure acidity
or alkalinity. Typical ranges are from 0 to 14 pH units.
Accuracy: The degree of closeness of measurements to the actual pH value. Accuracy is
often expressed as a percentage of the full-scale range or in pH units.
Resolution: The smallest increment of pH that the sensor can detect. It indicates the sensor's
ability to discern small changes in pH.
Response Time: The time it takes for the sensor to reach a stable pH reading after being
immersed in a solution or after a pH change occurs. Faster response times are desirable for
real-time monitoring applications.
Temperature Range: The operating temperature range within which the sensor can provide
accurate pH measurements. Some pH sensors are equipped with temperature compensation
to correct for temperature variations.
Pressure Range: Some pH sensors are rated for specific pressure ranges, especially if they
are used in applications where pressure variations occur, such as in pipelines or reactors.
Junction Type: The type of junction used in the pH sensor, which can affect the sensor's
performance in different types of solutions and environments. Common junction types
include ceramic, double junction, and triple junction.
Maintenance Requirements: Information about calibration frequency, storage conditions,
and cleaning procedures to maintain the sensor's performance over time.
Compatibility: Whether the sensor is compatible with specific types of solutions, such as
aqueous solutions, organic solvents, or aggressive chemicals.
Output Signal: The type of output signal provided by the sensor, such as analog (voltage or

Swarnandhra College of Engineering and Technology 27


Smart Aquaculture Monitoring System

current), digital (RS-485, Modbus, etc.), or frequency.


Enclosure Material: The material used to construct the sensor's housing, which should be
chemically resistant and suitable for the intended application environment. These
specifications are essential considerations when selecting a pH sensor for a particular
application, as they determine the sensor's suitability, performance, and reliability in the
intended operating conditions

Swarnandhra College of Engineering and Technology 28


Smart Aquaculture Monitoring System

4.5Turbidity Sensor

Turbidity sensors measure the amount of light that is scattered by suspended solids in a
liquid, such as water. When the concentration of total suspended solids (TSS) and total
dissolved solids (TDS) in a liquid increase, the turbidity also increases.

Fig:4.5 Turbidity sensor


A turbidity sensor is a device used to measure the cloudiness or haziness of a fluid
caused by suspended particles. Turbidity is often used as an indicator of water quality and can
be influenced by factors such as sediment, algae, organic matter, and industrial waste.
Turbidity sensors are commonly used in environmental monitoring, water treatment,
wastewater management, and industrial processes. Here are some key features and
considerations for turbidity sensors:

Measurement Principle: Turbidity sensors operate based on various principles to measure


the scattering or absorption of light by suspended particles in the fluid. Common measurement
principles include nephelometry, where the amount of scattered light at a specific angle is
measured, and transmittance, where the decrease in light transmission through the fluid is
measured.

Swarnandhra College of Engineering and Technology 29


Smart Aquaculture Monitoring System

Detection Range: Turbidity sensors typically have a specified detection range, which
indicates the range of turbidity values that the sensor can accurately measure. The detection
range can vary depending on the sensor model and application requirements.
Accuracy and Resolution: The accuracy and resolution of a turbidity sensor determine its
ability to provide precise measurements of turbidity levels. High-resolution sensors can
detect small changes in turbidity, while high-accuracy sensors provide reliable
measurements across a wide range of turbidity levels.
Response Time: The response time of a turbidity sensor refers to the time it takes for the
sensor to register a change in turbidity and provide a stable reading. Faster response times
are desirable for applications requiring real-time monitoring and control.
Calibration: Turbidity sensors often require periodic calibration to ensure accurate
measurements. Calibration procedures may involve using standard reference solutions or
calibration kits to adjust the sensor readings based on known turbidity values.
Temperature Compensation: Some turbidity sensors feature temperature compensation to
correct for variations in temperature that can affect turbidity measurements. Temperature
compensation helps ensure the accuracy and reliability of measurements, especially in
environments with fluctuating temperatures.
Mounting Options: Turbidity sensors may be available in various mounting configurations,
including submersible sensors for immersion in water, in-line sensors for installation in pipes
or flow cells, and portable handheld sensors for on-site measurements.
Maintenance Requirements: Consider the maintenance requirements of the turbidity
sensor, including cleaning procedures to remove fouling or buildup on the sensor's optical
surfaces and replacement of consumable parts such as membranes or filters.
Compatibility: Ensure that the turbidity sensor is compatible with the fluid being measured
and suitable for the intended application environment. Some sensors may be specifically
designed for freshwater, seawater, or wastewater applications.
By considering these features and specifications, you can select a turbidity sensor that
meets your specific measurement requirements and ensures accurate and reliable monitoring
of water quality.

Swarnandhra College of Engineering and Technology 30


Smart Aquaculture Monitoring System

WORKING PRINCIPLE
The working principle of a turbidity sensor involves measuring the scattering or
absorption of light by suspended particles in a fluid, typically water. Turbidity sensors utilize
various methods to quantify the turbidity or cloudiness of the water, providing an indication
of the concentration of suspended particles.
Here's a general overview of how turbidity sensors work:
Light Source: Turbidity sensors typically incorporate a light source, such as an LED (Light
Emitting Diode), that emits light into the water being measured. The wavelength of the light
emitted by the source is often carefully selected based on the sensor's design and intended
application.
Detector: The sensor also includes a detector positioned at a specific angle relative to the light
source. The detector is responsible for capturing and measuring the light that interacts with
the suspended particles in the water.
Scattering or Absorption: When light encounters suspended particles in the water, it
undergoes scattering or absorption. The extent of scattering or absorption depends on various
factors, including the size, shape, and concentration of the particles, as well as the wavelength
of the light.
Measurement Method: Turbidity sensors use different measurement methods to quantify
turbidity based on the interaction of light with suspended particles. Two common methods are
nephelometry and transmittance:
Conversion to Turbidity Units: The sensor converts the measured light intensity or
transmittance into turbidity units, typically expressed in NTU (Nephelometric Turbidity
Units) or FNU (Formazin Nephelometric Units), which are standardized units of turbidity
measurement.
Calibration: Turbidity sensors often require calibration using standard reference solutions or
calibration standards to ensure accurate measurements. Calibration procedures involve
adjusting the sensor's response based on known turbidity values to account for variations in
sensor performance.
By measuring the scattering or absorption of light by suspended particles, turbidity sensors
provide a quantitative assessment of water clarity or turbidity, making them valuable tools for
monitoring water quality in various applications.

Swarnandhra College of Engineering and Technology 31


Smart Aquaculture Monitoring System

4.6 FAN SETS

Fan Sets:
Description: fan sets consist of fans equipped with controllers that regulate temperature and
aeration levels in aquaculture facilities.
Function: Automatic fan sets help maintain optimal temperature and aeration levels by adjusting
fan speed based on environmental conditions and system requirements.
Fan Size and Capacity: Varies depending on system requirements and application
Control Interface: Typically digital control signals from Arduino Uno microcontroller

Explanation:
Aerators are vital in semi-intensive and intensive aquaculture ponds to maintain optimum
dissolved oxygen suitable to the physiological needs of the farmed Aquatic organisms. Aeration
plays a crucial role in intensive culture ponds /tanks because atmospheric oxygen diffusion is not
sufficient to meet the oxygen demand of biota in intensive fish culture units. Aerators enhance
the interfacial area between air and water, facilitating oxygen transfer and creating water
circulation, ultimately preventing stratification in the water.
Different varieties of aerators have been designed over the years to support the desired level of
dissolved oxygen (DO) concentration in pond water to maximize the energy efficiency of the
oxygen mass transfer process. The selection of aerators is critical to optimizing profit and
reducing the production cost, accounting for around 15%. After post larvae and feed, it is the
third most expensive expenditure in an intense aquaculture system. The choice of an aeration
system depends mainly on technical and economic aspects other than specific requirements
because artificial aeration involves high energy costs and requires a large apparatus.
The least aeration cost is achieved only when the rotational speed of the spiral aerator(a modified
design of the paddlewheel aerator) is only 70 rpm for pond volumes up to 700 m3, and it ranges
from 120 to 220 rpm for pond volumes exceeding 700 m3 of aquaculture ponds. Dissolved
oxygen is one of the vital water quality parameters, and it determines the oxygen present in water.
Thus according to (Shultz et al., 2011), dissolved oxygen is essential to the process of aquatic
life. As a result, Aerators enhance the oxygen requirement for fish growth, and it is crucially
important in the intensive pond stocked with high densities. The circulation and aeration of
surface water with pumps or by stirring with the boat or outboard motor prevented fish
kills.Dissolved oxygen concentration measured either milligrams of gas per liter of water (mg/l)

Swarnandhra College of Engineering and Technology 32


Smart Aquaculture Monitoring System
or parts per million (ppm) and also measured in percent saturation stated that dissolved oxygen
concentration in water at saturation differs with water temperature, salinity, and barometric
pressure. Aerators influence the oxygen transfer rate from air to water by increasing water’s
turbulence and surface area in contact with air Aeration may also be a suitable method for
managing thermal stratification.
Aerators can increase fish and shrimp production in ponds, but few generally accepted guidelines
on how best to apply aeration in ponds (Boyd, 2001& 2003; Tucker, 2005; Tucker and Robinson,
1990). This document presents information about managing production using an aeration system
in aquaculture ponds. In broad terms, this technical note converses dissolved oxygen dynamics
in ponds, types of pond aerators, and the use of aerators in ponds.

Fig:4.6 Fan Sets

Swarnandhra College of Engineering and Technology 33


Smart Aquaculture Monitoring System

4.6 AMMONIA SENSOR


Ammonia nitrogen is a common byproduct of fish excretion and decaying organic matter in
aquaculture systems. The presence of ammonia in water can be detrimental to fish health and
growth, ultimately leading to mortality if chronic exposure occurs. Ammonia toxicity can also
affect the overall water quality, potentially causing harm to other aquatic organisms and the
surrounding ecosystem. Monitoring ammonia nitrogen levels in aquaculture systems is crucial
to maintaining water quality and ensuring the well-being of the fish stock.

Ammonia Nitrogen Sensors: A Game-Changer in Aquaculture Management

Traditionally, monitoring ammonia nitrogen levels in aquaculture systems required regular


water sampling and laboratory analysis, which often proved time-consuming and delayed
corrective actions. With the advent of ammonia nitrogen sensors, monitoring becomes real-
time and significantly more efficient. These sensors are capable of continuously measuring
ammonia nitrogen levels in water, providing immediate feedback to aquaculture operators.
This instant data allows for timely adjustments in feed management, water exchange, and
overall system management to prevent adverse effects on fish health.
Key Benefits of Ammonia Nitrogen Sensors

Real-time Monitoring: Ammonia nitrogen sensors offer real-time monitoring capabilities,


enabling aquaculture operators to respond promptly to changes in water quality. By providing
continuous data, these sensors assist in the early detection of ammonia spikes, allowing for
prompt remedial actions.
Improved Fish Health and Growth: Maintaining optimal ammonia nitrogen levels is crucial
for fish health and growth. By using ammonia nitrogen sensors, aquaculture operators can
ensure that the water conditions remain within the safe range for their fish stock, reducing the
risk of stress-related illnesses and boosting overall growth rates.
Enhanced Water Quality Control: Proper management of ammonia nitrogen levels not only
benefits fish health but also contributes to maintaining a healthy aquatic environment. By
implementing ammonia nitrogen sensors, aquaculture operators can accurately measure and
control ammonia levels, preventing contamination and preserving the surrounding ecosystem.
Cost Reduction: Timely detection and correction of ammonia spikes can significantly reduce
the economic losses resulting from fish and poor growth. Additionally, the automation

Swarnandhra College of Engineering and Technology 34


Smart Aquaculture Monitoring System

provided by ammonia nitrogen sensors eliminates the need for repetitive manual testing, saving
lab and error.
Implementing Ammonia Nitrogen Sensors for Sustainable Aquaculture Practices

To effectively implement ammonia nitrogen sensors in aquaculture systems, operators should


consider the following steps:

Sensor Selection: Choose reliable and accurate ammonia nitrogen sensors that are suitable for
the specific aquaculture setup. Factors like sensor cost, durability, and compatibility with
existing monitoring systems should be considered.
Installation and Calibration: Follow the manufacturer's guidelines for sensor installation and
calibration. Proper installation and periodic calibration of the sensors are crucial to ensure
accurate readings over time.
Data Integration and Analysis: Establish a data integration system that allows for real-time
monitoring and analysis of ammonia nitrogen levels. This enables quick decision-making and
timely actions based on the sensor data.
Operator Training: Sensitize aquaculture operators and employees about the importance of
ammonia nitrogen monitoring and empower them to effectively utilize the data provided by the
sensors.
Continuous System Monitoring: Regularly maintain and monitor both the sensors and the
overall aquaculture system to ensure optimal sensor performance and overall system efficiency.
Ammonia nitrogen sensors have revolutionized the way aquaculture operators manage water
quality. By providing real-time data and allowing for immediate interventions, these sensors
play a vital role in sustainable aquaculture practices. Through effective implementation and
periodic maintenance, ammonia nitrogen sensors can aid in achieving and maintaining a healthy
ecosystem, while ensuring the long-term viability and profitability of aquaculture operations.

Swarnandhra College of Engineering and Technology 35


Smart Aquaculture Monitoring System

Fig:4.6 Ammonia Sensor

Swarnandhra College of Engineering and Technology 36


Smart Aquaculture Monitoring System

4.8 INLET OUTLET MOTORS

1. Inlet System:
o The inlet system plays a crucial role in optimizing water flow and maintaining
favorable conditions for fish in aquaculture tanks.
o Key components of the inlet system include:
 Jet Pipe: The jet pipe is used to regulate the flow rate of water entering the
ank. It ensures efficient water exchange and oxygenation.
 Clean Water Supply: The inlet system provides clean, oxygenated water to
the fish farming tanks, promoting fish health and growth.
2. Outlet System:
o The outlet system is responsible for draining water from the tank.
o Components of the outlet system include:
 Outlet Box: This collects water from the tank.
 Outlet Pipe: The outlet pipe carries water away from the tank.
 Side Outlet: Some systems may have additional side outlets for specific
purposes.
3. Applications:
o In aquaculture, proper inlet and outlet systems are essential for maintaining water
quality, preventing stagnation, and ensuring optimal conditions for fish.
o These systems contribute to efficient water exchange, oxygen supply, and waste
removal.

Fig:4.8 Inlet Outlet Motors

Swarnandhra College of Engineering and Technology 37


Smart Aquaculture Monitoring System

4.9 BLUETOOTH MODULE

Using of HC-05 Bluetooth module


The HC-05 has two operating modes, one is the Data mode in which it can send and receive data
from other Bluetooth devices and the other is the AT Command mode where the default device
settings can be changed. We can operate the device in either of these two modes by using the key
pin as explained in the pin description.

It is very easy to pair the HC-05 module with microcontrollers because it operates using the Serial
Port Protocol (SPP). Simply power the module with +5V and connect the Rx pin of the module
to the Tx of MCU and the Tx pin of the module to the Rx of MCU as shown in the figure below

Fig:4.9 Bluetooth Module

During power up the key pin can be grounded to enter into Command mode, if left free it will
by default enter into the data mode. As soon as the module is powered you should be able to
discover the Bluetooth device as “HC-05” then connect with it using the default password
1234 and start communicating with it. The name password and other default parameters can
be changed by entering into the

Swarnandhra College of Engineering and Technology 38


Smart Aquaculture Monitoring System

HC-05 Default Settings

 Default Bluetooth Name: “HC-05”

 Default Password: 1234 or 0000

 Default Communication: Slave

 Default Mode: Data Mode

 Data Mode Baud Rate: 9600, 8, N, 1

 Command Mode Baud Rate: 38400, 8, N, 1

 Default firmware: LINVOR

HC-05 Technical Specifications

 Serial Bluetooth module for Arduino and other microcontrollers


 Operating Voltage: 4V to 6V (Typically +5V)
 Operating Current: 30mA
 Range: <100m
 Works with Serial communication (USART) and TTL-compatible
 Follows IEEE 802.15.1 standardized protocol
 Uses Frequency-Hopping Spread Spectrum (FHSS)
 Can operate in Master, Slave, or Master/Slave mode
 Can be easily interfaced with Laptops or Mobile phones with Bluetooth
 Supported baud rate: 9600,19200,38400,57600,115200,230400,460800.

Swarnandhra College of Engineering and Technology 39


Smart Aquaculture Monitoring System

CHAPTER 5
SOFTWATER DEVELOPMENT

Swarnandhra College of Engineering and Technology 40


Smart Aquaculture Monitoring System

5.1 INTRODUCTION TO ARDUINO UNO

Fig:5.1 Arduino uno

Arduino is a prototype platform (open-source) based on an easy-to-use hardware and


software. It consists of a circuit board, which can be programmed (referred to as a
microcontroller) and a ready-made software called Arduino IDE (Integrated Development
Environment), which is used to write and upload the computer code to the physical board. The
key features are:
a. Arduino boards are able to read analog or digital input signals from different sensors and turn
it into an output such as activating a motor, turning LED on/off, connect to the cloud and many
other actions.
b. You can control your board functions by sending a set of instructions to the microcontroller
on the board via Arduino IDE (referred to as uploading software).
c. Unlike most previous programmable circuit boards, Arduino does not need an extra piece of
hardware (called a programmer) in order to load a new code onto the board. You can simply
use a USB cable.
d. Additionally, the Arduino IDE uses a simplified version of C++, making it easier to learn to
program.
e. Finally, Arduino provides a standard form factor that breaks the functions of the micro-
controller into a more accessible package.

Swarnandhra College of Engineering and Technology 41


Smart Aquaculture Monitoring System

5.2 ARDUINO INSTALLATION

After learning about the main parts of the Arduino UNO board, we are ready to learn
how to set up the Arduino IDE. Once we learn this, we will be ready to upload our program
on the Arduino board. In this section, we will learn in easy steps, how to set up the Arduino
IDE on our computer and prepare the board to receive the program via USB cable.

Step 1: First you must have your Arduino board (you can choose your favorite board) and a
USB cable. In case you use Arduino UNO, Arduino Duemilanove, Nano, Arduino Mega 2560,
or Diecimila, you will need a standard USB cable (A plug to B plug), the kind you would
connect to a USB printer as shown in the following image.

Fig:5.2USB Cable

In case you use Arduino Nano, you will need an A to Mini-B cable instead as shown in the
following image .

Step 2: Download Arduino IDE Software.


You can get different versions of Arduino IDE from the Download page on the Arduino
Official website. You must select your software, which is compatible with your operating
system (Windows, IOS, or Linux). After your file download is complete, unzip the file.

Swarnandhra College of Engineering and Technology 42


Smart Aquaculture Monitoring System

Fig:5.2.1Device manager
Step 3: Power up your board. The Arduino Uno, Mega, Duemilanove and Arduino Nano
automatically draw power from either, the USB connection to the computer or an external
power supply. If you are using an Arduino Diecimila, you have to make sure that the board
is configured to draw power from the USB connection. The power source is selected with a
jumper, a small piece of plastic that fits onto two of the three pins between the USB and
power jacks. Check that it is on the two pins closest to the USB port. Connect the Arduino
board to your computer using the USB cable. The green power LED (labeled PWR) should
glow.

Step 4: Launch Arduino IDE. After your Arduino IDE software is downloaded, you need
to unzip the folder. Inside the folder, you can find the application icon with an infinity label
(application.exe). Double click the icon to start the IDE.

Swarnandhra College of Engineering and Technology 43


Smart Aquaculture Monitoring System

Fig:5.2.2 Driver application

Step 5: Open your first project.


a. Once the software starts, you have two options:
b. Create a new project.
c. Open an existing project example.
To create a new project, select File --> New.

Fig:5.2.3Driver software

Swarnandhra College of Engineering and Technology 44


Smart Aquaculture Monitoring System

To open an existing project example, select File -> Example -> Basics -> Blink.

Fig:5.2.4 Arduino Tab

Here, we are selecting just one of the examples with the name Blink. It turns the LED on
and off with some time delay. You can select any other example from the list.

Step 6: Select your Arduino board.


To avoid any error while uploading your program to the board, you must select the correct
Arduino board name, which matches with the board connected to your computer.
Go to Tools -> Board and select your board.

Swarnandhra College of Engineering and Technology 45


Smart Aquaculture Monitoring System

Fig:5.2.5Arduino board selecting


Here, we have selected Arduino Uno board according to our tutorial, but you must select
the name matching the board that you are using.

Step 7: Select your serial port. Select the serial device of the Arduino board. Go to Tools
1.Serial Port menu. This is likely to be COM3 or higher (COM1 and COM2 are usually
reserved for hardware serial ports). To find out, you can disconnect your Arduino board and
re-open the menu, the entry that disappears should be of the Arduino board. Reconnect the
board and select that serial port.

Swarnandhra College of Engineering and Technology 46


Smart Aquaculture Monitoring System

Fig:5.2.6 Tool Selecting


Step 8: Upload the program to your board.
Before explaining how we can upload our program to the board, we must demonstrate the
function of each symbol appearing in the Arduino IDE toolbar.

A- Used to check if there is any compilation error.


B- Used to upload a program to the Arduino board.
C- Shortcut used to create a new sketch.
D- Used to directly open one of the example sketch.

Swarnandhra College of Engineering and Technology 47


Smart Aquaculture Monitoring System

E- Used to save your sketch.


F- Serial monitor used to receive serial data from the board and send the serial data to
the board.
Now, simply click the "Upload" button in the environment. Wait a few seconds; you
will see the RX and TX LEDs on the board, flashing. If the upload is successful, the
message "Done uploading" will appear in the status bar. Note: If you have an Arduino
Mini, NG, or other board, you need to press the reset button physically on the board,
immediately before clicking the upload button on the Arduino Software.

Swarnandhra College of Engineering and Technology 48


Smart Aquaculture Monitoring System

Program structure

The source code for the Java environment is released under the GPL and the C/C++
microcontroller libraries are under the LGPL.
Sketch: The first new terminology is the Arduino program called “sketch”.
Structure
Arduino programs can be divided in three main parts: Structure, Values (variables and
constants), and Functions. In this tutorial, we will learn about the Arduino software
program, step by step, and how we can write the program without any syntax or
compilation error.
Let us start with the Structure. Software structure consist of two main functions:
1.Setup( ) function
2.Loop( ) function

Fig:5.2.7upload programmer

Swarnandhra College of Engineering and Technology 49


Smart Aquaculture Monitoring System

Void setup ( )
{
}

PURPOSE: The setup() function is called when a sketch starts. Use it to initialize
the variables, pin modes, start using libraries, etc. The setup function will only run
once, after each power up or reset of the Arduino board.
INPUT: -
OUTPUT: -
RETURN: -

Void Loop ( )
{
}

PURPOSE: After creating a setup() function, which initializes and sets the initial
values, the loop() function does precisely what its name suggests, and loops
consecutively, allowing your program to change and respond. Use it to actively
control the Arduino board.
INPUT: -
OUTPUT: -
RETURN: -

Swarnandhra College of Engineering and Technology 50


Smart Aquaculture Monitoring System

CHAPTER-6
EXPERIMENTAL RESULT

Swarnandhra College of Engineering and Technology 51


Smart Aquaculture Monitoring System

RESULTS

Fig: Hardware kit

Real-time aquatic environment monitoring system using an Arduino and sensors,


enabling you to monitor crucial parameters and ensure the health and stability of the aquatic
ecosystem. By using real-time monitoring it will continuously monitor the water quality
using sensors, and the detected information is conveyed to the aqua-farmer's mobile via the
cloud.

Swarnandhra College of Engineering and Technology 52


Smart Aquaculture Monitoring System

OUTPUT:

Fig: Monitoring Sensor Values

Fig: Monitoring Sensor Values

Swarnandhra College of Engineering and Technology 53


Smart Aquaculture Monitoring System

CHAPTER 7
ADVANTAGES AND APLLICATIONS

Swarnandhra College of Engineering and Technology 54


Smart Aquaculture Monitoring System

MERITS

Real-time Monitoring: The system allows continuous monitoring of water quality


parameters such as turbidity, pH, and water level in real time. This enables aqua-farmers to
promptly detect any deviations from optimal conditions, allowing for timely corrective
actions.
Improved Efficiency: By automating the monitoring process, the system enhances
efficiency compared to manual checking methods. Aqua-farmers can optimize resource
utilization and reduce losses by quickly responding to changes in water quality parameters.
Resource Conservation: The integration of aquaponics enables the recycling of
wastewater from the aquarium to grow plants. This not only minimizes water wastage but also
promotes sustainable farming practices by utilizing resources effectively.
Data Analysis and Insights: The system provides data analytics capabilities through
cloud-based platforms, enabling users to analyze historical trends and make informed
decisions. This facilitates proactive measures to maintain optimal conditions and maximize
productivity.

Swarnandhra College of Engineering and Technology 55


Smart Aquaculture Monitoring System

APPLICATIONS
Real-time Water Quality Monitoring: The IAMCS can be utilized for continuous
monitoring of water quality parameters such as turbidity, pH, temperature, and salt levels in
aquaculture ponds. This real-time data enables aquafarmers to promptly detect any
fluctuations or anomalies in water quality, allowing for timely intervention to maintain
optimal conditions for aquatic life.
Automated Control of Aquaculture Environment: By integrating sensors with the
controller module, the IAMCS enables automated control of the aquaculture environment
based on the monitored parameters. For instance, if the turbidity levels exceed a certain
threshold indicating water pollution, the system can automatically trigger actions such as
activating pumps to circulate and oxygenate the water or initiating water treatment processes
to mitigate contamination.
Resource Conservation and Efficiency: The IAMCS facilitates efficient resource
management in aquaculture operations by minimizing water wastage and energy
consumption. Through remote monitoring and control capabilities, aquafarmers can
optimize water usage by implementing techniques such as recirculating aquaculture systems
(RAS) and aquaponics, where waste water from aquaculture is utilized for plant cultivation,
thereby reducing water consumption and enhancing overall resource efficiency.
Mobile Access and Alerts: The inclusion of a mobile application as part of the output
module enables aquafarmers to access real-time data on water quality parameters and receive
instant alerts and notifications regarding any deviations from desired conditions. This mobile
accessibility empowers aquafarmers to remotely monitor and manage their aquaculture
facilities from anywhere, enhancing operational efficiency and responsiveness.

Swarnandhra College of Engineering and Technology 56


Smart Aquaculture Monitoring System

CHAPTER 8
CONCLUSION AND FUTURE SCOPE

Swarnandhra College of Engineering and Technology 57


Smart Aquaculture Monitoring System

8.1 CONCLUSION
The methodology executed can facilitate the aqua-farmers for the precise and reliable
observance of water parameters, the actual fact that manual testing will take longer and water
quality parameters could change with time It additionally takes proactive measures before any
harm is done. Despite the fact that the primary cost is high, there will be no extra expense and
maintenance once it is installed. Thus, the framework implemented will reach the farmers to
reduce the harm from climatic changes and confirm the growth and health of aquatic life. This
improves productivity, helps in improving foreign trade, and increases the GDP of the country.
More of the gathered information can be inspected utilizing big data analytics and necessary
steps can be taken before the water quality parameter crosses the edge value range. The aqua-
system automated using IoT, decreases the energy labour cost and consumption.

8.2 FUTURE SCOPE


Integration of Advanced Sensors: Future advancements may include the integration of
advanced sensors capable of measuring a wider range of water quality parameters with higher
accuracy. This could include sensors for additional chemical compounds, microbial
contaminants, and environmental factors, providing a more comprehensive understanding of
aquaculture conditions.

Automation and Autonomous Systems: Future systems may evolve towards greater
automation and autonomy, where decision-making processes are automated based on real-
time sensor data and predefined algorithms. This could include automated adjustments to
water quality parameters, feeding schedules, and environmental controls, leading to more
efficient and responsive aquaculture management

Enhanced Connectivity and Interoperability: With the proliferation of IoT devices and
standards, future systems may focus on enhancing connectivity and interoperability. This can
enable seamless integration with other farm management systems and IoT ecosystems,
improving overall efficiency and scalability.

Swarnandhra College of Engineering and Technology 58


Smart Aquaculture Monitoring System

REFERENCES
[1] A Nasirudin, U. N. Za’bah and O. Sidek. 2011. Freshwater real-time monitoring system based in
wireless sensor network and GSM, in 2011 IEEE Conference on Open System (ICOS). IEEE. pp. 354-
357.

[2] S. Silva, N. Hoang Nghia, V. Tiportini, and K. Alameh. 2011. Web based water quality monitoring
with sensor network Employing Zigbee and WiMax technologies. In High Capacity Optical Networks
and Enbaling Technologies (HONET). IEEE. pp. 138-142.

[3] K. Raghu Sita Rama Raju, G. Harish Kumar Varma, ”Knowledge-Based Real-Time Monitoring
System for Aquaculture Using IoT”, IEEE 7th International Advance Computing Conference, 2017.

[4] Cole-parmer technical library, http://www.coleparmer.ca/techinfo/techinfo.asp?html file = pH Pure


Water. htm&ID=556
[5] Daudi S. Simbeye and Shi Feng Yang, ”Water Quality Monitoring and Control for Aquaculture
Based on Wireless Sensor Networks”, Journal Of Networks, Vol 9, page No. 4, Apr. 2014.
[6] Cesar Encinas, Erica Ruiz, Joaquin Cortez, Adolfo Espinoza, ”IoT system for the monitoring of water
quality in aquaculture”, IEEE Conference on aquaculture, 2017.
[7] Luo Hongpin, Li Guanglin, Peng Weifeng, Song Jie, Bai Qiuwei, ”Real-time remote monitoring
system for aquaculture water quality”, International Journal Agriculture Biology Eng, Vol.8, No.6, Dec.
2015.
[8] Nocheski S, Naumoski A, ”Water monitoring IoT system for fish farming ”, International scientific
journal ”Industry 4.0” year III, Issue 2, Page no. 77-79, 2018.

Swarnandhra College of Engineering and Technology 59


Smart Aquaculture Monitoring System

CHAPTER 9

APPENDIX

Swarnandhra College of Engineering and Technology 60


Smart Aquaculture Monitoring System

SOURCE CODE

#include <Wire.h>
#include <Adafruit_GFX.h>
#include <SoftwareSerial.h>
SoftwareSerial B(10, 11);
const int sensorPin = A0;
const int ammoniaPin = A1;
const float slope = 1.0;
const float intercept = 0.0;
float calibration_value = -1.99;
int phval = 0;
unsigned long int avgval;
int buffer_arr[10], temp;

float ph_act;
int turbidity_value; // Define the variable to store turbidity value
float ammonia_value;
void setup() {
Serial.begin(9600);
B.begin(9600);
}
void loop()
{
ph();
turbidity();
ammonia();
bluetooth();
delay(3000);
}
void ph() {
for(int i=0;i<10;i++) {
buffer_arr[i]=analogRead(A2);

Swarnandhra College of Engineering and Technology 61


Smart Aquaculture Monitoring System

delay(30);
}

for(int i=0;i<9;i++) {
for(int j=i+1;j<10;j++) {
if(buffer_arr[i]>buffer_arr[j]) {
temp=buffer_arr[i];
buffer_arr[i]=buffer_arr[j];
buffer_arr[j]=temp;
}
}
}

avgval=0;
for(int i=2;i<8;i++) {
avgval+=buffer_arr[i];
}

float volt=(float)avgval*5.0/1024/6;
ph_act = -5.70 * volt/calibration_value ;

Serial.print("pH Val: ");


Serial.println(ph_act);

void turbidity() {
int sensorValue = analogRead(sensorPin);
turbidity_value = map(sensorValue, 0,800, 70, 0);
delay(100);
Serial.print("Turbidity: ");
Serial.println(turbidity_value);
}

Swarnandhra College of Engineering and Technology 62


Smart Aquaculture Monitoring System

void ammonia() {
int ammoniaValue = analogRead(ammoniaPin);
float voltage = ammoniaValue / 2823.0;
ammonia_value = slope * voltage + intercept-0.15;

avgval = 0;
for (int i = 2; i < 8; i++) {
avgval += buffer_arr[i];
}

Serial.print("Ammonia: ");
Serial.println(ammonia_value);
}

void bluetooth() {
B.print(turbidity_value);
B.print(",");
B.print(ammonia_value);
B.print(",");
B.print(ph_act);
B.print(";");
}
//

Swarnandhra College of Engineering and Technology 63


Smart Aquaculture Monitoring System

Swarnandhra College of Engineering and Technology 64

You might also like