CN213423404U - Switch state detection circuit - Google Patents

Switch state detection circuit Download PDF

Info

Publication number
CN213423404U
CN213423404U CN202020978898.0U CN202020978898U CN213423404U CN 213423404 U CN213423404 U CN 213423404U CN 202020978898 U CN202020978898 U CN 202020978898U CN 213423404 U CN213423404 U CN 213423404U
Authority
CN
China
Prior art keywords
circuit
node
switch
diode
switching
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.)
Active
Application number
CN202020978898.0U
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.)
Shenzhen H&T Intelligent Control Co Ltd
Original Assignee
Shenzhen H&T Intelligent Control Co Ltd
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 Shenzhen H&T Intelligent Control Co Ltd filed Critical Shenzhen H&T Intelligent Control Co Ltd
Priority to CN202020978898.0U priority Critical patent/CN213423404U/en
Application granted granted Critical
Publication of CN213423404U publication Critical patent/CN213423404U/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Electronic Switches (AREA)

Abstract

The utility model discloses a switch state detection circuit, in this switch state detection circuit, rectifier circuit and switch circuit are connected, and the opto-coupler isolation circuit is connected with rectifier circuit, and control circuit and opto-coupler isolation circuit are connected, and switch circuit includes first switch state and second switch state, and when switch circuit was in first switch state, rectifier circuit was to alternating current half-wave rectification, output first detected signal, and the opto-coupler isolation circuit exported first square wave signal according to first detected signal; when the switching circuit is in a second switching state, the rectifying circuit performs full-wave rectification on the alternating current and outputs a second detection signal, and the optical coupling isolation circuit outputs a second square wave signal according to the second detection signal, wherein the frequency of the second square wave signal is different from that of the first square wave signal; when the control circuit receives the first square wave signal, the switching circuit is determined to be in the first switching state, and when the control circuit receives the second square wave signal, the switching circuit is determined to be in the second switching state. Through the mode, the switch state misjudgment can be prevented.

Description

