Smart Aquarium Design Based on Arduino and Alibaba Cloud IoT Platform

Smart Aquarium Design Based on Arduino and Alibaba Cloud IoT Platform
Authors: Zhou Shuyi, Hong Yuhan, Xu Jiajun
Shanghai Mengshan High School

Origin of the Topic

  I traveled to another province with my parents for nearly two weeks, and when I returned, I found that the water in my small aquarium was very murky, and one of the fish had already died. Although the oxygen pump was still working normally, it was likely that the water had not been changed for a long time or that too much fish food was added before leaving, resulting in an unfavorable water quality environment for the fish’s growth.

  These are also defects of traditional aquariums, which overly rely on manual management, including timed feeding, water quality testing and changing, and temperature control. At the same time, during long absences or holidays, due to the lack of timely intervention, common issues such as deteriorating water quality, frequent fish diseases, and deaths are not uncommon.

  After experiencing an unfortunate event where the aquarium’s water environment deteriorated and fish died due to a lack of maintenance, I deeply felt the regret and inconvenience of not being able to effectively manage the aquarium during long absences. Thus, my classmates and I came up with the idea of designing an all-round intelligent aquarium, with the core goal of achieving remote monitoring and automatic maintenance functions, aiming to solve common problems encountered in traditional fish-keeping processes such as water changing, feeding, temperature, and water quality monitoring.

Smart Aquarium Design Based on Arduino and Alibaba Cloud IoT Platform
Smart Aquarium Design Based on Arduino and Alibaba Cloud IoT Platform

Common Traditional Aquariums

Market Research and Analysis

  Currently, there are a wide variety of traditional aquariums to modern ecological intelligent aquariums, each with its own characteristics. Through daily observations and online searches, it can be seen that aquariums are gradually incorporating more advanced functions to enhance user experience and fish care quality. Most of these products are equipped with advanced filtration systems to reduce the frequency of water changes, and some even support remote control of heating, lighting, and other environmental settings. However, many of these intelligent aquariums have functional limitations, such as the inability to monitor water quality parameters in real-time, lack of a fully automated water change design, and the inability to remotely control and monitor comprehensively. Price is also an important consideration for consumers; once an aquarium has high-end features, it means a higher price tag. Additionally, while the integrated design style has advantages in convenience, it is not flexible enough for modular upgrades and maintenance. Therefore, there remains a strong market demand for intelligent aquariums with comprehensive control systems, modular designs, and cost-effectiveness, but attention must be paid to user interaction experience, comprehensiveness of functions, as well as sustainability and economy of the products.

Literature Research

  In recent years, with the development of IoT technology, the intelligence of daily items has become a research hotspot. By reviewing literature, I found that some scholars have conducted research on intelligent aquariums and have made some progress.

  Hu Zhihao, Song Zhiqiang, and others designed a low-cost, remotely controllable, and easy-to-operate intelligent aquarium system. It uses OLED to display key information such as aquarium temperature, light intensity, and turbidity, and can control functions like water changing and feeding through buttons. Using the ESP8266-01S module and the Zhizhi Cloud platform, they generated an app with a very simple and user-friendly operation flow, providing users with rich customization options to remotely view and control the aquarium, solving many problems that may arise when keeping pet fish.

  Gao Xiaowei, Jia Xian, and others optimized various excellent controllers related to the fish industry, and through extensive data analysis and processing, these devices based on microcontroller control integrate temperature control, oxygenation, lighting, water changing, filtration, disinfection, and alarm functions into one, achieving automated operation.

  Zhang Yunda designed an intelligent ecological aquarium system that uses multiple sensors to monitor water quality in real-time and collects and processes data through an embedded system, achieving automatic adjustment and control of water quality. In addition, this system also integrates functions such as automatic feeding, oxygenation, and supplementary lighting, effectively maintaining the ecological environment within the aquarium, improving fish survival rates and health.

  The literature indicates that these studies focus on technologies such as data collection and automated control, aiming to enhance user experience, while also having some research on remote control, but lack integration of functions and definition of models, thus making the research on intelligent aquariums of certain practical significance.

Design Plan

  This project designed an intelligent aquarium based on the Arduino microcontroller, integrating IoT technology to achieve multifunctional automated management. The system can monitor water temperature and quality, support automatic water changing and feeding, and has variable atmosphere lighting to enhance the viewing effect. By integrating the ESP8266 Wi-Fi module, the intelligent aquarium connects to the Alibaba Cloud IoT platform, allowing users to remotely view the aquarium’s status and execute remote control commands through mobile devices. This design not only greatly facilitates fish enthusiasts, reducing manual intervention in the fish-keeping process, but also expands the application scope of mobile IoT in the home field.

  The project involves two modes: one is the physical automatic mode: the aquarium can automatically update the water quality and temperature environment based on sensor data or scheduled settings, or perform automatic water changes and timed feeding to assist in meeting users’ fish-keeping needs at home or in the office. The other is the remote control mode: users can remotely view the aquarium’s environmental conditions and manually intervene after going out. The switch between the two modes is executed by mobile controls, allowing users to adjust the aquarium’s operating mode at any time.

