发布时间:2025年09月27日 作者:aiycxz.cn
分类号:______ 单位代码:______密 级:______ 学 号:______# 天 津 理 工 大 学## 本科毕业设计说明书### 基于单片机的智能台灯设计#### Intelligent Desk Lamp Based on Single Chip Microcomputer学 院:______ 电气电子工程学院______ 专 业:______ 电子信息工程______ 学生姓名:______ 刘 浩______ 指导教师:______ 张 军______ 职 称:______ 副教授______ 完成日期:______ 2016年6月3日______天津理工大学教务处制二〇一六年六月# 天津理工大学本科毕业设计说明书## 基于单片机的智能台灯设计### 【摘要】随着社会的发展,人们生活水平的提高,人们对生活质量的要求也越来越高,智能家居产品逐渐进入人们的生活。智能台灯作为智能家居产品的一种,不仅具有普通台灯的功能,而且具有自动感应、自动调光、定时等功能,能够满足人们的需求。本设计以 STC89C52 单片机为核心,通过光敏电阻、红外传感器、超声波传感器等传感器检测外界环境,实现对台灯的智能控制。系统由单片机最小系统、光敏电阻模块、红外传感器模块、超声波传感器模块、按键模块、LCD 显示模块、LED 灯模块等组成。系统通过光敏电阻检测环境光照强度,通过红外传感器检测是否有人靠近,通过超声波传感器检测人与台灯的距离,根据检测到的数据,单片机控制 LED 灯的亮灭和亮度,实现台灯的自动开关和自动调光功能。同时,系统还具有手动模式和定时功能,用户可以通过按键切换模式、设置定时时间等。本设计实现了台灯的智能控制,具有节能、环保、方便等优点,具有一定的实用价值。### 【关键词】单片机 智能台灯 光敏电阻 红外传感器 超声波传感器# Intelligent Desk Lamp Based on Single Chip Microcomputer## [Abstract]With the development of society and the improvement of people's living standards, people's requirements for the quality of life are getting higher and higher, and smart home products are gradually entering people's lives. As a kind of smart home product, the smart desk lamp not only has the function of ordinary desk lamp, but also has the functions of automatic induction, automatic dimming, timing and so on, which can meet people's needs.This design takes STC89C52 single-chip microcomputer as the core, and uses sensors such as photoresistor, infrared sensor and ultrasonic sensor to detect the external environment, so as to realize the intelligent control of the desk lamp. The system consists of single-chip microcomputer minimum system, photoresistor module, infrared sensor module, ultrasonic sensor module, key module, LCD display module, LED lamp module and so on. The system detects the ambient light intensity through the photoresistor, detects whether someone is approaching through the infrared sensor, and detects the distance between the person and the desk lamp through the ultrasonic sensor. According to the detected data, the single-chip microcomputer controls the on-off and brightness of the LED lamp to realize the automatic switch and automatic dimming function of the desk lamp. At the same time, the system also has manual mode and timing function. Users can switch modes and set timing time through keys.This design realizes the intelligent control of the desk lamp, which has the advantages of energy saving, environmental protection, convenience and so on, and has certain practical value.## [Keywords]Single chip microcomputer Intelligent desk lamp Photoresistor Infrared sensor Ultrasonic sensor# 目 录## 1 引言1.1 研究背景及意义 ...... 1 1.2 国内外研究现状 ...... 1 1.3 主要研究内容 ...... 2 ## 2 系统总体设计2.1 系统功能要求 ...... 3 2.2 系统总体方案设计 ...... 3 2.3 系统工作原理 ...... 4 ## 3 系统硬件设计3.1 单片机最小系统 ...... 5 3.1.1 STC89C52 单片机简介 ...... 5 3.1.2 时钟电路 ...... 6 3.1.3 复位电路 ...... 6 3.2 光敏电阻模块 ...... 7 3.2.1 光敏电阻简介 ...... 7 3.2.2 光敏电阻模块电路设计 ...... 7 3.3 红外传感器模块 ...... 8 3.3.1 红外传感器简介 ...... 8 3.3.2 红外传感器模块电路设计 ...... 8 3.4 超声波传感器模块 ...... 9 3.4.1 超声波传感器简介 ...... 9 3.4.2 超声波测距原理 ...... 9 3.4.3 超声波传感器模块电路设计 ...... 10 3.5