基本信息
文件名称:基于STM32的自动宠物喂食器设计.docx
文件大小:390.62 KB
总页数:43 页
更新时间:2025-04-14
总字数:约1.93万字
文档摘要

摘要

本设计所研究的是实现一个宠物自动喂食器,即先将宠物饲料放入其中,通过设定五个喂食时间点,当到达这一时间点后,系统发出喂食信号吸引宠物,自动进行喂食。本设计主要研究如何发出喂食信号。宠物喂食器系统主要包括单片机控制、自动开关和蜂鸣器提示、倒计时间设定系统。喂食器的喂食过程,通过键盘设定倒计时间,当依次到达所定时间时,发光二极管发光,蜂鸣器发出响声,吸引宠物过来进食并自动投放食物。本设计解决了工作时或节假日时由于主人不在不能对宠物进行喂食,避免了宠物由于饮食不正常所产生的问题。通过DS18B20温度传感器检测当前温度,若检测到的温度低于设定温度则开启加温功能:液晶屏显示当前水位及温度和设定水位及温度。喂食过程是通过光电传感器检测饲料是否存在,若检测到饲料不存在,则开启加饲料功能。

在整个系统中,利用单片机对各个系统进行控制。利用键盘设定倒计时间,单片机不停的读取时间,并判断是否到达喂食时间。开关系统电阻和发光二极管表示,发光二级管收到低电平时导通表示开关打开投放喂食。同时接有蜂鸣器,当到达喂食时间后蜂鸣器发出响声吸引宠物进行喂食。

关键词:喂食器;单片机控制;温度传感器

DesignofautomaticpetfeederbasedonSTM32Abstract

Theresearchofthisdesignistorealizeanautomaticpetfeeder,thatis,petfeedisputintoitfirst,andafterfivefeedingtimepointsareset,thesystemsendsoutfeedingsignalstoattractpetsandfeedthemautomatically.Thisdesignmainlystudieshowtosendfeedingsignals.Thepetfeedersystemmainlyincludessinglechipmicrocomputercontrol,automaticswitchandbuzzerprompt,andcountdownintervalsettingsystem.Inthefeedingprocessofthefeeder,thecountdownintervalissetbythekeyboard.Whenthegiventimeisreachedinturn,theLEDlightsupandthebuzzersounds,attractingpetstoeatandautomaticallyfeedingfood.Thisdesignsolvestheproblemthatthepetcantbefedwhentheownerisawayatworkoronholidays,andavoidstheproblemscausedbytheabnormaldietofthepet.ThecurrenttemperatureisdetectedbyDS18B20temperaturesensor.Ifthedetectedtemperatureislowerthanthesettemperature,theheatingfunctionisturnedon:theLCDscreendisplaysthecurrentwaterlevelandtemperatureandthesetwaterlevelandtemperature.Inthefeedingprocess,theexistenceoffeedisdetectedbyphotoelectricsensor,andifitisdetectedthatfeeddoesnotexist,thefeedaddingfunctionisturnedon.

Inthewholesystem,thesinglechipmicrocomputerisusedtocontroleachsystem.Thekeyboardisusedtosetthecountdowntime,andthesinglechipmicrocomputerkeepsrea