Technical Route

System Framework Diagram

  First, the system of the project refers to the basic home IoT structure, and its internal device system is as follows:

  1. The main control chip is the “brain” of the project, achieving overall intelligence and control functions through a powerful chip.

  2. The wireless module is an important component for achieving interconnection, mainly including technologies such as WIFI, ZigBee, and Bluetooth.

  3. The sensor is the hub for internal and external communication; after receiving instructions from external devices through the wireless module, it transmits them to the main controller for processing, while also transmitting the detected information to external devices via the wireless module to achieve real-time monitoring.

Smart Aquarium Design Based on Arduino and Alibaba Cloud IoT Platform

Structure Diagram of IoT

Hardware Block Diagram and Introduction

  1. Hardware Block Diagram

  The hardware block diagram of this solution is as follows, among which the automation elements are:

  Sensors: Water quality detection sensor, water temperature detection sensor

  Actuators: Water pump, LCD1602 display, RGB lights, servos

  Communication Module: ESP8266 WIFI

  Main Control: Arduino Uno mainboard

  IoT Platform: Alibaba Cloud IoT platform

Smart Aquarium Design Based on Arduino and Alibaba Cloud IoT Platform

Hardware Block Diagram

2. Introduction to Important Components

(1)D1-UNO R3 WIFI Development Board: It uses the ATmega328P microprocessor, integrated with the ESP8266 WIFI module, which can read analog or digital input signals from different sensors and convert them into outputs, as well as connect to the cloud and perform various operations; it is the “brain” of the project.

Smart Aquarium Design Based on Arduino and Alibaba Cloud IoT Platform

Microprocessor

  (2)Water Quality Detection Module: The sensor contains an infrared tube; when light passes through a certain amount of water, the amount of light transmitted depends on the turbidity of the water; the more turbid the water, the less light passes through. The light receiving end converts the intensity of the transmitted light into the corresponding current size; more transmitted light means larger current, while less transmitted light means smaller current. The turbidity sensor module converts the current signal output by the sensor into a voltage signal, which is processed by the microcontroller for AD conversion data to know the current turbidity of the water.

Smart Aquarium Design Based on Arduino and Alibaba Cloud IoT Platform

Smart Aquarium Design Based on Arduino and Alibaba Cloud IoT Platform

Water Quality Detection Module

  (3)Water Temperature Detection Module: The probe uses the DS18B20 temperature sensor chip, with a wide temperature range of -55℃ to +125℃ without external components, featuring a unique single-bus interface. The output leads are red (VCC), yellow (DATA), and black (GND), making it an ideal high-precision, low-cost sampling front-end module.

Smart Aquarium Design Based on Arduino and Alibaba Cloud IoT Platform

Water Temperature Detection Module

  (4)Relay Module: Its operation is based on the principles of electromagnetic induction and magnetic materials; by controlling the current in the coil, it can achieve the attraction and release of contacts, thereby achieving conduction and disconnection in the circuit.

Smart Aquarium Design Based on Arduino and Alibaba Cloud IoT Platform

Relay Module

Project Preparation

  The preliminary preparation includes setting up the programming environment, hardware wiring connections, registering on the IoT platform, and configuring devices.

  1. Development Environment

  Arduino IDE compilation environment configuration: Download and install the Arduino software. Connect the development board, open the software, find the ESP8266 library and install it, then select the corresponding development board and port.

  2. Hardware Connection and System Structure

Smart Aquarium Design Based on Arduino and Alibaba Cloud IoT Platform

System Structure Block Diagram

  3. IoT Platform Setup

  The project uses the Alibaba Cloud IoT platform; register an account, understand the device access process, and follow the instructions step by step to complete the creation and access of devices.

  4. Project Development

  The main program workflow of the aquarium system is shown below. When the system is running, it first initializes the module configuration, including the libraries corresponding to the modules, pins, and variables for storing data, then reads the sensor data and displays it on the screen, and finally connects to the network and transmits the collected information while reading cloud commands to achieve online and offline data visualization and mode determination.

Smart Aquarium Design Based on Arduino and Alibaba Cloud IoT Platform

Flowchart of the Main Program Control

  5. Programming for Automatic Control Mode

  When the user selects the automatic control mode, the system automatically judges the current water quality and temperature. If the water quality is below the set threshold, the microcontroller sends a signal to the relay module, and the water pump module starts to change the water; at the same time, it sets timed feeding, meaning every certain period, the servo rotates once to complete a quantitative feeding.

Smart Aquarium Design Based on Arduino and Alibaba Cloud IoT Platform

