news 2026/3/18 21:05:35

【dz-1044】基于单片机的自动门

作者头像

张小明

前端开发工程师

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

基于单片机的自动门

摘要

在公共场所和家居环境中,自动门的便捷性与安全性已成为提升通行体验的重要因素。传统自动门常存在感应不灵敏、防夹功能缺失或调节不便等问题,可能导致通行效率低或安全隐患。尤其在人流密集场所,可靠的感应触发、及时的防夹保护及灵活的参数调节对保障通行安全至关重要。因此,研发一种低成本、高可靠性的自动门控制系统具有实际应用价值。

本设计提出了一种基于 STC89C52 单片机的自动门控制系统。系统主要功能包括:通过 HC-R04 超声波传感器检测前方人员距离,当距离小于设定最小值时自动开门,延时 5 秒后自动关门;集成分离式红外对射管实现防夹功能,遇障碍物时立即停止关门动作;借助 HX711 压力检测模块辅助检测人员存在,确保开门响应准确;通过 ULN2003A 芯片驱动步进电机模拟门体运行;支持通过按键设置距离阈值;通过 LCD1602 实时显示当前检测距离值。

该自动门控制系统的作用在于,通过多传感器协同感应提升了开门触发的准确性,防夹功能保障了通行安全,参数可调设计增强了场景适应性。为公共场所及家居环境提供了一种低成本、易操作的自动门解决方案,有效提升了通行便捷性与安全性。

关键词:单片机;自动门;STC89C52;传感器;防夹功能

Automatic door based on microcontroller

Abstract

The convenience and safety of automatic doors have become important factors in improving the travel experience in public places and home environments. Traditional automatic doors often suffer from issues such as insensitive sensing, lack of anti pinch function, or inconvenient adjustment, which may lead to low traffic efficiency or safety hazards. Especially in crowded areas, reliable induction triggering, timely anti pinch protection, and flexible parameter adjustment are crucial to ensuring safe passage. Therefore, developing a low-cost and highly reliable automatic door control system has practical application value.

This design proposes an automatic door control system based on STC89C52 microcontroller. The main functions of the system include: detecting the distance of personnel ahead through HC-R04 ultrasonic sensor, automatically opening the door when the distance is less than the set minimum value, and automatically closing the door after a 5-second delay; The integrated and separated infrared collimator achieves anti pinch function, and immediately stops closing the door when encountering obstacles; Using the HX711 pressure detection module to assist in detecting the presence of personnel, ensuring accurate door opening response; Simulate the operation of the gate body by driving the stepper motor with ULN2003A chip; Support setting distance threshold through buttons; Real time display of the current detection distance value through LCD1602.

The function of this automatic door control system is to improve the accuracy of door opening triggering through multi-sensor collaborative sensing, ensure safe passage with anti pinch function, and enhance scene adaptability with adjustable parameter design. It provides a low-cost and easy to operate automatic door solution for public places and home environments, effectively improving accessibility and safety.

Keywords:microcontroller; Automatic Door; STC89C52; Sensors; Anti pinch function

目 录

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 LCD1602显示模块子流程设计

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

4.5 步进电机子流程设计

5实物制作与功能测试

5.1 实物制作

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

5.3 压力检测辅助开门功能测试

5.4 防夹保护功能测试

5.5 按键设置与参数调节功能测试

6 总结

参考文献

致谢

附录A 原理图

附录B PCB

附录C 主程序

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

网安毕设2026开题集合

0 选题推荐 - 人工智能篇 毕业设计是大家学习生涯的最重要的里程碑,它不仅是对四年所学知识的综合运用,更是展示个人技术能力和创新思维的重要过程。选择一个合适的毕业设计题目至关重要,它应该既能体现你的专业能力,又能满足实际…

作者头像 李华
网站建设 2026/3/13 9:15:27

什么是SLA、DLP和LCD?一文读懂光固化3D打印三大技术

光固化3D打印技术凭借其在精度与表面质量上的优势,已成为模型制作、齿科、珠宝等领域的重要工艺。目前主流技术包括立体光刻(SLA)、数字光处理(DLP) 与液晶显示掩模(LCD) 三种,它们在…

作者头像 李华
网站建设 2026/3/16 5:46:08

告别“救火队”,迈向高效终端管理:现代与传统模式的差异思考

你是否经历过这样的工作场景?每当软件需要更新时,IT人员带着U盘在办公室间穿梭;安全漏洞出现后,不得不逐台手动打补丁;资产盘点时依赖手工表格和记忆;员工遇到电脑问题,远程协助却卡顿不堪……如…

作者头像 李华
网站建设 2026/3/14 6:15:02

Instagram漏洞曝光:未授权访问私密帖文风险解析

网络安全研究员 Jatin Banga 本周披露,Instagram 基础设施存在一个严重的服务器端漏洞,攻击者无需登录或关注关系即可访问私密照片和文字说明。Meta 公司已于 2025 年 10 月静默修复该漏洞,其利用方式涉及通过特定 HTTP 标头配置绕过移动网页…

作者头像 李华
网站建设 2026/3/14 10:10:39

基于java的餐厅点餐系统(11814)

有需要的同学,源代码和配套文档领取,加文章最下方的名片哦 一、项目演示 项目演示视频 二、资料介绍 完整源代码(前后端源代码SQL脚本)配套文档(LWPPT开题报告)远程调试控屏包运行 三、技术介绍 Java…

作者头像 李华