CN107153379A - A kind of intelligent switch - Google Patents

A kind of intelligent switch Download PDF

Info

Publication number
CN107153379A
CN107153379A CN201710390484.9A CN201710390484A CN107153379A CN 107153379 A CN107153379 A CN 107153379A CN 201710390484 A CN201710390484 A CN 201710390484A CN 107153379 A CN107153379 A CN 107153379A
Authority
CN
China
Prior art keywords
temperature
circuit
chip microcomputer
module
relay
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201710390484.9A
Other languages
Chinese (zh)
Inventor
肖应旺
伍银波
周卫
刘军
姚美银
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Polytechnic Normal University
Original Assignee
Guangdong Polytechnic Normal University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Polytechnic Normal University filed Critical Guangdong Polytechnic Normal University
Priority to CN201710390484.9A priority Critical patent/CN107153379A/en
Publication of CN107153379A publication Critical patent/CN107153379A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Program-control systems
    • G05B19/02Program-control systems electric
    • G05B19/04Program control other than numerical control, i.e. in sequence controllers or logic controllers
    • G05B19/042Program control other than numerical control, i.e. in sequence controllers or logic controllers using digital processors
    • G05B19/0423Input/output
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/20Pc systems
    • G05B2219/25Pc structure of the system
    • G05B2219/25257Microcontroller

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Automation & Control Theory (AREA)
  • Air Conditioning Control Device (AREA)

Abstract

The invention discloses a kind of intelligent switch, including respectively, the key-press module inputted for the clock circuit of Time Calculation, the numeral method module for showing the time, temperature collect module, the bell circuit of temperature over-range, function selection with parameter, the relay switch circuit of control apparatus switch and the system with monolithic mechatronics reset the reset circuit resetted.The intelligent switch is controlled using single-chip microcomputer, and circuit is simple, occupies little space, and electrical equipment temperature detect switch (TDS) and time switch can be achieved.

Description

一种智能开关a smart switch

技术领域technical field

本发明涉及智能家居的控制领域,特别涉及一种智能开关。The invention relates to the control field of smart home, in particular to an intelligent switch.

背景技术Background technique

随着科技的发展及人们生活需求的加大,人们对生活的方式和态度上有了很大的变化,在自己的家中,追求着方便与智能。然而在如今的家庭中,大多家电控制并没有变得多方便与智能,电器的使用上依然是自己动手控制;而传统的开关已经不能完成人们想要的功能,不能满足如今人们的生活上的需求,所以我们需要一种新的控制方式,智能开关可以很好决解这些问题。尽管如此,智能开关在生活上并没有很好地普及,且智能开关的功能上比较单一,不能很好地使生活变得便捷;在产品同质化上很严重,功能雷同;资本热度高,但在用户的认可上不高;甚至有些产品的实用价值并不高。With the development of science and technology and the increase of people's living needs, people's ways and attitudes towards life have undergone great changes. In their own homes, they are pursuing convenience and intelligence. However, in today's families, the control of most home appliances has not become more convenient and intelligent, and the use of electrical appliances is still controlled by yourself; and the traditional switch can no longer fulfill the functions people want, and cannot meet the needs of people's lives today. Demand, so we need a new control method, smart switch can solve these problems well. Despite this, smart switches have not been popularized in life, and the functions of smart switches are relatively single, which cannot make life convenient; the homogeneity of products is serious, and the functions are similar; capital heat is high, But the user recognition is not high; even the practical value of some products is not high.

发明内容Contents of the invention

本发明针对上述存在的问题,提供了一种智能开关,具有电子时钟、状态切换、作息定时的家居电灯的开启与关闭、响铃、温控空调或风扇的启动与关闭等功能。In view of the above problems, the present invention provides an intelligent switch, which has the functions of electronic clock, state switching, turning on and off of household lamps with regular work and rest, ringing a bell, turning on and off of temperature-controlled air conditioners or fans, and the like.

本发明采用以下技术方案,一种智能开关,包括分别与单片机电连接的用于时间计算的时钟电路、用于显示时间的数码管显示模块、温度采集模块、温度超限的响铃电路、功能选择与参数输入的按键模块、控制电器开关的继电开关电路和系统清零复位的复位电路。The present invention adopts the following technical solutions, an intelligent switch, including a clock circuit for time calculation, a digital tube display module for displaying time, a temperature acquisition module, a ringing circuit for temperature exceeding the limit, and a function The button module for selection and parameter input, the relay switch circuit for controlling electrical switches, and the reset circuit for system clearing and reset.

作为进一步的改进,所述的单片机的型号为AT89C51,兼容标准MCS-51指令系统及80C51引脚结构,芯片内集成了通用8位中央处理器和ISP Flash存储单元。As a further improvement, the model of the single-chip microcomputer is AT89C51, which is compatible with the standard MCS-51 command system and 80C51 pin structure, and integrates a general-purpose 8-bit central processing unit and an ISP Flash storage unit in the chip.

