news 2026/5/5 19:23:34

【dz-1135】基于单片机的自动门设计

作者头像

张小明

前端开发工程师

1.2k 24
文章封面图
【dz-1135】基于单片机的自动门设计

基于单片机的自动门设计

摘要

随着智能化技术在公共设施领域的普及,自动门因能提升通行效率与便捷性,成为商场、办公楼等场所的常用设备。传统自动门存在感应不灵敏、防夹功能缺失、控制方式单一等问题,可能带来通行不便或安全隐患。因此,研发一款集智能感应、安全防护与多元控制于一体的自动门系统具有重要现实意义。

本设计提出一种基于 STC89C52 单片机的自动门系统。系统核心功能包括:通过 HC-R04 超声波传感器检测前方人员距离,当距离小于设定最小值时自动开门,延时 5 秒后自动关门;采用分离式红外对射管实现防夹功能,避免关门时夹伤人员;通过 ULN2003A 驱动模块控制四相五线步进电机模拟门体开合动作;配备按键模块,可设置感应距离最小值及实现门体急停控制;通过 LCD1602 显示屏实时显示检测的距离值;集成 ECBO2 蓝牙模块,将检测数据上传至手机端,同时支持手机远程控制门的开关状态。

该系统的作用在于提升自动门的智能化水平与安全性。超声波感应与自动开关功能减少了手动操作,提高通行效率;防夹功能通过红外对射实时监测,保障人员安全;按键与蓝牙远程控制结合,满足不同场景下的操作需求;距离显示功能增强系统交互性与可控性。整体设计以 STC89C52 单片机为核心,硬件结构简洁,运行稳定,为公共场所的自动化通行管理提供了经济实用的解决方案。

关键词:单片机;自动门;超声波感应;防夹功能;蓝牙控制

Design of Automatic Door Based on Single Chip Microcomputer

Abstract

With the popularization of intelligent technology in the field of public facilities, automatic doors have become a commonly used equipment in shopping malls, office buildings, and other places due to their ability to improve traffic efficiency and convenience. Traditional automatic doors have problems such as insensitive sensing, lack of anti pinch function, and single control mode, which may bring inconvenience or safety hazards to passage. Therefore, developing an automatic door system that integrates intelligent sensing, safety protection, and multiple controls is of great practical significance.

This design proposes an automatic door system based on STC89C52 microcontroller. The core functions of the system include: detecting the distance of personnel ahead through HC-R04 ultrasonic sensors, automatically opening the door when the distance is less than the set minimum value, and automatically closing the door after a 5-second delay; Using a separated infrared collimator to achieve anti pinch function, avoiding personnel injury when closing the door; Control the four phase five wire stepper motor to simulate the door opening and closing action through the ULN2003A driver module; Equipped with a button module, it can set the minimum sensing distance and achieve emergency stop control of the door body; Real time display of detected distance values through LCD1602 display screen; Integrate ECBO2 Bluetooth module, upload detection data to mobile phone, and support remote control of door opening and closing status from mobile phone.

The purpose of this system is to enhance the intelligence and safety of automatic doors. Ultrasonic induction and automatic switch function reduce manual operation and improve traffic efficiency; The anti pinch function is monitored in real-time through infrared radiation to ensure personnel safety; Combining buttons with Bluetooth remote control to meet operational needs in different scenarios; The distance display function enhances the system's interactivity and controllability. The overall design is centered around the STC89C52 microcontroller, with a simple hardware structure and stable operation, providing an economical and practical solution for automated traffic management in public places.

Keywords:microcontroller; Automatic Door; Ultrasonic induction; Anti pinch function; Bluetooth control

目 录

1 绪论

1.1 研究背景及意义

1.2 国内外研究现状

1.3 主要内容

2 系统总体方案设计

2.1系统总体设计

2.2 主要模块方案选择

3系统硬件设计

3.1 总体硬件框架

3.2 主控模块电路设计

3.3 超声波检测模块电路设计

