news 2026/4/18 3:32:46

【dz-1049】基于单片机的宠物狗自动投喂系统设计

作者头像

张小明

前端开发工程师

1.2k 24
文章封面图
【dz-1049】基于单片机的宠物狗自动投喂系统设计

摘要

随着人们生活水平的提高,宠物狗成为许多家庭的重要成员,科学合理的喂养对其健康成长至关重要。传统的人工喂养方式不仅依赖主人的时间安排,容易出现投喂不规律、食量把控不准等问题,而且在主人外出时难以保障宠物的饮食需求,难以满足精细化、便捷化喂养的需求。​

基于 STM32F103C8T6 单片机的宠物狗自动投喂系统,整合了 DS1302 时钟模块、HX711 重量检测模块、YW-J 液位传感器、DS18B20 防水式温度传感器、3 个独立按键、OLED 显示屏、ESP8266 WIFI 通信模块、蜂鸣器及继电器模块(控制电机和水泵),实现了宠物狗的自动化投喂与管理。系统核心功能包括:通过 DS1302 同步时间,并设定 6:00、12:00、18:00 三个投喂时间,时间可通过按键调节,到点后蜂鸣器响 3 次提醒;借助 HX711 重量检测模块检测食物重量,若重量小于设置最小值且投喂时间到,继电器控制电机自动补充食物,直至重量大于设置最大值停止;通过 YW-J 液位传感器检测液位值,当液位低于设置最小值且投喂时间到,继电器控制水泵自动补水,直至液位大于设置最大值停止;利用 DS18B20 防水式温度传感器监测水温,水温低于阈值时进行加热;支持通过 3 个独立按键设置各阈值;通过 OLED 显示屏显示时间、食物重量、液位、水温等数据;借助 ESP8266 WIFI 通信模块实现对系统的远程控制。​

该系统的实现,有效提升了宠物狗喂养的自动化与智能化水平,减少了人工干预,确保了投喂的规律性和精准性,为宠物狗的健康成长提供了保障,同时为同类宠物喂养设备的研发提供了参考,具有较高的实际应用价值。​

关键词:STM32F103C8T6;宠物狗;自动投喂系统;传感器;远程控制;智能管理

ABSTRACT

With the improvement of people's living standards, pet dogs have become important members of many families, and scientific and reasonable feeding is crucial to their healthy growth. Traditional manual feeding methods not only rely on the owner's schedule, which is prone to problems such as irregular feeding and inaccurate food amount control, but also make it difficult to ensure the pet's dietary needs when the owner is away, failing to meet the needs of refined and convenient feeding.​

The pet dog automatic feeding system based on the STM32F103C8T6 microcontroller integrates DS1302 clock module, HX711 weight detection module, YW-J liquid level sensor, DS18B20 waterproof temperature sensor, 3 independent buttons, OLED display, ESP8266 WIFI communication module, buzzer and relay module (controlling motor and water pump), realizing automatic feeding and management of pet dogs. The core functions of the system include: synchronizing time through DS1302, setting three feeding times at 6:00, 12:00 and 18:00, which can be adjusted by buttons, and the buzzer will sound 3 times as a reminder when the time comes; detecting the weight of food by HX711 weight detection module, if the weight is less than the set minimum value and the feeding time is up, the relay controls the motor to automatically supplement food until the weight is greater than the set maximum value; detecting the liquid level through YW-J liquid level sensor, when the liquid level is lower than the set minimum value and the feeding time is up, the relay controls the water pump to automatically replenish water until the liquid level is greater than the set maximum value; monitoring the water temperature with DS18B20 waterproof temperature sensor, and heating when the water temperature is lower than the threshold; supporting the setting of each threshold through 3 independent buttons; displaying time, food weight, liquid level, water temperature and other data through OLED display; realizing remote control of the system through ESP8266 WIFI communication module.​

The implementation of this system effectively improves the automation and intelligence level of pet dog feeding, reduces manual intervention, ensures the regularity and accuracy of feeding, provides a guarantee for the healthy growth of pet dogs, and also provides a reference for the research and development of similar pet feeding equipment, with high practical application value.​

