河南科技学院新科学院2015届本科毕业论文(设计)基于单片机的音乐浇花系统的设计与实现学生姓名:所在院系所学专业:导师姓名:完成时间:2015年4月19日基于单片机的音乐浇花系统的设计与实现摘要本次设计的音乐浇花系统主要包括土壤温湿度的检测与控制和蓄水箱自动上水及水位报警功能实时显示湿度,可实现自动和手动切换,及播放背景音乐等几部分。温湿度传感器选择SHT-11,把传感器的感应到的信号经过A/D转换送入到AT89C51单片机内,在LCD1602液晶显示器上显示其温湿度值。再跟通过单片机内的程序设计的温湿度标准值进行对比判断是否执行浇水任务。如果湿度值小于设定的标准值,单片机发出信号继电器控制电磁阀打开执行浇水任务。电磁阀选用单刀双掷开关可实现自动和手动的切换。浇水的同时单片机控制蜂鸣器播放背景音乐,在传感器部分接一个音乐开关可实现闲暇时间也可以播放音乐的功能。关键词:AT89C51单片机,SHT-11温湿度传感器,LCD1602,电磁阀,蜂鸣器MusicwateringtheflowerssystembasedonsinglechipdesignandimplementationAbstractMusicwateringtheflowersofthisdesignsystemmainlyincludesthemeasurementandcontrolofsoiltemperatureandhumidityandstoragetankautomaticallysheungshuireal-timedisplaythehumidityandwaterlevelalarmfunction,canrealizetheautomaticandmanualswitch,canrealizedisplaydigitalclockandplaybackgroundmusicandsoonseveralparts.TemperatureandhumiditysensorselectionSHT-11,thesensorsensingsignalafterA/DconversiontoAT89C51,theLCD1602LCDdisplayonthetemperatureandhumidityvalues.WiththroughagainthetemperatureandhumidityoftheprocedureintheMCUdesignstandardtocomparedeterminewhetherwatertaskexecution.Ifthehumidityvaluelessthanthestandardvaluesofset,MCUsignalrelaycontrolsolenoidvalveopenwatertaskexecution.Ifthehumidityvaluelessthanthestandardvaluesofset,MCUsignalrelaycontrolsolenoidvalveopenwatertaskexecution.Solenoidvalvetochoosesinglepoledoublethrowswitchcanrealizeautomaticandmanualswitch.Waterofsinglechipmicrocomputercontrolbuzzerplaybackgroundmusicatthesametime,themusicinthesensorpartbyoneswitchcanrealizefreetimecanalsoplaythefunctionofmusic.Keywords:AT89C51;SHT-11temperatureandhumiditysensors;LCD1602;solenoidvalve;abuzzerI目录绪论................................................................................................................................11选题的目的研究方法和发展....................................................................................11.1音乐浇花系统的研究方法和手段.........................................................................11.2自动浇花系统的诞生背景及国内外发展现状.....................................................12主要部件介绍和性能................................................................................................22.1单片机的基本概念.................................................................................................22.1.1AT89C51单片机..................................................................................................22.1.2AT89C51的主要性能..........................................................................................22.1.3AT89C51的管脚说明..........................................................................................32.1.4AT89C51的中断系统..........................................................................................42.2数字温湿度传感器SHT-11...................................................................................52.2.1SHT-11的特点.....................................................................................................52.2.2;SHT-11的引脚.....................................................................................................52.3JZC-36F继电器......................................................................................................62.4电磁阀(solenoidvalve).....................................................................................62.5显示器件的选择......................................................................................................62.5.1LCD1602...............................................................................................................73音乐浇花系统的设计................................................................................................83.1总体设计框图..........................................................................................................83.2振荡电路.................................................................................................................93.3复位电路.................................................................................................................93.4播放背景音乐模块...............................................................................................103.5温湿度显示模块...................................................................................................113.6电源电路模块.......................................................................................................123.7浇水电路模块.......................................................................................................124结论..........................................................................................................................12参考文献......................................................................................................................15致谢..............................................................................................................................17附录..............................................................................................................................19附录Ⅰ总体电路图....................................................................................................19附录II