摘要
根据工业现场对超声波测距的需求,设计了一种基于STM32与MODBUS协议的超声波测距仪。该测距仪通过RS485总线与主控制器组网,结合MODBUS通信协议,与上位机进行通讯。充分利用STM32和红外接收专用芯片的软硬件资源,实现实时距离测量。同时加入了温度补偿以提高测距精度。实验结果表明:该测距仪成本低,结构简单,测量精度高,具有广阔的工程应用前景。
According to the requirements of industrial field for ultrasonic wave distance measurement, an ultrasonic telemeter was designed based on STM32 with MODBUS protocol. The Ultrasonic Telemeters connected with the main controller through RS - 485 bus to build a network ,which was combined with the MODBUS protocol to communicate with the host computer. The telemeter makes full use of a specified infrared receiver chip and hardware and software resources of the main controller, realizing a real-time distance. With temperature compensation the ranging accuracy was improved. The experimental result shows that the telemeter is low cost, simple structure, high precision and has good prospect of engineering application.
出处
《仪表技术与传感器》
CSCD
北大核心
2014年第11期27-29,33,共4页
Instrument Technique and Sensor