作为进一步的改进,所述的按键电路为按键开关与单片机I/O口连接,包括设定开关灯定时模式选择按键、设定开灯定时按键、设定关灯定时按键、设定温度上下限模式选择按键、设定温度上限按键、设定温度下限按键、有人/无人状态模式选择按键和复位按键。As a further improvement, the key circuit is a key switch connected to the I/O port of the single-chip microcomputer, including a key for setting the timing mode of the switch light, a key for setting the timing of turning on the light, a key for setting the timing of turning off the light, and a key for setting the temperature. Lower limit mode selection button, set temperature upper limit button, set temperature lower limit button, manned/unattended state mode selection button and reset button.

作为进一步的改进,所述的时钟电路为包括一个晶振和两个电容组成的振荡电路,所述的两个电容分别并联在晶振与单片机连接的两接线端;时钟电路由单片机控制数码管显示模块输出显示时间。As a further improvement, the clock circuit is an oscillating circuit comprising a crystal oscillator and two capacitors, and the two capacitors are respectively connected in parallel to the two terminals connecting the crystal oscillator and the single-chip computer; the clock circuit is controlled by the single-chip computer. The output shows the time.

作为进一步的改进,数码管显示模块还能输出显示温度,由单片机接收温度采集模块采集的温度信息控制数码管显示模块输出温度。As a further improvement, the digital tube display module can also output and display temperature, and the temperature information collected by the temperature acquisition module is received by the single-chip microcomputer to control the output temperature of the digital tube display module.

作为进一步的改进,所述的数码管显示模块与单片机采用动态显示接口连接。As a further improvement, the said nixie tube display module is connected with the single-chip microcomputer through a dynamic display interface.

作为进一步的改进,所述的温度采集电路采用DS18B20数字式传感器,其I/O接口用数据线与单片机I/O接口连接。As a further improvement, the temperature acquisition circuit uses a DS18B20 digital sensor, and its I/O interface is connected to the I/O interface of the single-chip microcomputer with a data line.

作为进一步的改进,所述的继电开关电路包括温度继电器和时间继电器,所述的温度继电器由单片机根据按键模块设定的温度条件控制空调开关,时间继电器由单片机根据按键模块设定的定时控制灯源开关。As a further improvement, the relay switch circuit includes a temperature relay and a time relay, the temperature relay is controlled by the single-chip microcomputer according to the temperature condition set by the key module, and the time relay is controlled by the single-chip microcomputer according to the timing set by the key module Light switch.

作为进一步的改进,所述的复位电路包括电容、接地电阻、串联电阻和复位按键,所述的串联电阻与复位按键串联后与电容并联。As a further improvement, the reset circuit includes a capacitor, a grounding resistor, a series resistor and a reset button, and the series resistor is connected in series with the reset button and then connected in parallel with the capacitor.

作为进一步的改进,其控制方法步骤为:As a further improvement, its control method steps are:

1)、启动智能开关,系统初始设置为无人状态,单片机和时钟电路启动,数码管显示模块显示时间,其它电路和模块处于休眠状态;按下按键模块的“有人/无人的状态设定”功能按键,设定为有人状态,所有的电路和模块启动,进行温度控制和定时控制;1), start the smart switch, the system is initially set to the unmanned state, the single-chip microcomputer and the clock circuit are started, the digital tube display module displays the time, and other circuits and modules are in a dormant state; press the button module "Manned/unmanned state setting "Function button, set to manned state, all circuits and modules start, temperature control and timing control;

2)、温度控制:温度采集模块启动,采集环境温度,根据按键模块输入的温度范围判断,温度高于设定温度范围时,单片机控制响铃电路启动响铃一次,同时控制继电开关电路的温度继电器闭合,空调启动;当环境温度低于设定温度范围时,单片机控制温度继电器断开,空调关闭;2), temperature control: start the temperature acquisition module, collect the ambient temperature, and judge according to the temperature range input by the button module. The temperature relay is closed, and the air conditioner starts; when the ambient temperature is lower than the set temperature range, the single-chip microcomputer controls the temperature relay to be disconnected, and the air conditioner is turned off;

3)、定时控制:单片机检测按键模块输入的定时设置,达到设定开启时间,单片机输出控制继电开关电路的时间继电器闭合,开启灯源;灯源定时达到设定关闭时间时,单片机控制时间继电器断开,灯源关闭。3) Timing control: The single-chip microcomputer detects the timing setting of the button module input, and when the set opening time is reached, the single-chip output controls the time relay of the relay switch circuit to close, and the light source is turned on; when the light source timing reaches the set closing time, the single-chip microcomputer controls the time The relay opens and the light source turns off.

