An alarm input device and method

By applying a bias voltage to the alarm input circuit and performing voltage division processing, the problem of the switch-type signal switch being disconnected/switched to the power supply in the prior art is solved, and effective detection of switch-type signals and improved anti-interference ability are achieved.

CN114268304BActive Publication Date: 2025-08-05ZHEJIANG HUARUIJIE TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111347334.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-15
Publication Date
2025-08-05
Estimated Expiration
2041-11-15

AI Technical Summary

Technical Problem

The existing alarm input circuit cannot effectively detect the switch off/off to the power supply in the switch-type signal.

Method used

Using a combination of a bias voltage application module, a voltage voltage division module and a control processing module, the alarm signal is mapped to different voltage intervals by applying a bias voltage at the alarm input port and performing voltage division processing, thereby distinguishing different alarm event types.

Benefits of technology

Effective detection of switch opening/off closing to power supply in switch-type signals is realized, the detection blind spots in the prior art are solved, and the accuracy of the alarm input circuit and anti-interference ability are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114268304B_ABST
    Figure CN114268304B_ABST
Patent Text Reader

Abstract

The present application relates to an alarm input device and method, which includes a bias voltage application module, a voltage divider module, and a control processing module; the bias voltage application module is used to apply a bias voltage to the alarm input port; the bias voltage application module includes a bias voltage generating unit and a bias applying unit; the bias voltage generating unit generates a bias voltage, and applies the bias voltage to the alarm input port through the bias applying unit; the voltage divider module is connected to the alarm input port, and is used to divide the port voltage on the alarm input port to obtain a first voltage; the control processing module collects the first voltage and determines the type of alarm event based on the first voltage. By mapping the input alarm signal to different voltage intervals, different alarm signals can be detected, solving the problem in the alarm input circuit in the related art that it cannot detect switch-type signals such as switch opening / closing to power supply.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of security protection technology, and in particular to an alarm input device and method. Background Art

[0002] In vehicle-mounted device alarm input applications, to accommodate alarm inputs from a variety of devices, the alarm input must support both switch-type and level-type signals. A switch-type signal is an external switch, with two possible scenarios: open / closed to vehicle ground and open / closed to vehicle power. A level-type signal is a level-type signal, with both vehicle ground and vehicle power levels.

[0003] The existing alarm input circuit implemented by combinational logic composed of transistors can only detect level-type alarm signals and switch-type alarm inputs of switch opening / switch closing to signal ground, but cannot detect switch-type signals of switch opening / switch closing to power supply.

[0004] Currently, no effective solution has been proposed to the problem that the alarm input circuit in the related art cannot detect the switch-type signal of switch opening / switch closing to power supply. Summary of the Invention

[0005] In this embodiment, an alarm input device and method are provided to solve the problem in the related art that the alarm input circuit cannot detect the switch-type signal of switch opening / switch closing to power supply.

[0006] In a first aspect, an alarm input device is provided in this embodiment, the device comprising a bias voltage applying module, a voltage dividing module and a control processing module;

[0007] The bias voltage applying module is used to apply a bias voltage to the alarm input port; the bias voltage applying module includes a bias voltage generating unit and a bias applying unit; the bias voltage generating unit generates a bias voltage, and the bias voltage is applied to the alarm input port through the bias applying unit;

[0008] The voltage dividing module is connected to the alarm input port, and is used to divide the port voltage on the alarm input port to obtain a first voltage; the first voltage is a voltage adapted to the control processing module;

[0009] The control processing module is connected to the voltage dividing module. The control processing module collects the first voltage and determines the type of alarm event according to the first voltage.

[0010] In some embodiments, the bias voltage generating unit includes a voltage reference diode D2, an NPN transistor Q1, a PNP transistor Q2, a resistor R3, a resistor R5, and a resistor R6;

[0011] The base of the NPN transistor Q1 is connected to the base of the PNP transistor Q2, and the emitter of the NPN transistor Q1 is connected to the emitter of the PNP transistor Q2;

