摘要
为了提高行李箱的智能性和安全性,解决行李箱安全防盗的问题,本文提出了一种基于加速度计测距的行李箱防盗系统。系统由MPU6050加速度计,STM32单片机,LM317电源模块,蓝牙模块,蜂鸣器组成。系统通过MPU6050加速度计测量行李箱异常移动的距离判断行李箱的安全状态,采用中位值平均滤波算法削弱MPU6050加速度计测量时存在的加速度漂移误差和加速度突变误差。为了更好的通过加速度拟合物体的实际运动状态,采用牛顿插值法预处理加速度数据已得到更平滑的加速度变化曲线,最后用梯形法对加速度数据作积分运算,得到物体运动的检测值。当设定时间间隔内,物体移动距离超过阈值距离,单片机将通过蓝牙模块向用户APP端发送警报。实验与仿真结果表明该防盗算法能有效提高系统的距离测量精度,降低安全状态误判的概率。
In order to improve the intelligence and safety of the luggage and solve the problem of safe security of the luggage,this paper proposes a luggage anti-theft system based on accelerometer distance measurement.The system consists of MPU6050 accelerometer,STM32 microcontroller,LM317 power module,Bluetooth module,and buzzer.The system uses the MPU6050 accelerometer to measure the distance of the abnormal movement of the luggage to determine the safety state of the luggage.The median filtering algorithm is used to attenuate the acceleration drift error and acceleration mutation error in the MPU6050 accelerometer measurement.In order to fit the actual motion state of the object by the acceleration better,the acceleration data is preprocessed by using Newton interpolation,and a smoother acceleration change curve is obtained.Finally,the trapezoidal acceleration data is integrated to obtain the detection value of the object motion.When the object movement distance exceeds the threshold distance within the set time interval,the microcontroller will send an alarm message to the user’s APP via the Bluetooth module.The experimental and simulation results show that the anti-theft algorithm can effectively improve the distance measurement accuracy of the system and reduce the probability of misjudgment of the security state.
作者
韩福长
彭一南
严婷
张萍
Han Fuchang;Peng Yinan;Yan Ting;Zhang Ping(School of Control Science and Engineering,Hebei University of Technology,Tianjin 300130,China)
出处
《电子世界》
2018年第13期11-13,17,共4页
Electronics World