本发明不仅解决了家具智能控制问题,还具有以下有益效果:本发明采用单片机的控制,没有繁杂的控制电路,占用空间小,反应灵敏,操作简单,切换快速;具有电子时钟、状态切换、作息定时的家居电灯的开启与关闭、温度超限响铃、温控空调和风扇的启动与关闭等功能;根据设定有人/无人状态,选择性地开启或关闭某些模块,实行多功能与低功耗之间的切换,更加省电。The present invention not only solves the problem of furniture intelligent control, but also has the following beneficial effects: the present invention adopts the control of a single-chip microcomputer, does not have complicated control circuits, takes up little space, has quick response, simple operation, and fast switching; it has electronic clock, state switching, work and rest Timed on and off of home lights, ringing when temperature exceeds the limit, start and close of temperature-controlled air conditioners and fans, etc.; according to the set occupant/unoccupied state, some modules are selectively turned on or off to implement multi-function and Switch between low power consumption, more power saving.

附图说明Description of drawings

图1是本发明智能开关的结构框图;Fig. 1 is the structural block diagram of intelligent switch of the present invention;

图2是本发明实施例AT89C51单片机的引脚排列图;Fig. 2 is the pin arrangement diagram of AT89C51 single-chip microcomputer of the embodiment of the present invention;

图3是本发明实施例时钟电路的电路原理图;Fig. 3 is the circuit schematic diagram of the clock circuit of the embodiment of the present invention;

图4是本发明实施例温度采集模块的电路原理图;Fig. 4 is the circuit schematic diagram of the temperature acquisition module of the embodiment of the present invention;

图5是本发明实施例数码管显示模块的电路原理图;Fig. 5 is the schematic circuit diagram of the nixie tube display module of the embodiment of the present invention;

图6是本发明实施例继电开关电路的电路原理图;Fig. 6 is the circuit schematic diagram of the relay switch circuit of the embodiment of the present invention;

图7是本发明实施例响铃电路的电路原理图;Fig. 7 is the circuit schematic diagram of the bell circuit of the embodiment of the present invention;

图8是本发明实施例复位电路的电路原理图;FIG. 8 is a schematic circuit diagram of a reset circuit according to an embodiment of the present invention;

图9是本发明实施例控制方法的流程框图。Fig. 9 is a flowchart of a control method according to an embodiment of the present invention.

具体实施方式detailed description

为了使本发明的实施例的目的、技术方案和有点更加清楚,以下结合附图对本发明的实施例作详细描述,显然,所描述的实施例仅为本发明的优选的实施例,而不是全部实施例,不能用来限制本发明的权利范围。In order to make the purpose, technical solutions and points of the embodiments of the present invention clearer, the embodiments of the present invention will be described in detail below in conjunction with the accompanying drawings. Obviously, the described embodiments are only preferred embodiments of the present invention, not all Examples should not be used to limit the scope of rights of the present invention.

如图1所示,一种智能开关,包括分别与单片机电连接的用于时间计算的时钟电路、用于显示时间的数码管显示模块、温度采集模块、温度超限的响铃电路、功能选择与参数输入的按键模块、控制电器开关的继电开关电路和系统清零复位的复位电路。As shown in Figure 1, an intelligent switch includes a clock circuit for time calculation, a digital tube display module for displaying time, a temperature acquisition module, a ringing circuit for temperature exceeding the limit, and a function selection The button module for inputting parameters, the relay switch circuit for controlling electrical switches, and the reset circuit for system clearing and reset.

图2为实施例的AT89C51单片机的引脚排列图,AT89C51是一个低功耗,高性能CMOS8位单片机,片内含4k Bytes ISP(In-system programmable)的可反复擦写1000次的Flash只读程序存储器,器件采用ATMEL公司的高密度、非易失性存储技术制造,兼容标准MCS-51指令系统及80C51引脚结构,芯片内集成了通用8位中央处理器和ISP Flash存储单元,功能强大的微型计算机的AT89C51可为许多嵌入式控制应用系统提供高性价比的解决方案。Fig. 2 is the pin arrangement diagram of the AT89C51 single-chip microcomputer of the embodiment, AT89C51 is a low power consumption, high-performance CMOS 8-bit single-chip microcomputer, the Flash read-only that can be repeatedly erased and written 1000 times including 4k Bytes ISP (In-system programmable) in the chip Program memory, the device is manufactured using ATMEL's high-density, non-volatile storage technology, compatible with the standard MCS-51 command system and 80C51 pin structure, integrated in the chip with a general-purpose 8-bit central processing unit and ISP Flash storage unit, powerful The AT89C51 microcomputer can provide a cost-effective solution for many embedded control application systems.

