Smart Aquarium Project
Smart Aquarium Project
AQUARIUM
Prepared by
Salman Khaliq Bajwa (3746)
M Waqas Aslam (3781)
Murtaza Malik (4721)
Project Advisor
Asstt. Professor, Chairman SDP Committee, Abdul Aleem
College of Engineering
PAF-Karachi Institute of Economics & Technology
Karachi
DEDICATION
Our Parents,
Whose love, affection and support helped s in bringing our work to this level of
accomplishments; we are also thankful to them for educating us for unconditional support and
encouragement to pursue our interests, even when the interest went beyond the boundaries of
field and scope. Without their support and kindness this work would not have been possible.
Page | 2
ACKNOWLEDEMENT
Praise to Allah the most beneficent and the most merciful.
We are grateful to our project advisor Mr. Abdul Aleem, Chairman SDP Committee, for
enlightening us with his precious knowledge and vast experience to benefit us in the future. We
are also thankful to the Assistant Professor Mr. Rehan Adil for his continuous over viewing on
our progress and imparting useful suggestions. We also like to thank our teachers and lab
assistants for their assistance and support.
We would also thank with all gratitude and depth of our hearts to our parents who helped us not
only financially but with integrity too and support us in all our hardships. Finally our sincere
thanks to our institute PAF-KIET, College of Engineering, for providing us the opportunity to
gave us the strength to undertake this project.
Special thanks to all our fellows and friends who lend us a hand throughout the final year
projects phase.
We pray this effort may prove to be the beginning of new era, a era in which Science and
Technology may make great progress in Pakistan and Pakistan may become a part of the
developed nations.
Thank you.
Page | 3
ABSTRACT
Fish keeping is a popular fad; almost people from all the age groups like to keep fish in their
home, offices etc for decoration purpose or as a hobby. Fish keeping is itself an industry which
comes in agriculture.
Fish keeping is not an easy job; we always need an aquarium or a pond for that. The hobby of
fish keeping is broadly divided into three; freshwater, brackish, marine. Among all these three,
freshwater is considered to be the most popular hobby of keeping fish because it is easy to
handle with freshwater fish and aquariums.
It has always been a headache to take care of the fish and aquariums. We have to change the
water after sometime; we have to feed the fish on time, we have to maintain the temperature and
turbidity level of the water and always have to keep an eye on fish and aquarium. All these steps
are done manually.
The project, SMART aquarium has been designed by keeping in mind, the problem of those who
cannot take care of their aquarium every day. It does the feeding itself every day, keeps the
temperature of the aquarium under control, and also keeps the turbidity level under control. The
GSM Mobile attached to it sends the report or we can say the current situation of the aquarium
like temperature level, turbidity level, feeding etc via SMS on your cell phone.
Page | 4
Table of Contents
List of Figures ................................................................................................................................. 8
List of Tables .................................................................................................................................. 9
CHAPTER 1: ................................................................................................................................ 13
PROJECT OBJECTIVES ............................................................................................................. 13
1.1-Project Objective: ................................................................................................................... 14
1.2-Motivation: ............................................................................................................................. 14
1.3-Aim: ........................................................................................................................................ 15
1.3.1-Objective: ....................................................................................................................................... 15
2.2-Functionality: .......................................................................................................................... 20
CHAPTER 3: ................................................................................................................................ 22
DESIGN OBJECTIVES, ISSUES AND THEIR ANALYSIS ..................................................... 22
3.1-Design Objectives: .................................................................................................................. 23
3.1.1-Design Objectives and Issues: ........................................................................................................ 23
3.1.1.2-Dimensions: ............................................................................................................................ 23
3.1.1.3-Safety Factor: .......................................................................................................................... 24
Page | 5
5.13-Graph: ............................................................................................................................................. 44
5.2-ANALYSIS: ........................................................................................................................... 44
CHAPTER 6: ................................................................................................................................ 45
ECONOMIC ANALYSIS ............................................................................................................ 45
6.0-Economic Analysis: ................................................................................................................ 46
CHAPTER 6: ................................................................................................................................ 47
CONCLUSION ............................................................................................................................. 47
6.0-Conclusion: ............................................................................................................................. 48
CHAPTER 7: ................................................................................................................................ 49
FUTURE RECOOMENDATIONS .............................................................................................. 49
7.1-Future Recommendations: ...................................................................................................... 50
7.1.1-Air Cooler: ..................................................................................................................................... 50
7.1.2-Solar Cell: ....................................................................................................................................... 50
7.1.3-Heater: ........................................................................................................................................... 50
7.1.4-GSM Module: ................................................................................................................................ 50
CHAPTER 8: ................................................................................................................................ 52
REFERENCES ............................................................................................................................. 52
8.0-Refrences: ............................................................................................................................... 53
8.1-WEB Refrences: ............................................................................................................................... 53
Page | 7
List of Figures
Figure-1 Market Adaptibility ........................................................................................................ 11
Figure-2 Dimension ...................................................................................................................... 20
Figure-3 Glass ............................................................................................................................... 21
Fgure-4 Feeder .............................................................................................................................. 24
Fgure-5 Feeder .............................................................................................................................. 24
Fgure-6 Block Diagram ................................................................................................................ 28
Fgure-7 Schematic ....................................................................................................................... 30
Fgure-8 PCB ................................................................................................................................. 32
Fgure-9 Animation ........................................................................................................................ 32
Fgure-10 Mechanical Design ........................................................................................................ 33
Fgure-11 PH Sensor ...................................................................................................................... 38
Fgure-12 LCD Display ................................................................................................................. 38
Fgure-13 Temprature Sensor ........................................................................................................ 38
Fgure-14 Water Pumps ................................................................................................................. 38
Fgure-15 Feeder ............................................................................................................................ 39
Fgure-16 Turbidity Sensor ............................................................................................................ 39
Fgure-17 GSM Mobile.................................................................................................................. 39
Page | 8
List of Tables
Table-1 Thickness Table ............................................................................................................... 19
Table-2 Water Pumps ................................................................................................................... 22
Table-3-Test Results ..................................................................................................................... 33
Table-4 Cost ................................................................................................................................. 33
Page | 9
Page | 10
Page | 11
Page | 12
CHAPTER 1:
PROJECT OBJECTIVES
Page | 13
1.1-Project Objective:
The objective of this project is to design and construct an automatic aquarium for those who
cannot take care and keep an eye on their fish and aquarium daily and minimize the manual
factor as much as possible. The aquarium will perform all the steps automatically like
temperature control, turbidity level under control, feeding etc and would send all the information
on cell phone via GSM Mobile.
1.2-Motivation:
We all know, today is the world of new scientific inventions. Every day there are some new
inventions in almost every field, in the world. World is becoming very fast and automatic
because of these inventions day by day. So we have decided very cheap alternative to make the
process of maintaining the fish aquarium fully automatic.
Page | 14
1.3-Aim:
The aim of our project is to replace manual maintenance of fish aquarium with an automated
system.
1.3.1-Objective:
The objective of our project is to perform following tasks automatically, when really required.
Stabilize temperature
Page | 15
1.4-Problem Discussion:
Usually aquarium care takers face several problems in maintenance the vitality and health of
fishes along with the presentation of the aquarium. Some of the problems are mentioned as
under:
1.5-Problem Solution:
The project has been chosen to minimize the problems of fish keepers or aquarists by shifting it
from manual to the automatic mode. Fish keepers or aquarists now would not have to watch out
and keep an eye on their aquarium and fish again and again. SMART aquarium would be there.
If any problem occurs, the aquarium would generate a report and send it on cell phone via GSM
Mobile. The advantages of this project are:
Page | 16
1.6-Methodology:
The development of SMART aquarium can be divided into following major phases:
Project design
Analysis and, component level design and selection
Assembly and hardware testing
Simulation development and Verification
Development for future implementation
1.6.1-Project Design:
The Project design phase included mainly the determination of general layout and design of the
SMART aquarium. The first step in this phase was the identification of design goals. The
following things were required:
Page | 17
1.7-Market adaptability:
The idea of making the aquarium automatic is not new. It is being used in the agriculture sector
as well as commercially but the aquariums available in the markets are semi automatic or
manual; they are not fully automatic as we have designed.
The SMART Aquarium is not so much expensive thats why it can be used by an individual
aquarist, fish keeper, and can also be used for large scale.
Individual
Aquarists
Commercial
SMART
Aquarium
Figure-1.0-Market Adaptability
Page | 18
CHAPTER 2:
INTRODUCTION
Page | 19
2.0-Introduction:
Pet ownership has been increasing at a steady pace in the last 20 years. After cats and dogs, the
most popular pet is now the freshwater fish. The maintenance of fish aquariums is a very
difficult task itself. Whenever you have to clean up your aquarium or you have to feed, you have
to do a lot of things. You have to turn off your aquarium's power head/air pump and feed
manually and turn on the air again after an hour.
2.1-Introduction:
The project with which we came up is an Automated Fish Aquarium. The project will be more
efficient than the systems available in market, now days. In addition to the efficiency it will be of
lower cost as well. The projects audience is the group of people interested to keep fishes at
home or offices but dont have time to take care of, or they are worried to keep on asking their
neighbors to take care of the fishes in their absence.
The project is an automated system to take care of fishes. It will replace the manual maintenance
of fish aquarium with its automated functions. It will monitor the physical changes in the water
and will maintain it to the ideal conditions, with required changes.
2.1.2-Key Points:
2.2-Functionality:
Main principle of the project is to sense the changes via sensors. These changes will be then
processed by the Controller. The microcontroller installed in the circuit will be performing the
main task of controlling. Controller will send commands to the actuators where the output part
will be observed working to sustain the ideal conditions. There will be a temperature sensor,
turbidity sensor, PH level sensor, water level sensor, heater, feeder, an LCD and a GSM Mobile.
They all will be interfaced with the controller. If anything happens or changes, the controller will
start working to reach back to the ideal state. The normal temperature of fresh water aquarium is
considered to be 28-30 degree Celsius. If temperature exceeds, the controller would start the fan
till the desired temperature is not achieved. If the temperature goes down, the heater will be on
until the temperature does not reach to the normal temperature. After every 24 hours the
Page | 20
controller would turn on the feeder for feeding purpose. If the turbidity level has increased
beyond the normal then controller will change the water. Half of the water will be flushed
through solenoid valves so that the temperature would not change rapidly which could harm the
fish. The ongoing process and situation like temperature, feeding, changing water etc will be
shown on the LCD. The owner could also get the report regarding the situation of aquarium on
his/her cell phone by just asking the GSM Mobile or after every 24 hours the GSM Mobile
would generate the report and send it on the mobile phone.
Page | 21
CHAPTER 3:
DESIGN OBJECTIVES, ISSUES AND THEIR ANALYSIS
Page | 22
3.1-Design Objectives:
Our objective of the project is to build an automatic aquarium for those who cannot keep an eye
on their aquarium regularly. It will be fully automatic so there will be no need to see aquarium
again and again.
The short term goal of our project is to make a low cost but automatic aquarium so that it could
be in the reach of every one. The long term goal is to extend it to the version where it can be
fully automated Our main objective was to limited to our short term goals and to achieve those,
lot of research was done and finally we were able to produce the desired output.
Aquarium Volume
Glass Thickness: A glass thickness that will hold under the pressure of your fish tank.
Glass Area: The sum of areas of the six sides of your aquarium.
Glass+Water Weight: The weight of your fish tank when filled with water.
You will also get your glass surfaces dimensions. Notice the sides surfaces are reduced
by the glass thickness.
Page | 23
Figure-2 Dimension
3.1.1.3-Safety Factor:
The variability of the strength of glass due to limitations of the manufacturing process means a
suitable safety factor must be used when calculating glass thickness. The factor commonly used
is 3.8. While not a perfect guarantee, it will remove all risk bar that of damaged or very poor
quality.
3.1.1.4-Glass Thickness & Pressure:
While determining the pressure that water exerts on a glass wall is pretty simple, determining the
glass thickness needed to resist this pressure is not quite so simple. The glass will be subjected to
bending stress as the pressure tries to force it outward. The actual amount of stress depends on
the unsupported area of glass. The glass wall or "window" is fixed and sealed at its edges, but
unsupported over its area. The larger the window is, the greater the bending stress that results. If
you think about it, this is actually fairly clear (must stop with those puns!). Let us say that the
water is deep enough to exert an average pressure a pressure of 50 pounds per square foot against
the window. The larger the window, the greater number of square feet of glass is holding back
the pressure. If we have one window that is (let us say) 10 square feet in area, then there will be a
total force of 500 pounds forcing the glass outward. But suppose we want to use a window that is
Page | 24
100 square feet in area. In that case, there will be a total force on the glass of 5000 pounds.
Obviously the larger window will need to be thicker to resist the greater force.
Figure-3 glass
Here's a few ways to figure out how thick of glass you need if you building your own tanks.
1. In the table below, the top row indicates the length of the tank; the left vertical column
indicates the depth (height) of the tank. To determine the glass thickness to use for constructing
your tank, find the length of the tank in the top row (indicated in feet and cm - centimeters), then
follow that column down until you reach the height of the tank (indicated in inches and cm).
Glass thickness is indicated in mm (millimeters), with the number in parenthesis below
indicating the Safety Factor. There is an inches to millimeters calculator below the Glass
Thickness
calculator.
Page | 25
Page | 26
CHAPTER 4:
REQUIREMENT SPECIFICATIONS
Page | 27
4.0-Requirement Specifications:
The things that were required has been discussed in this chapter and are given below:
4.1-Literature Review:
4.1.1-Related Work:
From simple battery operated, to state-of-the-art electronic devices, automatic aquarium fish
feeders come in an array of styles. While some are moisture controlled units designed to prevent
flake, pellet and other dried foods from clumping, others not only have the capability of releasing
a variety of different fares, but at specific times and intervals. From small to large capacity
feeders with single to multi-purpose functions, here are some units your Guides consider to be
the best choices.
Figure 4 Feeder
Page | 28
Size
Volume
1000Lx480wx755H
260L
1200LX480WX755H
315L
1800LX480WX815H
422L
Table-2 Water Pump
Water Pump
HQB-2500
HQB-2500
HQB-3500
4.1.5-Automatic LCD Auto Aquarium Fish Tank Food Feeder Timer [4]:
Easy to set the feeding time, you can set at most 4 times a day,Safe and convenient. Detachable,
Washable and Moisture proof Food Can, easy filling of the food and easy to clean. Ideal for
flakes granulates. Easy mounting, Can be installed on the aquarium, Adjustable clamp to fix on
different tank sizes.
11 x 7 x 7cm.
Feed chamber
Velcro size
3.6 x 3 x 0.5 cm
Power
Color
Black
The controller can power on the Ozone O3(Not included)or to control the ORP value
Page | 29
How to Use
Put the ORP pen into the ORP Meter, it can show the ORP value
Normally, Saltwater ORP around 300mV ~ 350mV, for freshwater ORP around 235mV
to 260mV
ORP Meter will automatic to power on and connect with the Ozone O3 (Not Included) to
operate the value most suitable for the tank
Specification
Measurement
1999mV ~ + 1999mV
Control Range
0-1000mV
Resolution
1 mV
Accuracy
0.01mV
Power
Weight
1.4 kg
Feeders are available with timers to automate the feeding of fishes. The device can be
replaced by a simple and cheap system comprising of a stepper motor based mechanical
structure controlled by the controller.
Water coolers are available to reduce the temperature when it goes higher. It can be
replaced using fans placed well to cool down the aquarium when temperature goes high.
Similarly heaters can be replaced by high intensity lights.
PLC based systems are available for aquarium maintenance. We may design a system
working on a micro-controller to make it more cost effective.
Page | 30
4.2-Process Flow:
Page | 31
Page | 32
4.4-Design Matrix:
Page | 33
4.5-Schematics:
Figure-7 Schematics
Page | 34
4.6-Algorithm:
Page | 35
4.8-PCB Design:
Figure-8 PCB
4.9-Animations:
Figure-9 Animation
Page | 36
4.10-Mechanical Design:
Electronic Valves
Micro-Controller
Stepper Motor
Temperature Sensor
Turbidity Sensor
PCB
PH Sensor
LCD
4.11.2-Software List:
Portable Proteus
Auto CAD
PIC PGM
Page | 38
4.12-Gantt Chart:
Page | 39
Page | 40
CHAPTER 5:
TEST RESULTS AND THEIR ANALYSIS
Page | 41
The normal temperature of the water of aquarium was set as 28 degree Celsius.
The normal PH level was set as 7. If the PH level increases or decreases the GSM mobile
would send SMS on the mobile and after 15 seconds it would again send a reminder
SMS on the given number.
The Turbidity sensor was working on logic 1 and 0. Two LDRs were used in order to
sense the turbidity. One had an LED. If the opponent LDR does not sense the light
emitted from LED, it would start draining the water via water pump.
Figure-11 PH sensor
Figure-15 Feeder
5.12-Test Results:
No
Temperature
PH Level
5.9
6.1
10
6.37
15
6.5
20
6.9
25
30
7.21
35
7.47
40
8.0
10
45
8.6
Page | 43
5.13-Graph:
5.2-ANALYSIS:
The temperature of water is proportional to the PH level. As we keep on increasing the
temperature, the PH level also increases.
Page | 44
CHAPTER 6:
ECONOMIC ANALYSIS
Page | 45
6.0-Economic Analysis:
Economically at the student level, this type of project is itself a huge task, because the
components to be used are basically very expensive and being the citizens of under developed
country it is hard to maintain both ends meet. Anyhow with leaps a bounce all these issues were
managed so that the project could be completed within the defined time limits.
S. No
Components
Cost
Electronic Valves
3,000
Micro-Controllers
Temperature Sensor
2,200
1,100
Turbidity Sensor
PCB
5,000
pH Sensor
3,000
LCD
10
11
GSM Mobile
10,000
500
800
500
12,000
3,000
Total
41,100
Table-4 Cost
Page | 46
CHAPTER 6:
CONCLUSION
Page | 47
6.0-Conclusion:
We started off the project with aim to accomplish the simple looking task of designing an
automatic aquarium (SMART Aquarium). But with time and experiences it was learnt that this
was not at all an easy task, specially interfacing the sensors and GSM Mobile with the controller.
Though we are able to achieve all the goals of our project but still we think that lots of
advancement can be done on this project. We have provided the platform and the platform is
ready for everyone to work on it. For advancements, we need more time, money and hard work.
Money would remain the critical issue cause in order to upgrade the project many of the stuff
would need an up gradation.
Nevertheless this project has been a success as far as learning and practical implementation of
Electronics Engineering concepts is concerned. The basic idea proposed in this project works
well and can be implemented on large scale industries like agriculture etc. Having a SMART
Aquarium, will save our time and we would not have to be worried for our fish and their
aquariums for long time.
Page | 48
CHAPTER 7:
FUTURE RECOOMENDATIONS
Page | 49
7.1-Future Recommendations:
After implementing and detailing the project, still it has many future advancement possibilities of which
are stated as below:
7.1.1-Air Cooler:
Sometime the temperature of inside the aquarium or we can say the temperature of water
increases in summers thats why fish die because of the sudden increase in the temperature. As
there is nothing in the aquarium that could reduce the temperature when it has increased so a
small air cooler or a fan can be used to decrease the temperature in case the temperature
increases up.
7.1.2-Solar Cell:
As the aquarium needs 24/7 constant power in order to work so lots of power is consumed, GSM
mobile also needs a separate constant power. Lots of power is utilized and it can be a burden on
your pocket so in order to reduce this, solar cells or panels can be used to get the constant power.
So that there will be no issue of over billing and burden on your pocket. If in case of power
failure, the aquarium would not stop its work.
7.1.3-Heater:
In winter, most of the time, the temperature of the water goes down like if it is in snowfall area
then its temperature would go suddenly down and the sudden variation in the temperature can
kill the fish inside the water. In our project we have used a bulb because we live in a region
where temperature does not change suddenly. Heater can also be used in order to increase the
temperature if it has fallen down.
7.1.4-GSM Module:
A GSM modem is a wireless modem that works with GSM networks. A wireless modem
behaves like a Hayes compatible dial-up modem. The main difference between a standard Hayes
modem and a GSM modem is that a hayes modem sends and receives data through a fixed
telephone line while a GSM modem sends and receives data through radio waves. A GSM
Page | 50
modem can be an external unit or a PCMCIA card (also called PC Card). An external GSM
modem is connected to a PC through a serial cable, a USB cable, Bluetooth or Infrared. Like a
GSM mobile phone, a GSM modem requires a SIM card from a wireless carrier in order to
operate.
We have used a GSM Mobile (6610) for sending the report on the aquarists cell number. We
had to make a low cost and cost effective project thats why we selected a GSM Mobile instead
of GSM modem so GSM module can be used in future.
Page | 51
CHAPTER 8:
REFERENCES
Page | 52
8.0-Refrences:
8.1-WEB Refrences:
[1] Current USA
Title: AquaChef Automatic Fish Feeder | Visiting Date: 02/Feb/2011
2005-2009 Current Inc. | Updated: March 2, 2009 - 16:10
http://www.current-usa.com/aquachef.html
[3] Alibaba.com
Title: Automatic Aquarium | Visiting Date: 05/Feb/2011
1999-2010 Alibaba.com Hong Kong Limited and licensors. All rights reserved.
http://www.alibaba.com/product-gs/238098574/automatic_aquarium.html
Page | 54
CHAPTER 14:
APPENDICES
Page | 55
Appendices A:
Source Code
Page | 56
A-Code:
'****************************************************************
'*
Name
'*
'*
Date
: AQUARIUM.BAS
: 14-Sep-10
'****************************************************************
Device = 18F452
'device = 16f877a
Xtal = 20
Declare Watchdog = On
Declare Adin_Res 10
Declare Adin_Stime 60
LCD_DTPin = PORTB.4
LCD_RSPin = PORTB.2
LCD_ENPin = PORTB.3
'-----------------------------------------------------------
Page | 57
As Word
As Byte
Dim DECIMAL As Word
Page | 58
Hserial_Clear = On
Input PORTC.7
Symbol DIRTY_WATER = PORTD.7 ' 30
Symbol LOW_LEVEL = PORTD.0 ' 23
Symbol HI_LEVEL = PORTD.1 ' 24
Symbol DRAIN_MOTOR = PORTD.5 '28
Symbol INJECT_MOTOR
= PORTD.6 '29
Symbol BUZZER
= PORTB.0'33
Symbol ENTER
Symbol UP
= PORTC.4
= PORTD.4
Symbol DOWN
= PORTC.5
Input ENTER
Input UP
Input DOWN
Output BUZZER
Input DIRTY_WATER
Input LOW_LEVEL
Input HI_LEVEL
Output INJECT_MOTOR
Output DRAIN_MOTOR
BUZZER = 0
DelayMS 200
Clear
Cls
FIRST_RUN = ERead 15
DelayMS 50
Page | 59
Page | 60
EndIf
If SETTING_MODE = 1 Then
Call SETTING_MODE_SR
EndIf
Call ANALOG_INPUT
SET_POINT = ERead 25
DelayMS 50
If TEMPERATURE >= SET_POINT Then
BUZZER = 0
EndIf
If TEMPERATURE < SET_POINT Then
BUZZER = 1
EndIf
If DIRTY_WATER = 1 Then
INJECT_MOTOR = 0
Cls
Print At 1,1,"CLEANING START"
While LOW_LEVEL = 1
INJECT_MOTOR = 0
DRAIN_MOTOR = 1
Print At 2,1, "WATER DRAINING"
Wend
Cls
While HI_LEVEL = 0
Page | 61
DRAIN_MOTOR = 0
INJECT_MOTOR = 1
Print At 2,1,"WATER FILLING"
Wend
INJECT_MOTOR = 0
DRAIN_MOTOR = 0
EndIf
Call PH_ROUTINE
Goto Main_Prog
****************************************************************
''''''''''''SUB ROUTINES''''''''''''''''''
SETTING_MODE_SR:
BUZZER = 0
While SETTING_MODE = 1
If UP=0 Then
DelayMS 200
If UP=0 Then
Inc SET_POINT
If SET_POINT >= 99 Then SET_POINT = 5
Print At 2,1,Dec2 SET_POINT
EndIf
EndIf
If DOWN=0 Then
DelayMS 200
If DOWN=0 Then
Page | 62
SET_POINT = SET_POINT - 1
If SET_POINT < 5 Then SET_POINT=99
Print At 2,1,Dec2 SET_POINT
EndIf
EndIf
If ENTER = 0
Then
DelayMS 1000
If ENTER = 0 Then
Cls
EWrite 25 , [SET_POINT]
DelayMS 50
SETTING_MODE = 0
Cls
EndIf
EndIf
Wend
Return
PH_ROUTINE:
If PH>=9 Or PH<=5 Then
HSerOut ["AT+CMGS=",34,"+923452791444",34,13]
'INC SMS_4_COUNTER
HSerIn 3000,SMS_4,[Wait(">")]
HSerOut ["PH: ",Dec2 PH,13,10,"TMP:",Dec1 TEMPERATURE,26]
'INC SMS_4_COUNTER
Page | 63
HSerIn 8000,SMS_4,[Wait("OK")]
HSerOut ["MSG SENT"]
DelayMS 3000
EndIf
Return
ANALOG_INPUT:
For i = 1 To 150
VAR1 = 0
VAR1 = ADIn 0
DelayUS 70
VAR_PH = ADIn 1
DelayUS 70
SUM_PH = SUM_PH + VAR_PH
SUM_VAR1 = SUM_VAR1 + VAR1
Next
AVG_VAR1 = 0
AVG_PH = 0
AVG_PH = SUM_PH / 150
AVG_VAR1 = SUM_VAR1 / 150
SUM_VAR1 = 0
SUM_PH = 0
Page | 64
PH:",Dec1 PH
Return
Page | 65
Appendix B:
Data Sheets
Page | 66
LM35
LDR
PIC16F452
MAX-232
Page | 67