项目简介
项目名:鱼缸(实物)
项目编号:mcuclub-dz-273
单片机类型:STM32F103C8T6
具体功能:
1、通过防水式DS18B20检测水温,水温低于设置最小值,进行加热(防水式加热棒加热)
2、通过超声波检测剩余水位,剩余水位低于设置最小值,进行加水,高于设置最大值进行抽水(需要设定一个鱼缸总高度)
3、通过浊度传感器检测浑浊度,浑浊度大于设置最大值,启动水泵换水(两个继电器)
4、通过光敏电阻检测光照值,光照值低于设置最小值进行补光(灯为彩色,可通过按键切换颜色)
5、通过按键可实现设置定时投喂、定时充氧时间
6、通过按键可设置各阈值
7、通过OLED显示屏显示测量值
总字数:16414
基于单片机的智能鱼缸系统设计
摘 要:传统养鱼方式存在费时费力、经验少、易出错等问题,在养鱼环节中出现鱼儿刚进缸阶段环境不适、换水以及长时间没有进行鱼缸管理等问题,设计一款智能鱼缸迫在眉睫。
为了解决上述问题,本文采用STM32作为主控芯片,控制系统的参数采集和参数调节。采用防水式DS18B20检测鱼缸内水温,通过超声波模块检测剩余水位,采用TDS水质模块检测鱼缸内水的浑浊度,采用光敏电阻检测关照值,采用OLED显示屏显示相关监测值,采用按键可以设置定时投喂、充氧时间和阈值设置,还可以控制继电器进行相关工作,达到调节鱼缸环境相关参数的目的。
实物测试表明,该鱼缸可自动实现对鱼缸系统的实时检测、调节功能。并将集到的数据通过传输到显示屏进行实时显示,即可宏观检测鱼缸状态,又可实时操控鱼缸,实现鱼缸的控制功能,更好的美化生态环境,提高人们的生活水平。
关键词:鱼缸;传感器;控制:单片机;OLED显示屏
Design of intelligent fish tank system based on single chip microcomputer
Abstract: Traditional fish farming methods are time-consuming, laborious, less experience, error-prone and other problems. In the fish farming process, the environment is not comfortable when the fish just enter the tank, the water is changed, and the tank management is not carried out for a long time.
In order to solve the above problems, this paper uses STM32 as the main control chip to control the parameter acquisition and parameter adjustment of the system. The waterproof DS18B20 is used to detect the water temperature in the aquarium, the remaining water level is detected by the ultrasonic module, the turbidity of the water in the aquarium is detected by the TDS water quality module, the care value is detected by the photoresistor, the relevant monitoring value is displayed by the OLED display, and the timing feeding, oxygenation time and threshold Settings can be set by pressing the button. The relay can also be controlled to perform related work to achieve the purpose of adjusting the parameters related to the fish tank environment.
The real test shows that the fish tank can automatically realize the real-time detection and adjustment of the fish tank system. And the collected data is transmitted to the display screen for real-time display, which can detect the status of the aquarium in a macroscopic way, and control the aquarium in real time to achieve the control function of the aquarium, better beautify the ecological environment and improve people’s living standards.
Key words: fish tank; Sensor; Control: MCU; OLED display
目 录
摘 要
Abstract