如图3,时钟电路为时钟振荡电路,包括有两个电容和一个晶振X1,两电容C1、C2分别并联在晶振两接线端XT1、XT2,XT1连接AT89C51单片机的19引脚(XTAL1),XT2连接AT89C51单片机的18引脚(XTAL2);晶振X1选用12MHz,两电容均为30pF。该时钟电路能够实现电路时间的准确控制,为AT89S51单片机提供时间基准。As shown in Figure 3, the clock circuit is a clock oscillation circuit, including two capacitors and a crystal oscillator X1. The two capacitors C1 and C2 are respectively connected in parallel to the two terminals XT1 and XT2 of the crystal oscillator. XT1 is connected to the 19 pins (XTAL1) and XT2 of the AT89C51 microcontroller. Connect the 18-pin (XTAL2) of the AT89C51 microcontroller; the crystal oscillator X1 is 12MHz, and the two capacitors are 30pF. The clock circuit can realize accurate control of circuit time and provide time reference for AT89S51 single-chip microcomputer.

如图4,温度采集模块采用数字式温度传感器DS18B20进行温度采集,该电路连接简单,DS18B20温度传感器的VDD接口外接VCC电压源,其I/O接口通过数据线连接AT89S51单片机的引脚P2.4,VDD接口与数据线还串联有电阻R3,R3阻值为4.7KΩ,GND接口接地。As shown in Figure 4, the temperature acquisition module uses a digital temperature sensor DS18B20 for temperature acquisition. The circuit connection is simple. The VDD interface of the DS18B20 temperature sensor is externally connected to the VCC voltage source, and its I/O interface is connected to the pin P2.4 of the AT89S51 microcontroller through a data line. , the VDD interface and the data line are also connected in series with a resistor R3, the resistance of R3 is 4.7KΩ, and the GND interface is grounded.

图5为数码管显示模块,采用单片机与数码管的动态显示接口连接显示时间,通过数码管段码的输入,显示出数字时间。数码管显示模块同样可以用来显示温度,由单片机接收温度采集模块采集的温度信息控制数码管显示模块输出显示温度。其中数码管动态显示的四个非门分别与单片机的5、6、7、8引脚(P1.4、P1.5、P1.6、P1.7)连接,数码管8段(dp、g、f、e、d、c、b、a)分别与单片机的28~21引脚(P2.7~P2.0)。可以看到4位数码管的8段共同受单片机P2.7~P2.0控制,每个数码管的公共端COM位选通由P1口P1.4、P1.5、P1.6、P1.7通过非门SN74LS04N控制。公共端(C4~C1)哪个电位从0变为1,对应的数码管运行。通过P2.7~P2.0电位为1时,对应的数码管8段亮起,显示0~9)。单片机I/O若采用静态驱动方式驱动一个数码管需要8位I/O端口,这种驱动方式虽然简单,亮度高,但耗电且浪费I/O端口资源。当需要驱动4个以上数码管时,就必须扩展I/O端口或增加译码驱动器进行驱动,硬件电路设计复杂且耗费资源。而动态显示接口方式尽管占用CPU时间,但节省硬件和接口电路简单。Figure 5 is the digital tube display module, which uses a single-chip microcomputer to connect with the dynamic display interface of the digital tube to display time, and displays the digital time through the input of the segment code of the digital tube. The digital tube display module can also be used to display temperature, and the temperature information collected by the temperature acquisition module is received by the single-chip microcomputer to control the digital tube display module to output and display the temperature. Among them, the four NOT gates dynamically displayed by the digital tube are respectively connected to pins 5, 6, 7, and 8 (P1.4, P1.5, P1.6, P1.7) of the microcontroller, and the 8 segments of the digital tube (dp, g , f, e, d, c, b, a) and 28 ~ 21 pins (P2.7 ~ P2.0) of the microcontroller respectively. It can be seen that the 8 segments of the 4-digit digital tube are jointly controlled by the single-chip microcomputer P2.7~P2.0, and the COM bit of the common port of each digital tube is strobed by P1 port P1.4, P1.5, P1.6, P1. 7 is controlled by the NOT gate SN74LS04N. Which potential of the common terminal (C4~C1) changes from 0 to 1, and the corresponding digital tube runs. When the potential of P2.7~P2.0 is 1, the corresponding 8-segment digital tube lights up, displaying 0~9). If the single-chip I/O adopts a static driving method to drive a digital tube, an 8-bit I/O port is required. Although this driving method is simple and has high brightness, it consumes power and wastes I/O port resources. When it is necessary to drive more than 4 digital tubes, it is necessary to expand the I/O port or add a decoding driver for driving, and the hardware circuit design is complex and resource-consuming. Although the dynamic display interface mode takes up CPU time, it saves hardware and the interface circuit is simple.

