走马观花

Smart fish tank system control board based on ESP32 and STM32

 
Overview

# 1. Introduction
### **1.1 This project mainly explores the design of intelligent fish tank control system based on ESP32 and STM32. The main work includes the following aspects:**
(1) Hardware design: According to the overall design block diagram and selection, the circuit design and hardware system are built. The schematic PCB design is carried out using **EDA Professional Edition**, and the hardware product is finally produced.
(2) Software design: According to the designed hardware module, modular programming is carried out, a simple program flowchart is drawn, and programming is carried out using **C, C++** languages, and IDE software such as KEIL and VSCODE is used for development.
(3) Shell design: Use 3D printing technology and laser cutting technology to design the shell, and reserve screw holes in the hardware design so that the product and the shell can fit each other.
### **1.2 The application scope of this design is a small fish tank in daily life. The main functions of the specific design are as follows:**
(1) Monitoring of the water area in the fish tank: to detect the temperature, pH value and TDS value in the fish tank.
(2) Real-time display of data: a display screen is required to display the current water area data and the current time.
(3) Automatic feeding: a self-made automatic feeding module is used to realize timed and fixed-point feeding.
(4) Automatic filtration and oxygen supply: automatically turn on filtration or oxygen supply according to the current water area conditions.
(5) Numerical limit recording: when the measured data exceeds the set data, the current time and the out-of-bounds value are automatically recorded.
(6) Automatic manual switching: the system can realize the automatic and manual free switching to adapt to different environmental requirements.
(7) Lighting system: there are various lighting systems to choose from, making the fish tank more colorful.
### **1.3 The following figure is a rendering of each module of this project**
![Figure 1.1 FishTank_Shell]
**Figure 1.1 FishTank_Shell**

***
(1) As shown in Figure 1.1 above, the shell design of the fish tank main control box is about 85x103x171mm in size after assembly. It includes a total of 5 3D printed parts and one laser cut part, including the slots for two switches (switch 1 and switch 2 are used for the mechanical control of the oxygen supply machine and the filter), the slot for the main switch, the slot for the DC power port, the design of the support frame, the design of the control panel protective shell, etc.
 
![图1.2 FishTank_CircuitBoard]
**图1.2 FishTank_CircuitBoard**

***
(2) As shown in Figure 1.2 above, the main board design of the fish tank control box is shown, with the pink "Fish Tank-Z" lettering facing the LOGO as the front, the top and upper left are the main power 5V interface and various sensor terminal interfaces, the right side is the LED light board interface, and the lower left corner is the amplifier circuit of the PH and TDS detectors.
 
![Figure 1.3 Back view of FishTank_CircuitBoard]
**Figure 1.3 Back view of FishTank_CircuitBoard**

***
 
![Figure 1.4 Front view of FishTank_CircuitBoard]
**Figure 1.4 Front view of FishTank_CircuitBoard**

***
 
### **1.4 Module parameters**
(1) Input power: Use the standard voltage of **5V** input via the DC5.5-2.1&USB interface cable. The recommended input power is **greater than 10W**
(2) Working temperature: Work at room temperature (25°C)
(3) Screw types used: M2.5x10 hexagon socket screw, M3x10 hexagon socket screw

# 2. Hardware design
### **2.1 Schematic design and PCB design**
(1) Since the text part is too long and difficult to edit, the detailed introduction of the hardware application part is placed in the PDF file for reference. If you have any questions, please leave a message in the comment area.
>##### Documentation: [Smart fish tank system control board based on ESP32 and STM32-detailed hardware design.pdf](https://oshwhub.com/attachments/2023/4/WWEsrDPpnbyy9x5yEBFvfyzV9b50ThHe0YswYP0D.pdf?operation=download)
### **2.2 Selection of main modules**
(1) Main control microcontroller chip (MCU1): Hezhou ESP32-C3 microcontroller core board
(2) Sub-control microcontroller chip (MCU2): STM32F103C6T6 chip
(3) Display screen: Hezhou 0.96-inch IPS80X160LCD expansion screen
(4) DC motor and DC motor driver chip:
Oxygen supply motor: The oxygen supply pump with USB5V interface purchased on Taobao, model 385 atmospheric volume silent oxygen pump, is almost universal as long as it is a motor with 5V voltage USB interface.
Filter motor: Arctic Ice USB small mini water pump purchased on Taobao, model TD-02X, is almost universal as long as it is a motor with 5V voltage USB interface.
Driver chip: TB6612
(5) Stepper motor and stepper motor driver chip:
Feeding motor: special model stepper motor, model 11SRM1410001 15 micro two-phase four-wire stepper reduction motor, step angle is 18°, reduction ratio is about 1:50
Driver chip: TMC2225
(6) Various probes:
PH probe: Shanghai Yueci E-201 PH composite electrode probe blue
TDS probe: Shenzhen Bit Atom water quality detection sensor probe BA01 (without temperature)
Temperature sensor probe: DS18B20 temperature sensor probe (waterproof)
###### **_Notes:_**
(1) For the rest, since Jialichuang Mall may not have the components, it is not recommended to use the BOM table. You can select the model according to the schematic diagram at Taobao e-shops such as "Shenzhen Youxin Electronics Store".
(2) Because the PH and TDS hardware design requires high precision for resistors and capacitors, please select the model according to the schematic diagram requirements to ensure the accuracy of the measurement.
(3) If you have any questions about the module selection, you can leave a message in the comment area


# 3. Software Design
### **3.1 Software Design Description**
>##### Documentation: [Smart fish tank system control board based on ESP32 and STM32-Software design part details.pdf](https://oshwhub.com/attachments/2023/4/Cx9P0it6PgIs5QXbi0LofOybgORGeC6xenYUobfs.pdf?operation=download)
>##### Code download: [Github](https://github.com/Xk-w/FishTank-Z.git)

# 4. Shell Design
### **4.1 Shell Design Description**
>##### Description document: [Smart fish tank system control board based on ESP32 and STM32-detailed introduction to shell design.pdf](https://oshwhub.com/attachments/2023/4/sl6SKJEyzVFUp1Abujl8ayNwmlajX7Be7m8gO6K0.pdf?operation=download)
>##### Main control board shell download: [Thingiverse-Fish tank shell](https://www.thingiverse.com/thing:5967494)
>##### Feeder shell download: [Thingiverse-Fish tank feeding motor shell](https://www.thingiverse.com/thing:5967508)
>##### Transparent acrylic protective shell download: [FishTank_Transparent acrylic board Extraction code: uxx4](https://pan.baidu.com/s/162I7ZmOKHFM1Um2f_J53fA)

# 5. Usage test and instructions
### **5.1 Usage test and instructions**
>##### Documentation: [Smart fish tank system control board based on ESP32 and STM32-system design and description part detailed introduction.pdf](https://oshwhub.com/attachments/2023/4/sF5KQU5MLAmGn5fpjGQaKgtQhVrPX9TTPMflg4cn.pdf?operation=download)
### **5.2 Test video at the end of the article**

 
 
 
# Supplement
###### **(1) This project complies with GPL 3.0 agreement, no commercial charges! **
###### (2) Considering that the project involves too many modules, we will consider separating each module and releasing it as an independent project in the future
###### (3) The project is developed independently by individuals. If you encounter any problems or bugs, please report them to the comment area
###### (4) Problem sharing and exchange group:
![qrcode_1687268993537.jpg]
参考设计图片
×
 
 
Search Datasheet?

Supported by EEWorld Datasheet

Forum More
Update:2025-05-20 05:57:24

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
community

Robot
development
community

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号