[0012] The supply voltage of the bias voltage generating unit is applied to one end of the resistor R3, the other end of the resistor R3 is connected to one end of the voltage reference diode D2, the other end of the voltage reference diode D2 is connected to one end of the resistor R6, one end of the resistor R6 is connected to one end of the resistor R5, and the other end of the resistor R5 is connected to one end of the bias applying unit.

[0013] In some embodiments, the bias voltage is half of the maximum alarm input voltage.

[0014] In some embodiments, the voltage divider module includes a resistor R1 and a resistor R2, the resistor R1 and the resistor R2 are connected in series, one end of the resistor R1 is connected to the alarm input port, the other end of the resistor R1 is connected to one end of the resistor R2, and the other end of the resistor R2 is grounded.

[0015] In some embodiments, the control processing module includes a control unit and an ADC acquisition unit, the control unit is connected to the ADC acquisition unit, the ADC acquisition unit is used to acquire the first voltage and convert the first voltage into a digital signal, and the control unit determines the type of alarm event based on the first voltage acquired by the ADC acquisition unit.

[0016] In a second aspect, an alarm input method is provided in this embodiment, which is applied to the alarm input device described in the first aspect. The method includes:

[0017] detecting a trigger signal, the trigger signal being used to indicate a change in the first voltage;

[0018] After detecting a trigger signal, collecting the first voltage output by the voltage divider module;

[0019] The alarm event type is determined according to a preset correspondence between the change state of the first voltage and the alarm event type.

[0020] In some embodiments, determining the alarm event type according to a preset change state of the first voltage includes:

[0021] The range of the first voltage is divided into a high-level region, a suspended region, and a low-level region, wherein the suspended region is arranged between the high-level region and the low-level region; a first isolation region is arranged between the high-level region and the suspended region, and a second isolation region is arranged between the suspended region and the low-level region;

[0022] The alarm event type is determined according to a change in the area where the first voltage is located.

[0023] In some embodiments, determining the alarm event type according to the change of the area where the first voltage is located includes:

[0024] If the change state of the first voltage is that the region where the first voltage is located changes from the high level region to the low level region, determining that the alarm event is a level-type low-level input alarm event;

[0025] If the change state of the first voltage is that the region where the first voltage is located changes from the low level region to the high level region, it is determined that the alarm event is a level-type high level input alarm event.

[0026] In some embodiments, determining the alarm event type according to a preset change state of the first voltage includes:

[0027] If the change state of the first voltage is that the region where the first voltage is located changes from the high level region to the suspended region, determining that the alarm event is a VCC type switch disconnection alarm event;

[0028] If the change state of the first voltage is that the region where the first voltage is located changes from the suspended region to the high level region, it is determined that the alarm event is a VCC type switch closing alarm event.

[0029] In some embodiments, determining the alarm event type according to a preset change state of the first voltage includes:

[0030] If the change state of the first voltage is that the region where the first voltage is located changes from the suspended region to the low level region, determining that the alarm event is a GND type switch closing alarm event;

[0031] If the change state of the first voltage is that the region where the first voltage is located changes from the low level region to the suspended region, it is determined that the alarm event is a GND type switch disconnection alarm event.

[0032] Compared with the related art, the alarm input device and method provided in this embodiment maps the input alarm signal to different voltage intervals after applying a bias voltage to the alarm circuit, thereby distinguishing different alarm signals, solving the problem that the alarm input circuit in the related art cannot detect the switch-type signal of the switch opening / switch closing to the power supply.

[0033] The details of one or more embodiments of the present application are set forth in the following drawings and description to make other features, objects, and advantages of the present application more readily apparent. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0035] Figure 1 is a schematic diagram of an alarm input device of this embodiment;

[0036] Figure 2 is a schematic diagram of another alarm input device of this embodiment;

[0037] Figure 3 is a schematic diagram of another alarm input device of this embodiment;

[0038] Figure 4 This is a circuit diagram of an alarm input device and a peer alarm output in this embodiment;