图6为实施例中继电开关电路的电路原理图,继电开关电路包括温度继电器和时间继电器,继电器是一种电控制器件,当输入量的变化达到规定的要求时,在电气输出电路中使被控量发生预定阶跃变化的一种电器,实际上是用小电流控制大电流运作的一种“自动开关”。继电器电路电阻R1端连接单片机2引脚(P1.1),采用PNP型三极管放大电路,线圈两端电流由三极管来提供,当单片机引脚P1.1给三极管B极送低电平时,三极管导通,线圈有电流,继电器吸合。送高电平时,三极管截至,线圈无电流,继电器断开。其中二极管的作用是当线圈在断电的瞬间产生一个很强的反电动势,可以与之消耗,这样就不容易烧坏三极管。而继电器的输出端相当与一个单刀双掷开关,动触点接地,当开关接到左静触点,电路接通。当温度传感器测量到环境温度达到设定值时,通过单片机的输出,使得温度继电器闭合或断开,从而控制空调的有规律的运作。而对LED灯的控制则采用时间继电器。时间继电器是一种加上或除去输入信号时,输出部分需延时或限时到规定时间才闭合或断开其被控电路的继电器。当单片机检测到定时开或关灯时间时,通过单片机的输出,使得时间继电器闭合或断开,导致灯的亮灭。Fig. 6 is the circuit schematic diagram of the relay switch circuit in the embodiment, the relay switch circuit includes a temperature relay and a time relay, the relay is a kind of electrical control device, when the change of the input quantity reaches the specified requirement, in the electrical output circuit An electrical appliance that causes a predetermined step change in the controlled quantity is actually an "automatic switch" that uses a small current to control a large current operation. The resistance R1 end of the relay circuit is connected to pin 2 (P1.1) of the single-chip microcomputer, and a PNP type triode amplifier circuit is used. The current at both ends of the coil is provided by the triode. On, the coil has current, and the relay pulls in. When the high level is sent, the triode is cut off, the coil has no current, and the relay is disconnected. The function of the diode is that when the coil generates a strong counter electromotive force at the moment of power failure, it can be consumed with it, so that it is not easy to burn out the triode. The output end of the relay is equivalent to a single-pole double-throw switch, and the moving contact is grounded. When the switch is connected to the left static contact, the circuit is connected. When the temperature sensor detects that the ambient temperature reaches the set value, the temperature relay is closed or disconnected through the output of the single-chip microcomputer, thereby controlling the regular operation of the air conditioner. The control of the LED lights uses a time relay. The time relay is a kind of relay that closes or disconnects the controlled circuit when the output part needs to be delayed or limited to the specified time when the input signal is added or removed. When the single-chip microcomputer detects the timing of turning on or off the light, the output of the single-chip microcomputer makes the time relay close or open, causing the light to turn on and off.

响铃电路原理图如图7所示,电路的输入连接单片机1引脚(P1.0),该响铃电路采用蜂鸣器FM,内部有自带的震荡电路,可以由单片机的输出输入高低电平驱动,输入经与电阻R18串联的放大器Q1放大输入到蜂鸣器FM中,蜂鸣器FM外接有输入电压VCC。当AT89S51单片机检测到温度采集模块采集的温度超过设定温度时,单片机就会输出电平驱动响铃电路动作响铃。The schematic diagram of the ringing circuit is shown in Figure 7. The input of the circuit is connected to pin 1 (P1.0) of the single-chip microcomputer. The ringing circuit uses a buzzer FM and has its own oscillation circuit inside, which can be controlled by the output and input of the single-chip microcomputer. Level drive, the input is amplified and input to the buzzer FM through the amplifier Q1 connected in series with the resistor R18, and the buzzer FM is externally connected with the input voltage VCC. When the AT89S51 single-chip microcomputer detects that the temperature collected by the temperature acquisition module exceeds the set temperature, the single-chip microcomputer will output a level to drive the ringing circuit to ring the bell.

如图8,该复位电路与AT89S51单片机的9引脚(RST)连接,包括电容C18、接地电阻R25、串联电阻R24和复位按键K19,所述的串联电阻与复位按键串联后与电容并联,其中R24为100Ω,R25为10KΩ,C18为100nF。复位按键设置在按键模块,按下复位按键,即可完成系统清零复位。As shown in Figure 8, the reset circuit is connected to 9 pins (RST) of the AT89S51 microcontroller, including capacitor C18, grounding resistor R25, series resistor R24 and reset button K19, and the series resistor is connected in parallel with the capacitor after being connected in series with the reset button, wherein R24 is 100Ω, R25 is 10KΩ, and C18 is 100nF. The reset button is set on the button module, and the reset button can be pressed to complete the system reset.

本发明智能开关控制系统,可实现对家用电器的智能控制。在一个优选的实施例中,智能开关利用温度继电器和时间继电器分别对空调进行温控开关和LED灯的定时开关,该控制系统的控制方法如图9所示:The intelligent switch control system of the invention can realize intelligent control of household appliances. In a preferred embodiment, the intelligent switch uses the temperature relay and the time relay to respectively perform temperature control switch and timing switch of the LED light on the air conditioner. The control method of the control system is shown in Figure 9:

