news 2026/6/11 23:22:44

【dz-1015】基于STM32单片机智能鱼缸

作者头像

张小明

前端开发工程师

1.2k 24
文章封面图
【dz-1015】基于STM32单片机智能鱼缸

摘要

在观赏鱼养殖领域,水质状态、水温稳定性及饲喂合理性对鱼类生存质量与健康状况起着决定性作用。传统鱼缸管理多依赖人工换水、经验控温及定时投喂,存在水质恶化预警滞后、水温波动大、饲喂不规律等问题,难以满足精细化养殖的严苛需求。

基于 STM32F103C8T6 单片机的智能鱼缸系统,整合了 TDS 水质模块、防水式 DS18B20 温度传感器、水位检测模块、OLED 显示屏、按键、语音识别模块、WIFI 模块及蓝牙模块,实现了对鱼缸环境的实时监测、智能调控与多端交互。系统核心功能包括:通过 TDS 水质模块检测水质,数值大于设定最大值时启动双水泵自动换水;借助防水式 DS18B20 检测水温,超过上下限值时通过加热棒加热或风扇制冷;利用水位检测模块监测水位,低于最小值时自动加水;支持通过按键设置定时投喂、定时充氧时间,以及各参数阈值、手动控制各类设备及模式切换;通过 OLED 显示屏实时展示各项测量数据;通过语音识别模块控制换水、加热等多项功能及模式切换;通过 WIFI 和蓝牙模块将数据发送至手机端,支持在手机端设置阈值、控制设备及模式切换。

该系统的实现,有效提升了鱼缸管理的自动化与智能化水平,通过多参数协同监测、多方式智能调节及多端交互,为鱼类生长提供了稳定、适宜的环境,同时为家庭及小型观赏鱼养殖场所的设备升级提供了参考,具有较高的实用价值与推广意义。

关键词:智能鱼缸;STM32;自动控制;水质监测;多端交互

ABSTRACT

In the field of ornamental fish farming, the state of water quality, the stability of water temperature and the rationality of feeding play a decisive role in the quality of life and health of fish. Traditional fish tank management mostly relies on manual water changing, experience-based temperature control and regular feeding, which has problems such as delayed early warning of water quality deterioration, large fluctuations in water temperature and irregular feeding, making it difficult to meet the strict requirements of refined aquaculture.

The intelligent fish tank system based on STM32F103C8T6 single-chip microcomputer integrates TDS water quality module, waterproof DS18B20 temperature sensor, water level detection module, OLED display screen, buttons, voice recognition module, WIFI module and Bluetooth module. Real-time monitoring, intelligent regulation and multi-terminal interaction of the fish tank environment have been achieved. The core functions of the system include: detecting water quality through the TDS water quality module. When the value exceeds the set maximum value, the dual water pumps will be activated for automatic water exchange. The water temperature is detected by the waterproof DS18B20. When it exceeds the upper and lower limit values, it is heated by the heating rod or cooled by the fan. The water level is monitored by the water level detection module, and water is automatically added when it drops below the minimum value. Support setting timed feeding, timed oxygenation time, and various parameter thresholds through buttons, as well as manual control of various devices and mode switching. All measurement data are displayed in real time through the OLED screen. The voice recognition module is used to control multiple functions such as water change and heating, as well as mode switching. Data is sent to the mobile phone via WIFI and Bluetooth modules, and it supports setting thresholds, controlling devices and switching modes on the mobile phone.

The implementation of this system has effectively enhanced the automation and intelligence level of fish tank management. Through multi-parameter collaborative monitoring, multi-mode intelligent adjustment and multi-terminal interaction, it provides a stable and suitable environment for fish growth. At the same time, it offers a reference for equipment upgrades in household and small-scale ornamental fish breeding sites, and has high practical value and promotion significance.

Keywords:Smart Fish tank "STM32; "Automatic control; Water quality monitoring Multiterminal interaction

目录

第1章 绪论

1.1 研究的目的及意义

1.2 国内外发展情况

1.2.1 国外研究现状

1.2.2 国内研究现状

1.3 本文主要研究内容

第2章 设计思路与方案论证

2.1 主要元器件选择

2.1.1 主控芯片选择

2.1.2 水质检测模块选择