[0039] Figure 5 This is a circuit diagram of another alarm input device and a peer alarm output in this embodiment;

[0040] Figure 6 This is a circuit diagram of another alarm input device and a peer alarm output in this embodiment;

[0041] Figure 7 This is a schematic diagram of sub-intervals of a level interval of a voltage input to a voltage divider module of an alarm input device according to this embodiment;

[0042] Figure 8 This is another schematic diagram of sub-intervals of the voltage level interval of the voltage divider module of the input alarm input device of this embodiment;

[0043] Figure 9 is a flow chart of an alarm input method of this embodiment;

[0044] Figure 10 This is a flow chart of alarm input event detection in this embodiment. DETAILED DESCRIPTION

[0045] In order to more clearly understand the purpose, technical solutions and advantages of the present application, the present application is described and illustrated below in conjunction with the accompanying drawings and embodiments.

[0046] Unless otherwise defined, the technical terms or scientific terms involved in this application should have the general meaning understood by people with ordinary skills in the technical field to which this application belongs. The words "one", "an", "a", "the", "these" and the like in this application do not indicate quantitative restrictions, and they can be singular or plural. The terms "include", "comprise", "have" and any variants thereof involved in this application are intended to cover non-exclusive inclusions; for example, a process, method and system, product or device comprising a series of steps or modules (units) is not limited to the listed steps or modules (units), but may include unlisted steps or modules (units), or may include other steps or modules (units) inherent to these processes, methods, products or devices. The words "connect", "connected", "coupled" and the like involved in this application are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. The "plurality" involved in this application refers to two or more. "And / or" describes the relationship between related objects, indicating that three possible relationships exist. For example, "A and / or B" can represent: A exists alone, A and B exist simultaneously, and B exists alone. Generally, the character " / " indicates that the related objects are in an "or" relationship. The terms "first," "second," "third," etc. used in this application are only used to distinguish similar objects and do not represent a specific ordering of the objects.

[0047] In this embodiment, an alarm input device is provided. Figure 1 Schematic diagram of an alarm input device according to this embodiment. Figure 1 As shown, the alarm input device includes a bias voltage applying module 1 , a voltage dividing module 2 and a control processing module 3 .

[0048] The bias voltage application module 1 is used to apply a bias voltage to the alarm input port. The bias voltage application module 1 includes a bias voltage generating unit and a bias application unit. The bias voltage generating unit generates a bias voltage, which is then applied to the alarm input port via the bias application unit. Depending on the alarm input signal, the voltage applied to the alarm input port by the bias voltage application module 1 varies, and the voltage collected by the control processing module 3 also varies. Based on the voltage changes, the control processing module 3 analyzes the different alarm input signals, thereby distinguishing different alarm events.

[0049] The voltage divider module 2 is connected to the alarm input port and is used to divide the port voltage at the alarm input port to obtain a first voltage, which is a voltage suitable for the control processing module 3. The voltage divider module 2 divides the higher voltage at the alarm input port after the bias voltage is applied by the bias voltage application module 1 into a voltage that can be collected by the control processing module 3.

[0050] The control processing module 3 is connected to the voltage divider module 2. The control processing module 3 collects the first voltage obtained by the voltage divider module 2 and determines the type of alarm event based on the first voltage. The control processing module 3 collects the first voltage obtained by the voltage divider module 2, converts the analog signal into a digital signal, and analyzes different alarm input signals based on the voltage changes, thereby distinguishing different alarm events. The control processing module 3 can be an ADC (analog to digital converter) device, or an MCU (Microcontroller Unit) or SOC (System on Chip) with integrated ADC function, such as the Renesas U2A16.

[0051] In this embodiment, an alarm input device is also provided. Figure 2 Schematic diagram of another alarm input device of this embodiment, such as Figure 2 As shown, the alarm input device includes a bias voltage applying module 1 , a voltage dividing module 2 and a control processing module 3 .

