Wednesday, May 30, 2018

WEEK 17: FYP REPORT PROGRESS

This is the last week to finish up the report as it need to be submit to the FYP coordinator on 1st June 2018 before 5 pm. I've re-submit to Dr. Masum for final review before do the hardcover printing. The plagiarism for my report is 5% so I don't have to do any correction to reduce the plagiarism percentage as it must be less than 20% for the report to be accepted by the FYP coordinator as stated in the FYP handbook.

The cover page and the plagiarism percentage of the FYP report
I went to the Achik Printing factory to do the hardcover printing for the FYP report as this is the only nearby printing shop that offers a fast service with a cheaper price compared to others where I can collect it the next day.

The Hardcover of the final FYP report


Tuesday, May 29, 2018

WEEK 16: FINAL YEAR PROJECT REPORT PROGRESS

The last thing to do is to complete the Chapter 4 and 5 which is the Result and the Conclusion of the Final Year Project Report. I've done it and submitted to Dr. Masum to check it. He said that I need to do some correction and improvement in some part of the report where there is some grammatical mistakes and the position of the captions of the figure to be corrected.

Most of the parts to be corrected is on the introduction and chapter summary on chapter 2 and chapter 4 which I need to elaborate more on what has been done in the progress of completing the project and the results obtained from testing the project.

Cover page of the draft submitted to Dr. Masum


One of the correction and improvement to be made on the report.

Sunday, May 27, 2018

WEEK 15: FYP 2 PRESENTATION DAY

The Final Year Project 2 presentation day was held on 2nd May 2018 in week 14 where all of the students taking Final Year Project 2 presenting their project. The assessors that is assigned to assess my project is Sir Azlan and another one is Sir Zainal, the assessor from the industry. I have presented my project by presenting the poster I've done which include all the things about my project before showing them how my project works. Fortunately, all the real-time data that is currently measured is successfully displayed on the node-red dashboard.

The poster of my project

At the end of the presentation, Sir Zainal said that my project need to have the feedback system integrated in it to control the condition of the water quality which the feature would be able to re-balance the water quality condition into optimal state. 

WEEK 14: FINAL PROJECT TESTING


The hardware setup is the same as shown in the previous post. The experiment to test the functionality of the monitoring system is set up by placing the sensors in the water. The sensors are tested using a water that is simulated to the one used in the catfish tank except for the chlorine content in the water is not filtered but it will not affect the reading produced by the sensors. The temperature sensor is tested by adding a slightly hot and cold water into the container used to hold the water which also will affect the amount of dissolved oxygen and the pH value of the water. This is because more dissolved oxygen present in the cold water than warm and the pH measurement varies in different temperature. The normal condition for the pH measurement is at 25 C at where the pH value varies at ±0.001 pH in a temperature other than 25 C.

The changes in water temperature

The graph rises a bit when a little hot water is added before it goes back to a constant reading. When a slightly cold water is added, the water temperature drops from 30.31°C to 28.43°C. The changes in the water temperature is not obvious as shows in the graph for the insignificant drops of 1.88°C.

Changes in pH value of the water

The pH value turns from neutral state into acidic and alkaline state when the pH solution of 4.00 (acidic) and 9.18 (alkaline) is added to it.the colour changes from green which indicates normal condition into red colour which indicates a warning sign when the water quality is in a bad condition.

Dissolved oxygen value

From the beginning until the end, the sensor produced a reading 0 mg/L for the content of the dissolved oxygen. This condition means that there is no oxygen at all in the water which makes the water not suitable to be used for the catfish or any other living creature to live in. it is possible for the water to possess no oxygen at all since I’m using tap water which normally possess 10 mg/L of the dissolved oxygen content in it. The voltage output from the sensor is not zero when measured using the multimeter, which means that there is oxygen detected by the sensors since the content of the dissolved oxygen in the water is directly proportional to the voltage output from the probe. The connection and coding of the dissolved oxygen sensor needs to be revised according to the datasheet provided on the manufacturer’s website.



WEEK 13: CONSTRUCTING THE COMPLETE CIRCUIT

Complete circuit of the water quality monitoring system (Fritzing)

The final product of the water quality monitoring system is constructed based on the fritzing done as shown in the picture above. 

Hardware setup of the final product

The configuration of the hardware that has been set up on which pin the sensors are connected to, is as shown in the table below. Both pH sensor and temperature sensor is connected to the analog pin while the dissolved oxygen sensor is connected to the I2C pin of the microcontroller since the sensor module is switched into I2C mode.

Circuit configuration



WEEK 12: COMPILING THE CODING

All the codings of the individual sensors is compiled in one program where the program enables data transmission to the cloud server. The WiFi Id and password is set up in the coding (on the highlighted part in the picture below) to successfully connect to the WiFi connection. 

