摘要
基于单片机测温和超声波测距两个独立的系统,将两者合并起来,变为由一个单片机控制的测温测距系统。由单片机软件产生40kHz的超声波,测量回波时间可精确到μs级。通过DS18B20测量实时温度,提供给单片机进行处理。由实时温度,换算出此时的声速,从而使测出的障碍物距离更加精确。通过温度补偿及实验证明,该系统具有较高的实用性和测量精度。
Based on the two separate systems which are temperature measuring and ultrasonic wave distance measuring,the two systems can be combined into a temperature and distance measuring system controlled by a single chip.The 40kHz ultrasound wave is generated by the microcontroller software.The echo time measurement can be accurate.Real-time temperature measured by DS18B20 is provided to the microcontroller for processing.Through the real-time temperature conversion to the speed of sound at this time,then the measured distance is at more accurate obstacle.Through the temperature compensation and experiments,it showed that the system has high availability and accuracy.
出处
《信息技术》
2012年第2期71-75,共5页
Information Technology
关键词
单片机
超声波
DS18B20
实时温度
温度补偿
microcontroller
ultrasonic wave
DS18B20
real-time temperature
temperature compensation