[0052] The bias voltage application module 1 includes a bias voltage generation module and a bias voltage application resistor R7. The bias voltage generation module generates a bias voltage, which is applied to the alarm input port via the bias voltage application resistor R7. One end of the bias voltage application resistor R7 is connected to the bias voltage generation module, and the other end is connected to the alarm input port.

[0053] Voltage divider module 2 includes resistors R1 and R2, which are connected in series. One end of resistor R1 is connected to the alarm input port, the other end of resistor R1 is connected to one end of resistor R2, and the other end of resistor R2 is grounded. Resistors R1 and R2 divide the bias voltage applied to the alarm input port to generate a first voltage, which is a voltage suitable for control processing module 3.

[0054] Control processing module 3 includes an ADC chip. One input terminal of the ADC chip is connected to voltage divider module 2 for collecting the first voltage output by voltage divider module 2. The other input terminal of the ADC chip is grounded. The ADC chip converts the analog first voltage signal output by voltage divider module 2 into a digital signal. Based on the voltage changes, it analyzes different alarm input signals, thereby distinguishing different alarm events.

[0055] In some embodiments, the maximum alarm input voltage VAI, the circuit power supply voltage VCC, the bias voltage VBIAS, the ADC power supply voltage VADC, the resistor R1 and the resistor R2 have the following limiting relationship: the bias voltage VBIAS is less than the circuit power supply voltage VCC; the bias voltage VBIAS is less than the maximum alarm input voltage VAI, preferably, VBAIS=VAI / 2; VAI*R2 / (R1+R2)≤VADC.

[0056] In this embodiment, an alarm input device is also provided. Figure 3 Schematic diagram of another alarm input device of this embodiment, such as Figure 3 As shown, the alarm input device includes a bias voltage applying module 1 , a voltage dividing module 2 and a control processing module 3 .

[0057] The bias voltage application module 1 includes a bias voltage generating unit and a bias voltage application resistor R7. The bias voltage generating unit includes a voltage reference diode D2, an NPN transistor Q1, a PNP transistor Q2, a resistor R3, a resistor R5, and a resistor R6. The base of the NPN transistor Q1 is connected to the base of the PNP transistor Q2, and the emitter of the NPN transistor Q1 is connected to the emitter of the PNP transistor Q2. The supply voltage of the bias voltage generating unit is applied to one end of the resistor R3, the other end of the resistor R3 is connected to one end of the voltage reference diode D2, the other end of the voltage reference diode D2 is connected to one end of the resistor R6, one end of the resistor R6 is connected to one end of the resistor R5, and the other end of the resistor R5 is connected to one end of the bias application unit. The voltage reference diode D2 provides a reference voltage for the bias voltage generating unit. The bias voltage generating unit also includes some protection circuits, such as a protection diode D1, a resistor R4, a capacitor C1, a capacitor C3, and a capacitor C4. One end of protection diode D1 is connected to one end of resistor R5, and the other end is grounded. One end of resistor R4 is connected to one end of voltage reference diode D2, and the other end is grounded. One end of capacitor C1 is connected to one end of resistor R5, and the other end is grounded. One end of capacitor C3 is connected to the base of NPN transistor Q1 and the base of PNP transistor Q2, and the other end is grounded. One end of capacitor C4 is connected to one end of resistor R5, and the other end is grounded. One end of resistor R7 is connected to one end of resistor R5, and the other end is connected to the alarm input port.

[0058] The bias voltage VREF generated by the bias voltage generating unit is applied to the alarm input port through the voltage applying resistor R7. The calculation formula of the bias voltage VREF is as follows.

[0059]

[0060] Among them, Vfb is the reference voltage of the voltage reference diode D2, which is related to specific device parameters and is commonly 2.5V.

[0061] Voltage divider module 2 includes resistors R1 and R2, which are connected in series. One end of resistor R1 is connected to the alarm input port, the other end of resistor R1 is connected to one end of resistor R2, and the other end of resistor R2 is grounded. Resistors R1 and R2 divide the bias voltage applied to the alarm input port to generate a first voltage, which is a voltage suitable for control processing module 3.

