基于单片机控制定时插座.docx基于单片机控制的定时插座
摘 要
本文设计了一款基于STC89C52RC单片机控制的光敏定时插座,它可以通过人为设定 I 时间和光照强度的强弱,实现自动通电和断电功能,从而达到节能的目的。硬件电路设计
; 包括:单片机最小系统电路、电源稳压电路、1602液晶显示电路、独立式按键电路、温度
: 控制电路、光敏电阻电路、继电器电路以及报警电路,设计原理主要利用DS1302时钟芯
: 片和PCF8591芯片经A/D转换后在1602液晶上显示定时时间和光强大小,利用按键来选
I 择工作模式和设定定时时间以及设定光照的阈值,当定时时间结束或光照强度小于设定光
: 照阈值时,通过继电器的吸合作用来驱动插座的切断,红色发光二极管和蜂鸣器的状态来
: 表示插座的工作状态。软件程序的设计包括:1602液晶显示程序、DS1302定时程序、AD
I 转换程序,按键处理程序、蜂鸣器报警程序,在本文的最后对设计了硬件和软件部分,并
| 进行了调试和制作,基于单片机控制的定时插座系统具有电路简单,可靠性高,定时准确 ' 等特点,基本满足设计要求。
装
关键词:STC89C52;光敏;定时;插座 订
THE TIMING SOCKET BASED ON SINGLE-CHIP
MICROCOMPUTER
ABSTRACT
Design a based on SCM STC89C52RC photosensitive regular outlet, by artificially setting time and the strength of the light intensity, it can achieve automatic power-on and power-off function, so as to achieve the purpose of energy saving. Hardware circuit design includes: the smallest single-chip system circuit, power regulator circuit, 1602 LCD circuit, an independent key circuit, temperature control circuit, the photoresistor circuit, the relay circuit and alarm circuit design principles mainly use the DS 1302 clock chip and PCF8591 chip by A / D conversion timing in 1602 and two light levels, use keys to select the operating mode and set the timing and setting a threshold of light, when the time runs out or when the light intensity is less than the set light threshold,the state of the red light emitting diode and a buzzer to indicate the working status of the socket. Software design include: 1602 LCD procedures, DS 1302 timer program, the AD conversion process, the key handler, the buzzer alarm program, at the end of this article on the final design of the hardware and software components in the design and commissioning and production , based on single-chip timing control socket system has a simple circuit, high reliability, and timing accuracy, basically meet the design requirements.
Key words: STC89C52;photosensitive; Timing; Socket
绪论 0
. 1 课题来源及意义 0
. 2 定时插座发展趋势 0
定时插座系统设计 1
1 设计方案的选择 1
.
基于单片机控制定时插座 来自淘豆网m.daumloan.com转载请标明出处.