设计说明书
总字数:18000+
此次设计了一款基于STM32F103C8T6单片机的教室控制系统。该系统旨在实现对教室环境的智能化管理和控制。系统具备多种功能,包括前后门人数计数、时钟控制、光照检测、人体热释电感应、CO2浓度检测、雨水检测、按键调节、远程控制等。系统通过两对红外计数管模拟前后门人数计数,实现对教室内人数的监测。通过RTC内部时钟获取时间,并可设定开灯和关灯时间,实现对灯光的自动控制。光敏电阻用于检测光照值,根据设定的光照范围和人数情况,利用PWM调节灯光亮度,实现智能化的灯光控制。系统还引入了SGP30传感器,用于检测CO2浓度。当CO2浓度过高时,系统会自动开启通风,确保教室空气质量。同时,通过雨水检测模块检测是否下雨,如果下雨,则自动关闭窗户,保持室内的干燥。用户可以通过按键进行时间调整、设置CO2浓度最大值、设置开灯关灯时间、手动控制灯的亮度以及切换模式、开关窗户、开关通风等操作。测量数据通过OLED显示屏展示给用户,方便查看当前环境状态。此外,系统还提供了WIFI模块,使得用户可以通过手机端获取测量数据,并远程调节灯光、开关窗户、开关通风等功能,增加了系统的便捷性和灵活性。
通过本论文的设计和实现,基于STM32F103C8T6单片机的教室控制系统具备丰富的功能和智能化管理能力。该系统的应用对于提升教室环境的舒适度和能源利用效率具有一定的实用价值和市场潜力。未来的研究方向可以进一步优化系统的稳定性和精确度,增加传感器的种类和功能,提升系统的扩展性和智能化水平,以满足不断变化的用户需求和技术发展的要求。
关键词:教室控制系统;单片机;智能化管理;传感器;远程控制;用户体验
This paper presents the design of a classroom control system based on the STM32F103C8T6 microcontroller. The system aims to achieve intelligent management and control of the classroom environment. It incorporates various functionalities, including front and rear door people counting, clock control, light intensity detection, human body infrared sensing, CO2 concentration detection, rainwater detection, keypad adjustment, and remote control. The system utilizes two pairs of infrared counting tubes to simulate the counting of people entering and exiting through the doors, enabling monitoring of the number of people inside the classroom. It utilizes the internal RTC clock to obtain the time and allows for the setting of automatic light on/off timings. Light intensity is controlled intelligently by detecting the ambient light using a photoresistor and adjusting the brightness using PWM based on the set light range and the number of occupants. The system also incorporates an SGP30 sensor for monitoring CO2 concentration. When the CO2 concentration exceeds a certain threshold, the system automatically initiates ventilation to ensure a healthy indoor environment. Additionally, a rainwater detection module is employed to automatically close the windows in case of rainfall, maintaining a dry interior. Users can adjust the time, set the maximum CO2 concentration, define light on/off timings, manually control the light intensity, switch modes, and control window opening/closing and ventilation through the keypad. The measured data is displayed on an OLED screen, providing users with easy access to the current environmental conditions. Moreover, the system includes a Wi-Fi module that allows users to retrieve measurement data via a mobile application and remotely control lighting, window opening/closing, and ventilation, enhancing the system’s convenience and flexibility.
Through the design and implementation presented in this paper, the classroom control system based on the STM32F103C8T6 microcontroller exhibits rich functionalities and intelligent management capabilities. The application of this system has practical value and market potential in improving classroom comfort and energy utilization efficiency. Future research directions could focus on enhancing system stability and precision, expanding the range of sensors and functionalities, and improving the system’s scalability and level of intelligence to meet evolving user needs and technological advancements..
Keywords:Classroom control system; Microcontroller; Intelligent management; Sensors; Remote control; User experience.
目 录
摘要
Abstract
第1章 绪论
1.1 研究背景及意义
1.2 国内外研究现状
1.3 论文的主要内容
第2章 系统总体设计方案
2.1系统总体设计
2.2主要模块方案选择
2.2.1 主控模块方案选择
2.2.2 光照强度检测模块方案选择
2.2.3 显示模块方案选择
第3章 硬件设计
3.1 主控模块电路设计
3.2光照强度检测模块电路设计
3.3 红外对管模块电路设计
3.4 CO2检测模块电路设计
3.5 雨量检测模块电路设计
3.6 人体热释电感应电路设计
3.7 显示模块电路设计
3.8 步进电机模块电路设计
3.9 继电器模块电路设计
3.10 照明模块电路设计
3.11 WiFi模块电路设计
3.12 按键模块电路设计
第4章 系统程序设计
4.1 编程软件介绍
4.2 系统主流程设计
4.3 独立按键流程
4.4 OLED显示流程设计
第5章 实物测试
5.1 整体实物测试
5.2 教室照明控制实物测试
5.3 红外对管检测实物测试
5.4 CO2检测实物测试
5.5 雨量检测实物测试
第6章 总结展望
参考文献
附录A 原理图
附录B PCB
附录C 主程序
购买后可查看具体内容!