[0062] Control processing module 3 includes an ADC chip. One input terminal of the ADC chip is connected to voltage divider module 2 for collecting the first voltage output by voltage divider module 2. The other input terminal of the ADC chip is grounded. The ADC chip converts the analog first voltage signal output by voltage divider module 2 into a digital signal. Based on the voltage changes, it analyzes different alarm input signals, thereby distinguishing different alarm events.

[0063] The bias voltage application module of this embodiment has the following significant effects: first, it can provide an accurate reference voltage VREF; second, it can provide not only source current but also sink current, the source current is provided by the NPN transistor Q1, and the sink current is provided by the PNP transistor Q2; third, it has an anti-backflow function. When VCC is powered off or the external alarm input voltage is higher than VCC, no current will flow back from the external alarm input port to VCC.

[0064] In some embodiments, the alarm input is a switch type signal input, specifically the switch type signal input is a switch disconnected / short-circuited to GND. The circuit diagram of the alarm input device and the opposite alarm output in this embodiment is as shown in FIG. Figure 4 shown.

[0065] This circuit consists of the equivalent circuit for the opposite-end alarm output, the line equivalent resistor R10, and the equivalent circuit of this device. When switch K1 is open, the voltage input to the voltage divider module of the alarm input device is VBIAS. The equivalent impedance of the voltage divider and ADC acquisition module is much greater than the resistance value of R7, so the voltage divider effect of R7 is negligible. Therefore, when K1 is open, the voltage input to the voltage divider module of the alarm input device is VBIAS. When switch K1 is shorted to GND, the voltage output to the voltage divider module of this device is VBIAS*(R10 / (R7+R10)).

[0066] In some embodiments, the alarm input is a switch type signal input, specifically the switch type signal input is a switch disconnected / short-circuited to VCC. The circuit diagram of the alarm input device and the opposite alarm output in this embodiment is as shown in FIG. Figure 5 shown.

[0067] This circuit consists of the equivalent circuit for the opposite-end alarm output, the line equivalent resistor R10, and the equivalent circuit of this device. When switch K1 is open, the voltage input to the voltage divider module of the alarm input device is VBIAS. The equivalent impedance of the voltage divider and ADC acquisition module is much greater than the resistance value of R7, so the voltage divider effect of R7 is negligible. Therefore, when K1 is open, the voltage input to the voltage divider module of the alarm input device is VBIAS. When switch K1 is shorted to VCC, the voltage output to the voltage divider module of this device is VCC - VBIAS * (R10 / (R7 + R10)).

[0068] In some of the embodiments, for level signal input, the circuit diagram of the alarm input device and the opposite end alarm output in this embodiment is as follows: Figure 6 shown.

[0069] This circuit consists of the equivalent circuit for the peer alarm output, the line equivalent resistor R10, and the equivalent circuit of this device. When the peer output is at 0 level, the voltage input to the voltage divider module of the alarm input device is VBIAS*(R10 / (R7+R10)). When the peer output is at VCC level, the voltage input to the voltage divider module of the alarm input device is VCC-VBIAS*(R10 / (R7+R10)).

[0070] In some embodiments, the resistance of the circuit equivalent resistor R10 is much smaller than the resistance of the bias voltage applying resistor R7, such as R10 = 10Ω, R7 = 1kΩ, and the voltage division of the circuit equivalent resistor R10 can be ignored.

[0071] As can be seen, the voltages input to the voltage divider module of the alarm input device are different for both switch-type alarm inputs and level-type alarm inputs. Therefore, the alarm input device in this embodiment can identify both switch-type alarm inputs and level-type alarm inputs.

[0072] In some embodiments, the voltage level interval of the voltage divider module input to the alarm input device is divided into 5 sub-intervals, and the voltage range of the level interval is GND to VCC. Figure 7 As shown in the figure, from bottom to top, they are the low-level area, safety interval area 1, floating area, safety interval area 2, and high-level area. The voltage range of the low-level area is GND to V1, the voltage range of the safety interval area 1 is V1 to V2, the voltage range of the floating area is V2 to V3, the voltage range of the safety interval area 2 is V3 to V4, and the voltage range of the high-level area is V4 to VCC.