2.1.3 水温检测模块选择

2.1.4 水位监测模块选择

2.1.5 显示模块选择

2.1.6 语音识别模块选择

2.1.7 WIFI 模块选择

2.1.8 蓝牙模块选择

2.1.9 按键模块选择

2.2整体设计方案

第 3 章 硬件设计

3.1 主控电路模块

3.2 水质检测模块电路

3.3 水温检测模块电路

3.4 水位监测模块电路

3.5 显示模块电路

3.6 按键模块电路

3.7 语音识别模块电路

3.8 WIFI 模块电路

3.9 蓝牙模块电路

3.10 继电器控制模块电路

第4章 系统程序设计

4.1 编程软件介绍

4.2 系统主流程设计

4.3 独立按键

4.4 温度检测模块子流程

4.5 OLED显示流程设计

4.6 WiFi模块子流程设计

第 5 章 实物测试

5.1 整体实物测试

5.2 水质检测与自动换水功能测试

5.3 水温检测与加热 / 制冷功能测试

5.4 水位检测与加水功能测试

5.5 定时投喂与定时充氧功能测试

5.6 按键设置与显示功能测试

5.7 语音识别功能测试

5.8 WIFI 模块功能测试

5.9 蓝牙模块功能测试

第6章 总结与展望

6.1 总结

6.2 展望

致谢

参考文献

附录

附录一:原理图

附录二:PCB

附录三:主程序

版权声明: 本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若内容造成侵权/违法违规/事实不符,请联系邮箱:809451989@qq.com进行投诉反馈,一经查实,立即删除!
网站建设 2026/6/10 0:33:29

合规领航:下一代数字资产交易所全栈架构设计“黄金法则”大公开

引言:数字资产交易所的“合规突围战”在数字货币狂潮席卷全球的当下,数字资产交易所作为这场金融变革的核心枢纽,正经历着前所未有的挑战与机遇。据统计,全球数字资产交易所数量已突破千家,日交易量峰值超千亿美元&…

作者头像 李华
网站建设 2026/6/8 9:36:39

C++ dll 设计接口时,能否用shared_ptr作为接口返回值?

C DLL 设计接口时,能否用 shared_ptr 作为接口返回值? 最简短的行业共识答案(2025-2026): 强烈不推荐,绝大多数生产级项目都不这么做,几乎所有成熟的 C DLL 接口规范都明确禁止这样做。 为什…

作者头像 李华
网站建设 2026/6/10 21:34:31

没GPU怎么玩SAM 3?图像分割云端镜像2块钱搞定

没GPU怎么玩SAM 3?图像分割云端镜像2块钱搞定 你是不是也刷到过抖音上那种“一键抠图”的神操作?一张照片,点几下鼠标,人物、宠物、商品瞬间被精准分割出来,背景直接换掉——看起来像是PS高手花了几个小时的成果&…

作者头像 李华
网站建设 2026/6/5 17:24:12

GPEN修复成本揭秘:云端按秒计费,比本地部署省80%

GPEN修复成本揭秘:云端按秒计费,比本地部署省80% 你是不是也遇到过这样的情况:客户拿着泛黄的老照片来找你做纪念视频,可照片模糊、有划痕,直接用太影响效果?作为婚庆公司,我们经常接到这种需求…

作者头像 李华
网站建设 2026/6/10 18:04:49

零基础转AI产品经理,年薪50W不是梦!_年薪50W,AI产品经理薪资真相!

文章指出AI行业人才缺口达500万,AI产品经理需求旺盛,薪资中位数达36k/月,头部公司年薪可达50W。AI产品经理分为专业型、应用型和工具型三类,没有技术背景的人可通过成为应用型AI产品经理入局。成功入行需掌握商业变现模式、产品需…

作者头像 李华
网站建设 2026/6/7 11:00:32

新手必看!Lora训练开箱即用方案,没显卡也能当炼丹师

新手必看!Lora训练开箱即用方案,没显卡也能当炼丹师 你是不是也经常刷到别人用AI生成超可爱的宝宝童话绘本?画面温馨、角色萌趣,连故事都能自动生成。可当你想自己动手时,却被“显存不足”“CUDA版本不匹配”“环境配…

作者头像 李华