Keywords:STM32F103C8T6; Pet dog; Automatic feeding system; Sensor; Remote control; Intelligent management

目录

第 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.2整体设计方案

第 3 章 硬件设计

3.1 主控电路模块

3.2 时钟模块电路

3.3 重量检测模块电路

3.4 液位传感器电路

3.5 温度传感器电路

3.6 显示模块电路

3.7 WIFI 通信模块电路

3.8 按键模块电路

3.9 执行设备驱动电路

第4章 系统程序设计

4.1 编程软件介绍

4.2 系统主流程设计

4.3 OLED显示子流程设计

4.4 独立按键子流程设计

4.5 ADC模数转换子流程设计

4.6 时钟模块子流程设计

4.7 称重模块子流程设计

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

4.9 WiFi模块子流程设计

第 5 章 仿真测试

5.1 整体仿真测试

5.2 时钟模块功能测试

5.3 重量检测模块功能测试

5.4 液位传感器功能测试

5.5 温度传感器功能测试

5.6 WIFI 通信模块功能测试

5.7 按键设置与显示功能测试

第 6 章 实物测试

6.1 整体实物测试

6.2 时钟模块功能测试

6.3 重量检测模块功能测试

6.4 液位传感器功能测试

6.5 温度传感器功能测试

6.6 WIFI 通信模块功能测试

6.7 按键设置与显示功能测试

第 7 章 总结与展望

7.1 总结

7.2 展望

致谢

参考文献

附录

附录一:原理图

附录二:PCB

附录三:主程序

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

MyEMS开源能源管理系统助力贵金属冶炼行业生产

各位读者,大家好!今天,我要为大家介绍的是MyEMS开源能源管理系统如何助力贵金属冶炼行业生产。 在当下双碳目标提出的大背景下,贵金属冶炼行业在能源管理方面面临着诸多现状与挑战,而MyEMS开源能源管理系统具有独特优…

作者头像 李华
网站建设 2026/4/16 10:33:42

如何正确应对在线故障:系统化实战指南

第一章:故障管理的基本理念与原则1.1 重新认识在线故障的本质在线故障不是偶然事件,而是复杂系统运行中的必然产物。任何由人类设计、构建和维护的系统,在足够长的时间尺度内,必然会发生故障。这一认知转变是正确应对故障的首要前…

作者头像 李华
网站建设 2026/4/16 16:56:17

深入理解 HTTP 协议:从基础到前沿的全面解析

1. HTTP 协议概述与历史演进1.1 什么是 HTTP 协议HTTP(HyperText Transfer Protocol,超文本传输协议)是互联网上应用最广泛的协议之一,是万维网(World Wide Web)数据通信的基础。它定义了客户端&#xff08…

作者头像 李华
网站建设 2026/4/16 15:43:54

多模态旋转机械智能诊断模型【附代码】

✅ 博主简介:擅长数据搜集与处理、建模仿真、程序设计、仿真代码、论文写作与指导,毕业论文、期刊论文经验交流。✅成品或者定制,扫描文章底部微信二维码。(1) 基于时频域多模态信息的旋转机械特征表示方法旋转机械在运行过程中产生的振动信号…

作者头像 李华
网站建设 2026/4/8 11:00:02

【2026】 LLM 大模型系统学习指南 (26)

策略梯度(Policy Gradient):直接优化策略的强化学习方法 —— 用 “修课心情” 理解核心逻辑策略梯度(Policy Gradient, PG)是强化学习中 “直接优化策略” 的核心算法 —— 它不通过 Q 表间接学习,而是直接…

作者头像 李华
网站建设 2026/4/15 19:04:42

拒绝智商税!亲测5款降AI工具,谁才是过知网的真正救星?

论文降aigc现在绝对是大家写论文时遇到的最大拦路虎。别慌,只要掌握了正确的方法,把那些顽固的AI生成痕迹去掉,顺利通过检测其实并不难。 一、 AI检测原理 很多同学都在问:为什么我自己一个字一个字敲出来的论文,aig…

作者头像 李华