摘要
传统的时间继电器用振荡电路来完成延时功能,其时间的长短由RC时间常数确定,存在误差而且延时时间不方便调。在自动化工业控制系统中,采用传统时间继电器组成不同控制电路,一旦组装完成,其功能就无法更改,维护非常困难。基于此,详细介绍了利用atmega128单片机设计时间继电器的方法,解决了如何处理时间精度和方便调整时间的问题,该时间继电器是以AVR单片机为核心组成的小系统控制三路继电器,可以设定一天中的时间为继电器的开启时间和关闭时间,一共可以设定两组定时模式,延时开的模式和延时关的模式,并具有时间设定功能,用户可以根据实际情况设定需要延时的时间。
The oscillating circuit is used to complete the function of time delay for the traditional time relay. The length of time is determined by RC time constant and the delay time is not convenient to adjust for the existing errors. The different control circuits are usually composed of traditional time relay in the industrial automation control system, but the function cannot be changed and the work of maintenance is very difficult once the assembly is completed. A method of using atmega128 MCU to design a time relay is detailed introduced in the paper, the preambles of how to deal with the time precision and regulate the time easily is also solved. The time relay is a three-realy of small control system composed of AVR MCU, the time in one day can be set as the opening time and closing time of relay. Two time setting models, open-delay model and close-delay can be set; the users can set the delay time according to the actual situation.
出处
《山西电子技术》
2012年第5期17-19,共3页
Shanxi Electronic Technology