天津职业技术师范大学TianjinUniversityofTechnologyandEducation毕业设计专业:应用电子技术教育班级学号:0811-25学生姓名:岳阿娜指导教师:丁学文副教授二○一三年六月天津职业技术师范大学本科生毕业设计宠物定时喂食器设计TheDesignonPetTimingFeedingDevice专业班级:应电0811学生姓名:岳阿娜指导教师:丁学文副教授系别:电子工程学院2013年06月I摘要本文设计的是宠物定时喂食器,即先将宠物饲料放入其中,通过设定喂食时间点,当到达这一时间点后,系统发出喂食信号吸引宠物,自动进行喂食。本设计主要研究如何设定时间点并发出喂食信号。宠物自动喂食器主要包括单片机AT89S52、电源电路、电机控阀门、按键电路、显示模块、照明灯、DS1302电路模块、DS18B20温度测试模块和蜂鸣器模块。其中单片机为核心单元,对各个模块的工作进行控制。喂食器的喂食过程是,通过键盘设定倒计时间,当依次到达设定时间时,单片机驱动发光二极管发光,蜂鸣器发出响声,吸引宠物过来进食并自动投放食物。设计中加入的万年历和温度传感器,方便记录宠物的生长周期。倒计时和日期等信息通过LCD12864液晶显示。本设计解决了工作日或节假日由于主人不在不能对宠物喂食和宠物饮食不规律的问题,系统操作简单,电路运行稳定,具有一定的推广价值。关键词:宠物喂食器;AT89S52单片机;LCD12864液晶;万年历IIABSTRACTThestudyisadesignonpettimingfeedingdevice,thatis,petfeedintoitfirst,bysettingfeedingpointintime,whenarrivesatthispoint,thesystemsignalattractspetandautomaticallyfeeding.Thisdesignismainlytostudyhowtosettimeandsignalfeeding.PettimingfeedingdeviceincludemicrocontrollerAT89S52,Powercircuit,thekeycircuit,LCD12864displaymodule,DS1302clockcircuit,DS18B20temperaturetestingmoduleandmusicalertsystem.Themicrocontrolleristhecoreunit,tocontrolvariousmoduleswork.Feederfeedingprocessisthroughthekeyboardtosetthetime,whenarrivesthepoint,microcontrollerdrivelight-emittingdiodesled,buzzersound,attractpetfeedingandautomaticallyfeeding.Designwithcalendarandtemperaturesensorrecordpetgrowthcycleconveniently.CountdownsystemtimeisdisplayedthroughtheLCD12864.Thisdesignsolvestheproblemthatkeepingpethealthywhenpeopleworkornotathomeontheholidays.Thesystemisoperatedeasilyandthecircuitisstability.Ithasacertainpopularizationvalue.KeyWords:Petfeedingdevice;AT89S52;LCD12864displaymodule;Perpetualcalendar目录1引言.............................................................................................................................11.1研究背景...........................................................................................................11.2功能概述...........................................................................................................11.3社会意义...........................................................................................................12系统方案设计.............................................................................................................22.1总体设计方案构思...........................................................................................22.2系统组成模块设计...........................................................................................22.2.1单片机芯片的选择.................................................................................22.2.2时钟显示电路.........................................................................................32.2.3时钟芯片的选择.....................................................................................32.2.4温度传感器的选择.................................................................................43系统硬件设计.............................................................................................................53.1AT89S52单片机简介.......................................................................................53.2单片机模块设计..............................................................................................83.2.1单片机主控系统.....................................................................................83.2.2单片机的复位电路.................................................................................93.2.3时钟电路...............................................................................................103.3主要模块功能.................................................................................................103.3.1液晶显示模块LCD12864....................................................................103.3.2按键模块...............................................................................................123.3.3蜂鸣器模块...........................................................................................133.3.4照明灯...................................................................................................133.3.5DS1302..................................................................................................133.3.6DS18B20温度测试模块......................................................................153.3.7电机控阀门...........................................................................................163.4电源电路设计.................................................................................................183.4.1电源电路原理.......................................................................................183.4.2电源电路模块设计思路.......................................................................184系统软件设计...........................................................................................................204.1主程序流程图.................................................................................................204.1.1主流程概述...........................................................................................204.1.2设计思想...............................................................................................214.2程序设计软件概述............