电动车防盗控制系统的设计
摘 要
随着我国经济的飞速发展,电动自行车逐渐进入人们的生活,并成为城乡的主要运载工具之一,但是电动自行车被盗却屡有发生,而现在市场上有各式各样的电动车防盗报警装置出售,一些高档的智能报警器由于价格过高或者也有价格适中、质量可靠的防盗报警器出售,但是此类报警器的报警喇叭一般都只是安装在电动车身上,而完成警情传递任务的主要部件都是振动传感器,其灵敏度较高,致使一些外界环境因素,如刮风打雷,儿童嬉闹等,都有可能使其动作,并触发报警器报警,这种由于误报警带来的噪音污染常常造成不必要的扰民用户不愿意为售价仅两三千的电动车去配置,而得不到推广。种种原因使得大部分电动车用户并没有为他们的车去配备防盗报警装置,导致一些不法分子有机可乘,电动车被盗现象日益严重,由此,一种低价位、高品质,适合于普通用户的防盗报警器将是电动自行车市场翘首以盼的。
本文基于STC89S52研究的跷跷板上行进的智能电动车系统,其硬件主要STC89S52单片机最小系统板、小车左右前轮驱动电路、小车行进轨迹探测电路、角度方向检测电路、显示电路及报警电路等组成。通过软件产生PWM波控制小车速度,利用插补运算调整小车行进轨迹。经过反复分析、比较和调测。证明本系统达到了设计的要求。
关键词:单片机、GSM、防盗报警、电动车
Abstract
With the rapid development of China's economy, electric bicycles gradually into people's lives, and become one of the main means of urban and rural transport, but the electric bicycle stolen has occurred frequently, and now the market has a wide range of electric car burglar alarm Device sales, some high-end intelligent alarm due to the price is too high or there are affordable, reliable and reliable anti-theft alarm for sale, but the alarm alarm speakers are generally only installed in the electric car body, and the completion of police intelligence transmission task The main components are vibration sensors, the sensitivity is high, resulting in a number of external environmental factors, such as wind and thunder, children frolic, etc., are likely to make the action, and trigger the alarm alarm, this false alarm caused by noise pollution Often caused by unnecessary nuisance users do not want to price only two or three thousand electric cars to configure, and not promotion. All the reasons that most of the electric car users did not for their car to be equipped with anti-theft alarm device, resulting in some lawless elements can take advantage of the growing theft of electric cars, thus, a low price, high quality, suitable for Ordinary users of the burglar alarm will be the electric bicycle market eagerly hope.
Based on the STC89S52 research on the seesaw on the intelligent electric car system, the hardware main STC89S52 single chip minimum system board, car left and right front wheel drive circuit, car travel trajectory detection circuit, angle direction detection circuit, display circuit and alarm circuit and so on. Through the software to generate PWM wave control car speed, the use of interpolation operation to adjust the car travel track. After repeated analysis, comparison and commissioning. Prove that the system meets the design requirements.
Keywords: single chip, GSM, burglar alarm, electric car
1 绪论 4
1.1课题的背景及意义 4
1.1.1课题背景 4
1.1.2研究意义 5
1.2 系统简单概述 6
1.3 基于GSM模块电动车防盗系统优点 6
1.4 论文研究的内容和目标 7
1.4.1 论文研究的内容 7
1.4.2 论文研究的目标 7
1.5 论文的结构 8
2 系统相关原理 8
2.1有关GSM协议的介绍[10] 8
2.2有关GSM的组成 9
2.3有关SMS的相关介绍 10
3 系统硬件设计 11
3.1 基于GSM模块电动车防盗系统概述 11
3.2 STC89S52单片机介绍 12
3.3 单片机的最小系统(EDU)[8] 15
3.4 振动传感器 16
3.5 报警模块设计 17
3.5 GSM通信模块设计 18
3.5.1 TC35i总体描述 18
3.5.3 TC35i的硬件设计 19
3.5.4 短消息的发送和接收 20
3.6无线红外遥感开关的设计 20
3.6.1 无线红外原理 20
3.7电源模块的设计 22
4 系统软件开发环境 23
4.1软件开发环境介绍 23
4.2 Keil开发流程 23
4.3 Keil运行界面 23
5系统软件设计 24
5.1单片机初始化模块 25
5.2 GSM模块程序设计 26
5.2.1AT指令 27
5.2.1.2 AT指令操作原理[4] 28
5.2.1.3 设计使用的非标准AT指令 28
5.2.2 短信息PDU(Protocol Data Unit,协议数据单元)编码[4] 28
5.2.2.1 PDU编码格式 28
5.2.2.2 接收/发送号码与短信中心号码编码规则 29
5.2.2.3 短信内容的三种编码方式 29
6测试 30
6.1测试准备 30
6.2测试阶段及结果 30
7 结论 31
参考文献 32
致 谢 34
附录 35
〖附录1系统整体框图〗 35
〖附录2下位机主程序〗 35