Flow of Automatic Control Mode

  For task analysis of its logic, design a process control diagram, then read the data from each sensor, detect the critical control conditions, and complete the program writing to achieve the system’s automatic control.

  6. Programming for Remote Control Mode

  Upload the sensor data to the cloud, allowing users to remotely view the water quality and temperature data, understanding the aquarium’s water environment. At the same time, users can send control commands to the device through mobile devices, such as water changing, feeding, and lighting effects. The aquarium device executes the corresponding operation according to the received instructions.

Smart Aquarium Design Based on Arduino and Alibaba Cloud IoT Platform

Flow of Remote Control Mode

  After determining the control flow, I will read the commands issued from the cloud and make judgments, in order to execute the corresponding operations, completing online monitoring and adjustments.

Project Implementation

  Various sensors monitor the growth environment of the aquarium in real-time, connecting to the network via the WIFI module, sending the monitored data to the Alibaba Cloud IoT platform in real-time, allowing monitoring of data on PC or mobile devices. At the same time, based on sensor data and time settings, automatic water changing and timed feeding functions are completed.

Experimental Design and Test Analysis

  After completing the programming, in order to ensure the feasibility of the system, we conducted functional tests to verify the system’s effectiveness in practical applications.

Smart Aquarium Design Based on Arduino and Alibaba Cloud IoT Platform

Hardware Test Prototype

  Testing for the following functions: (1) Sensor data display (on screen and IoT platform); (2) Automatic control mode (turn on the automatic mode switch, test the following operations: add clean tap water to the aquarium, the water change system will not start; when dirt or planting soil is added to the water, the water becomes murky, the water change system will automatically start, and when the water quality recovers to a certain extent, the water change will stop. Timed feeding function, to improve testing efficiency, can shorten the time cycle, for example, feed every 5 minutes, observing whether it can complete a feeding on time); (3) Remote control mode (turn off the automatic mode, test the following operations: turn on the water change system, the water pump starts to draw water, turn off the water change system, the water pump stops drawing water, and the water change stops). To ensure system stability, we conducted multiple tests on the system to discover and improve its completeness.

Significance of the Topic

  1. Brings great convenience to life: Solving the limitations of experience and time in traditional fish-keeping through modern technology, making aquarium management automated and intelligent, thereby enhancing the fish-keeping experience and enjoyment.

  2. Intelligence of daily products: At this stage, as users’ requirements for home comfort increase and the maturity of technology improves, AI technology applications will permeate more product categories, further serving users’ daily lives; thus, the design of intelligent aquariums also aligns with the trend of smart homes.

  3. Application of IoT technology: By incorporating IoT and sensor technology, it develops more contemporarily, thus promoting its performance optimization and upgrades, such as automatically adjusting growth environment data based on different fish species.

Innovative Points

  Introduced two modes of automatic control and remote control, with specific advantages as follows:

  1. Datafication and visibility of environmental factors: Compared with traditional aquariums, this device displays specific data of the environment through sensors, making maintenance and management more precise and visible.

  2. Automated regulation of growth environment: Automatically adjusts environmental conditions based on sensor monitoring data, combined with water pumps and servo components.

  3. Remote monitoring and control: By integrating IoT, users can remotely view the environmental data of the aquarium and control adjustment facilities via mobile devices.

  4. Free switching between different modes: This project features both automatic control and remote control modes, which can be freely switched to meet different scenarios’ needs.

  5. Transition from traditional home to smart home: Using sensors and communication modules, combined with the IoT platform, to achieve remote interaction in homes, bringing a unique experience.

Outlook

  This solution still has some shortcomings, such as not establishing a dedicated APP, making the interface not user-friendly. In the future, we will improve and expand in the following areas:

  1. Technical optimization: Further enhance the accuracy of sensor data monitoring, improve the stability of WIFI communication, and optimize and integrate hardware to make its functions more complete.

  2. More convenient use: Although the system’s stability can be guaranteed to a certain extent, there are still safety hazards; if a failure occurs during the water change process, it can lead to danger. Adding warning functions and fault detection functions can make its application more user-friendly.

  3. Structural optimization: The water change system may involve the connection of water pipes and drainage, and the structure is not simple enough; it needs to be optimized, or a filtering system should be added to reduce the frequency of water changes.

Harvest and Growth

  The completion of this topic made us realize that the application of intelligent technology brings great impetus to products and life. We learned about the proposal and evolution of the concept of smart IoT, mastered commonly used WIFI communication technology, and found significant application value for the transformation and innovation of other items in daily life; thus, we pay more attention to the design of intelligent products and the implementation logic behind them.

  We encountered many difficulties in the process of designing and developing the product, from initially not knowing how to write the main program code to gradually trying until finally achieving physical testing; we successfully overcame various problems and gained tremendous satisfaction after solving them.

Editor: Xiao Yezi

WeChat Production: Jin Jin

Smart Aquarium Design Based on Arduino and Alibaba Cloud IoT Platform
Smart Aquarium Design Based on Arduino and Alibaba Cloud IoT Platform
– Scan to Follow –

Leave a Comment

Your email address will not be published. Required fields are marked *