一种可用于教学的CAN总线分布室内环境信息采集系统
2018-01-22雷建和万斌钱晶刘明
雷建和+万斌+钱晶+刘明
摘 要: 设计一种室内环境信息采集系统。系统中单片机STM32F103ZET6和STM32F103RBT6分别作为中央节点控制器和局部节点控制器并通过湿度传感器、光照传感器、PM2.5传感器、烟雾传感器、步进电机、音乐模块、语音模块控制器来完成温湿度、光照度、PM2.5的采集与显示、背景音乐的播放控制、室内灯光的自动调节、室内百叶窗控制。由于需要采集和控制客厅、卧室、厨房等建筑单元的环境参数,故采用分布控制式控制系统,每个建筑单元的采集、控制节点以及中央控制器和局部控制器都挂在CAN总线上,所以其具有模块化、可扩展的特点并能实现各控制器之间的通信。经过实际调试和运行结果表明,该系统可达到设计和教学要求。
关键词: CAN总线; 传感器; 信息采集; STM32; 通信; 控制器
中图分类号: TN431.1?34; TP273 文献标识码: A 文章编号: 1004?373X(2018)02?0026?04
Abstract: An indoor environment information acquisition system is designed in this paper. The STM32F103ZET6 and STM32F103RBT6 microcontrollers are used respectively as the central node controller and the local node controller to accomplish acquisition and display of temperature, humidity, illuminance and PM2.5, and play control of background music, automatic dimming of indoor lamplight and control of indoor shutter by using temperature and humidity sensor, light illumination sensor, PM2.5 sensor, smoke sensor, stepper motor, music module controller and voice module controller. The distributed control system is used due to the need to collect and control the environment parameters of the living room, bedroom, kitchen and other building units. The central node controller, the local node controller, the acquisition node and the control node of each building unit are all collected to the CAN bus to make the system have characteristics of modularization and expansibility, and realize communication between controllers. The actual debugging and operation results show that the system can meet the design and teaching requirements.
Keywords: CAN bus; sensor; information acquisition; STM32; communication; controller
隨着科技水平的不断提高,室内智能建筑环境在人们生活中出现的频率越来越高,人们已经不再满足于传统的建筑模式。因此对家庭环境的要求便成为了智能建筑和环境监测的发展动力。室内环境信息采集系统就是为解决室内环境监测和控制而设计的。我国的室内环境采集如今向着网络化、智能化方向发展。童怀、王朝华等人设计了基于Android的智能家居系统[1],通过单片机建立一个智能家居控制网关并利用基于Android手机的控制系统进行家居信息控制采集;南忠良,孙国新设计了一种基于ZigBee技术的智能家居系统[2],通过利用ZigBee模块、单片机和PC机对家居信息进行控制采集。……