Switch state detection circuit
Technical Field
The embodiment of the utility model provides a circuit protection technical field especially relates to a switch state detection circuit.
Background
In order to ensure the safety of the household electrical appliances, the state of the switch of the household electrical appliances is often required to be detected so as to accurately control the household electrical appliances.
At present, when detecting the state of a switch of a household appliance product, whether a square wave signal appears in a signal input to a controller is judged, if the square wave signal does not appear in the signal input to the controller, the state of the switch is determined to be a first switch state, and if the square wave signal appears in the signal input to the controller, the state of the switch is determined to be a second switch state. However, the inventor finds out in the process of realizing the utility model that: when the state of the switch is the first switch state, if the plug is continuously plugged, the signal input into the controller also generates a square wave signal, and based on the square wave signal, the state of the switch is determined by judging whether the square wave signal is generated in the signal input into the controller, so that the state of the switch is easily judged to be in the second switch state by mistake from being in the first switch state, and control errors are caused.
SUMMERY OF THE UTILITY MODEL
In order to solve the technical problem, the utility model discloses a technical scheme be: provided is a switch state detection circuit including:
a switching circuit comprising a first switching state and a second switching state for receiving alternating current when in the first switching state or in the second switching state;
the rectification circuit is connected with the switching circuit and used for performing half-wave rectification on the alternating current to output a first detection signal when the switching circuit is in the first switching state, and performing full-wave rectification on the alternating current to output a second detection signal when the switching circuit is in the second switching state;
the optical coupling isolation circuit is connected with the rectifying circuit and used for outputting a first square wave signal according to the first detection signal and outputting a second square wave signal according to the second detection signal, and the frequencies of the first square wave signal and the second square wave signal are different; and the number of the first and second groups,
and the control circuit is connected with the optical coupling isolation circuit and used for determining that the switching circuit is in the first switching state when receiving the first square wave signal and determining that the switching circuit is in the second switching state when receiving the second square wave signal.
Optionally, the switching circuit comprises: a first switch and a second switch;
the first end of the first switch is used for being connected with one end of an alternating current power supply, and the second end of the first switch is connected with a first node;
a first end of the second switch is connected with the first node, and a second end of the second switch is connected with the second node;
the first node and the second node are connected to the rectifying circuit.
Optionally, when the first switch is closed and the second switch is open, the switch circuit is in the first switch state;
the switching circuit is in the second switching state when the first switch and the second switch are both closed.
Optionally, the rectifier circuit comprises: a first diode, a second diode, a third diode and a fourth diode;
the cathode of the first diode is connected with the first node, and the anode of the first diode is connected with the third node;
the anode of the second diode is connected with the third node, and the cathode of the second diode is connected with the fourth node;
the anode of the third diode is connected with the fourth node, and the cathode of the third diode is connected with the fifth node;
the cathode of the fourth diode is connected with the fifth node, and the anode of the fourth diode is connected with the second node;
the third node and the fifth node are connected into the optical coupling isolation circuit;
and the fourth node is used for being connected with the other end of the alternating current power supply.
Optionally, the optical coupling isolation circuit comprises: the optical coupler, the sampling circuit and the first power supply;
a first input end of the optical coupler is connected with the fifth node, a second input end of the optical coupler is connected with the third node, an output end of the optical coupler is connected with an input end of the sampling circuit, an output end of the sampling circuit is connected with the control circuit, and a power supply end of the sampling circuit is connected with the first power supply;
when the first detection signal or the second detection signal meets the optical coupler on condition, the optical coupler works in an on state, the sampling circuit outputs a low level signal, when the first detection signal or the second detection signal does not meet the optical coupler on condition, the optical coupler works in an off state, and the sampling circuit outputs a high level signal.
Optionally, the optical coupler comprises: the photoelectric triode is close to the light emitting diode;
the anode of the light emitting diode of the optical coupler is connected with the fifth node, and the cathode of the light emitting diode of the optical coupler is connected with the third node;
the emitting electrode of the phototriode of the optical coupler is grounded, and the collecting electrode of the phototriode of the optical coupler is connected with the input end of the sampling circuit;
when the first detection signal or the second detection signal meets the optocoupler conduction condition, the light emitting diode emits light to enable the phototriode to be conducted, the input end of the sampling circuit is grounded, and a low level signal is output,
when the first detection signal or the second detection signal does not meet the optocoupler conduction condition, the light emitting diode does not emit light so as to cut off the phototriode, and the input end of the sampling circuit is connected to the first power supply to output a high level signal.
Optionally, the sampling circuit comprises: a first resistor;
a first end of the first resistor is connected with a sixth node, and a second end of the second resistor is connected with the first power supply;
and the sixth node is connected to the collector of the phototriode of the optocoupler, the control circuit and the ground.
Optionally, the sampling circuit further comprises: a first capacitor;
and the first end of the first capacitor is connected with the sixth node, and the second end of the first capacitor is grounded.
Optionally, the optical coupling isolation circuit further includes: a current limiting circuit;
and the first end of the current limiting circuit is connected with the fifth node, and the second end of the current limiting circuit is connected with the first input end of the optocoupler.
Optionally, the current limiting circuit comprises: a second resistor;
and the first end of the second resistor is connected with the fifth node, and the second end of the second resistor is connected with the first input end of the optocoupler.
The embodiment of the utility model provides a beneficial effect is: being different from the prior art, the embodiment of the utility model provides a switch state detection circuit, this switch state detection circuit includes switch circuit, rectifier circuit, opto-coupler isolation circuit and control circuit, and switch circuit includes first on-off state and second on-off state, and this switch circuit receives the alternating current when being in first on-off state or second on-off state; the rectification circuit is connected with the switching circuit, performs half-wave rectification on the alternating current to output a first detection signal when the switching circuit is in a first switching state, and performs full-wave rectification on the alternating current to output a second detection signal when the switching circuit is in a second switching state; the optical coupling isolation circuit is connected with the rectification circuit, the optical coupling isolation circuit can output a first square wave signal according to a first detection signal and output a second square wave signal according to a second detection signal, wherein, because the first detection signal is obtained through half-wave rectification and the second detection signal is obtained through full-wave rectification, the frequency of the first square wave signal output according to the first detection signal is different from the frequency of the second square wave signal output according to the second detection signal, based on the above, the control circuit can determine whether the type of the square wave signal is the first square wave signal or the second square wave signal according to the frequency of the square wave signal, if the square wave signal is the first square wave signal, the switching circuit is determined to be in the first switching state, if the square wave signal is the second square wave signal, the switching circuit is determined to be in the second switching state, namely, the utility model determines the state of the switching circuit according to the frequency of the square wave signal input into the control circuit, the situation of misjudgment caused by confusion with other signals is avoided, and the accuracy is improved.
Drawings
One or more embodiments are illustrated in drawings corresponding to, and not limiting to, the embodiments, in which elements having the same reference number designation may be represented as similar elements, unless specifically noted, the drawings in the figures are not to scale.
Fig. 1 is a schematic structural diagram of a switch state detection circuit according to an embodiment of the present invention;
FIG. 2 is a waveform diagram of an alternating current, a detection signal and a square wave signal;
fig. 3 is a schematic circuit diagram of a switch state detection circuit according to an embodiment of the present invention;
fig. 4 is a schematic circuit diagram of a switch state detection circuit according to another embodiment of the present invention;
fig. 5 is a schematic circuit diagram of a switch state detection circuit according to another embodiment of the present invention;
fig. 6 is a schematic circuit diagram of a switch state detection circuit according to another embodiment of the present invention;
fig. 7 is a schematic circuit diagram of a switch state detection circuit according to another embodiment of the present invention.
Detailed Description
In order to facilitate understanding of the present invention, the present invention will be described in more detail with reference to the accompanying drawings and specific embodiments. It will be understood that when an element is referred to as being "secured to" another element, it can be directly on the other element or intervening elements may also be present. When an element is referred to as being "connected" to another element, it can be directly connected to the other element or intervening elements may be present. The terms "vertical," "horizontal," "left," "right," and the like as used herein are for descriptive purposes only.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. The terminology used in the description of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used herein, the term "and/or" includes any and all combinations of one or more of the associated listed items.
Please refer to fig. 1, which is a schematic structural diagram of a switch state detection circuit according to an embodiment of the present invention, the switch state detection circuit includes a switch circuit 100, a rectifier circuit 200, an opto-isolator circuit 300 and a control circuit 400, the switch circuit 100 includes a first switch state and a second switch state, the switch circuit 100 is configured to receive an ac power when being in the first switch state or being in the second switch state; a rectifier circuit 200 is connected to the switching circuit 100, the rectifier circuit 200 being configured to perform half-wave rectification on the alternating current to output a first detection signal when the switching circuit 100 is in a first switching state, and perform full-wave rectification on the alternating current to output a second detection signal when the switching circuit 100 is in a second switching state; the optical coupling isolation circuit 300 is connected with the rectifying circuit 200, and the optical coupling isolation circuit 300 is used for outputting a first square wave signal according to a first detection signal and outputting a second square wave signal according to a second detection signal; the control circuit 400 is connected to the optical coupling isolation circuit 300, and the control circuit 400 is configured to determine that the switching circuit 100 is in the first switching state when receiving the first square wave signal, and determine that the switching circuit 100 is in the second switching state when receiving the second square wave signal.
Here, the first switch state and the second switch state may correspond to two switch positions of the household appliance product, respectively, and different switch positions may correspond to different functions or strengths. Whether the switching circuit 100 is specifically in the first switching state or the second switching state may depend on the specific control of the household appliance product by the user. The user can control the state of the switch circuit 100 by a switch device such as a knob switch of a household appliance.
Since the first detection signal is obtained by half-wave rectification and the second detection signal is obtained by full-wave rectification, the frequency of the first square wave signal output according to the first detection signal is different from the frequency of the second square wave signal output according to the second detection signal. Specifically, referring to fig. 2, when the alternating current is half-wave rectified, the period of the obtained first detection signal is identical to the period of the alternating current, and is T, and at this time, the period of the first square wave signal output based on the first detection signal is also T, so that the frequency of the first square wave signal is 1/T; when the alternating current is subjected to full-wave rectification, the period of the obtained second detection signal is half of the period of the alternating current and is T/2, and at this time, the period of the second square wave signal output based on the second detection signal is T/2, so that the frequency of the second square wave signal is 2/T, namely the frequency of the second square wave signal is 2 times of the frequency of the first square wave signal, and the frequencies of the second square wave signal and the first square wave signal are different.
Because the frequencies of the first square wave signal and the second square wave signal are different, the control circuit 400 can determine whether the type of the square wave signal is the first square wave signal or the second square wave signal according to the frequency of the received square wave signal, if the control circuit 400 determines that the type of the square wave signal is the first square wave signal according to the frequency of the square wave signal, it is determined that the switching circuit 100 is in the first switching state, and if the control circuit 400 determines that the type of the square wave signal is the second square wave signal according to the frequency of the square wave signal, it is determined that the switching circuit 100 is in the second switching state. That is, in the embodiment of the present invention, the state of the switching circuit 100 is determined according to the frequency of the square wave signal input to the control circuit 100, and when the state of the switching circuit 100 is determined according to the frequency of the square wave signal, different square wave signals are easily distinguished, so that the situation of erroneous judgment caused by confusion with other square wave signals can be avoided, and the accuracy is improved.
Specifically, referring to fig. 3, the switch circuit 100 includes: a first switch S1 and a second switch S2.
A first terminal of the first switch S1 is used to connect to one terminal of an ac power source, a second terminal of the first switch S1 is connected to a first node a, a first terminal of the second switch S2 is connected to a first node a, a second terminal of the second switch S2 is connected to a second node b, and the first node a and the second node b are connected to the rectifier circuit 200.
The first end of the first switch S1 can be used for connection to the live line end of the ac power supply and also can be used for connection to the neutral line end of the ac power supply. In an embodiment of the present invention, the first end of the first switch S1 is used for being connected to the live wire end of the ac power source.
When the first switch S1 is closed and the second switch S2 is open, the switching circuit 100 is in a first switching state; when the first switch S1 and the second switch S2 are both closed, the switch circuit 100 is in a second switch state.
The rectifier circuit 200 includes: a first diode D1, a second diode D2, a third diode D3, and a fourth diode D4.
The cathode of the first diode D1 is connected to the first node a, and the anode of the first diode D1 is connected to the third node c; the anode of the second diode D2 is connected to the third node c, and the cathode of the second diode D2 is connected to the fourth node D; the anode of the third diode D3 is connected to the fourth node D, and the cathode of the third diode D3 is connected to the fifth node e; the cathode of the fourth diode D4 is connected to the fifth node e, the anode of the fourth diode D4 is connected to the second node b, the third node c and the fifth node e are connected to the opto-isolator circuit 300, and the fourth node D is connected to the other end of the ac power supply.
When the first end of the first switch S1 is used for connecting with the live wire end of the ac power supply, the fourth node d is used for connecting with the neutral wire end of the ac power supply; the fourth node d is for connection to the live end of the ac power source when the first terminal of the first switch S1 is for connection to the neutral end of the ac power source. In an embodiment of the present invention, the fourth node d is used for being connected to the zero line end of the ac power supply.
It can be understood that, when the first switch S1 is closed and the second switch S2 is open, if the ac power is inputted to the switch state detection circuit in the forward direction, the ac power flows into the first diode D1 through the first switch S1 and the first node a, at this time, since the negative electrode of the first diode D1 is connected to the first node a, the first diode D1 is cut off in the reverse direction, the ac power cannot pass through the rectification circuit 200, and the rectification circuit 200 does not output voltage; if the ac power is reversely inputted to the switching state detecting circuit, the ac power flows into the second diode D2 and the third diode D3 through the fourth node D, at this time, since the cathode of the second diode D2 is connected to the fourth node D, the second diode D2 is reversely turned off, the anode of the third diode D3 is connected to the fourth node D, and the third diode D3 is forwardly turned on, the ac power flows to the fifth node e through the third diode D3, at this time, since the cathode of the fourth diode D4 is connected to the fifth node e, the fourth diode D4 is reversely turned off, the ac power flows to the opto-isolator circuit 300 through the fifth node e, and flows to the third node c through the opto-isolator circuit 300, at this time, since the anode of the first diode D1 is connected to the third node c, the first diode D1 is forwardly turned on, and the first diode D1 is forwardly turned on, and the ac power is supplied, The third diode D3, the optocoupler isolation circuit 300, the first diode D1 and the first switch S1 form a loop, and therefore, the rectifier circuit 200 has a voltage output. Since the rectifier circuit 200 has a voltage output only when the alternating current is input in the reverse direction and has no voltage output when the alternating current is input in the forward direction when the first switch S1 is closed and the second switch S2 is open, the rectifier circuit 200 performs half-wave rectification.
When the first switch S1 and the second switch S2 are both closed, if ac power is inputted to the switch state detection circuit in the forward direction, the ac power flows into the fourth diode D4 through the first switch S1, the second switch S2 and the second node b, at this time, since the anode of the fourth diode D4 is connected to the second node b and the fourth diode D4 is turned on in the forward direction, ac power flows to the fifth node e through the fourth diode D4, at this time, since the cathode of the third diode D3 is connected to the fifth node e and the third diode D3 is turned off in the reverse direction, ac power flows to the opto-isolator circuit 300 through the fifth node e and flows to the third node c through the opto-isolator circuit 300, at this time, since the anode of the second diode D2 is connected to the third node c, the second diode D2 is turned on in the forward direction, and after the second diode D2 is turned on in the forward direction, the ac power supply, the first switch S1, the second switch S2 and the second switch S2 are turned on, The fourth diode D4, the optocoupler isolation circuit 300 and the second diode D2 form a loop, so that the rectifying circuit 200 has a voltage output; if the ac power is reversely inputted to the switching state detecting circuit, the ac power flows into the second diode D2 and the third diode D3 through the fourth node D, at this time, since the cathode of the second diode D2 is connected to the fourth node D, the second diode D2 is reversely turned off, the anode of the third diode D3 is connected to the fourth node D, and the third diode D3 is forwardly turned on, the ac power flows to the fifth node e through the third diode D3, at this time, since the cathode of the fourth diode D4 is connected to the fifth node e, the fourth diode D4 is reversely turned off, the ac power flows to the opto-isolator circuit 300 through the fifth node e, and flows to the third node c through the opto-isolator circuit 300, at this time, since the anode of the first diode D1 is connected to the third node c, the first diode D1 is forwardly turned on, and the first diode D1 is forwardly turned on, and the ac power is supplied, The third diode D3, the optocoupler isolation circuit 300, the first diode D and the first switch S1 form a loop, so that the rectifier circuit 200 has a voltage output. Since the rectifier circuit 200 has a voltage output at both the forward input and the reverse input of the alternating current when both the first switch S1 and the second switch S2 are closed, the rectifier circuit 200 performs full-wave rectification.
The optical coupler isolation circuit 300 includes: an optical coupler U1, a sampling circuit 310, and a first power supply 320.
The first input end of the optical coupler U1 is connected with the fifth node e, the second input end of the optical coupler U1 is connected with the third node c, the output end of the optical coupler U1 is connected with the input end of the sampling circuit 310, the output end of the sampling circuit 310 is connected with the control circuit 400, and the power supply end of the sampling circuit 310 is connected with the first power supply 320.
It can be understood that, in the optical coupler isolation circuit 300, when the first detection signal or the second detection signal satisfies the optical coupler on condition, the optical coupler U1 operates in the on state, and the sampling circuit 310 outputs a low-level signal, and when the first detection signal or the second detection signal does not satisfy the optical coupler on condition, the optical coupler U1 operates in the off state, and the sampling circuit 310 outputs a high-level signal.
Specifically, when the rectifying circuit 200 outputs the first detection signal to the optical coupler isolation circuit 300, if the first detection signal satisfies the optical coupler on condition, the optical coupler U1 works in an on state, the sampling circuit 310 outputs a low level signal, if the first detection signal does not satisfy the optical coupler on condition, the optical coupler U1 works in an off state, the sampling circuit 310 outputs a high level signal, and at this time, the low level signal and the high level signal output by the sampling circuit 310 form a first square wave signal.
If the first detection signal is greater than the optocoupler conduction threshold, it is determined that the first detection signal meets the optocoupler conduction condition, and if not, it is determined that the first detection signal does not meet the optocoupler conduction condition (as shown in fig. 2 (a)).
When the rectifying circuit 200 outputs the second detection signal to the optical coupling isolation circuit 300, if the second detection signal meets the optical coupling on condition, the optical coupling U1 works in the on state, the sampling circuit 310 outputs a low level signal, if the second detection signal does not meet the optical coupling on condition, the optical coupling U1 works in the off state, the sampling circuit 310 outputs a high level signal, and at this time, the low level signal and the high level signal output by the sampling circuit 310 form a second square wave signal.
If the second detection signal is greater than the optocoupler conduction threshold, it is determined that the second detection signal satisfies the optocoupler conduction condition, and if not, it is determined that the second detection signal does not satisfy the optocoupler conduction condition (as shown in fig. 2 (b)).
Further, referring to fig. 4, the optical coupler U1 includes: the LED comprises a light emitting diode and a phototriode, wherein the phototriode is arranged close to the light emitting diode, when the light emitting diode emits light, the phototriode is conducted, and when the light emitting diode does not emit light, the phototriode is cut off.
The positive electrode of the light emitting diode of the optocoupler U1 is connected with the fifth node e, the negative electrode of the light emitting diode of the optocoupler U1 is connected with the third node c, the emitting electrode of the phototriode of the optocoupler U1 is grounded, and the collecting electrode of the phototriode of the optocoupler U1 is connected with the input end of the sampling circuit 310.
It can be understood that, when the first detection signal or the second detection signal satisfies the opto-coupler conduction condition, the light emitting diode emits light to turn on the phototransistor, at this time, the input end of the sampling circuit 310 is grounded, and the sampling circuit 310 outputs a low level signal; when the first detection signal or the second detection signal does not satisfy the optocoupler conduction condition, the light emitting diode does not emit light, so that the phototriode is cut off, at the moment, the input end of the sampling circuit 310 is connected to the first power supply 320, and the sampling circuit 310 outputs a high level signal.
The sampling circuit 310 includes: a first resistor R1.
The first end of the first resistor R1 is connected to a sixth node f, the second end of the first resistor R2 is connected to the first power source 320, and the sixth node f is connected to the collector of the phototransistor of the optocoupler U1, the control circuit 400 and ground.
Referring to fig. 5, in some embodiments, the sampling circuit 310 further includes: a first capacitor C1.
The first terminal of the first capacitor C1 is connected to the sixth node f, and the second terminal of the first capacitor C1 is grounded.
The first capacitor C1 is used for filtering the signal inputted to the control circuit 400 to prevent the interference signal from interfering with the control circuit 400.
Referring to fig. 6 and 7, in some embodiments, the optical coupler isolation circuit 300 further includes: and a current limiting circuit 330, wherein a first end of the current limiting circuit 330 is connected with the fifth node e, and a second end of the current limiting circuit 330 is connected with a first input end of the optocoupler U1, and is used for limiting the current of the input optocoupler U1 so as to prevent the current of the input optocoupler U1 from being too large and causing the damage of the optocoupler U1.
When the optocoupler U1 includes a light emitting diode and a phototransistor, the second end of the current limiting circuit 330 is connected to the first input end of the optocoupler U1, that is, to the anode of the light emitting diode of the optocoupler U1.
The current limiting circuit 330 includes: and a first end of the second resistor R2 is connected with the fifth node e, and a second end of the second resistor R2 is connected with a first input end of the optocoupler U1.
It is understood that when the optocoupler U1 includes a light emitting diode and a phototransistor, the second terminal of the second resistor R2 is connected to the anode of the light emitting diode of the optocoupler U1.
The control circuit 400 includes: a controller (not shown), which may be a general purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA), or a single chip, etc.
Preferably, in the embodiment of the present invention, the controller is a single chip microcomputer.
Wherein the controller is powered by an external power source.
It can be understood that, in the embodiment of the present invention, the control circuit 400 can determine whether the type of the square wave signal is the first square wave signal or the second square wave signal according to the frequency of the received square wave signal, if the control circuit 400 determines that the type of the square wave signal is the first square wave signal according to the frequency of the square wave signal, it is determined that the switch circuit 100 is in the first switch state, and if the control circuit 400 determines that the type of the square wave signal is the second square wave signal according to the frequency of the square wave signal, it is determined that the switch circuit 100 is in the second switch state. That is, in the embodiment of the present invention, the state of the switching circuit 100 is determined according to the frequency of the square wave signal input to the control circuit 100, and when the state of the switching circuit 100 is determined according to the frequency of the square wave signal, different square wave signals are easily distinguished, so that the situation of erroneous judgment caused by confusion with other square wave signals can be avoided, and the accuracy is improved.
Further, in some embodiments, the switch state detection circuit can also realize power-down restart security protection. Specifically, the control circuit 400 determines a state change sequence of the switching circuit 100 according to a frequency change sequence of the received square wave signal, and if the state change sequence of the switching circuit 100 is from a first switching state to a second switching state, it is determined that the switching circuit 100 is in the first switching state when the power failure is restarted, and the power failure restart safety requirement is met, and the control circuit 400 controls a product using the switching state detection circuit to operate; if the state change sequence of the switch circuit 100 is not from the first switch state to the second switch state, it is determined that the switch circuit 100 is not in the first switch state when the power failure restart occurs and does not meet the power failure restart safety requirement, and the control circuit 400 prohibits the product using the switch state detection circuit from running.
Further, in some embodiments, zero crossing detection can also be achieved by the switch state detection circuit. The control circuit 400 determines a zero crossing point according to the received second square wave signal, and specifically, the control circuit 400 determines a median of a rising edge time and a falling edge time of a high level of the second square wave signal as the zero crossing point. As shown in fig. 2(b), the high level rising edge time is t ', the high level falling edge time is t ", the median value of the high level rising edge time t' and the falling edge time t" is t1, and t1 is the zero-crossing point of the alternating current.
Because the period of the second square wave signal is half of the alternating current period, and each zero crossing point is positioned at the T/2 period of the alternating current, the zero crossing point can be determined according to the second square wave signal, the calculation is simple, and the zero crossing point can be determined accurately.
Through the switch state detection circuit, multiple functions such as switch state detection, power failure restart safety protection, zero crossing point detection and the like can be realized at the same time.
It should be noted that the preferred embodiments of the present invention are described in the specification and the drawings, but the present invention can be realized in many different forms, and is not limited to the embodiments described in the specification, and these embodiments are not provided as additional limitations to the present invention, and are provided for the purpose of making the understanding of the disclosure of the present invention more thorough and complete. Moreover, the above technical features are combined with each other to form various embodiments which are not listed above, and all the embodiments are regarded as the scope of the present invention; further, modifications and variations will occur to those skilled in the art in light of the foregoing description, and it is intended to cover all such modifications and variations as fall within the true spirit and scope of the invention as defined by the appended claims.

