设计说明书
总字数:16000+
摘要
在日常生活中,热水器的稳定运行与能源高效利用是提升生活品质的重要保障。传统热水器常存在水温控制精度不足、水位管理滞后、能源浪费等问题,不仅影响使用体验,还可能带来安全隐患。因此,研发一种具备自动温控、水位调节、能源优化及智能交互功能的热水器控制系统十分必要。
本设计提出了一种基于 STM32F103C8T6 单片机的智能热水器。系统主要功能包括:通过防水式 DS18B20 温度传感器采集水温,当水温低于设置最小值时,自动启动加热继电器进行加热,直至达到最大值;通过两个水位触发模块监测水位,低于最低值时启动加水继电器补水,直至达到最高值;借助 5516 光敏电阻检测光照强度,光照大于设置最小值时切换为太阳能供电,否则自动切换至市电供电(通过继电器模拟);当水温达标且水位充足时,启动抽水继电器正常供水,反之则停止供水;具备安全逻辑控制,水位过低时禁止加热操作;通过按键可设置各参数阈值、手动控制加热 / 加水 / 供电模式切换及启动电机进行除水垢操作;通过 OLED 显示屏实时显示水温、水位、供电模式等数据。
该智能热水器的作用在于,实现了水温、水位的全自动精准控制,通过太阳能与市电智能切换降低能源消耗,同时具备手动干预与状态可视化功能,提升了使用便捷性与安全性。通过多维度智能管理,为用户提供稳定、高效、节能的热水供应解决方案,改善生活体验。
关键词:单片机;智能热水器;温度控制;水位调节;能源优化
Abstract
In daily life, stable operation and efficient energy utilization of water heaters are important guarantees for improving the quality of life. Traditional water heaters often suffer from issues such as insufficient water temperature control accuracy, lagging water level management, and energy waste, which not only affect the user experience but may also pose safety hazards. Therefore, it is necessary to develop a water heater control system with automatic temperature control, water level regulation, energy optimization, and intelligent interaction functions.
This design proposes an intelligent water heater based on STM32F103C8T6 microcontroller. The main functions of the system include: collecting water temperature through a waterproof DS18B20 temperature sensor, automatically starting the heating relay to heat when the water temperature is below the set minimum value until it reaches the maximum value; Monitor the water level through two water level triggering modules. When the water level falls below the minimum value, activate the water replenishment relay to replenish water until the maximum value is reached; Using 5516 photoresistor to detect light intensity, switch to solar power supply when the light exceeds the set minimum value, otherwise automatically switch to mains power supply (simulated through relay); When the water temperature meets the standard and the water level is sufficient, start the pumping relay to supply water normally, otherwise stop supplying water; Equipped with safety logic control, heating operation is prohibited when the water level is too low; By pressing buttons, various parameter thresholds can be set, heating/water/power mode switching can be manually controlled, and the motor can be started for scale removal operation; Real time display of water temperature, water level, power supply mode and other data through OLED display screen.
The function of this intelligent water heater is to achieve fully automatic and precise control of water temperature and level, reduce energy consumption through intelligent switching between solar energy and mains power, and have manual intervention and status visualization functions, improving the convenience and safety of use. Through multi-dimensional intelligent management, we provide users with stable, efficient, and energy-saving hot water supply solutions to improve their living experience.
Keywords: microcontroller; Intelligent water heater; Temperature control; Water level regulation; energy optimization
目 录
1 绪论
1.1 研究背景及意义
1.2 国内外研究现状
1.3 主要内容
2 系统总体方案设计
2.1系统总体设计
2.2 主要模块方案选择
3 系统硬件设计
3.1 总体硬件框架
3.2 主控模块电路设计
3.3 温度检测模块电路设计
3.4 水位检测模块电路设计
3.5 光照检测模块电路设计
3.6 继电器模块电路设计
3.7 显示模块电路设计
3.8 按键模块电路设计
4 系统程序设计
4.1 编程软件介绍
4.2 系统主流程设计
4.3独立按键
4.4 OLED显示流程设计
4.5 温度检测模块子流程
5 实物制作与功能测试
5.1 实物制作
5.2 温度检测与加热控制功能测试
5.3 水位检测与加水控制功能测试
5.4 光照检测与供电切换功能测试
5.5 供水控制与安全逻辑功能测试
5.6 除垢控制功能测试
5.7 显示模块功能测试
5.8 按键模块功能测试
6 总结
参考文献
致谢
附录A 原理图
附录B PCB
附录C 主程序
购买后可查看具体内容!