Difference between revisions of "Team:NTHU Taiwan/Demonstrate"

Line 601: Line 601:
 
<p>
 
<p>
 
(Notice: Since our EDC sensor has not been made yet, so here we use the value detected by ultrasound for replacement. However, our detector’s mechanical design proposal and the software parts are ready.)
 
(Notice: Since our EDC sensor has not been made yet, so here we use the value detected by ultrasound for replacement. However, our detector’s mechanical design proposal and the software parts are ready.)
 +
</p>
 +
 +
<p>
 +
<img width="25%" src="https://static.igem.org/mediawiki/2017/e/e1/T--NTHU_Taiwan--Demonstrate--App_Design1.png">
 
</p>
 
</p>
  

Revision as of 08:00, 29 October 2017

Demonstrate


The Smart EDC Farmland Protection System

Integrated system of endocrine disrupting chemicals (EDCs) water protection system.

In order to solve some real environmental challenges, our team has proposed an integrated system that can both detect and degrade endocrine disrupting chemicals (EDCs) suitable for farmland water protection.

When we started building this system, we aimed not only to solve a few farmers’ problems but on a bigger scale, agricultural and industrial, since in most of the developing countries, factories could be easily found in between farmland. On the left-hand side of the slide, we developed the system that could sense the concentration of the EDC in the water and control the valve to protect the farmland from polluted water. And on the right-hand side of the slide, we could collect such data, such as the concentration, time, and place. If the number of devices could grow to dozens or say hundreds, we would be able to tell where and when did the pollution came from.

System flow chart of our EDCs water protection sysetm.

Model Demo Video

First, in normal days, the gate will remain half open and let the water comes into the channel. When the water passes through the gate, it will then passes through the filter. Enzyme mixed with activated carbon is filled in the filter, which can help filter out most of our target endocrine disrupting chemicals. We have proved the capability of the enzyme and filter through modeling and experiment test. Then the water will encounter out fluorescent detection. We pump some water into the detector and mix them with the indicator paper which is coated with modified E. coli, and the EDCs in the water can be captured by our modified E. coli. The E. coli is later excited with laser light to produce fluorescent, the fluorescent signal will be collected and calculated into relative EDCs concentration.

If the detected EDCs concentration is safe for the farmland to use, the microcontroller which is embedded in the detector will send a signal to the gate to tell it to remain open to let the water in. However, if the detected EDCs concentration is above the safety standard, a feedback signal will be sent to the gate and lower it to protect the farmland from further damage. The reading of the EDCs concentration will also be sent to our database and the App, which can allow the farmer or the farmland manager to remotely monitor the condition of the farmland.

IoT System and App

With the implementation of our device, we now can provide farmers a water protection system. Furthermore, we have developed an app and IoT system. The app will allow the user to know the condition of the farmland water, and the IoT system is set to save all the data and collaborate with other nearby protection systems to build up a “safe web.” When our devices are widely spread around a region, we would not only be able to help the farmers keep their farmland’ water source safe, but even identify when and where the pollution came from.

The IoT System

Why IoT?

In order to fulfill the purpose of data monitoring in real-time, we have to implement IoT system to our device. The implementation can be simply classified in the following steps:

1. Sensors (temperature, PH detector) collect data to our controller.

2. Controller upload data to cloud through wifi.

What have been used?

Cloud Platform : MediaTek Cloud Sandbox

We created an account on MediaTek Cloud Sandbox, therefore, our data will be going there.

After establishing an MCS account, we start to create our virtual device and data channel. When data channel is being created, they will have their own Device ID and Device Key. So, when writing our Arduino code and assign them with specific Device ID and Device Key, our data will be able to send to that data channel.

Controller and Sensors

The controller is the heart of our device, where it is responsible for receiving, processing, uploading data to the cloud, and also control our motor.

The reason why we choose MediaTek LinkIt™ ONE as our controller mainly because it has its own cloud platform MediaTek Cloud Sandbox, which enable us to implement IoT system to our device much easier. As for the sensors, right now we have used a thermometer and pH meter. Fluorescence detector will be added to the system once biochip has been successfully manufactured.

How we do this?

Step 1: Sensors collect data to our controller

This part is relatively simple, based on the sensors we use, we search for the corresponding code on the Internet, and copy them into our Arduino code (Figure 1). Once we have the code and correct PIN connected to our sensors, then we are good to go.

(Figure 1)

Step 2: Controller upload data to cloud through wifi

Remember the Device ID and Device Key that we mentioned before? In this part, we are going to use it. The function of them works like the address, when we assign specific Device ID and Device Key inside our code (Figure 2), our data can be correctly sent to the corresponding data channel.

(Figure 2)

IoT Demo Video

The App Design

Why we built this APP?

The purpose of building this APP is that we hope to monitor values from our detection point in real-time.Furthermore, if we have multiple detection points in the future, we can label all data with different colors of markers according to their concentrations, and show them on the google map. Therefore, we can get regional concentrations at once, which enable us to identify sources of pollution with ease.

How do we build our APP?

The software we use is Android Studio. And we manage to represent our detection data in the following ways:

Tab1: Real-time detection value from a single detection point.

Tab2: Historical monitoring data from a single detection point.

Tab3: The distribution of all detection points and their visualized EDC concentrations.

Since our detection system has implemented Internet of Things (IoT), therefore, all data being detected will be stored to our cloud in JSON format (For details, please refer to DEVICE / Software – IoT page). So if we want to retrieve those data from our cloud, what we have to do can be simplified as followings:

1. Get JSON file from server.

2. Parse JSON to retrieve specific data.

3. Display.

Now we will go through those steps one by one :

1. Get JSON file from server

Data is uploaded to our cloud were stored in JSON format (Figure 1), and data being uploaded by different sensors have their own unique URL. So, in our code, by searching the specific URL (Figure 2), we can get the information we need.

(Notice: Since our EDC sensor has not been made yet, so here we use the value detected by ultrasound for replacement. However, our detector’s mechanical design proposal and the software parts are ready.)

(Figure 1)

(Figure 2)(Part of our code)

2. Parse JSON to retrieve specific data

The JSON file we get from the server contains lots of information, such as API Version、Message、Device ID、Recorded time and Value, etc, therefore, in order to get a specific data in JSON file, we have to use a technique called parsing, to parse JSON Objects and JSON Arrays.(Figure 3)

(Notice: Since our EDC sensor has not been made yet, so here we use the value detected by ultrasound for replacement. However, our detector’s mechanical design proposal and the software parts are ready.)

(Figure 3)

3. Display

And finally, here is how we represent our data.

For Tab1 (Real-time detection value from a single detection point), we simply layout some TextView boxes, and let the text be changed to the value we got from JSON file.

For Tab2 (Historical monitoring data from a single detection point), we use GRAPH VIEW (http://www.android-graphview.org/showcase/ ) to display two of our data, which are temperature and concentration of EDC, with y-axis their values and x-axis the recorded time.

(Notice: Since our EDC sensor has not been made yet, so here we use the value detected by ultrasound for replacement. However, our detector’s mechanical design proposal and the software parts are ready.)

And for Tab3 (The distribution of all detection points and their visualized EDC concentrations), in order to use google map in our application, we need to register to Google Developer Console for permission.

IoT Demo Video