1)、启动智能开关,系统初始设置为无人状态,单片机和时钟电路启动,数码管显示模块显示时间,其它电路和模块处于休眠状态;按下按键模块的“有人/无人的状态设定”功能按键,设定为有人状态,所有的电路和模块启动,进行温度控制和定时控制;1), start the smart switch, the system is initially set to the unmanned state, the single-chip microcomputer and the clock circuit are started, the digital tube display module displays the time, and other circuits and modules are in a dormant state; press the button module "Manned/unmanned state setting "Function button, set to manned state, all circuits and modules start, temperature control and timing control;

2)、温度控制:温度采集模块启动,采集环境温度,温度高于设定温度范围时,单片机控制响铃电路启动响铃一次,同时控制继电开关电路的温度继电器闭合,空调启动;当环境温度低于设定温度范围时,单片机控制温度继电器断开,空调关闭;2), temperature control: the temperature acquisition module starts to collect the ambient temperature. When the temperature is higher than the set temperature range, the single-chip microcomputer controls the ringing circuit to start ringing once, and at the same time controls the temperature relay of the relay switch circuit to close, and the air conditioner starts; when the environment When the temperature is lower than the set temperature range, the single-chip microcomputer controls the temperature relay to disconnect, and the air conditioner is turned off;

3)、定时控制:单片机检测按键模块输入的定时设置,达到设定开启时间,单片机输出控制继电开关电路的时间继电器闭合,开启灯源;灯源定时达到设定关闭时间时,单片机控制时间继电器断开,灯源关闭。3) Timing control: The single-chip microcomputer detects the timing setting of the button module input, and when the set opening time is reached, the single-chip output controls the time relay of the relay switch circuit to close, and the light source is turned on; when the light source timing reaches the set closing time, the single-chip microcomputer controls the time The relay opens and the light source turns off.

时间和温度的设限均由按键模块预先设定,所述的按键电路为按键开关与单片机I/O口连接,包括(1)设定开关灯定时模式选择按键,按键与单片机39引脚(P0.0)连接;(2)设定开灯定时按键,按键与单片机38引脚(P0.1)连接;(3)设定关灯定时按键,按键与单片机37引脚(P0.2)连接;(4)设定温度上下限模式选择按键,按键与单片机36引脚(P0.3)连接;(5)设定温度上限按键,按键与单片机35引脚(P0.4)连接;(6)设定温度下限按键,按键与单片机34引脚(P0.5)连接;(7)有无/无人状态模式选择按键,按键与单片机33引脚(P0.6)连接;(8)复位,按键与单片机9引脚(RST)连接。The limit of time and temperature is all pre-set by the key module, and the key circuit is that the key switch is connected with the I/O port of the single-chip microcomputer, including (1) setting the switch light timing mode selection key, the key and the 39 pins of the single-chip microcomputer (P0.0) connection; (2) Set the timing button for turning on the light, which is connected to the 38-pin (P0.1) of the single-chip microcomputer; (3) Set the timing button for turning off the light, and the button is connected to the 37-pin (P0.2) of the single-chip microcomputer ) connection; (4) set the temperature upper and lower limit mode selection button, the button is connected with the 36-pin (P0.3) of the single-chip microcomputer; (5) set the temperature upper limit button, and the button is connected with the 35-pin (P0.4) of the single-chip microcomputer; (6) set the temperature lower limit button, the button is connected with the 34-pin (P0.5) of the single-chip microcomputer; (7) the selection button of the presence/absence state mode, the button is connected with the 33-pin (P0.6) of the single-chip microcomputer; (8 ) reset, and the button is connected to pin 9 (RST) of the microcontroller.

本发明采用单片机的作为控制模块,电路结构简单,控制更加效率,占用空间小,可实现温控和定时开关;能够实现多功能和低功耗的状态切换,更加省电。The invention adopts a single-chip microcomputer as a control module, has a simple circuit structure, more efficient control, takes up less space, can realize temperature control and timing switch, can realize multi-function and low power consumption state switching, and saves more power.

以上所述,仅为本发明较佳的具体实施方式,但本发明的保护范围并不局限于此,凡在本发明的精神和原则之内所作的任何修改、等同替换和改进等,均应包含在本发明的保护范围之内。The above is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto, and any modifications, equivalent replacements and improvements made within the spirit and principles of the present invention shall be Included within the protection scope of the present invention.

Claims (10)

