设计说明书
总字数:21000+
摘要
随着人们生活品质的提升,热水器作为家庭必备电器,其安全、节能与智能化运行愈发受到重视。传统热水器存在水温控制精度低、水位监测滞后、能源利用效率不高等问题,依赖人工操作易导致资源浪费或使用不便,难以满足现代家庭对便捷、高效热水供应的需求。基于 STM32F103C8T6 单片机的热水器设计,整合了防水式 DS18B20 温度传感器、YT-C 水位触发模块(2 个)、XGZP6847 气压检测模块、5516 光敏电阻、3 个独立按键、OLED 显示屏、ECB02 蓝牙模块及执行设备(加热继电器、加水继电器、抽水继电器、供电切换继电器)等,实现了热水器的自动化监测与智能控制。系统核心功能包括:通过 DS18B20 采集水温,当水温低于设置最小值时启动加热,直至达到最大值;利用 YT-C 模块检测水位,低于最低值时自动加水至最高值;通过 XGZP6847 监测气压,高于最大值时抽水,低于最小值时加水;借助 5516 检测光照,大于设置最小值时切换为太阳能供电,否则使用市电;当水温与水位均满足条件时启动供水,反之停止;水位低时禁止加热,保障安全;支持通过按键设置各阈值、手动控制加热 / 加水及切换供电模式;OLED 显示屏实时显示水温、水位、气压、供电状态等数据;通过 ECB02 蓝牙模块将数据发送至手机端,手机端可远程控制加热或加水。
该系统的实现,有效提升了热水器的智能化与自动化水平,提高了能源利用效率,保障了使用安全与便捷性,为家庭热水供应提供了高效解决方案,同时为同类智能家电的研发提供了参考,具有较高的实际应用价值。
关键词:STM32F103C8T6;热水器;传感器;智能控制;蓝牙通信;能源优化
ABSTRACT
With the improvement of people’s living standards, water heaters, as essential household appliances, have increasingly attracted attention for their safe, energy-efficient, and intelligent operation. Traditional water heaters have problems such as low water temperature control accuracy, delayed water level monitoring, and low energy utilization efficiency. Relying on manual operation can easily lead to resource waste or inconvenience, making it difficult to meet the needs of modern families for convenient and efficient hot water supply.
The water heater design based on the STM32F103C8T6 microcontroller integrates waterproof DS18B20 temperature sensors, YT-C water level trigger modules (2 units), XGZP6847 air pressure detection modules, 5516 photoresistors, 3 independent buttons, OLED displays, ECB02 Bluetooth modules, and executive devices (heating relays, water addition relays, water pumping relays, power supply switching relays), realizing automatic monitoring and intelligent control of the water heater. The core functions of the system include: collecting water temperature through DS18B20, starting heating when the water temperature is lower than the set minimum value until it reaches the maximum value; using YT-C modules to detect water level, automatically adding water to the maximum value when it is lower than the minimum value; monitoring air pressure through XGZP6847, pumping water when it is higher than the maximum value, and adding water when it is lower than the minimum value; using 5516 to detect light, switching to solar power supply when it is greater than the set minimum value, otherwise using municipal power; starting water supply when both water temperature and water level meet the conditions, otherwise stopping; prohibiting heating when the water level is low to ensure safety; supporting setting various thresholds through buttons, manually controlling heating/water addition and switching power supply modes; the OLED display showing real-time data such as water temperature, water level, air pressure, and power supply status; sending data to the mobile phone through the ECB02 Bluetooth module, and the mobile phone can remotely control heating or water addition.
The implementation of this system effectively improves the intelligence and automation level of the water heater, enhances energy utilization efficiency, ensures safety and convenience in use, provides an efficient solution for household hot water supply, and also offers a reference for the research and development of similar smart home appliances, with high practical application value.
Keywords: STM32F103C8T6; Water heater; Sensor; Intelligent control; Bluetooth communication; Energy optimization
目录
第 1 章 绪论
1.1 研究的目的及意义
1.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 显示模块选择
2.1.8 蓝牙模块选择
2.2整体设计方案
第 3 章 硬件设计
3.1 主控电路模块
3.2 温度传感器电路
3.3 水位传感器电路
3.4 气压检测模块电路
3.5 光照检测模块电路
3.6 显示模块电路
3.7 蓝牙模块电路
3.8 按键模块电路
3.9 执行设备驱动电路
第4章 系统程序设计
4.1 编程软件介绍
4.2 系统主流程设计
4.3 OLED显示子流程设计
4.4 独立按键子流程设计
4.5 温度检测模块子流程设计
4.6 ADC模数转换子流程设计
4.7 蓝牙模块子流程设计
第 5 章 仿真测试
5.1 整体仿真测试
5.2 温度传感器功能测试
5.3 水位传感器功能测试
5.4 气压检测模块功能测试
5.5 光照检测模块功能测试
5.6 蓝牙模块功能测试
5.7 按键设置与显示功能测试
第 6 章 实物测试
6.1 整体实物测试
6.2 温度传感器功能测试
6.3 水位传感器功能测试
6.4 气压检测模块功能测试
6.5 光照检测模块功能测试
6.6 蓝牙模块功能测试
6.7 按键设置与显示功能测试
第 7 章 总结与展望
7.1 总结
7.2 展望
致谢
参考文献
附录
附录一:原理图
附录二:PCB
附录三:主程序
购买后可查看具体内容!