3.4 防夹检测模块电路设计

3.5 门体驱动模块电路设计

3.6 显示模块电路设计

3.7 按键模块电路设计

3.8 蓝牙通信模块电路设计

4 系统程序设计

4.1 编程软件介绍

4.2 系统主流程设计

4.3 独立按键

4.4 OLED显示流程设计

4.5 蓝牙模块子流程

4.6 超声波检测模块子流程设计

4.7 步进电机子流程设计

5 仿真绘制与功能测试

5.1 仿真绘制

5.2 超声波检测与自动开门功能测试

5.3 防夹功能测试

5.4 按键控制功能测试

5.5 显示功能测试

5.6 蓝牙通信功能测试

6实物制作与功能测试

6.1 实物制作

6.2 超声波检测与自动开门功能测试

6.3 防夹功能测试

6.4 按键控制功能测试

6.5 显示功能测试

6.6 蓝牙通信功能测试

6 总结

参考文献

致谢

附录A 原理图

附录B PCB

附录C 主程序

版权声明: 本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若内容造成侵权/违法违规/事实不符,请联系邮箱:809451989@qq.com进行投诉反馈,一经查实,立即删除!
网站建设 2026/5/1 16:28:05

【dz-1141】密码锁

摘要 随着社会安全意识的不断提升,对出入口安全防护的需求日益增长。传统机械锁存在钥匙易丢失、复制难度低、安全性不足等问题,难以满足现代生活和工作对安全防护的高要求。 基于 STC89C52 单片机的密码锁,整合了 44 矩阵键盘、AT24C02 存…

作者头像 李华
网站建设 2026/5/3 12:36:21

《从接口到架构:Python持久内存编程深度指南》

长期深耕数据密集型应用的开发实践,会清晰感知到Python在持久内存领域的进化轨迹—早期它只是底层技术的“上层翻译者”,通过封装接口降低开发者的使用门槛,而随着技术实践的深入,Python凭借自身动态特性与生态优势,逐渐构建起一套独特的“灵活存续”编程逻辑,让持久内存…

作者头像 李华
网站建设 2026/5/2 13:30:46

计算机毕设Java苗木交易互助网站 基于Java的苗木交易互助平台设计与实现 Java技术驱动的苗木交易互助管理系统开发

计算机毕设Java苗木交易互助网站l6l169 (配套有源码 程序 mysql数据库 论文) 本套源码可以在文本联xi,先看具体系统功能演示视频领取,可分享源码参考。随着信息技术的飞速发展,传统的苗木交易管理方式逐渐暴露出效率低下、信息不透…

作者头像 李华
网站建设 2026/5/3 17:41:26

智能重构新范式:AI如何破解Java遗留系统改造难题

在企业数字化转型进程中,Java遗留系统的现代化改造始终是技术团队面临的重要挑战。传统重构过程中,开发人员需要应对代码结构复杂、文档缺失、技术债务累积等多重障碍,这些因素显著增加了项目风险和开发成本。遗留系统重构的核心挑战技术债务…

作者头像 李华
网站建设 2026/5/1 0:54:16

渲染引擎多线程优化避坑指南(资深架构师亲授10年踩坑经验)

第一章:渲染引擎多线程优化的挑战与现状现代图形应用对实时性和性能的要求日益提升,渲染引擎作为核心组件,其多线程优化成为关键技术瓶颈。随着硬件多核架构的普及,传统单线程渲染模式已无法充分利用计算资源,导致CPU利…

作者头像 李华
网站建设 2026/5/1 7:35:26

【系统级编程必修课】:深入理解内存布局的7个关键维度

第一章:内存布局精确控制在系统级编程中,内存布局的精确控制是优化性能与确保硬件兼容性的关键。尤其是在操作系统开发、嵌入式系统或高性能计算场景中,开发者需要直接干预数据在内存中的排列方式,以满足对齐要求、减少缓存行冲突…

作者头像 李华