Aquaculture is one of the vital factors to support the food needs of the world community, especially in developing countries. The total world fish production, aquaculture production accounted for 40.1 % that is 88.5 % of the world aquaculture production is contributed by Asia. In the aquaculture cultivation process, water quality is crucial to the success of cultivation. Water quality monitoring can be measured by various variables including physical, chemical and biological aspects. There are four essential water parameters for aquaculture, those are dissolved oxygen (DO), salinity, water temperature and hydrogen potential (pH). The ideal content for those parameters varies depending on the type of aquaculture and fish species that are the object of cultivation.
In this project, we presented a connected system for real time monitoring the aquaculture (water eco-system ). Several types of sensors are used for monitoring the parameters of aqua. This system is useful for monitoring the fisheries farm.
- Wio Terminal based on ATSAMD51-based microcontroller with wireless connectivity supported by Realtek RTL8720DN and is equipped with a 2.4” LCD Screen, onboard IMU(LIS3DHTR), Microphone, Buzzer, microSD card slot, Light sensor, and Infrared Emitter(IR 940nm). Realtek RTL8720DN chip supports both Bluetooth and Wi-Fi providing the backbone for IoT projects.
- The DS18B20 communicates with the “One-Wire” communication protocol, a proprietary serial communication protocol that uses only one wire to transmit the temperature readings to the microcontroller. The DS18B20 can be operated in what is known as parasite power mode. Normally the DS18B20 needs three wires for operation: the Vcc, ground, and data wires. In parasite mode, only the ground and data lines are used, and power is supplied through the data line. The DS18B20 also has an alarm function that can be configured to output a signal when the temperature crosses a high or low threshold that’s set by the user. For more details on timing, configuring parasite power, and setting the alarm, see the datasheet.
- The TCS34725, which has RGB and Clear light sensing elements. An IR blocking filter, integrated on-chip and localized to the color sensing photodiodes, minimizes the IR spectral component of the incoming light and allows color measurements to be made accurately. The filter means you'll get much truer color than most sensors since humans don't see IR. The sensor also has an incredible 3, 800, 000:1 dynamic range with adjustable integration time and gain so it is suited for use behind darkened glass.
- Turbidity sensors measure the amount of light that is scattered by the suspended solids in water. As the amount of total suspended solids (TSS) in water increases, the water’s turbidity level (and cloudiness or haziness) increases. Turbidity sensors are used in river and stream gaging, wastewater and effluent measurements, control instrumentation for settling ponds, sediment transport research, and laboratory measurements. Turbidity is the cloudiness or haziness of a fluid caused by large numbers of individual particles that are generally invisible to the naked eye, similar to smoke in the air. The measurement of turbidity is a key test of water quality.
Turbidity is caused by particles suspended or dissolved in water that scatter light making the water appear cloudy or murky. Particulate matter can include sediment, especially clay and silt, fine organic and inorganic matter, soluble colored organic compounds, algae, and other microscopic organisms.
- Salinity sensor (Electrical conductivity based)
- Dissolved oxygen sensor
- pH sensor
The Wio Terminal based ATSAMD51-based microcontroller with wireless connectivity supported by Realtek RTL8720DN and is equipped with a 2.4” LCD Screen, onboard IMU(LIS3DHTR), Microphone, Buzzer, microSD card slot, Light sensor, and Infrared Emitter(IR 940nm). Realtek RTL8720DN chip supports both Bluetooth and Wi-Fi providing the backbone for IoT projects.
Key Features
- Powerful MCU: Microchip ATSAMD51P19 with ARM Cortex-M4F core running at 120MHz
- Reliable Wireless Connectivity: Equipped with Realtek RTL8720DN, dual-band 2.4Ghz / 5Ghz Wi-Fi
- Highly Integrated Design: 2.4” LCD Screen, IMU and more practical add-ons housed in a compact enclosure with built-in magnets & mounting holes
- Raspberry Pi 40-pin Compatible GPIO
- Compatible with over 300 plug&play Grove modules to explore with IoT
- USB OTG Support
- Support Arduino, CircuitPython, Micropython, ArduPy(What is ArduPy?), AT Firmware, Visual Studio Code
- TELEC certificated
For more information go to https://www.seeedstudio.com/Wio-Terminal-p-4509.html.
Step 1: Setup Wio Terminal and Arduino IDEFor Setup, you can follow this wonderful guide provide by SeeedStudio. Get Started with Wio Terminal, anyway a short video is given below,
Step 2: Setup waterproof temperature sensorThe DS18B20 waterproof digital thermal probe or sensor is connected with our board via jumper cable. The pin connections are given below,
Wio terminal to DS18B20 waterproof digital thermal sensor
D8 (37) ------------------> DQ (Yellow Wire)
GND -----------------> GND (Black Wire)
3.3V ----------------> VCC (RED wire)
DS18B20 sensor requires two libraries to reduce the complexity in parsing the code.
- DallasTemperature.h (Dallas Temperature by Miles Burton)
- OneWire.h (One Wire by Paul Stoffregen)
You can download and install this libraries directly through Arduino IDE or manually from our libraries page.
To install directly from IDE follow the below steps:
- Open Arduino IDE and select the Sketch drop down from menu bar
- Choose Include Library and Select Manage Libraries
- Now type the required library name in the search box, choose from the results and tap on install.
- The library is installed successfully.
#include <OneWire.h>
#include <DallasTemperature.h>
// Data wire is connected to digital pin 8 on the Arduino
#define ONE_WIRE_BUS 8
// Setup a oneWire instance to communicate with any OneWire device
OneWire oneWire(ONE_WIRE_BUS);
// Pass oneWire reference to DallasTemperature library
DallasTemperature sensors(&oneWire);
void setup(void)
{
sensors.begin(); // Start up the library
Serial.begin(9600);
}
void loop(void)
{
// Send the command to get temperatures
sensors.requestTemperatures();
//print the temperature in Celsius
Serial.print("Temperature: ");
Serial.print(sensors.getTempCByIndex(0));
Serial.print("ºC | ");
//print the temperature in Fahrenheit
Serial.print((sensors.getTempCByIndex(0) * 9.0) / 5.0 + 32.0);
Serial.println("ºF");
delay(500);
}
The above source is used for testing the temperature separately.
Step 3: Setup Grove Color sensorDirectly connected to the grove multi-functional port (left side) of Wio terminal.
First, we need to set up the TCS3472 for the Wio Terminal
Step 5.1: Download and Install Arduino Libraries
open up the Manage Libraries in Arduino IDE from Sketch -> Include Library -> Manage Libraries.
Then search for Adafruit TCS34725 and click Install.
#include <Wire.h>
#include "Adafruit_TCS34725.h"
/* Example code for the Adafruit TCS34725 breakout library */
/* Connect SCL to analog 5
Connect SDA to analog 4
Connect VDD to 3.3V DC
Connect GROUND to common ground */
/* Initialise with default values (int time = 2.4ms, gain = 1x) */
// Adafruit_TCS34725 tcs = Adafruit_TCS34725();
/* Initialise with specific int time and gain values */
Adafruit_TCS34725 tcs = Adafruit_TCS34725(TCS34725_INTEGRATIONTIME_614MS, TCS34725_GAIN_1X);
void setup(void) {
Serial.begin(9600);
if (tcs.begin()) {
Serial.println("Found sensor");
} else {
Serial.println("No TCS34725 found ... check your connections");
while (1);
}
// Now we're ready to get readings!
}
void loop(void) {
uint16_t r, g, b, c, colorTemp, lux;
tcs.getRawData(&r, &g, &b, &c);
// colorTemp = tcs.calculateColorTemperature(r, g, b);
colorTemp = tcs.calculateColorTemperature_dn40(r, g, b, c);
lux = tcs.calculateLux(r, g, b);
Serial.print("Color Temp: "); Serial.print(colorTemp, DEC); Serial.print(" K - ");
Serial.print("Lux: "); Serial.print(lux, DEC); Serial.print(" - ");
Serial.print("R: "); Serial.print(r, DEC); Serial.print(" ");
Serial.print("G: "); Serial.print(g, DEC); Serial.print(" ");
Serial.print("B: "); Serial.print(b, DEC); Serial.print(" ");
Serial.print("C: "); Serial.print(c, DEC); Serial.print(" ");
Serial.println(" ");
}
The above source is used for testing the color sensor separately. collected from the Adafruit TCS34725 breakout library.
Step 4: Setup pH and salinity sensor (Optional)An electrical conductivity probe is used to measure salinity levels as well as soil pH levels. We could not successfully integrate this sensor (EC probe) with our system.
Step 5: Setup turbidity sensorThe sensor is connected with PIN A0.
The source code used for testing turbidity sensor (separately)
void setup()
{
Serial.begin(9600);
}
void loop() {
int sensorValue = analogRead(A0);
float voltage = sensorValue * (3.3 / 1024.0);
Serial.println ("Sensor Output (V):");
Serial.println (voltage);
Serial.println();
delay(1000);
}
Step 6: Setup Dissolve Oxygen sensorWe did not integrate it into our system due to the sensor's limitation.
Building the whole systemThe circuit diagram of our system is given below,
The cloud connection is very straight forward. thinger.io cloud platform is used in this project.
Cloud Device creation (Thinger.io setup) short video, refer the thinger.io documentation for details.
Mobile AppsThe mobile apps collects data from thinger.io cloud and visualize them via image and charts. I have shared the APK (check the git repository as well as the download link). Note. the apps does not work if the device is not connected with thinger.io cloud. The apps used my cloud credentials for communication with thinger.io. refer the thinger.io documentation for more details about credentials.
We have developed a mobile apps for monitoring the plant remotely. You can download the mobile apps (android version) from here. The login email and password are hackster@gmail.com and hackster respectively.
Machine learning based monitoring and decision support system will be added.
Reference- Dzulqornain, Muhammad Iskandar, M. Udin Harun Al Rasyid, and Sritrusta Sukaridhoto. "Design and development of smart aquaculture system based on IFTTT model and cloud integration." MATEC Web of Conferences. Vol. 164. EDP Sciences, 2018.
- Mohammad Salah Uddin, Md. Fatin Istiaq , Mohd. Rasadin, and Md. Ruhel Talukder, "Freshwater shrimp farm monitoring system for Bangladesh based on internet of things." Engineering Reports. 2020; John Wiley & Sons Ltd, Volume 2, Issue 7, https://doi.org/10.1002/eng2.12184
- https://how2electronics.com/tds-sensor-arduino-interfacing-water-quality-monitoring/
- https://how2electronics.com/iot-based-tds-meter-using-esp8266-for-water-quality-monitoring/
- https://www.campbellsci.eu/turbidity
**Most of the images are collected from internet sources
Comments