A state detection circuit and system
By introducing a constant voltage source and MCU into the state detection circuit, and using the coordination of the regulation circuit and the detection module, the problem of misjudgment when the LED current is low is solved, and more accurate state detection is achieved.
Patent Information
- Application Number
- CN202010786889.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-08-07
- Publication Date
- 2025-06-03
- Estimated Expiration
- 2040-08-07
AI Technical Summary
In the prior art, when the current of the LED is small, the detection circuit may have a problem of misjudging the LED state.
A state detection circuit is adopted, including a constant voltage source, a control circuit, a driving signal source, a detection module and a MCU. The control circuit enables on and off based on the pulse signal sent by the driving signal source. The detection module is connected to the MCU, and the MCU judges the status of the device to be detected based on the received signal type.
Even when the current is low, the MCU can accurately receive the signal, thereby more accurately determining the status of the device to be detected and avoiding misjudgment.
Smart Images

Figure CN111766501B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of status detection, and more specifically, to a status detection circuit and system. Background Art
[0002] For light-emitting devices such as LEDs (Light Emitting Diodes), during use, it is necessary to detect whether there are faults such as open circuits.
[0003] The current detection method generally is: through a current sampling circuit, the current passing through a sampling resistor is converted into a voltage signal, and after the voltage signal is filtered, it is input to the negative terminal of a comparator. After the comparator compares the voltage signal at the negative terminal with the reference voltage at the positive terminal, the comparison result is output to the MCU (Microcontroller Unit), so that the MCU determines the status of the LED.
[0004] However, the voltage signal of the sampling resistor changes with the magnitude of the current. When the current is small, for example, when the current is only 0.1% of the maximum current, the voltage of the sampling resistor is also very small, which may cause misjudgment by the MCU.
[0005] In summary, when the current of the LED is small, the existing detection circuit may have the problem of misjudging the status of the LED. Summary of the Invention
[0006] The purpose of this application is to provide a status detection circuit and system to solve the problem that when the current of the LED is small in the prior art, the detection circuit may misjudge the status of the LED.
[0007] To achieve the above purpose, the technical solutions adopted in the embodiments of this application are as follows:
[0008] On the one hand, an embodiment of the present application provides a state detection circuit. The circuit includes a constant voltage source, a regulation circuit, a drive signal source, a detection module, and an MCU. The constant voltage source, the regulation circuit, and the detection module are all electrically connected to a device to be detected. The regulation circuit and the detection module are grounded. The constant voltage source is used to supply power to the regulation circuit and the detection module, and the regulation circuit is also electrically connected to the drive signal source. The detection module is electrically connected to the MCU. Among them, the regulation circuit is used to achieve conduction and disconnection according to the pulse signal sent by the drive signal source in each cycle. When the device to be detected is in an online state and the regulation circuit is conducting, the detection module is in a first state, so that the MCU receives a first signal. When the device to be detected is in an online state and the regulation circuit is disconnected, the detection module is in a second state, so that the MCU receives a second signal. When the device to be detected is in an offline state, the detection module is always in the first state, so that the MCU continuously receives the first signal. The MCU is used to determine that the device to be detected is in an online state when receiving the first signal and the second signal in each cycle. When only the first signal is received in each cycle, it is determined that the device to be detected is in an offline state.
[0009] Optionally, the detection module includes a voltage dividing component. One end of the voltage dividing component is electrically connected to the device to be detected, the other end is grounded, and the voltage dividing component is also electrically connected to the MCU. Among them, when the detection module is in the first state, the MCU receives a low-level signal. When the detection module is in the second state, the MCU receives a high-level signal.
[0010] Optionally, the voltage dividing component includes a first resistor and a voltage stabilizing diode. One end of the first resistor is electrically connected to the device to be detected, the other end of the first resistor is respectively electrically connected to the cathode of the voltage stabilizing diode and the MCU, and the anode of the voltage stabilizing diode is grounded. The MCU is used to judge whether the device to be detected is in an online state or an offline state according to the number of rising edges or falling edges of the signal received per unit time.
[0011] Optionally, the detection module includes a voltage dividing component, a first switching tube, and a detection power supply. One end of the voltage dividing component is electrically connected to the device to be detected, the other end is grounded, the first end of the first switching tube is electrically connected to the voltage dividing component, the second end of the first switching tube is grounded, and the third end of the first switching tube is respectively electrically connected to the detection power supply and the MCU. When the detection module is in the first state, the first switching tube is cut off, so that the MCU receives a high-level signal. When the detection module is in the second state, the first switching tube is turned on, so that the MCU receives a low-level signal.
[0012] Optionally, the voltage dividing component includes a first resistor and a second resistor. One end of the first resistor is electrically connected to the device to be detected, and the other end of the first resistor is respectively electrically connected to one end of the second resistor and the first end of the first switching tube. The other end of the second resistor is grounded. The MCU is configured to determine whether the device to be detected is in an online state or an offline state according to the number of rising edges or falling edges of the pulse signals received within a unit time.
[0013] Optionally, the first switching tube includes a triode and a MOS tube.
[0014] Optionally, the state detection circuit further includes a pull-up resistor. One end of the pull-up resistor is electrically connected to the detection power supply, and the other end of the pull-up resistor is respectively electrically connected to the third end of the first switching tube and the MCU.
[0015] Optionally, the regulation circuit includes a second switching tube and a bias resistor component. The first end of the second switching tube is electrically connected to the drive signal source through the bias resistor component, the second end of the second switching tube is grounded through the bias resistor component, and the third end of the second switching tube is electrically connected to the device to be detected. The drive signal source is configured to control the second switching tube to be in a conducting state or a cutoff state, so that the regulation circuit is in a conducting state or a cutoff state.
[0016] Optionally, the bias resistor component includes a third resistor, a fourth resistor, and a fifth resistor. The third resistor is respectively electrically connected to the drive signal source and the first end of the second switching tube. The fourth resistor is respectively electrically connected to the first end and the second end of the second switching tube. One end of the fifth resistor is electrically connected to the second end of the second switching tube, and the other end of the fifth resistor is grounded.
[0017] On the other hand, an embodiment of the present application provides a state detection system, which includes a device to be detected and the above-mentioned state detection circuit. The device to be detected is electrically connected to the state detection circuit, and the state detection circuit is configured to detect whether the device to be detected is in an online state or an offline state.
[0018] Compared with the prior art, the present application has the following beneficial effects:
[0019] A state detection circuit and system provided by an embodiment of the present application. The state detection circuit includes a constant voltage source, a regulation circuit, a drive signal source, a detection module, and an MCU. The constant voltage source, the regulation circuit, and the detection module are all electrically connected to a device to be detected. The regulation circuit and the detection module are grounded. The constant voltage source is used to supply power to the regulation circuit and the detection module, and the regulation circuit is also electrically connected to the drive signal source. The detection module is electrically connected to the MCU. Among them, the regulation circuit is used to achieve conduction and disconnection according to the pulse signal sent by the drive signal source in each cycle. When the device to be detected is in the online state and the regulation circuit is conducting, the detection module is in the first state, so that the MCU receives the first signal. When the device to be detected is in the online state and the regulation circuit is disconnected, the detection module is in the second state, so that the MCU receives the second signal. When the device to be detected is in the offline state, the detection module is always in the first state, so that the MCU continuously receives the first signal. The MCU is used to determine that the device to be detected is in the online state when receiving the first signal and the second signal in each cycle. When only the first signal is received in each cycle, it is determined that the device to be detected is in the offline state. Since the present application uses a constant voltage source for power supply and changes the traditional method of using a comparator for signal judgment to a method of using the signals received by the MCU in the cycle for judgment, even when the current is low, the MCU can receive the signal, so that the state of the device to be detected can be judged more accurately.
[0020] To make the above objects, features, and advantages of the present application more obvious and understandable, the following specifically enumerates preferred embodiments and, in conjunction with the accompanying drawings, makes the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] To more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the drawings required for use in the embodiments. It should be understood that the following drawings only show some embodiments of the present application, so they should not be regarded as limiting the scope. For those of ordinary skill in the art, other related drawings can be obtained based on these drawings without creative efforts.
[0022] Figure 1 It is a circuit diagram of a state detection circuit in the prior art provided by an embodiment of the present application.
[0023] Figure 2 It is a circuit diagram of the first state detection circuit provided by an embodiment of the present application.
[0024] Figure 3 It is a circuit diagram of the second state detection circuit provided by an embodiment of the present application.
[0025] Figure 4 It is a circuit diagram of the third state detection circuit provided by an embodiment of the present application.
[0026] In the figure: 100 - status detection circuit; 110 - constant voltage source; 120 - regulation circuit; 130 - drive signal source; 140 - detection module; 150 - MCU; 121 - bias resistor assembly; 141 - voltage division assembly; R1 - first resistor; R2 - second resistor; R3 - third resistor; R4 - fourth resistor; R5 - fifth resistor; Q1 - first switching transistor; Q2 - second switching transistor; DZ1 - zener diode. Detailed implementation manners
[0027] To make the objectives, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are some, but not all, of the embodiments of the present application. Components of the embodiments of the present application usually described and illustrated in the accompanying drawings here can be arranged and designed in various different configurations.
[0028] Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the present application claimed, but merely represents selected embodiments of the present application. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present application without creative efforts shall fall within the scope of protection of the present application.
[0029] It should be noted that like reference numerals and letters denote like items in the following drawings. Therefore, once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. At the same time, in the description of the present application, terms such as "first", "second", etc. are only used for differential description and cannot be construed as indicating or implying relative importance.
[0030] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or sequence between these entities or operations. Moreover, the term "comprising", "including" or any other variant thereof is intended to cover a non - exclusive inclusion, such that a process, method, article or device comprising a series of elements includes not only those elements, but also other elements not expressly listed, or elements inherent to such process, method, article or device. Without further limitation, an element defined by the phrase "comprising a..." does not exclude the existence of additional identical elements in the process, method, article or device comprising the element.
[0031] In the description of the present application, it should be noted that the orientation or positional relationship indicated by the terms "upper", "lower", "inner", "outer", etc. is based on the orientation or positional relationship shown in the drawings, or the orientation or positional relationship in which the product of this application is usually placed during use. It is only for the convenience of describing the present application and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be construed as a limitation to the present application.
[0032] In the description of the present application, it should also be noted that unless otherwise clearly specified and limited, the terms "set" and "connect" should be understood in a broad sense. For example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be directly connected or indirectly connected through an intermediate medium, and it can be the communication inside two elements. For those of ordinary skill in the art, the specific meanings of the above terms in the present application can be understood according to specific situations.
[0033] The following will describe in detail some embodiments of the present application with reference to the drawings. Without conflict, the following embodiments and the features in the embodiments can be combined with each other.
[0034] Please refer to Figure 1 , Figure 1 which shows the circuit diagram of the state detection circuit in the prior art. As described in the background art, the working principle of the existing state detection circuit is as follows: through the current sampling circuit, the current passing through the sampling resistor is converted into a voltage signal, and after the voltage signal is filtered, it is input to the negative terminal of the comparator. After the comparator compares the voltage signal at the negative terminal with the reference voltage at the positive terminal, the comparison result is output to the MCU (Microcontroller Unit), so that the MCU can determine the state of the LED.
[0035] Among them, the MCU can send a drive signal to the switching transistor Q2. When there is a load connected to the output terminal and the switching transistor Q2 is turned on, the switching transistor Q2 will output a current. This current flows through the sampling resistor R13 and becomes a voltage signal at both ends of the resistor R13. This voltage signal (the signal at point A) is filtered and then compared with the reference voltage (Vref) at the positive terminal of the comparator at the negative terminal. Then, the comparison result (the signal at point C) is given to the MCU, and the MCU judges the high and low levels of the signal at point C to determine whether there is an LED load at the output.
[0036] However, the magnitude of the signal at point A changes with the magnitude of the output current. When the output current is very small (for example, only 0.1% of the maximum current), the voltage across the sampling resistor is also very small. Therefore, the signal at point A is extremely small, and the detection circuit cannot identify the LED load. As a result, there will be a situation where the LED load is online, but the MCU determines that the LED load is offline, resulting in a misjudgment.
[0037] In view of this, to solve the above problems, the embodiments of the present application provide a status detection circuit, which realizes the status detection of the LED load by using the MCU to detect the type of signal received within a period.
[0038] The following is an exemplary description of the status detection circuit described in the present application:
[0039] As an implementation, please refer to Figure 2 , the status detection circuit 100 includes a constant voltage source 110, a regulation circuit 120, a drive signal source 130, a detection module 140, and an MCU 150. The constant voltage source 110, the regulation circuit 120, and the detection module 140 are all electrically connected to a device to be detected. The regulation circuit 120 and the detection module 140 are grounded. The constant voltage source 110 is used to supply power to the regulation circuit 120 and the detection module 140, and the regulation circuit 120 is also electrically connected to the drive signal source 130. The detection module 140 is electrically connected to the MCU 150.
[0040] Among them, the regulation circuit 120 is used to achieve conduction and disconnection according to the pulse signal sent by the drive signal source 130 in each period. When the device to be detected is in the online state and the regulation circuit 120 is conducting, the detection module 140 is in the first state, so that the MCU 150 receives the first signal. When the device to be detected is in the online state and the regulation circuit 120 is disconnected, the detection module 140 is in the second state, so that the MCU 150 receives the second signal. When the device to be detected is in the offline state, the detection module 140 is always in the first state, so that the MCU 150 continuously receives the first signal. The MCU 150 is used to determine that the device to be detected is in the online state when receiving the first signal and the second signal in each period; when only receiving the first signal in each period, it is determined that the device to be detected is in the offline state.
[0041] Since the present application uses the constant voltage source 110 for power supply and changes the traditional method of using a comparator to judge signals to the method of using the MCU 150 to judge the type of signal received within a period, even when the current is low, the MCU 150 can receive signals, so that the status of the device to be detected can be judged more accurately.
[0042] It should be noted that the device to be detected described in this application includes devices such as LEDs. Of course, when it is necessary to detect the status of other devices, only need to electrically connect the other devices to the constant voltage source 110, the regulation circuit 120, and the detection module 140 described in this application. This application does not make any limitations in this regard.
[0043] It should also be noted that the status described in this application includes the online status and the offline status. Among them, the online status means that the device to be detected is installed on the status detection circuit 100 and is stably electrically connected to the constant voltage source 110, the regulation circuit 120, and the detection module 140. At the same time, the device to be detected is in a normal working state. The offline status means that there is no device to be detected installed on the status detection circuit 100, or there is a device to be detected installed on the status detection circuit 100, but the device to be detected is in an open circuit state due to reasons such as a fault.
[0044] As an implementation, the detection module 140 includes a voltage dividing component 141. One end of the voltage dividing component 141 is electrically connected to the device to be detected, the other end of the voltage dividing component 141 is grounded, and the voltage dividing component 141 is also electrically connected to the MCU 150.
[0045] When the device to be detected is in the online state, if the detection module 140 is in the first state at this time, it means that there is no voltage flowing through the detection module 140 or the flowing voltage is small. On this basis, the MCU 150 can only receive a low-level signal at this time. And if the detection module 140 is in the second state at this time, a loop is formed between the constant voltage source 110, the device to be detected, the detection module 140, and the ground. The detection module 140 and the device to be detected are voltage-divided, and then a high-level signal is output to the MCU 150. In other words, in this scenario, the first signal is a low-level signal and the second signal is a high-level signal. When the device to be detected is in the offline state, there is no voltage input to the detection module 140, and the signal received by the MCU 150 is always a low-level signal.
[0046] It can be seen from this that when the device to be detected is in the online state, since the drive signal source 130 sends a pulse signal to the regulation circuit 120 in each cycle, the regulation circuit 120 is periodically turned on and off, and then the detection module 140 can also be periodically turned off and on. Therefore, when the MCU 150 can receive changing high-level signals and low-level signals in each cycle, it means that the device to be detected is in a stable online state at this time. And when the device to be detected is in the offline state, the signal received by the MCU 150 is only a low-level signal.
[0047] To make the voltage input to the MCU 150 more stable, optionally, the voltage dividing component 141 includes a first resistor R1 and a voltage stabilizing diode DZ1. One end of the first resistor R1 is electrically connected to the device to be detected, and the other end of the first resistor R1 is respectively electrically connected to the cathode of the voltage stabilizing diode DZ1 and the MCU 150, and the anode of the voltage stabilizing diode DZ1 is grounded. Among them, the voltage stabilizing diode DZ1 utilizes the phenomenon that in the reverse breakdown state of the pn junction, its current can vary within a large range while the voltage remains basically unchanged, and is made into a voltage stabilizing diode. By setting the voltage stabilizing diode DZ1, the voltage value of the high-level signal input to the MCU 150 is always consistent. On this basis, when the device to be detected is in the online state, the signal received by the MCU 150 is actually a pulse signal. Of course, in some other embodiments, the signal received by the MCU 150 can also be a square wave signal. For example, the voltage dividing component 141 includes two resistors, and the voltage dividing effect is achieved through the two resistors.
[0048] Based on this, as an implementation manner, the MCU 150 can determine whether the signal it receives is a signal with alternating high and low levels by collecting the rising edge or falling edge of the pulse signal. Taking the falling edge of the pulse signal as an example for illustration, since there is at least one pulse in a cycle, when the device to be detected is in the online state, the MCU 150 can always detect the falling edge. Therefore, optionally, the MCU 150 can determine whether the device to be detected is in the online state or the offline state according to the number of rising edges or falling edges of the signal received per unit time. For example, when there are 10 pulses in 1S, theoretically the MCU 150 should detect 10 falling edges. If the MCU 150 does not detect the pulse signal at this time, it means that the MCU 150 continuously receives a low-level signal at this time, and it can be determined that the device to be detected is in the offline state.
[0049] As another implementation manner of the present application, please refer to Figure 3 , the detection module 140 includes a voltage dividing component 141, a first switching transistor Q1, and a detection power supply. One end of the voltage dividing component 141 is electrically connected to the device to be detected, and the other end is grounded. The first end of the first switching transistor Q1 is electrically connected to the voltage dividing component 141, the second end of the first switching transistor Q1 is grounded, and the third end of the first switching transistor Q1 is respectively electrically connected to the detection power supply and the MCU 150.
[0050] When the detection module 140 is in the first state, it means that there is no voltage flowing through the detection module 140 or the flowing voltage is small. On this basis, the first switching transistor Q1 is turned off, and at this time, the voltage of the detection power supply directly flows into the MCU 150, so that the MCU 150 receives a high-level signal.
[0051] When the detection module 140 is in the second state, a loop is formed among the constant voltage source 110, the device to be detected, the detection module 140, and the ground. Voltage division occurs between the detection module 140 and the device to be detected, causing the first switching transistor Q1 to conduct. Since the resistance of the first switching transistor Q1 is low when it conducts, it is equivalent to grounding the detection power supply, causing the MCU 150 to receive a low-level signal at this time. In other words, in this application scenario, the first signal is a low-level signal and the second signal is a high-level signal.
[0052] Among them, the first switching transistor Q1 described in this application can be a MOS transistor or a bipolar transistor, and this application does not make any limitation in this regard. For example, please refer to Figure 4 , Figure 4 where the first switching transistor Q1 is implemented by the bipolar transistor Q3. And when the first switching transistor Q1 is a bipolar transistor, this bipolar transistor is an N-type bipolar transistor. Among them, the base of the first bipolar transistor is electrically connected to the voltage division component 141, the collector is electrically connected to the detection power supply and the MCU 150 respectively, and the emitter is grounded.
[0053] As an implementation, the voltage division component 141 includes a first resistor R1 and a second resistor R2. One end of the first resistor R1 is electrically connected to the device to be detected, and the other end of the first resistor R1 is electrically connected to one end of the second resistor R2 and the first end of the first switching transistor Q1 respectively, and the other end of the second resistor R2 is grounded. Of course, in this implementation, the second bipolar transistor can also be replaced by a zener diode, and this application does not make any limitation in this regard.
[0054] Similar to the above implementation, in this implementation, the MCU 150 can determine whether the device to be detected is in an online state or an offline state according to the number of rising edges or falling edges of the pulse signal received per unit time. Among them, it is a prior art for the MCU 150 to determine the output signal according to the number of rising edges or falling edges of the pulse signal, and this application will not elaborate on this here.
[0055] As an implementation, the regulation circuit 120 includes a second switching transistor Q2 and a bias resistor component 121. The first end of the second switching transistor Q2 is electrically connected to the drive signal source 130 through the bias resistor component 121, the second end of the second switching transistor Q2 is grounded through the bias resistor component 121, and the third end of the second switching transistor Q2 is electrically connected to the device to be detected.
[0056] Among them, the second switching transistor Q2 provided in this application can be a MOS transistor or a bipolar transistor. After the drive signal source 130 issues a drive signal, it can control the second switching transistor Q2 to be in a conducting or non-conducting state, and further control the regulation circuit 120 to be in a conducting or non-conducting state.
[0057] Optionally, the bias resistor assembly 121 includes a third resistor R3, a fourth resistor R4, and a fifth resistor R5. The third resistor R3 is electrically connected to the driving signal source 130 and the first end of the second switching transistor Q2 respectively. The fourth resistor R4 is electrically connected to the first end and the second end of the second switching transistor Q2 respectively. One end of the fifth resistor R5 is electrically connected to the second end of the second switching transistor Q2, and the other end of the fifth resistor R5 is grounded.
[0058] By providing the regulation circuit 120, the current of the device to be detected can be adjusted. For example, when the device to be detected is an LED, the current of the LED can be adjusted by the regulation of the regulation circuit 120, and then its brightness can be adjusted. It should be noted that, in the present application, the method of adjusting the current is to adjust the duty cycle of the driving signal. Moreover, the duty cycle of the driving signal sent by the driving signal source 130 is 0.099% to 99.9%. It can be understood that when the duty cycle of the driving signal is 0.099%, it is the minimum output current, and when the duty cycle of the driving signal is 99.9%, it is the maximum output current.
[0059] Therefore, the signal actually sent by the driving signal source 130 is a pulse signal, which further controls the conduction and cutoff of the second switching transistor Q2. It should be noted that, in the present application, the resistance value of the fifth resistor R5 is small, and its magnitude is in the order of milliohms. Therefore, when the second switching transistor Q2 is conducting, the load is equivalently grounded. At this time, the detection module 140 is equivalently short-circuited and no voltage flows through it; while when the second switching transistor Q2 is cutoff, the detection module 140 and the device to be detected form a loop.
[0060] In summary, it can be understood that the working principle of the state detection circuit 100 provided by the present application is as follows:
[0061] When the device to be detected is in an online state, the driving signal source 130 outputs a pulse signal to drive the second switching transistor Q2. Under the action of the pulse signal, when it is at a high level, the second switching transistor Q2 conducts, so that no voltage flows through the detection module 140, and further the MCU 150 receives a first signal; when it is at a low level, the second switching transistor Q2 turns off, so that voltage flows through the detection module 140, and further the MCU 150 receives a second signal.
[0062] When the device to be detected is in an online state, the driving signal source 130 outputs a pulse signal to drive the second switching transistor Q2. However, no matter whether the second switching transistor Q2 is in a conducting state or a cutoff state, no current will flow through the detection module 140, and further the MCU 150 always receives a first signal.
[0063] After the MCU 150 receives the signal, by counting the number of rising edges or falling edges of the signal within a unit time and then comparing it with the standard number, the state of the device to be detected can be obtained.
[0064] Understandably, through the above circuit, even when the current flowing through the device to be detected is low, for example, when the duty cycle of the drive signal is 0.099%, the current flowing through the device to be detected is the smallest. At this time, since the drive signal is a pulse signal, the MCU 150 will still receive a high-level signal and a low-level signal within each cycle. Furthermore, the state of the device to be detected can still be determined by counting the number of rising edges or falling edges, and the accuracy of state detection is higher.
[0065] Based on the above embodiments, the present application further provides a state detection system. The state detection system includes a device to be detected and the state detection circuit 100 described in the first embodiment. The device to be detected is electrically connected to the state detection circuit 100, and the state detection circuit 100 is used to detect whether the device to be detected is in an online state or a dropped line state. Since the state detection circuit 100 has been described in detail in the first embodiment, it will not be elaborated in this embodiment.
[0066] In summary, the present application provides a state detection circuit and system. The state detection circuit includes a constant voltage source, a regulation circuit, a drive signal source, a detection module, and an MCU. The constant voltage source, the regulation circuit, and the detection module are all electrically connected to a device to be detected. The regulation circuit and the detection module are grounded. The constant voltage source is used to supply power to the regulation circuit and the detection module, and the regulation circuit is also electrically connected to the drive signal source. The detection module is electrically connected to the MCU. Among them, the regulation circuit is used to achieve conduction and disconnection according to the pulse signal sent by the drive signal source in each cycle. When the device to be detected is in an online state and the regulation circuit is conducting, the detection module is in a first state, so that the MCU receives a first signal. When the device to be detected is in an online state and the regulation circuit is disconnected, the detection module is in a second state, so that the MCU receives a second signal. When the device to be detected is in a dropped line state, the detection module is always in the first state, so that the MCU continuously receives the first signal. The MCU is used to determine that the device to be detected is in an online state when receiving the first signal and the second signal within each cycle. When only receiving the first signal within each cycle, it is determined that the device to be detected is in a dropped line state. Since the present application uses a constant voltage source for power supply and changes the traditional method of using a comparator to judge signals to a method of judging the signals received within a cycle by the MCU, even when the current is low, the MCU can receive signals, so that the state of the device to be detected can be judged more accurately.
[0067] The above are only the preferred embodiments of the present application and are not used to limit the present application. For those skilled in the art, the present application can have various changes and modifications. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
[0068] For those skilled in the art, it is obvious that the present application is not limited to the details of the above-described exemplary embodiments, and that the present application can be implemented in other specific forms without departing from the spirit or essential characteristics of the present application. Therefore, in any regard, the embodiments should be regarded as exemplary and non-limiting. The scope of the present application is defined by the appended claims rather than the above description. Therefore, all changes falling within the meaning and scope of the equivalent elements of the claims are intended to be embraced within the present application. Any reference signs in the claims should not be construed as limiting the claims involved.
Claims
1. A state detection circuit, characterized in that, the circuit includes a constant voltage source, a regulation circuit, a drive signal source, a detection module and an MCU. The constant voltage source, the regulation circuit and the detection module are all electrically connected to a device to be detected. The regulation circuit and the detection module are grounded. The constant voltage source is used to supply power to the regulation circuit and the detection module, and the regulation circuit is also electrically connected to the drive signal source. The detection module is electrically connected to the MCU. Wherein, the regulation circuit is used to achieve conduction and disconnection according to the pulse signal sent by the drive signal source in each cycle; when the device to be detected is in the online state and the regulation circuit is conducting, the detection module is in the first state, so that the MCU receives the first signal; when the device to be detected is in the online state and the regulation circuit is disconnected, the detection module is in the second state, so that the MCU receives the second signal; when the device to be detected is in the offline state, the detection module is always in the first state, so that the MCU continuously receives the first signal; the MCU is used to determine that the device to be detected is in the online state when receiving the first signal and the second signal in each cycle; when only receiving the first signal in each cycle, determine that the device to be detected is in the offline state; the regulation circuit includes a second switching tube and a bias resistor assembly. The first end of the second switching tube is electrically connected to the drive signal source through the bias resistor assembly. The second end of the second switching tube is grounded through the bias resistor assembly. The third end of the second switching tube is electrically connected to the device to be detected; the drive signal source is used to control the second switching tube to be in the on or off state, so that the regulation circuit is in the on or off state; the bias resistor assembly includes a third resistor, a fourth resistor and a fifth resistor. The third resistor is electrically connected to the drive signal source and the first end of the second switching tube respectively. The fourth resistor is electrically connected to the first end and the second end of the second switching tube respectively. One end of the fifth resistor is electrically connected to the second end of the second switching tube, and the other end of the fifth resistor is grounded. Wherein, the resistance value of the fifth resistor is in the order of milliohms. When the second switching tube is conducting, the detection module is equivalent to a short circuit and no voltage flows through.
2. The state detection circuit according to claim 1, characterized in that, the detection module includes a voltage dividing component. One end of the voltage dividing component is electrically connected to the device to be detected, and the other end is grounded. The voltage dividing component is also electrically connected to the MCU. Wherein, when the detection module is in the first state, the MCU receives a low-level signal; when the detection module is in the second state, the MCU receives a high-level signal.
3. The state detection circuit according to claim 2, characterized in that, The voltage dividing component includes a first resistor and a voltage stabilizing diode. One end of the first resistor is electrically connected to the device to be detected, the other end of the first resistor is respectively electrically connected to the cathode of the voltage stabilizing diode and the MCU, and the anode of the voltage stabilizing diode is grounded; The MCU is configured to determine whether the device to be detected is in an online state or an offline state based on the number of rising edges or falling edges of the signals received within a unit time.
4. The state detection circuit according to claim 1, wherein, the detection module includes a voltage dividing component, a first switching tube, and a detection power supply. One end of the voltage dividing component is electrically connected to the device to be detected, the other end is grounded, and the first end of the first switching tube is electrically connected to the voltage dividing component, the second end of the first switching tube is grounded, and the third end of the first switching tube is respectively electrically connected to the detection power supply and the MCU; When the detection module is in the first state, the first switching tube is turned off so that the MCU receives a high-level signal; When the detection module is in the second state, the first switching tube is turned on so that the MCU receives a low-level signal.
5. The state detection circuit according to claim 4, wherein, the voltage dividing component includes a first resistor and a second resistor. One end of the first resistor is electrically connected to the device to be detected, the other end of the first resistor is respectively electrically connected to one end of the second resistor and the first end of the first switching tube, and the other end of the second resistor is grounded; The MCU is configured to determine whether the device to be detected is in an online state or an offline state based on the number of rising edges or falling edges of the pulse signals received within a unit time.
6. The state detection circuit according to claim 4, wherein, the first switching tube includes a triode and a MOS tube.
7. The state detection circuit according to claim 4, wherein, the state detection circuit further includes a pull-up resistor. One end of the pull-up resistor is electrically connected to the detection power supply, and the other end of the pull-up resistor is respectively electrically connected to the third end of the first switching tube and the MCU.
8. A state detection system, wherein, the state detection system includes a device to be detected and the state detection circuit according to any one of claims 1 to 7. The device to be detected is electrically connected to the state detection circuit, and the state detection circuit is configured to detect whether the device to be detected is in an online state or an offline state.
Citation Information
Patent Citations
State detection circuit and system
CN212321775U