news 2026/4/16 15:20:32

【dz-664】基于单片机的智能垃圾桶设计

作者头像

张小明

前端开发工程师

1.2k 24
文章封面图
【dz-664】基于单片机的智能垃圾桶设计

摘要

随着智能家居的快速发展,垃圾桶的智能化管理对提升生活便捷性、改善居住环境具有重要意义。传统的垃圾桶依赖手动开合、人工判断垃圾满溢,存在操作繁琐、清洁不及时等问题,难以满足现代化家居的卫生需求。​

基于 STM32F103C8T6 单片机的智能垃圾桶设计,整合了 HX711 称重模块、DS18B20 温度传感器、红外避障传感器、SG90 舵机、ULN2003 步进电机驱动模块、OLED 显示屏、按键及 ECB02 蓝牙模块等,实现了垃圾桶的自动化管理与智能控制。系统核心功能包括:通过红外避障传感器检测前方是否有人,检测到人时控制 SG90 舵机驱动桶盖自动打开;借助 HX711 模块监测垃圾重量,超过设定最大值时进行声光报警并通过 ULN2003 驱动步进电机模拟自动打包;通过 DS18B20 检测桶内温度,辅助判断垃圾变质情况;支持通过按键设置重量阈值;利用 OLED 显示屏实时显示垃圾重量;通过蓝牙模块将重量、温度数据传输至手机端,实现远程监测及打包、开关控制。​

该系统的实现,有效提升了垃圾桶的自动化与智能化水平,减少了人工操作,实现了垃圾的及时处理,为智能家居生活提供了卫生、便捷的解决方案,同时为同类智能环卫设备的研发提供了参考,具有较高的实际应用价值。

关键词:STM32F103C8T6;智能垃圾桶;重量监测;自动打包;传感器;蓝牙通信

ABSTRACT

With the rapid development of smart homes, intelligent management of trash bins is of great significance for improving life convenience and living environments. Traditional trash bins rely on manual opening/closing and manual judgment of fullness, with problems such as cumbersome operation and delayed cleaning, making them difficult to meet the hygiene needs of modern homes.​

The intelligent trash bin design based on the STM32F103C8T6 microcontroller integrates HX711 weighing module, DS18B20 temperature sensor, infrared obstacle avoidance sensor, SG90 servo, ULN2003 stepper motor driver module, OLED display, buttons, and ECB02 Bluetooth module, realizing automatic management and intelligent control of the trash bin. The core functions of the system include: detecting whether there is a person in front through the infrared obstacle avoidance sensor, and controlling the SG90 servo to drive the bin lid to open automatically when a person is detected; monitoring the weight of garbage through the HX711 module, triggering sound and light alarm when exceeding the set maximum weight, and simulating automatic packing through the ULN2003-driven stepper motor; detecting the internal temperature via DS18B20 to assist in judging garbage spoilage; supporting weight threshold setting through buttons; displaying real-time weight on the OLED screen; transmitting weight and temperature data to the mobile phone via the Bluetooth module, enabling remote monitoring and control of packing, opening, and closing.​

The implementation of this system effectively improves the automation and intelligence level of trash bins, reduces manual operations, realizes timely garbage disposal, provides a hygienic and convenient solution for smart home life, and also offers a reference for the research and development of similar intelligent sanitation equipment, with high practical application value.

Keywords:STM32F103C8T6; Intelligent trash bin; Weight monitoring; Automatic packing; Sensor; Bluetooth communication

目录

第1章 绪论

1.1 研究的目的及意义

1.2 国内外发展情况

1.3 本文主要研究内容

第2章 设计思路与方案论证

2.1 主要元器件选择

2.1.1 主控芯片选择

2.1.2 称重模块选择

2.1.3 温度传感器选择

2.1.4 红外避障传感器选择

2.1.5 舵机选择

2.1.6 步进电机及驱动模块选择

2.1.7 显示模块选择

2.1.8 蓝牙模块选择

2.1.9 按键模块选择

2.2整体设计方案

第 3 章 硬件设计

3.1 主控电路模块

3.2 称重模块电路

3.3 温度传感器电路

3.4 红外避障传感器电路

3.5 舵机驱动电路

3.6 步进电机驱动电路

3.7 显示模块电路

3.8 蓝牙模块电路

3.9 按键模块电路

3.10 声光报警电路

第4章 系统程序设计

4.1 编程软件介绍

4.2 系统主流程设计

4.3 独立按键

4.4 温度检测模块子流程设计

4.5 OLED显示流程设计

4.6 步进电机子流程

4.7 舵机子流程设计

4.8 称重模块子流程设计

4.9 红外避障模块子流程设计

4.10 蓝牙模块子流程

4.11 声光报警模块子流程设计

第 5 章 实物测试

5.1 整体实物测试

5.2 称重模块功能测试

5.3 温度传感器功能测试

5.4 红外避障传感器功能测试

5.5 执行设备功能测试

5.6 按键与显示功能测试

5.7 蓝牙模块功能测试

5.8 声光报警功能测试

第6章 总结与展望

6.1 总结

6.2 展望

致谢

参考文献

附录

附录一:原理图

附录二:PCB

附录三:主程序

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

【国产桌面操作系统】打包opencv的离线安装包

前言 现阶段大部分安装国产信创桌面操作系统(统信UOS系统、麒麟kylin系统)的终端,基本上都是在无法连接互联网的内网使用,如果需要安装依赖包,已经安装的终端只能通过离线安装包进行升级,本篇仅讲解统信UOS…

作者头像 李华
网站建设 2026/4/16 14:32:04

计算机毕设java汉字学习小程序 基于Java的汉字学习辅助系统开发 Java技术驱动的汉字学习平台设计与实现

计算机毕设java汉字学习小程序08iog9(配套有源码 程序 mysql数据库 论文) 本套源码可以在文本联xi,先看具体系统功能演示视频领取,可分享源码参考。 随着互联网技术的飞速发展,数字化学习工具逐渐成为教育领域的重要组成部分。汉…

作者头像 李华
网站建设 2026/4/16 12:46:38

2026年简历自动筛选工具排名:从Moka到世纪云猎的效率大比拼

在2026年的招聘漏斗中,最大的瓶颈不再是简历太少,而是垃圾简历太多。面对海量的无效投递,企业HR和猎头急需一种能够像资深面试官一样阅读和判断的自动化工具。传统的关键词匹配技术(Keyword Matching)已无法应对当前的…

作者头像 李华
网站建设 2026/4/16 12:51:46

基于Chrome140的Bing自动化(关键词浏览)——需求分析环境搭建(一)

引言 伴随搜索引擎营销的兴起,Bing作为全球领先的搜索引擎之一,已成为企业和个人开展品牌推广的重要平台。然而,手动管理Bing营销账号存在诸多不便。RPA(机器人流程自动化)技术的发展为解决这一问题提供了有效途径。 …

作者头像 李华