临沂大学2014届本科毕业设计摘要单片机渗透到我们生活的各个领域,几乎很难找到哪个领域没有单片机的踪迹,台灯已是千家万户的必需生活用品,当夜晚来临时,人们摸黑去开灯,非常不方便,而当离开时,人们又经常忘记关灯而造成巨大的能源浪费。本文设计制作了一种智能台灯,主要是以红外热释电处理芯片BISS0001和单片机组成的红外传感控制电路。其原理是:以人体红外辐射(波长为9.5um)为传感信号,当人体在台灯的范围内且环境光强较弱时,自动感应开灯,省去黑夜摸灯的麻烦;当人离开台灯传感器检测范围,自动感应关灯。另外当人身体太靠近桌面时,台灯自动感应,蜂鸣器发出警报,警告纠正坐姿,同时灯光控制电路控制灯光变暗,若在一定时间内未离开桌面则自动熄灭,当纠正好坐姿则消除警报,灯光变亮。其特点是自动开关灯,节约能源;且能纠正坐姿,防止近视。本文首先介绍结合了单片机的智能化电器的普遍推广推动了家用小电器台灯的智能化。然后介绍设计中用到的单片机的功能以及传感器的选择。最后进行台灯的硬件设计和软件设计。关键词:Atmega16单片机;热释电红外传感器;智能台灯;节能临沂大学2014届本科毕业设计AbstractSingle-chipmicrocomputerpenetratedintoallareasofourlives,itisverydifficulttofindtheareaofalmostnotracesofsingle-chip.Lampisnecessaryforthousandsofhouseholdslivingsupplies.Wheninthedark,thepeopleisveryinconvenienttoturnonthelights,andtheyoftenforgertoturnedoffthelightswhentheyleft,itisresultinginahugewasteofenergy.Inthispaper,anintelligentdesigntablelamp,MainlypyroelectricinfraredBISS0001chipandsingle-chipprocessorconsistingofinfraredsensorcontrolcircuit.Theprincipleisthatinfraredradiationinthehumanbodyforthesensorcircuit,automaticsensorsturnonthelightswhenthebodyofthescopeofthelampandtheenvironmentwhenaweaklight.Inanotherway,turnoffthelightsbyautomaticsensorwhenpeopleleavethelampsensordetectionrange.Inaddition,whenthebodyistooclosetothedesktop.Thebuzzeralarmtowarningtocorrectposturebythelampautomaticsensor.Inthesametime,lightingcontrolcircuittocontrollightsdimmed.ifwithinacertainperiodoftimenottoleavethedesktopthelightsautomaticallyextinguished,Thelightsbrightenandremovethealarmwhenthecorrectgoodposture.Itisfeaturesisautomaticlightswitch,energyconservation;cancorrectpostureandpreventmyopia.ThispaperfirstintroducestheintelligentcombinationofSCMappliancestopromotethegeneralpromotionofthesmallhouseholdelectricalappliancesintelligentlamp.Andthenusedtointroducesingle-chipdesignfeaturesaswellasthesensorofchoice.Thefinaltableofthehardwaredesignandsoftwaredesign.KeyWords:Atmega16Microcomputer;PIR;IntelligentTablelamp;EnergySaving临沂大学2014届本科毕业设计I目录1引言..............................................................................................................................11.1研究背景.........................................................11.2研究的意义.......................................................21.2.1在节约电能方面的意义........................................21.2.2对使用者的眼睛保护及坐姿的调整..............................31.3课题的发展现状...................................................41.3.1单片机的发展现状...............................................41.3.2台灯的发展现状..............................................51.4研究内容.........................................................62AVR单片机的特点及功能简介...................................................................................62.1系统构成框图.....................................错误!未定义书签。2.2AVR单片机的特点..................................................62.3单片机的串口功能.................................................72.4ATmega16单片机PWM功能..........................................83传感器的选择及功能介绍........................................................................................103.1传感器..........................................................103.1.1传感器的定义...............................................103.1.2传感器的分类...............................................103.1.3传感器的静态特性...........................................113.1.4传感器的动态特性...........................................113.1.5传感器的灵敏度.............................................123.1.6传感器的分辨力.............................................123.1.7传感器的迟滞性.............................................123.2热释电红外传感器................................................123.2.1概述.......................................................133.2.2热释电红外传感器工作原理...................................133.2.3热释电红外传感器的优缺点...................................143.2.4热释电红外传感器的抗干扰性能...............................143.2.5热释电红外传感器的应用前景.................................14临沂大学2014届本科毕业设计II3.2.6小结.......................................................143.3菲涅尔透镜......................................................153.3.1概述.......................................................153.3.2菲涅尔透镜的工作原理.......................................153.3.3菲涅尔透镜的优点...........................................153.3.4小结.......................................................163.4光敏电阻........................................................163.4.1概述.......................................................163.4.2光敏电阻工作原理...........................................163.4.3光敏电阻的分类.............................................173.4.4光敏电阻的主要参数.........................................173.4.5光敏电阻的制作材料.........................................173.5本章小结........................................................184硬件电路设计及原理................................................................................................184.1人体热释电电路..................................................184.1.1BISS0001的管脚结构和工作原理...............................184.1.2人体红外模块与单片机的电路.................................194.2灯光驱动电路....................................................194.3光线检测与单片机电路