1. a kind of intelligent switch, it is characterised in that including respectively with monolithic mechatronics for Time Calculation clock circuit, For showing that numeral method module, temperature collect module, the bell circuit of temperature over-range, the function of time select defeated with parameter Key-press module, the relay switch circuit of control apparatus switch and the system entered resets the reset circuit resetted.
2. a kind of intelligent switch according to claim 1, it is characterised in that the model AT89C51 of described single-chip microcomputer, General 8 central processing units and ISP are integrated with compatibility standard MCS-51 instruction systems and 80C51 pin configurations, chip Flash memory cell.
3. a kind of intelligent switch according to claim 1, it is characterised in that described key circuit is key switch and list The connection of I/O mouthfuls of piece machine, including configuration switch lamp timing mode selection key, setting turn on light regularly button, setting turn off the light timing by Key, design temperature bound mode selection button, design temperature upper limit button, design temperature lower limit button, someone/unmanned state Mode selection button and reset key.
4. a kind of intelligent switch according to claim 1, it is characterised in that described clock circuit is to include a crystal oscillator With the oscillating circuit of two electric capacity compositions, two described electric capacity are connected in parallel on two terminals that crystal oscillator is connected with single-chip microcomputer respectively; Clock circuit controls the numeral method module output display time by single-chip microcomputer.
5. a kind of intelligent switch according to claim 4, it is characterised in that numeral method module can also output display temperature Degree, the temperature information for receiving temperature collect module collection by single-chip microcomputer controls numeral method module to export.
6. a kind of intelligent switch according to claim 1, it is characterised in that described numeral method module and single-chip microcomputer Connected using Dynamic Announce interface.
7. a kind of intelligent switch according to claim 1, it is characterised in that described temperature collection circuit is used DS18B20 digital transducers, its I/O interfaces data wire is connected with single-chip processor i/o interface.
8. a kind of intelligent switch according to claim 1, it is characterised in that described relay switch circuit include temperature after Electrical equipment and the time relay, the temperature conditionss control air-conditioning that described temperature relay is set by single-chip microcomputer according to key-press module are opened Close, the timing controlled lamp source that the time relay is set by single-chip microcomputer according to key-press module is switched.
9. a kind of intelligent switch according to claim 1, it is characterised in that described reset circuit includes electric capacity, ground connection Resistance, series resistance and reset key, described series resistance are in parallel with electric capacity after being connected with reset key.
10. a kind of intelligent switch according to claim any one of 1-9, it is characterised in that the controlling party of the intelligent switch Method step is:
1) intelligent switch, is started, system is initially set to unmanned state, and single-chip microcomputer and clock circuit start, numeral method mould Block shows the time, and other circuits and module are in a dormant state;Push button " someone/nobody state setting " function of module Button, is set as someone's state, and all circuits and module start, and carry out temperature control and timing controlled;
2), temperature control:Temperature collect module starts, and gathers environment temperature, and the temperature range inputted according to key-press module judges, When temperature is higher than design temperature scope, single-chip microcomputer control bell circuit starts jingle bell once, while controlling relay switch circuit Temperature relay is closed, starting of air conditioner;When environment temperature is less than design temperature scope, single-chip microcomputer control temperature relay breaks Open, air-conditioning is closed;
3), timing controlled:The time set of monolithic machine testing key-press module input, reaches setting opening time, single-chip microcomputer output The time relay closure of relay switch circuit is controlled, lamp source is opened;When lamp source timing reaches the setting shut-in time, single-chip microcomputer control The time relay processed is disconnected, and lamp source is closed.
CN201710390484.9A 2017-05-27 2017-05-27 A kind of intelligent switch Pending CN107153379A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710390484.9A CN107153379A (en) 2017-05-27 2017-05-27 A kind of intelligent switch

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710390484.9A CN107153379A (en) 2017-05-27 2017-05-27 A kind of intelligent switch

Publications (1)

Publication Number Publication Date
CN107153379A true CN107153379A (en) 2017-09-12

Family

ID=59793910

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710390484.9A Pending CN107153379A (en) 2017-05-27 2017-05-27 A kind of intelligent switch

Country Status (1)

Country Link
CN (1) CN107153379A (en)

