APP下载

基于“互联网+” 的超声波距离检测创新设计

2017-04-01张凯

现代电子技术 2017年5期
关键词:单片机

张凯

摘 要: 距离检测方案的设计是在超声波传感器基础上,实现自行检测、自动判断、短信自动通知等功能。通过超声波进行距离检测并给出信号,由单片机对采集信号进行整理,针对采集结果对手机模块工作状态进行调整,若采集信号小于标准信号,手机模块工作;若大于标准信号,则手机模块处于等待状态。经验证,在无人操控下项目完成预期功能。该设计实现的自动检测及自动短信功能可用于安防、自动刹车、自动避障等方面。

关键词: 超声波传感器; 单片机; 自动检测; 工作状态调整

中图分类号: TN710?34; TM910 文献标识码: A 文章编号: 1004?373X(2017)05?0163?03

Abstract: On the basis of the ultrasonic sensor, the distance detection scheme was designed to realize the functions of automatic detection, automatic judgment and SMS automatic notification. The distance is detected with the ultrasonic wave, and the acquisition signal is given in the design. The single chip microcomputer is used to process the acquired signal, and adjust the working state of the mobile phone module according to the acquisition result. If the amplitude of the acquired signal is lower than that of the standard signal, the mobile phone module will work, otherwise the mobile phone module will be in the waiting state. The project can realize the expected function under the unmanned control by means of verification. The automatic detection and automatic SMS notification functions of this design can be used in security, automatic braking, automatic obstacle avoidance, etc.

Keywords: ultrasonic sensor; single chip microcomputer; automatic detection; working state adjustment

1 方案设计

依据扩展功能要求,本系统由超声波传感器模块、单片机模块、短信发送模块组成。系统依据测距信号对后续电路做出相应指令,进而控制电路的工作状态,达到自动检测、自动调整的目的。系统设计框图如图1所示。

1.1 超声波检测原理

超声波测距原理是通过超声波发射器向某一方向发射超声波,在发射时刻的同时开始计时,超声波在空气中传播时碰到障碍物就立即返回来,超声波接收器收到反射波就立即停止计时。超声波在空气中的传播速度为[v,]而根据计时器记录的发射和接收回波的时间差[Δt,]就可以计算出发射点距障碍物的距离[S,]即:

[S=v?Δt2]

由于超声波也是一种声波, 其声速[C]与温度有关,表1列出了几种不同温度下的声速[1]。在使用时,如果温度变化不大, 则可认为声速是基本不变的。常温下超声波的传播速度是334 m/s,但其传播速度[v]易受空气中温度、湿度、压强等因素的影响,其中受温度的影响较大,如温度每升高1 ℃, 声速增加约0.6 m/s。……

登录APP查看全文

猜你喜欢

单片机
基于单片机的SPWM控制逆变器的设计与实现
基于单片机的层次渐变暖灯的研究
基于单片机的多功能智能插排
基于单片机的便捷式LCF测量仪
小议PLC与单片机之间的串行通信及应用
MSP430单片机在仿真中要注意的几点问题
基于单片机的平衡控制系统设计
基于单片机的三维LED点阵设计
Microchip推出两个全新PIC单片机系列
基于Proteus的单片机控制系统的仿真设计