[0073] For switch type input, if the switch is short-circuited to GND, the low level area and floating area are used to represent the switch being short-circuited to GND and the switch being disconnected, respectively.

[0074] For switch type input, if the switch is short-circuited to VCC, the high level area and floating area are used to represent the switch being short-circuited to VCC and the switch being disconnected, respectively.

[0075] For level type input, the high level area and low level area are used to represent the input high level and input low level respectively.

[0076] The safety interval 1 is used as a safety interval between the low-level area and the suspended area. The wider the safety interval is, the stronger the anti-interference ability is.

[0077] The safety interval 2 is used as a high-level area and a suspended safety interval. The wider the safety interval is, the stronger the anti-interference ability is.

[0078] The voltage limiting relationships are as follows: GND<V1<V2<VBIAS<V3<V4<VCC; preferably, V3-VBIAS=VBIAS-V2; preferably, V1-GND=VCC-V4.

[0079] The driving current required to leave the floating area and enter the safe interval area 1 is (VBIAS-V2) / R7. The larger the driving current, the stronger the anti-interference ability.

[0080] The driving current required to leave the floating area and enter the safe interval area 2 is (V3-VBIAS) / R7. The larger the driving current, the stronger the anti-interference ability.

[0081] To keep it in the low level area, the minimum driving current required is (VBIAS-V1) / R7.

[0082] To maintain the high level area, the minimum driving current required is (V4-VBIAS) / R7.

[0083] The driving current refers to the current generated by the bias application module flowing through R7. The driving current includes sinking current and sourcing current. When the alarm input voltage is greater than the VBAIS voltage, the bias application module provides sinking current through R7. When the alarm input voltage is less than VBAIS, the bias application module provides sourcing current through R7.

[0084] In this embodiment, a safety interval is established to improve the noise threshold of the alarm input circuit. For example, at a certain moment, the alarm input circuit is in the high-level area. If there is interference on the alarm input line, the interference signal needs to interfere the alarm input state from the high-level area to the floating area, and it needs to cross the safety interval 2. The wider the safety interval 2, the wider the noise threshold.

[0085] In some embodiments, the bias voltage applying resistor R7 = 1 kΩ, GND = 0 V, V1 = 2 V, V2 = 3 V, VBAIS = 4 V, V3 = 5 V, V4 = 6 V, VCC = 12 V, and the voltage level interval of the voltage divider module input to the alarm input device is divided into 5 sub-intervals, and the voltage range of the level interval is 0 to 12 V. Figure 8 shown.

[0086] The external alarm input signal causes the alarm input level to enter the safety interval zone 1 from the floating area, and the required sink current is 1mA. The external alarm input signal causes the alarm input level to enter the safety interval zone 2 from the floating area, and the required source current is also 1mA.

[0087] The external alarm input signal keeps the alarm input level in the low level area, and the minimum sink current required is 2mA.

[0088] The external alarm input signal keeps the alarm input level in the high level area, and the minimum pull current required is 2mA.

[0089] Assume that the alarm input port is currently in a suspended state. If an external interference signal wants the alarm detection device to enter the safety interval area 1 or the safety interval area 2 from the suspended area, the interference signal needs to provide at least 1mA of sink current or source current. Generally, the interference signal cannot provide such a large driving current. Therefore, the alarm input device has a strong anti-interference ability.

[0090] In particular, by adjusting the resistance of the bias voltage applying resistor R7, the above-mentioned source / sink current can be adjusted. The larger the source / sink current is, the stronger the anti-interference ability is, but the resistance requirement for the alarm input circuit is higher.

[0091] In this embodiment, an alarm input method is provided. Figure 9This is a flow chart of an alarm input method of this embodiment. Figure 9 As shown, the process includes the following steps:

[0092] Step S902: detecting a trigger signal, where the trigger signal is used to indicate that the first voltage has changed.

