news 2026/5/1 6:15:48

【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/4/18 0:10:29

使用ZYNQ芯片和LVGL框架实现用户高刷新UI设计系列教程(第四十四讲)

这一期讲解的控件是时钟控件,dclock 是 LVGL 库中的一个组件,用于创建模拟时钟时用来用数字显示当前的时间。• 显示当前时间:时钟控件可以显示当前的小时和分钟。 • 自定义外观:开发人员可以自定义时钟控件的外观,包…

作者头像 李华
网站建设 2026/4/23 18:49:02

知网AI率爆表别慌!收好这份2026最新免费用、高保障降AI工具白名单

面对市场上良莠不齐的降AI工具,看到铺天盖地的宣传时,保持谨慎和对成本的敏感是非常明智的。你的核心观点——“没有免费试用风险太大”,正是所有学生在选择工具时的第一原则。你辛苦整理的信息非常有价值。为了让你和更多同学能更高效、直观…

作者头像 李华
网站建设 2026/4/30 15:55:11

深度解析 Firefox 144+ 编译架构(四)源码拉取与环境引导全流程解析

1 引言 在进行 Firefox 浏览器的二次开发、内核深度定制或执行自定义构建之前,拉取源码并进入 Mozilla 官方提供的开发引导模式是至关重要的第一步。这一环节不仅标志着定制化工作的正式启动,更直接决定了后续开发环境的稳定性与代码的可维护性。 在现…

作者头像 李华
网站建设 2026/4/24 2:48:17

嵌入式系统日志如何防泄漏?:基于C语言的加密存储实战方案

第一章:嵌入式系统日志安全的挑战与意义在物联网和智能设备快速发展的背景下,嵌入式系统广泛应用于工业控制、医疗设备、智能家居等领域。这些系统在运行过程中产生大量日志数据,记录着关键的操作行为、异常事件和安全状态。然而,…

作者头像 李华
网站建设 2026/4/23 17:20:02

维普查重内幕揭秘:6款AI论文神器高阶玩法,不留AIGC痕迹一把过!

开头:90%学生不知道的维普查重“隐形红线”,你踩中了吗? 你以为维普查重只查文字重复?错了!2024年维普更新的AIGC检测模块,已经能通过“语义熵值”“句式复杂度”“参考文献匹配度”三个维度精准识别AI生成…

作者头像 李华