设计简介:
项目编号: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
第二章 设计思路与方案选择 9
第三章 硬件设计 11
4 系统程序设计 22
第五章 仿真测试 28
第六章 实物测试 30
7结论 33
致谢 34
参考文献 35
附录 36