[0093] The control processing module 3 detects a trigger signal, which is used to indicate that the first voltage has changed. When the first voltage changes, a trigger signal is generated. The control processing module 3 supports an ADC level interrupt trigger detection method.

[0094] Step S904: After detecting the trigger signal, collecting the first voltage output by the voltage divider module.

[0095] After detecting the trigger signal, the control processing module 3 collects the first voltage output by the voltage divider module and converts the collected analog signal into a digital signal.

[0096] Step S906 : determining the alarm event type according to a preset correspondence between the change state of the first voltage and the alarm event type.

[0097] The control processing module 3 determines the type of the alarm event according to a preset correspondence between the change state of the first voltage and the type of the alarm event.

[0098] Through the above steps, by mapping the input alarm signal to different voltage intervals, different alarm signals can be detected, which solves the problem in the related art that the alarm input circuit cannot detect the switch-type signal of switch opening / switch closing to power supply.

[0099] In some embodiments, the alarm input device reports what kind of alarm input event is based on the type of level transition detected. The alarm input event detection flow chart is as follows: Figure 10 shown.

[0100] When the voltage jumps from the high level area to the floating area, the alarm input event reported is a switch to VCC type switch disconnection event; when the voltage jumps from the floating area to the high level area, the alarm input event reported is a switch to VCC type switch closing event.

[0101] When it jumps from the low level area to the floating area, the alarm input event switch to GND type switch disconnection event is reported; when it jumps from the floating area to the low level area, the alarm input event switch to GND type switch closing event is reported.

[0102] When it jumps from the low level area to the high level area, an alarm input event level type high level input event is reported; when it jumps from the high level area to the low level area, an alarm input event level type low level input event is reported.

[0103] Other status transitions are considered abnormal events and reported.

[0104] After the alarm input detection reports the corresponding event, the upper-layer application will make the corresponding alarm input response based on the alarm input type configured by the user.

[0105] In some of the embodiments, the ADC acquisition module can use a level trigger mode to detect the corresponding level interval jump. Compared with the ordinary polling method, this level trigger mode is an interrupt detection mode, which can greatly reduce software resource overhead and improve the detection response speed of the alarm input jump.

[0106] It should be understood that the specific embodiments described herein are only used to explain this application and are not used to limit it. Based on the embodiments provided in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0107] Obviously, the accompanying drawings are merely examples or embodiments of the present application. A person skilled in the art can also apply the present application to other similar situations based on these drawings without inventive effort. Furthermore, it is understandable that, although the work involved in this development process may be complex and lengthy, certain design, manufacturing, or production changes based on the technical content disclosed in this application are merely routine technical means for a person skilled in the art and should not be considered to constitute a deficiency in the disclosure of the present application.

[0108] The term "embodiment" as used in this application refers to specific features, structures, or characteristics described in conjunction with the embodiment that can be included in at least one embodiment of this application. The appearance of this phrase in various places in the specification does not necessarily mean that the embodiment is the same, nor does it mean that it is mutually exclusive with other embodiments and is independent or optional. It is understood, either explicitly or implicitly, by those skilled in the art that the embodiments described in this application can be combined with other embodiments when there is no conflict.

[0109] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of patent protection. It should be noted that a person of ordinary skill in the art may make various modifications and improvements without departing from the spirit of the present application, and these modifications and improvements fall within the scope of protection of the present application. Therefore, the scope of protection of the present application shall be determined by the appended claims.

Claims