Citations (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN2881805Y (en) * 2005-10-28 2007-03-21 北京联合大学 Smart access control system
CN201035663Y (en) * 2007-05-17 2008-03-12 孙肖 Novel doorbell
CN201875839U (en) * 2010-12-01 2011-06-22 广东美的制冷设备有限公司 Time switch system of air conditioner
CN201886306U (en) * 2010-11-08 2011-06-29 郑州市锦飞汽车电气系统有限公司 Central on-off control device for automobile air conditioner
CN202159268U (en) * 2011-07-22 2012-03-07 江苏省精创电气股份有限公司 Communication parameter setting device of temperature controller
CN102540943A (en) * 2012-01-09 2012-07-04 昌奎 Multifunctional intelligent switch
CN202794914U (en) * 2012-04-28 2013-03-13 吴起林 Novel multifunctional switch controller
CN202794937U (en) * 2012-09-27 2013-03-13 长沙东申电器有限公司 Warmer intelligent switch
CN103226347A (en) * 2013-03-22 2013-07-31 中感科技有限公司 Personalized switch device and control method thereof
CN103955156A (en) * 2014-05-09 2014-07-30 武汉大学 Intelligent lamplight antitheft control system
CN104423297A (en) * 2013-09-10 2015-03-18 李竹君 Pyroelectric infrared energy-saving intelligent switching device and switching control method
CN204229218U (en) * 2014-12-10 2015-03-25 广西职业技术学院 A kind of home intelligent switching system based on wireless network
CN205003502U (en) * 2015-09-10 2016-01-27 上海电器科学研究院 Wireless Intelligence flush mounting plate of switch with timing holding function
CN105676748A (en) * 2016-03-25 2016-06-15 中建安装工程有限公司 Wireless socket control system
CN205425292U (en) * 2015-11-09 2016-08-03 金德奎 Infrared both -way communication intelligence air conditioning system
CN106154910A (en) * 2016-06-28 2016-11-23 王玉华 A kind of intelligent switch system
CN106444477A (en) * 2016-08-29 2017-02-22 杭州鸿雁智能科技有限公司 Multipurpose intelligent switch
CN106681215A (en) * 2017-01-09 2017-05-17 天津易卡科技有限公司 Intelligent switching control system
CN206788613U (en) * 2017-05-27 2017-12-22 广东技术师范学院 A kind of intelligent switch

Patent Citations (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN2881805Y (en) * 2005-10-28 2007-03-21 北京联合大学 Smart access control system
CN201035663Y (en) * 2007-05-17 2008-03-12 孙肖 Novel doorbell
CN201886306U (en) * 2010-11-08 2011-06-29 郑州市锦飞汽车电气系统有限公司 Central on-off control device for automobile air conditioner
CN201875839U (en) * 2010-12-01 2011-06-22 广东美的制冷设备有限公司 Time switch system of air conditioner
CN202159268U (en) * 2011-07-22 2012-03-07 江苏省精创电气股份有限公司 Communication parameter setting device of temperature controller
CN102540943A (en) * 2012-01-09 2012-07-04 昌奎 Multifunctional intelligent switch
CN202794914U (en) * 2012-04-28 2013-03-13 吴起林 Novel multifunctional switch controller
CN202794937U (en) * 2012-09-27 2013-03-13 长沙东申电器有限公司 Warmer intelligent switch
CN103226347A (en) * 2013-03-22 2013-07-31 中感科技有限公司 Personalized switch device and control method thereof
CN104423297A (en) * 2013-09-10 2015-03-18 李竹君 Pyroelectric infrared energy-saving intelligent switching device and switching control method
CN103955156A (en) * 2014-05-09 2014-07-30 武汉大学 Intelligent lamplight antitheft control system
CN204229218U (en) * 2014-12-10 2015-03-25 广西职业技术学院 A kind of home intelligent switching system based on wireless network
CN205003502U (en) * 2015-09-10 2016-01-27 上海电器科学研究院 Wireless Intelligence flush mounting plate of switch with timing holding function
CN205425292U (en) * 2015-11-09 2016-08-03 金德奎 Infrared both -way communication intelligence air conditioning system
CN105676748A (en) * 2016-03-25 2016-06-15 中建安装工程有限公司 Wireless socket control system
CN106154910A (en) * 2016-06-28 2016-11-23 王玉华 A kind of intelligent switch system
CN106444477A (en) * 2016-08-29 2017-02-22 杭州鸿雁智能科技有限公司 Multipurpose intelligent switch
CN106681215A (en) * 2017-01-09 2017-05-17 天津易卡科技有限公司 Intelligent switching control system
CN206788613U (en) * 2017-05-27 2017-12-22 广东技术师范学院 A kind of intelligent switch

Similar Documents

Publication Publication Date Title
CN105040377A (en) Intelligent clothes hanger and work method of same
CN103425235A (en) Single chip microcomputer low power consumption standby circuit and control method
CN206788613U (en) A kind of intelligent switch
CN102662386A (en) Intelligent short message temperature switch with switchable control mode
CN103237125A (en) Method for configuring relations among sensors and controlled devices by aid of mobile phone
CN107153379A (en) A kind of intelligent switch
CN205809633U (en) Intelligent touch switch
CN215117293U (en) Temperature control circuit, temperature control device and electronic product
CN207424583U (en) A kind of switching on and shutting down management circuit and terminal
CN205540000U (en) Intelligent control system for household appliances
CN207232950U (en) Time-sharing multiplex is connected in series circuit
CN206348685U (en) A kind of intelligent environment monitoring system
CN204902284U (en) Solar water heater temperature controller based on WIFI
CN104536401A (en) Intelligent home control system based on GSM
CN204373229U (en) A kind of Intelligent warm air blower control circuit
CN202027411U (en) Intelligent electric kettle control device
CN206618995U (en) A kind of clothes hanger control system
CN207912531U (en) Window intelligent control equipment
CN206024208U (en) A kind of family's lamp intelligent switch device based on Internet of Things
CN212009351U (en) A smart home monitoring circuit
CN203848940U (en) Temperature top and bottom limitation alarm
CN202815628U (en) Multifunctional temperature measurement module
CN106766226A (en) Wireless water flow sensing unit circuit
CN202421884U (en) Soybean milk making circuit for soybean milk maker
CN206894612U (en) A key control circuit

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20170912