1、摘 要 基于单片机的自动救生圈属于智能救生圈的一种,不同于市面上只有漂浮功能的普通救生圈,这种救生圈通过人体红外感应器定位人的位置,并且可以迅速准确无误的行驶到落水的人旁边,使溺水的人获救,为救援溺水等突发事故争取宝贵的抢救时间,可以展望以后可以广泛应用在突发洪水救援、大型湖泊江河救生设备等领域。本课题是自动救生的设计与实现,涉及到传感器技术、程序设计、电路设计、控制理论等多方面的知识,是一项综合了多门大学课程的设计。设计的目标是让自动救生圈自动感应并且往人的方向运动,同时发出警报。主要内容包括基于单片机的自动救生圈的软硬件的设计、搭建和实现。本文首先介绍了自动救生圈的研究背景、国内外的研究情
2、况、研究方法;随后介绍了自动救生圈的硬件结构设计开发,该自动救生圈的核心硬件平台采用的是低功耗高性能CMOS 8位微控制器,具有8K的系统可编程Flash存储器的STC89C52作为控制核心。硬件模块包括电源模块、人体感应模块、运动模块(包括电机驱动和螺旋桨)、MCU最小系统模块、警报模块。其次该自动救生圈的软件平台为keil uvision3开发环境。软件系统包括系统初始化程序,热释电人体红外传感器的感应人的策略程序,电机驱动转向程序等,其功能主要实现软件系统的基本输入和输出配置。在本课题中,硬件系统和软件系统都采用模块化结构,整个系统的电路结构简单,可靠性高。在实际调试中,救生圈能适应水中
3、的运行环境,有着良好的防水作用,并且能智能控制运动方向,发出警报,达到自动救生圈的设计目标和要求。关键词:自动救生圈 热释电人体红外感应器 自主定位 电机驱动 螺旋桨AbstractBased on SCM automatic life buoy is a kind of intelligent buoy, which is different fromordinary life buoy in the market.Besides, through the human body infrared sensor, the life ring positioning the position q
4、uickly and accurately running next to the drowning man, the drowning man rescued, strive for the precious rescue time for the rescue of drowning. A sudden accident, can look forward to the future can be widely used in emergency rescue, flood rescue equipment in areas such as large lakes and rivers.
5、This topic is the design and implementation of automatic lifesaving, which involves the knowledge of sensor technology, program design, circuit design, control theory and so on. The goal of the design is to enable the automatic life buoy to automatically sense and move in the direction of the human
6、body, while giving an alarm. The main contents include the design, construction and implementation of the hardware and software of the automatic life buoy based on mcu.First introduced the design and development of hardware structure of automatic life buoy, the hardware platform of the automatic buo
7、y is used in low power and high performance CMOS 8 bit microcontroller system with 8K programmable Flash memory STC89C52 as the control core. The hardware module includes the power module, the human body induction module, the motion module (including the motor drive and propeller), the MCU minimum s
8、ystem module, the alarm module.Secondly, the software platform of the automatic life buoy is the development environment of Keil uvision3. The software system includes the system initialization program, the pyroelectric infrared sensor of the human body of the induction of the strategic procedures,
9、motor drive steering procedures, the main function of the software system to achieve the basic input and output configuration. In this paper, the hardware system and the software system all adopt the modular structure, the circuit structure of the whole system is simple, the reliability is high. In
10、the actual debugging, the life buoy can adapt to the operating environment of the water, has a good waterproof effect, and can intelligently control the direction of movement, alarm, to achieve the design goals and requirements of automatic life buoy.Keyword: Automatic life buoy ,Pyroelectric infrar
11、ed sensor, Autonomous positioning, motor drive, Propeller目 录1 绪论11.1 选题的背景和意义11.2 国内外的研究状况11.3 题目的研究方法31.4 论文构成及研究内容32 自动救生圈的整体方案设计52.1 自动救生圈的运行环境介绍52.2 传感器的方案的选定62.3 设计方案的选定82.4 系统各部分的主要功能93硬件电路的设计113.1 自动救生圈硬件设计相关概念113.1.1 MCU113.1.2 PCB153.2 热释电人体红外传感器的工作原理及特点163.3 电机驱动电路的设计203.3.1 L298N驱动电路逻辑真值表
12、213.3.2 L298N驱动模块电路原理图223.3.3 L298N集成H桥芯片,引脚图223.3.4 L298N引脚功能表233.3.5 L298N驱动电路运行参数243.4 微控制器的接口设计243.5 系统主板电路的设计254软件算法设计及实验结果分析274.1 软件开发平台274.2 软件的整体算法设计275 自动救生圈的实验结果与分析295.1 实验过程与结果295.2 自动救生圈的实验分析29结 论31参考文献32致谢33附录A34 4 1 绪论1.1 选题的背景和意义古往今来,受季风气候影响的中国是洪灾多发国家。每当发生险情或意外溺水事件,紧迫的抢险救援时间关乎着每一个受灾人民
13、的生命。然而目前如果突发洪水,受限于当前救生设备不够先进,我们往往很难及时迅速有效率的把落水人救起。只有漂浮作用的救生圈难有作为。据统计中国每年因溺水而身亡的人数为34/10万(不记因洪灾遇难的人数)。除此之外,在一些江河湖泊都有安全措施预防游客下水,放置一些救生圈。传统的救生圈在面对一些比较紧急的情况,依靠个人的操作去抛放,难免有失误,耽误抢救时间,并且在这江湖湖泊不一定每时每刻都有人在,当有人溺水,就相当的无助。 随着人工智能时代的到来,自动化、智能化是一种潮流,而基于单片机的自动救生圈可以很好地解决这个问题。本课题主要目的设计一个基于单片机的自动救生圈,当有人溺水,自动救生圈可以立马感应
14、,并向溺水者游去。并发出警报。功能包括:人体红外线感应模块,警报模块,采集模块将采集到的数据传输到单片机。单片机对采集的数据进行分析处理,发出声光等报警。运动模块,通过人体红外线感应定位人的位置,控制电机转速和转向,向溺水者方向移动。可以想象,在未来智能时代,抢险救灾必然需要这种类型的救生圈,所以对于该题目的研究很有意义。此外,对救生圈的软件系统搭建还有软件系统调试,在一定程度上增强自身的动手能力,思考能力,解决问题的能力,更好的将理论和实践联系起来,学以致用。1.2 国内外的研究状况 自动救生圈属于智能救生圈的一种,目前我国国内的救生圈发展在往着自动化、智能化、便携等方向在发展着,已经有不少
15、的智能救生圈被发明出来,并申请了专利,但目前还没有大范围投产应用。影响投产的原因有市场的不明朗、技术上仍然不够成熟、应用还不够广泛等。目前对于智能救生圈的研发方向有自动救生圈、自动充气救生圈、便携式自动充气救生圈、遥控救生圈等。关于自动救生圈这一方面的研究,已经有好几个申请专利了,比较典型的是郑州大学学生设计的一种自动救生圈。该自动救生圈是一种新型救生圈,可以自动寻找意外落水者的位置并行驶过去,第一时间救起落水者。打开电源,救生圈就能感应方圆十米范围内的落水者。它可以为抢救落水者节约一定时间并解放部分救援人力。在国外,对于智能救生圈的研究的进展和国内相差无几,有许多新颖的想法,但是仍然还没有大范围的应用在生活中。国外的研究的方向和国内大体一致,都往着智能化、自动化、便携等方向发展。例如图1-1所示:图1-1国外关于自动救生圈的新颖设计想法如上图所示,这是来自2015年IF国际设计的学生得奖作品。此设计概念针对在海上遭遇意外事故的人们,提供即時有效的救援协助,以拯救宝贵的生命。该系統一旦侦测到海面的生命迹象,即能通过GPS功能精准地定位溺水者的即时位置,然后发送信号给当地最近的搜救。接着对溺水者传出出救生圈,同时标记其位置,若在黑暗中,也会投射出红色指示灯号,以此引导搜救团队前往溺水者的位置进行救援。每次当太空中的卫
