设计简介:

项目编号:mcuclub-dz-137
单片机类型:STC89C52
具体功能:
1、通过DS1302获取时间,可通过蓝牙修正时间
2、通过DHT11获取温湿度
3、通过四个触摸按键分别是开关、模式、亮度+、亮度-。首先触摸开关按钮,初始灯光白光亮起。一共有三个模式,在白光模式下我触摸亮度+,灯光变亮,触摸亮度-灯光变暗。不想用白光模式就触摸模式按钮灯光就可变为暖光,同理在暖光模式下也可以调节亮度。再触摸一下模式按钮,就是夜间感应模式,当环境昏暗且检测到有人经过的情况下,氛围灯会亮起持续时间10秒。
4、通过LCD1602显示数据
5、通过蓝牙,可将温湿度发送到手机端,手机端也有四个按键一一对应四个触摸按键

总字数:13917

实物链接:点击跳转

仿真链接:点击跳转

设计说明书链接:点击跳转

开题报告链接:点击跳转

答辩PPT链接:点击跳转

基于单片机的多功能氛围灯设计与实现

摘要

本论文介绍了一款基于STC89C52单片机的多功能氛围灯设计与实现。该氛围灯集成了多项实用功能,包括时间显示、温湿度获取、多种灯光模式切换以及蓝牙连接功能。通过DS1302实时时钟模块,氛围灯能够准确获取时间,并且支持通过蓝牙连接进行时间修正。通过DHT11温湿度传感器,氛围灯可以实时监测环境的温度和湿度,并在需要时将数据传送至手机端。在操作方面,氛围灯通过四个触摸按键实现用户交互。其中,开关按钮用于控制灯光的开关;模式按钮实现不同的灯光模式切换,包括白光模式、暖光模式以及夜间感应模式;亮度+和亮度-按钮用于调节灯光的亮度。在白光和暖光模式下,用户可以通过亮度按钮实现灯光的调节,以适应不同的环境需求。此外,氛围灯还搭载LCD1602液晶显示屏,用于显示当前时间、温湿度等信息。通过蓝牙连接,用户可以将温湿度数据传送到手机端,手机应用程序也提供了四个按键,与氛围灯上的触摸按键一一对应,实现了远程控制功能。特别值得一提的是,氛围灯还具备夜间感应模式,当环境昏暗且有人经过时,灯光会自动亮起,持续时间为10秒,为用户提供便利的照明体验。通过多种功能的集成,本款多功能氛围灯在不同场景下都能提供灵活、智能的照明解决方案,为用户带来舒适、便捷的生活体验。

关键词:氛围灯;实时时钟;温湿度传感器;触摸按键;蓝牙连接;亮度调节

Abstract

This paper presents the design and implementation of a versatile ambient lamp based on the STC89C52 microcontroller. This ambient lamp integrates multiple practical functionalities, including time display, temperature and humidity acquisition, various lighting mode toggles, and Bluetooth connectivity. Leveraging the DS1302 real-time clock module, the ambient lamp accurately retrieves the time and supports time correction via Bluetooth connection. With the DHT11 temperature and humidity sensor, the lamp can real-time monitor the environmental temperature and humidity, and transmit data to a mobile device when necessary.In terms of operation, the ambient lamp employs four touch buttons for user interaction. Among them, the power button controls the lamp’s on/off state; the mode button facilitates switching between different lighting modes, including white light, warm light, and night sensing mode; the brightness+ and brightness- buttons are used to adjust the lamp’s brightness. In white light and warm light modes, users can adjust the light intensity using the brightness buttons to cater to various environmental needs.Furthermore, the ambient lamp is equipped with an LCD1602 liquid crystal display screen to show current time, temperature, humidity, and other information. Through Bluetooth connectivity, users can transmit temperature and humidity data to a mobile device. The mobile application features four corresponding buttons to the touch buttons on the lamp, enabling remote control functionality.Notably, the ambient lamp includes a night sensing mode that automatically turns on the light for a duration of 10 seconds when it detects low ambient light and detects movement, providing convenient illumination for users.By integrating multiple functionalities, this versatile ambient lamp offers flexible and intelligent lighting solutions for different scenarios, delivering a comfortable and convenient living experience.

Keywords:Ambient lamp, real-time clock, temperature and humidity sensor, touch buttons, Bluetooth connectivity, brightness adjustment.

目录

摘要 I

Abstract II

前言 6

第一章 绪论 7

1.1课题设计背景与意义 7

1.2国内外发展历程 7

1.3研究目标及预期功能 8

第二章 设计思路与方案选择 9

2.1 主要元器件选择 9

2.1.1主控芯片选择 9

2.1.2光照强度检测模块方案选择 9

2.1.3显示模块方案选择 9

2.2整体设计方案 9

第三章 硬件设计 11

3.1主控电路模块 11

3.2人体热释电检测电路模块 13

3.3光照强度检测电路模块 14

3.4 温湿度监测电路模块 15

3.5 触摸按键电路模块 16

3.6 显示电路模块 17

3.7 时钟电路模块 18

3.8蓝牙模块 19

3.9 RGB灯电路模块 20

4 系统程序设计 22

4.1 编程软件介绍 22

4.2 系统主流程设计 22

4.3 独立按键 24

4.4 温湿度检测模块子流程 24

4.5 时钟模块子流程 25

4.6 蓝牙模块子流程 27

第五章 仿真测试 28

5.1整体仿真测试 28

5.2灯控仿真测试 28

5.3蓝牙仿真测试 29

第六章 实物测试 30

5.1整体实物测试 30

5.2灯控实物测试 30

5.3蓝牙实物测试 31

7结论 33

致谢 34

参考文献 35

附录 36

附录一 原理图 36

附录二:PCB 37

附录三:主程序 38

……………..本设计说明书是配套实物或仿真来写的,完整的设计参考书请购买后下载,购买过程遇到任何问题请联系客服进行咨询。本资料是一次性商品,不支持退货,感谢您对单片机俱乐部的支持……………..

发表评论

后才能评论

本站所有资源版权均属于原作者所有,这里所提供资源均只能用于参考学习用,请勿直接商用。若由于商用引起版权纠纷,一切责任均由使用者承担。更多说明请参考 VIP介绍。

最常见的情况是下载不完整: 可对比下载完压缩包的与网盘上的容量,若小于网盘提示的容量则是这个原因。这是浏览器下载的bug,建议用百度网盘软件或迅雷下载。 若排除这种情况,可在对应资源底部留言,或联络我们。

对于会员专享、整站源码、程序插件、网站模板、网页模版等类型的素材,文章内用于介绍的图片通常并不包含在对应可供下载素材包内。这些相关商业图片需另外购买,且本站不负责(也没有办法)找到出处。 同样地一些字体文件也是这种情况,但部分素材会在素材包内有一份字体下载链接清单。

如果您已经成功付款但是网站没有弹出成功提示,请联系站长提供付款信息为您处理

源码素材属于虚拟商品,具有可复制性,可传播性,一旦授予,不接受任何形式的退款、换货要求。请您在购买获取之前确认好 是您所需要的资源