1. An alarm input device, characterized in that: include: Bias voltage application module, voltage divider module and control processing module; The bias voltage applying module is used to apply a bias voltage to the alarm input port; The bias voltage applying module includes a bias voltage generating unit and a bias applying unit; the bias voltage generating unit generates a bias voltage, and the bias voltage is applied to the alarm input port through the bias applying unit; The voltage dividing module is connected to the alarm input port, and is used to divide the port voltage on the alarm input port to obtain a first voltage; the first voltage is a voltage adapted to the control processing module; The control processing module is connected to the voltage dividing module, and the control processing module collects the first voltage and determines the type of alarm event according to the first voltage; The bias voltage generating unit includes a voltage reference diode D2, an NPN transistor Q1, a PNP transistor Q2, a resistor R3, a resistor R5 and a resistor R6; the bias applying unit includes a resistor R7; One end of the resistor R3 is connected to the power supply voltage terminal VCC and the collector of the NPN transistor Q1, and the other end is connected to the base of the NPN transistor Q1, the base of the PNP transistor Q2 and the cathode of the voltage reference diode D2; one end of the resistor R5 is connected to the control end of the voltage reference diode D2 and one end of the resistor R6, and the other end is connected to the emitter of the PNP transistor Q2, the emitter of the NPN transistor Q1 and one end of the resistor R7; the other end of the resistor R7 is connected to the alarm input port and the port voltage input end of the voltage divider module, the first voltage output end of the voltage divider module is connected to the signal acquisition end of the control processing module; the collector of the PNP transistor Q2, the other end of the resistor R6 and the anode of the voltage reference diode D2 are grounded.

2. The alarm input device according to claim 1, characterized in that: The bias voltage is half of the maximum alarm input voltage.

3. The alarm input device according to claim 1, characterized in that: The voltage divider module includes a resistor R1 and a resistor R2, one end of the resistor R1 is connected to the alarm input port, and the other end is connected to one end of the resistor R2 and the signal acquisition end of the control processing module; the other end of the resistor R2 is grounded.

4. The alarm input device according to claim 1, characterized in that: The control processing module includes a control unit and an ADC acquisition unit. The control unit is connected to the ADC acquisition unit. The ADC acquisition unit is used to acquire the first voltage and convert the first voltage into a digital signal. The control unit determines the type of alarm event based on the first voltage acquired by the ADC acquisition unit.

5. An alarm input method, characterized in that: Applied to the alarm input device according to any one of claims 1 to 4, the method comprises: detecting a trigger signal, where the trigger signal is used to indicate that the first voltage has changed; After detecting a trigger signal, collecting the first voltage output by the voltage divider module; The alarm event type is determined according to a preset correspondence between the change state of the first voltage and the alarm event type.

6. The alarm input method according to claim 5, characterized in that: The determining of the alarm event type according to the preset change state of the first voltage includes: The range of the first voltage is divided into a high-level region, a suspended region, and a low-level region, wherein the suspended region is arranged between the high-level region and the low-level region; a first isolation region is arranged between the high-level region and the suspended region, and a second isolation region is arranged between the suspended region and the low-level region; The alarm event type is determined according to a change in the area where the first voltage is located.

7. The alarm input method according to claim 6, characterized in that: Determining the alarm event type according to the change of the area where the first voltage is located includes: If the change state of the first voltage is that the region where the first voltage is located changes from the high level region to the low level region, determining that the alarm event is a level-type low-level input alarm event; If the change state of the first voltage is that the region where the first voltage is located changes from the low level region to the high level region, it is determined that the alarm event is a level-type high level input alarm event.

8. The alarm input method according to claim 6, characterized in that: The alarm event type is determined according to a preset change state of the first voltage, include, If the change state of the first voltage is that the region where the first voltage is located changes from the high level region to the suspended region, determining that the alarm event is a VCC type switch disconnection alarm event; If the change state of the first voltage is that the region where the first voltage is located changes from the suspended region to the high level region, it is determined that the alarm event is a VCC type switch closing alarm event.

9. The alarm input method according to claim 6, characterized in that: The alarm event type is determined according to a preset change state of the first voltage, include, If the change state of the first voltage is that the region where the first voltage is located changes from the suspended region to the low level region, determining that the alarm event is a GND type switch closing alarm event; If the change state of the first voltage is that the region where the first voltage is located changes from the low level region to the suspended region, it is determined that the alarm event is a GND type switch disconnection alarm event.

Citation Information

Patent Citations

  • Voltage alarm system

    CN106154021A