Set up the WiFi Id and password

Each of the sensors used is designed with its specific variable in the coding to be called out to display the data on the dashboard by accessing the specific IP address. The data won't be display properly or it will display nothing at all if wrong variables is set on the node-red.

Variables designed for each of the sensor

Node-Red dashboard designed for the user interface

WEEK 11: DISSOLVED OXYGEN SENSOR

Dissolved oxygen sensor circuit

The EZO sensor module can be operated by either by using UART or I2C protocol. I choose to use the I2C protocol since I can't seem to solve the error arise from the UART coding. Since the I2C protocol is used, the sensor module need to change into I2C mode as the sensor module is in UART mode by default. The coding for both mode is as provided at the manufacturer’s website, so it can be use according to the switched mode.

Switching the sensor module into I2C mode

Two 4.7k resistor need to be used as a pull-up resistor for each SDA and SCL line when using the I2C mode to operate the dissolved oxygen sensor. The SDA pin of the EZO sensor module is connected to the SDA pin of the microcontroller and the same goes with the SCL pin connection, the EZO sensor module’s SCL pin is connected to the SCL pin on the microcontroller.

Connection for the I2C mode


WEEK 10: VALIDATING THE TEMPERATURE SENSOR

DS18B20 Temperature sensor circuit

The accuracy of the DS18B20 temperature sensor is tested using a digital thermometer where the reading obtained from both DS18B20 temperature sensor and the digital thermometer is compared. The reading for the DS18B20 is as displayed on the serial monitor of Energia software. 

Measurement comparisonn between DS18B20 and Digital Thermometer

The accuracy of the temperature sensor can be calculated using the percentage error. The calculation is as shown below.


The percentage error of the DS18B20 temperature sensor compared to the digital thermometer is just 0.44%, that is almost zero which is suitable for the water temperature measurement for its accuracy.


WEEK 9: pH SENSOR Calibration

I've tried testing the pH sensor to see whether it able to produce a reading or not. The connection between the board and the pH sensor is as below:

CC3200 and pH module connection (fritzing)

A 10 k potentiometer is used to as a part of the calibration. The DATA pin of the pH module is connected to the potentiometer where the output from it is connected to the  to the analogRead pin 2 of the CC3200 board while the VCC and Ground pin is connected accordingly.

Before it can be use to measure the pH water, it needs to be calibrate first to ensure its accuracy. The calibration is divided into two part, which is the sensor module calibration and the probe calibration. For the sensor module calibration, the BNC part of the sensor module is short-circuit by using a stripped wire to simulate a neutral pH reading that is pH 7. The 10k potentiometer controls the output voltage to the analog pin of the microcontroller so that the output voltage from the is 2.5V the neutral state, pH 7. 

Short-circuit of the BNC connector
The pH probe is calibrated using the buffer solution. There is three buffer solution which the common buffer solution used are pH 4.01 and pH 6.86, as it applies to the range of most pH applications while the other one is pH 9.18. The buffer solution is made by adding the buffer powder to 250 ml of distilled water and stirred until dissolved.

Buffer powder
Replace the stripped wire with the probe, connect it to the sensor module and immersed the probe in the pH solution. The offset for the pH probe calibration is set at the coding on the Energia software based on the value of the pH displayed on the serial monitor. In example, if the reading on the serial monitor is pH 5.44 and the buffer solution is pH 6.86, change the offset value to 1.42.


Setting pH the pH probe offset

WEEK 8: PORTABLE HOTSPOT

Since this project implement the IOT platform in the water quality monitoring system in the fish farm, a portable WiFi device needs to be used to ensure the system is connected to WiFi the whole time. This is because WiFi connection is needed to ensure that the data collected from the sensors is transferred to the cloud server so that it can be accessed by the user.

For that reason, I'm using the Tenda portable WiFi device or known as Tenda pocket WiFi to solve the WiFi connection problem.

Tenda 3G185 Portable Mobile Wireless Router
Any sim-card with active internet connection be plug into the Tenda pocket WiFi to enable the WiFi function of the device. However it only supports 3G and 2G connection which means it olnly connects to 3G connection even though 4G LTE supported sim-card is inserted.

Inner part of the Tenda pocket WiFi
The sim-card slot of the Tenda pocket WiFi is shown in the picture above. The WiFi Id and password can be found just below the barcode of the device near to the sim-card slot. After inserting the sim-card, the device needs to be set up first to fully enable the WiFi connection. The steps on the setup for the Tenda pocket WiFi can is as shown here. Despite of it compact size, the Tenda pocket WiFi use a powerful internal battery of 2000mAh that can lasts up to 6 hours which is ideal for extended hours of outdoor use.