Claims (10)

1. A switch state detection circuit, comprising:
a switching circuit comprising a first switching state and a second switching state for receiving alternating current when in the first switching state or in the second switching state;
the rectification circuit is connected with the switching circuit and used for performing half-wave rectification on the alternating current to output a first detection signal when the switching circuit is in the first switching state, and performing full-wave rectification on the alternating current to output a second detection signal when the switching circuit is in the second switching state;
the optical coupling isolation circuit is connected with the rectifying circuit and used for outputting a first square wave signal according to the first detection signal and outputting a second square wave signal according to the second detection signal, and the frequencies of the first square wave signal and the second square wave signal are different; and the number of the first and second groups,
and the control circuit is connected with the optical coupling isolation circuit and used for determining that the switching circuit is in the first switching state when receiving the first square wave signal and determining that the switching circuit is in the second switching state when receiving the second square wave signal.
2. The switch state detection circuit according to claim 1, wherein the switch circuit comprises: a first switch and a second switch;
the first end of the first switch is used for being connected with one end of an alternating current power supply, and the second end of the first switch is connected with a first node;
a first end of the second switch is connected with the first node, and a second end of the second switch is connected with the second node;
the first node and the second node are connected to the rectifying circuit.
3. The switch state detection circuit of claim 2,
when the first switch is closed and the second switch is opened, the switch circuit is in the first switch state;
the switching circuit is in the second switching state when the first switch and the second switch are both closed.
4. The switching state detection circuit according to claim 2 or 3, wherein the rectifier circuit includes: a first diode, a second diode, a third diode and a fourth diode;
the cathode of the first diode is connected with the first node, and the anode of the first diode is connected with the third node;
the anode of the second diode is connected with the third node, and the cathode of the second diode is connected with the fourth node;
the anode of the third diode is connected with the fourth node, and the cathode of the third diode is connected with the fifth node;
the cathode of the fourth diode is connected with the fifth node, and the anode of the fourth diode is connected with the second node;
the third node and the fifth node are connected into the optical coupling isolation circuit;
and the fourth node is used for being connected with the other end of the alternating current power supply.
5. The switch state detection circuit of claim 4, wherein the optical coupling isolation circuit comprises: the optical coupler, the sampling circuit and the first power supply;
a first input end of the optical coupler is connected with the fifth node, a second input end of the optical coupler is connected with the third node, an output end of the optical coupler is connected with an input end of the sampling circuit, an output end of the sampling circuit is connected with the control circuit, and a power supply end of the sampling circuit is connected with the first power supply;
when the first detection signal or the second detection signal meets the optical coupler on condition, the optical coupler works in an on state, the sampling circuit outputs a low level signal, when the first detection signal or the second detection signal does not meet the optical coupler on condition, the optical coupler works in an off state, and the sampling circuit outputs a high level signal.
6. The switch state detection circuit of claim 5, wherein the optocoupler comprises: the photoelectric triode is close to the light emitting diode;
the anode of the light emitting diode of the optical coupler is connected with the fifth node, and the cathode of the light emitting diode of the optical coupler is connected with the third node;
the emitting electrode of the phototriode of the optical coupler is grounded, and the collecting electrode of the phototriode of the optical coupler is connected with the input end of the sampling circuit;
when the first detection signal or the second detection signal meets the optocoupler conduction condition, the light emitting diode emits light to enable the phototriode to be conducted, the input end of the sampling circuit is grounded, and a low level signal is output,
when the first detection signal or the second detection signal does not meet the optocoupler conduction condition, the light emitting diode does not emit light so as to cut off the phototriode, and the input end of the sampling circuit is connected to the first power supply to output a high level signal.
7. The switch state detection circuit of claim 6, wherein the sampling circuit comprises: a first resistor;
a first end of the first resistor is connected with a sixth node, and a second end of the first resistor is connected with the first power supply;
and the sixth node is connected to the collector of the phototriode of the optocoupler, the control circuit and the ground.
8. The switch state detection circuit of claim 7, wherein the sampling circuit further comprises: a first capacitor;
and the first end of the first capacitor is connected with the sixth node, and the second end of the first capacitor is grounded.
9. The switch state detection circuit according to any one of claims 5 to 8, wherein the optical coupling isolation circuit further comprises: a current limiting circuit;
and the first end of the current limiting circuit is connected with the fifth node, and the second end of the current limiting circuit is connected with the first input end of the optocoupler.
10. The switch state detection circuit of claim 9, wherein the current limit circuit comprises: a second resistor;
and the first end of the second resistor is connected with the fifth node, and the second end of the second resistor is connected with the first input end of the optocoupler.
CN202020978898.0U 2020-06-01 2020-06-01 Switch state detection circuit Active CN213423404U (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202020978898.0U CN213423404U (en) 2020-06-01 2020-06-01 Switch state detection circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202020978898.0U CN213423404U (en) 2020-06-01 2020-06-01 Switch state detection circuit

Publications (1)

Publication Number Publication Date
CN213423404U true CN213423404U (en) 2021-06-11

Family

ID=76224582

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202020978898.0U Active CN213423404U (en) 2020-06-01 2020-06-01 Switch state detection circuit

Country Status (1)

Country Link
CN (1) CN213423404U (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114184827A (en) * 2021-10-19 2022-03-15 深圳拓邦股份有限公司 Alternating current flash detection circuit and intelligent switch

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114184827A (en) * 2021-10-19 2022-03-15 深圳拓邦股份有限公司 Alternating current flash detection circuit and intelligent switch

Similar Documents

Publication Publication Date Title
CN107664969B (en) Intelligent double-control switch and control system and the control method of control system work
WO2015184832A1 (en) Alternating current detection circuit
CN103063979B (en) Load open-circuit detection circuit
CN110109403B (en) Double-control switch
CN103675424B (en) Zero passage and standby zero-power-consumption key press detecting circuit, washing machine
CN212364414U (en) Zero-crossing detection circuit and system thereof
CN102426302A (en) Three-phase power input open-phase detection circuit
CN106841762A (en) Zero cross detection circuit and home appliance
CN214473595U (en) Detection circuit and household appliance
CN101995548A (en) Circuit breaker locator
US9742128B2 (en) Smart plug having plug blade detection
CN213423404U (en) Switch state detection circuit
CN101995515A (en) Ac voltage phase discriminator for circuit breaker locators
CN205483168U (en) Water level detection circuit and electric rice cooker
CN103852676A (en) Passive contact detection device and method
CN207218658U (en) A kind of wireless intelligent device based on conventional mechanical switch
CN218630128U (en) Zero-crossing detection circuit
CN214013869U (en) Reliable single-phase wiring detection circuit of commercial power
CN105067884A (en) Three-phase alternating-current supply phase detection circuit
CN211086562U (en) Commercial power ground wire connectivity detection circuit and device
CN211043504U (en) Energy metering device
WO2017089120A1 (en) A driver circuit
CN208636374U (en) A kind of a-c cycle detection circuit
CN218331733U (en) Power-on state detection circuit and electronic equipment
JP5601490B2 (en) AC voltage disconnection detection circuit and power supply device

Legal Events

Date Code Title Description
GR01 Patent grant
GR01 Patent grant