Coding equipment for fire-fighting front end and use method of coding equipment
By designing a compact and portable fire-fighting front-end coding device, equipped with a display screen and circuit protection mechanism, the problems of cumbersome and unintuitive traditional coding devices are solved, and efficient and safe coding operation is achieved.
Patent Information
- Application Number
- CN202510852539.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-24
- Publication Date
- 2025-11-11
AI Technical Summary
Traditional fire protection front-end equipment has a cumbersome coding process, relies on large and bulky controllers and lacks intuitive display, which increases the difficulty of operation and the error rate.
Design a compact and portable coding device equipped with a display screen, button array, and spring-loaded pins. It also incorporates a built-in power module and multiple circuit protection mechanisms, including USB charging detection, short-circuit protection, and voltage detection, to achieve intuitive display and secure coding.
It improves coding efficiency and accuracy, reduces operational difficulty, ensures stable operation and safety of equipment in different environments, extends battery life, and reduces energy waste.
Smart Images

Figure CN120929415A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of fire protection equipment technology, specifically relating to an encoding device for fire protection front-end and its usage method. Background Technology
[0002] Accurate coding of front-end fire protection equipment (such as detectors and alarms) is a crucial step in ensuring the normal operation of fire protection systems during installation and maintenance. Traditional coding methods mainly rely on large, bulky controllers, which are inconvenient to carry.
[0003] Specifically, when using traditional controllers to encode fire protection front-end equipment, operators need to adjust the controller to a specific interface and sequentially complete operations such as reading address numbers, writing address numbers, reading types, and writing types. This process is not only cumbersome but also time-consuming. In addition, traditional controllers usually lack an intuitive display screen, making it difficult for operators to understand the coding status and results in real time, further increasing the difficulty of operation and the error rate. Summary of the Invention
[0004] To address the shortcomings of existing technologies, which rely on large coding controllers for coding fire protection front-end equipment and require adjusting the controller to a specific interface, making the process cumbersome and difficult for operators to understand the coding status and results in real time, thus increasing the difficulty of operation and error rate, this invention provides a coding device for fire protection front-end equipment and its usage method to solve the above-mentioned technical problems.
[0005] In a first aspect, the present invention provides an encoding device for fire protection front end, including a housing and a display screen, a key array and a spring pin disposed on the housing. A main control chip U1 is disposed inside the housing. The key array is connected to the input terminal of the main control chip U1, the display screen is connected to the output terminal of the main control chip U1, and the main control chip U1 is connected to the fire protection front end to be encoded through the spring pin.
[0006] A further improvement to this technical solution is that it also includes a power module that powers the entire device. The power module includes a USB charging port on the housing and a battery inside the housing, with the USB charging port connected to the battery.
[0007] Further improvements to this technical solution include a USB charging detection circuit housed within the casing. This USB charging detection circuit comprises a diode D1, resistors R1 and R2, a transistor Q1, and a resistor R3. The first terminal of resistor R1 and the anode of diode D1 are both connected to the power pin of the USB charging interface. The cathode of diode D1 is connected to the power supply terminal of the fire-fighting front-end equipment. The second terminal of resistor R1 is connected to the first terminal of resistor R2 and the base of transistor Q1. The second terminal of resistor R2 and the emitter of transistor Q1 are both grounded. The collector of transistor Q1 is connected to the first terminal of resistor R3 and the main control chip U1. The second terminal of resistor R3 is connected to the VCC power supply.
[0008] Further improvements to this technical solution include a button detection circuit housed within the casing. The button detection circuit comprises several pull-up resistors and several current-limiting resistors. Buttons in the same column are connected to the VCC power supply via pull-up resistors, and buttons in the same row are connected to the main control chip U1 via current-limiting resistors.
[0009] Further improvements to this technical solution include a short-circuit protection circuit housed within the casing. This short-circuit protection circuit comprises resistor R4, transistor Q2, resistor R5, resistor R6, transistor Q3, diode D2, resistor R7, resistor R8, transistor Q4, diode D3, diode D4, resistor R9, transistor Q5, resistor R11, resistor R12, transistor Q6, resistor R13, resistor R14, and resistor R15. The first terminal of resistor R4 is connected to the main control chip U1. The second terminal of resistor R4 is connected to the base of transistor Q2. The collector of transistor Q2 is connected to the first terminal of resistor R6 and the base of transistor Q3 through resistor R5. The emitter of transistor Q3, the second terminal of resistor R6, and the cathode of diode D2 are all connected to a 15V power supply. The collector of transistor Q3 and the anode of diode D2 are connected to the first terminals of resistors R7 and R8, and the emitter of transistor Q4. The second terminal of resistor R7 is connected to the cathode of diode D3 and the anode of diode D4. The anode of diode D3 is connected to the base of transistor Q5 and the first terminal of resistor R9. The collector of transistor Q5 is connected to... Resistor R10 is connected to the second terminal of resistor R8 and the base of transistor Q4. The collector of transistor Q4 is connected to the cathode of diode D4, the first terminal of resistor R11 and the spring pin. The second terminal of resistor R11 is connected to the main control chip U1 and the first terminal of resistor R12. The first terminal of resistor R13 is connected to the VCC power supply. The second terminal of resistor R13 is connected to the main control chip U1 and the collector of transistor Q6. The base of transistor Q6 is connected to the spring pin and the first terminal of resistor R15 through resistor R14. The emitter of transistor Q2, the second terminal of resistor R9, the emitter of transistor Q5, the second terminal of resistor R12, the emitter of transistor Q6, and the second terminal of resistor R15 are all grounded.
[0010] Further improvements to this technical solution include a voltage detection circuit housed within the casing. The voltage detection circuit comprises transistor Q7, resistors R16, R17, R18, and R19, a power button S1, transistor Q8, resistor R20, MOSFET Q9, resistors R21 and R22, capacitors C1 and C2, a voltage regulator U2, and capacitor C3. The collector of transistor Q7 is connected to the main control chip U1 and the first terminal of resistor R16. The second terminal of resistor R16 is connected to the VCC power supply. The base of transistor Q7 is connected through resistor R17 to the first terminal of resistor R18 and the first terminal of power button S1. The second terminal of resistor R18 is connected to the first terminal of resistor R19 and the base of transistor Q8. The second terminal of resistor R19 is connected to the main control chip U1. The collector of transistor Q8 is connected to the first terminal of resistor R20 and the gate of MOSFET Q9. The second terminal of power button S1 and the MOSFET... The source of transistor Q9 is connected to the negative terminal of diode D1. The drain of transistor Q9 is connected to the first terminal of resistor R21, the first terminal of capacitor C1, the first terminal of capacitor C2, and the input terminal of voltage regulator U2. The second terminal of resistor R21 is connected to the main control chip U1 and the first terminal of resistor R22. The output terminal of voltage regulator U2 is connected to the VCC power output terminal. The emitters of transistors Q7 and Q8, the second terminal of resistor R22, the second terminal of capacitor C1, the second terminal of capacitor C2, and the second terminal of capacitor C3 are all grounded.
[0011] Further improvements to this technical solution include a backlight panel consisting of a resistor R23 and a light-emitting diode D5. The first end of the resistor R23 is connected to the main control chip U1, the resistor R23 is connected to the positive terminal of the light-emitting diode D5, and the negative terminal of the diode D5 is grounded.
[0012] In a second aspect, the present invention provides a method of using the encoding device according to any one of the preceding claims, comprising: Connect to the fire protection front end to be coded via a spring-loaded pin; Press the read key in the key array, and the main control chip U1 sends a read command to the fire front end to be coded through a preset communication protocol; Receive the address number and type number from the fire protection front-end to be coded, and display the code reading result on the display screen; Input the address number corresponding to the fire protection front-end to be coded via the key array, and display the current address number on the screen; After inputting the information, press the write key in the key array to send the input address number to the fire protection front end to be coded; Receive the address writing result from the fire protection front end to be coded, and verify it; Once the verification is successful, the current address number will be automatically incremented by 1, and the next address number to be written will be displayed on the screen.
[0013] Further improvements to this technical solution include: during the read / write process, the output level is detected in real time by a voltage detection circuit, and a short circuit is detected by a short circuit detection circuit, and the output of the main control chip U1 is stopped when a short circuit is detected.
[0014] Further improvements to this technical solution include: detecting the key array through a key detection circuit, and when it is determined that there has been no key operation for more than 10 seconds, the main control chip U1 enters sleep mode.
[0015] The beneficial effects of this invention are as follows: Portability and Efficiency: The fire-fighting front-end coding device provided by this invention achieves rapid coding of fire-fighting front-end equipment through its compact and portable housing design and integrated display screen, button array, and spring-loaded pins. Compared with traditional large and bulky controllers, this device is not only easy to carry but also simple to operate, significantly improving the efficiency of coding work.
[0016] Intuitive Display and Real-Time Feedback: The device's display screen clearly shows the coding status and results, allowing operators to understand the coding progress in real time and reducing operational difficulty and error rates caused by information asymmetry. This intuitive feedback mechanism helps improve the accuracy and efficiency of coding work.
[0017] Dual power supply and stable reliability: The device has a built-in battery and a USB charging port, supporting dual power supply modes to ensure stable operation in different environments. The USB charging detection circuit design enables the device to intelligently identify the USB charging status and automatically switch to external power when the battery is low, further enhancing the device's reliability and battery life.
[0018] Short-circuit protection and safety: The short-circuit protection circuit enables the device to monitor the output line status in real time during the encoding process. Once a short circuit is detected, output is immediately stopped, effectively protecting the device and its upstream components. This design significantly reduces the risk of equipment damage caused by short circuits and improves the safety of the encoding process.
[0019] Low power consumption and automatic shutdown: The device's built-in low-power sleep and automatic shutdown functions enable the device to automatically enter hibernation or shut down when there is no operation for a long time, effectively extending battery life and reducing energy waste.
[0020] Voltage Detection and Battery Management: The voltage detection circuit monitors the battery voltage in real time, providing operators with intuitive feedback on battery level. This design helps operators understand the battery status promptly, preventing coding failures or equipment damage due to insufficient battery power.
[0021] Backlight design: The backlight, consisting of resistor R23 and light-emitting diode D5, enables the display to be clearly visible even in low-light environments, further improving the practicality and ease of use of the device. Attached Figure Description
[0022] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0023] Figure 1 This is a front view of an apparatus according to an embodiment of the present invention.
[0024] Figure 2 This is a left view of an apparatus according to an embodiment of the present invention.
[0025] Figure 3 This is the circuit diagram of the display screen.
[0026] Figure 4 This is the circuit schematic of the main control chip U1.
[0027] Figure 5 This is the circuit diagram of the backlight panel.
[0028] Figure 6 Schematic diagram of a USB charging detection circuit.
[0029] Figure 7 This is a schematic diagram of a key detection circuit.
[0030] Figure 8 This is a schematic diagram of a short-circuit protection circuit.
[0031] Figure 9 This is a schematic diagram of a voltage detection circuit.
[0032] Figure 10 This is a schematic flowchart illustrating a method according to an embodiment of the present invention.
[0033] 110 is the housing, 120 is the display screen, 130 is the button array, 140 is the spring pin, 150 is the USB charging port, and 200 is the fire alarm front end to be coded. Detailed Implementation
[0034] To make the objectives, features, and advantages of this invention more apparent and understandable, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings of the specific embodiments. Obviously, the embodiments described below are only some embodiments of this invention, and not all embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0035] Unless otherwise defined, 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 pertains. The terminology used herein in the description of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention.
[0036] like Figure 1 and Figure 2 As shown, the present invention provides an encoding device for fire protection front end, including a housing 110 and a display screen 120, a button array 130 and a spring pin 140 disposed on the housing 110. A main control chip U1 is disposed inside the housing 110. The button array 130 is connected to the input terminal of the main control chip U1, the display screen 120 is connected to the output terminal of the main control chip U1, and the main control chip U1 is connected to the fire protection front end to be encoded through the spring pin 140.
[0037] Specifically, the encoding device includes a handheld housing 110, which is compact and lightweight for easy carrying and operation. The housing 110 is equipped with a display screen 120, a button array 130, and spring-loaded pins 140. The fire-fighting front-end encoding device provided by this invention, through its compact and portable housing 110 design and the integrated display screen 120, button array 130, and spring-loaded pins 140, enables rapid encoding of fire-fighting front-end equipment. Compared to traditional large and bulky controllers, this device is not only easy to carry, but also allows direct connection to the fire-fighting front-end to be encoded via the spring-loaded pins 140, and enables encoding and reading / writing operations via the button array 130, simplifying operation and significantly improving the efficiency of the encoding process.
[0038] like Figure 3 As shown, the display screen 120 uses a 6-bit decimal segment LCD for content display, providing a clear and intuitive display. The display screen 120 includes a main control chip U1 (model HC32L130J8TA). Figure 4 (As shown) A directly driven segmented code screen has a simple structure. A backlight panel is added to the back of the segmented code screen, as shown. Figure 5As shown, the backlight panel consists of a resistor R23 and a light-emitting diode D5 connected in series (the first terminal of resistor R23 is connected to the main control chip U1, resistor R23 is connected to the positive terminal of light-emitting diode D5, and the negative terminal of diode D5 is grounded), and is controlled by the main control chip U1 to ensure clear display even in low-light environments. The display screen 120 equipped with the device can intuitively display the encoding status and results, allowing operators to understand the encoding progress in real time, reducing the operational difficulty and error rate caused by information opacity. This intuitive feedback mechanism helps improve the accuracy and efficiency of the encoding work.
[0039] To ensure the stable operation of the fire protection front-end equipment in different environments, the device also includes a power module that supplies power to the entire device. The power module includes a USB charging port 150 installed on the housing 110 and a battery installed inside the housing 110. The USB charging port 150 is connected to the battery; it supports dual power supply modes.
[0040] The housing 110 contains a compartment for four AAA batteries. The bottom of the housing 110 integrates a USB-C charging port, supporting 5V / 2A input. When connected via USB, USB power is prioritized; in this mode, the battery is in sleep mode, and the display 120 shows a full charge level.
[0041] like Figure 6 As shown, the device also includes a USB charging detection circuit disposed within the housing 110. The USB charging detection circuit includes a diode D1, resistors R1 and R2, a transistor Q1, and a resistor R3. The first end of resistor R1 and the anode of diode D1 are both connected to the power supply pin of the USB charging interface 150. The cathode of diode D1 is connected to the power supply terminal of the fire-fighting front-end device. The second end of resistor R1 is connected to the first end of resistor R2 and the base of transistor Q1. The second end of resistor R2 and the emitter of transistor Q1 are both grounded. The collector of transistor Q1 is connected to the first end of resistor R3 and the main control chip U1. The second end of resistor R3 is connected to the VCC power supply.
[0042] The negative terminal of diode D1 (model 1N4007) is connected to the power supply terminal of the fire protection front-end equipment, and the positive terminal is connected to the USB power supply cable. The fire protection front-end equipment is powered through the USB interface. Diode D1 can form a reverse charging protection path. When the USB is connected, the USB charging interface 150 is at a high voltage. The voltage divider between R1 and R2 makes the base voltage of Q1 > 0.7V → Q1 conducts → the collector outputs a low level (0V) → U1 detects the low level and determines that the USB power supply is connected. When the USB is not connected, there is no voltage at the USB charging interface 150 → Q1 is cut off → R3 pulls the collector up to a high level (3.3V) → U1 determines that the fire protection front-end equipment is in power supply mode.
[0043] like Figure 7As shown, the device also includes a button detection circuit housed within the casing 110. This circuit includes several pull-up resistors and several current-limiting resistors. Buttons in the same column are connected to the VCC power supply via pull-up resistors, and are also connected to the main control chip U1. Buttons in the same row are connected to the main control chip U1 via current-limiting resistors. The device's built-in low-power sleep and automatic shutdown functions allow it to automatically enter sleep mode or shut down when inactive for extended periods, effectively extending battery life and reducing energy waste.
[0044] The key array 130 includes 14 keys (including 10 numeric keys from 0 to 9). Figure 7 SP-PB0 to SP-PB9 in the series), and the write key (i.e. Figure 7 SP-PB WP / +1 is used to write the front-end address number, and the read key (i.e.) Figure 7 SP-PB RD, used to read the front-end address number, and clear key (i.e. Figure 7 SP-PB CLR in the middle) and login key (i.e. Figure 7 In the SP-PBLogin section, U1 cyclically outputs a low level to the column line while simultaneously detecting the row line level. When a button is pressed, the corresponding row line is pulled low, and U1 locates the button position. Furthermore, if there is no button operation for three minutes, the device is powered off. If U1 detects no button operation for 10 seconds, it disables the button matrix scanning driver and enters sleep mode (power consumption drops to 1μA).
[0045] like Figure 8As shown, the device also includes a short-circuit protection circuit disposed within the housing 110. The short-circuit protection circuit includes resistor R4, transistor Q2, resistor R5, resistor R6, transistor Q3, diode D2, resistor R7, resistor R8, transistor Q4, diode D3, diode D4, resistor R9, transistor Q5, resistor R11, resistor R12, transistor Q6, resistor R13, resistor R14, and resistor R15. The first end of resistor R4 is connected to the main control chip U1, and the second end of resistor R4 is connected to the base of transistor Q2. The collector of transistor Q2 is connected to the first end of resistor R6 and the base of transistor Q3 through resistor R5. The emitter of transistor Q3, the second end of resistor R6, and the cathode of diode D2 are all connected to a 15V power supply. The collector of transistor Q3 and the anode of diode D2 are connected to the first ends of resistors R7 and R8, and the emitter of transistor Q4. The second terminal of R7 is connected to the cathode of diode D3 and the anode of diode D4. The anode of diode D3 is connected to the base of transistor Q5 and the first terminal of resistor R9. The collector of transistor Q5 is connected to the second terminal of resistor R8 and the base of transistor Q4 through resistor R10. The collector of transistor Q4 is connected to the cathode of diode D4, the first terminal of resistor R11, and spring pin 140. The second terminal of resistor R11 is connected to the main control chip U1 and the first terminal of resistor R12. The first terminal of resistor R13 is connected to the VCC power supply. The second terminal of resistor R13 is connected to the main control chip U1 and the collector of transistor Q6. The base of transistor Q6 is connected to the spring pin 140 and the first terminal of resistor R15 through resistor R14. The emitter of transistor Q2, the second terminal of resistor R9, the emitter of transistor Q5, the second terminal of resistor R12, the emitter of transistor Q6, and the second terminal of resistor R15 are all grounded.
[0046] The main control chip U1 is connected to the base of transistor Q2 via resistor R4, sending an enable signal to the protection circuit. The collector of Q2 drives the base of transistor Q3 via resistor R5. The emitter of Q3 is connected to a 15V independent power supply (isolated from the main power supply), and the cathode of diode D2 is synchronously connected to this power supply. The collector of Q3 and the anode of D2 are connected to the emitter of transistor Q4, and connected to bidirectional clamping diodes D3-D4 via resistors R7 / R8: the cathode of D3 is connected to R7, and the anode is connected to the base of transistor Q5; the anode of D4 is connected to R7, and the cathode is directly connected to the collector of Q4 (output control terminal). The collector of Q5 controls the base of Q4 via resistor R10. The spring pin 140 (non-polarized output interface) is directly connected to the collector of Q4, and is also connected to the base of transistor Q6 via resistor R14; the collector of Q6 feeds back the status to U1 via resistor R13, and resistor R11 samples the voltage of the spring pin to the ADC pin of U1.
[0047] Normal operating conditions: U1 outputs a high level → Q2 turns on → Q3 turns on → Q4 turns on → spring pin 140 outputs normal voltage; output voltage > 2V → Q6 turns on → R13 feeds back a high level to U1 (normal state).
[0048] Short circuit trigger (Example: Output short-circuited to ground): t=0μs: The voltage of spring pin 140 drops sharply to 0V → Q6 base voltage < 0.7V → Q6 is cut off → R13 outputs a low level to the U1 interrupt pin; t=2μs: U1 detects an interrupt → immediately stops sending codes → outputs a low level in parallel to R4 → Q2 is turned off; t=5μs: Q2 cut off → Q3 base voltage drops off → Q3 cut off → Q4 base is pulled down to 0V via R10 → Q4 cut off → physically cut off the output path; t=10μs: Short-circuit current impacts D3-D4 → clamping diode conducts → locks the collector voltage of Q4 within ±15V → protects the main control chip.
[0049] Fault recovery: Eliminate short circuit → Restart equipment → U1 outputs high level again → Transistors at all stages are reset and turned on → Circuit returns to normal output.
[0050] This short-circuit protection circuit has triple safety protection: Q4 physically cuts off the output, U1 interrupts the output code; D3-D4 clamps to withstand ±1kV transient impact.
[0051] like Figure 9As shown, the device also includes a voltage detection circuit disposed within the housing 110. The voltage detection circuit includes a transistor Q7, resistors R16, R17, R18, and R19, a power button S1, a transistor Q8, a resistor R20, a field-effect transistor Q9, resistors R21 and R22, capacitors C1 and C2, a voltage regulator U2, and a capacitor C3. The collector of transistor Q7 is connected to the main control chip U1 and the first terminal of resistor R16. The second terminal of resistor R16 is connected to the VCC power supply. The base of transistor Q7 is connected through resistor R17 to the first terminal of resistor R18 and the first terminal of the power button S1. The second terminal of resistor R18 is connected to the first terminal of resistor R19 and the base of transistor Q8. The second terminal of resistor R19 is connected to the main control chip U1. The collector of transistor Q8 is connected to the first terminal of resistor R20 and the gate of MOSFET Q9. The second terminal of power button S1 and the source of MOSFET Q9 are connected to the negative terminal of diode D1 and to the positive terminal (X2) of battery. The 2X5M terminal is grounded. The drain of MOSFET Q9 is connected to the first terminal of resistor R21, the first terminal of capacitor C1, the first terminal of capacitor C2 and the battery. The input terminal of voltage regulator U2 is connected to the battery (6V). The second terminal of resistor R21 is connected to the main control chip U1 and the first terminal of resistor R22. The output terminal of voltage regulator U2 is connected to the VCC power output terminal. The emitter of transistor Q7, the emitter of transistor Q8, the second terminal of resistor R22, the second terminal of capacitor C1, the second terminal of capacitor C2 and the second terminal of capacitor C3 are all grounded.
[0052] The first end of the power button S1 is connected to resistor R17, and the second end is directly connected to the positive terminal of the battery (X2, 6V input); when S1 is pressed, the battery voltage drives the base of transistor Q7 through R17.
[0053] The base of Q7 is controlled by S1, and its collector is pulled up to VCC (3.3V) through resistor R16, outputting a detection signal to the main control chip U1; the base of transistor Q8 receives the command from U1 through resistor R19, and its collector drives the gate of field-effect transistor Q9 through resistor R20.
[0054] The source of the field-effect transistor Q9 is connected to the positive terminal of the battery (X2), and the drain output is connected to the input terminal of the voltage regulator U2; when Q9 is turned on, the 6V voltage of the battery is input to the voltage regulator circuit.
[0055] Resistors R21 (high end) and R22 (low end) are connected in series to divide the voltage, and the midpoint is connected to the ADC pin of U1; the voltage regulator U2 (model AMS1117) reduces the battery voltage to 3.3V (VCC) for use by the main control chip; capacitors C1 (100nF), C2 (10μF), and C3 (100nF) form a π-type filter to eliminate high-frequency noise.
[0056] Button triggering stage: Press the power button S1 → Battery voltage (6V) is limited by R17 → Drives the base of Q7 → Q7 conducts; Q7 collector outputs a high level to U1 → U1 determines that the button is valid and starts the voltage detection process.
[0057] Voltage detection stage: U1 sends a high level to the base of Q8 through R19 → Q8 turns on → R20 pulls down the gate voltage of Q9 → MOSFET Q9 turns on; The battery voltage (6V) is input to two paths via Q9: Voltage regulation path: to the input terminal of U2 → output a stable 3.3V (VCC) to power the system; Sampling path: Voltage divider via R21-R22 (ratio 1:1) → Midpoint voltage = Battery voltage / 2 → Input to ADC pin of U1.
[0058] U1 performs the calculation: the battery voltage is twice the ADC sampling value, for example: the ADC detects 2.75V → the battery voltage is 5.5V.
[0059] After the test is completed, U1 pulls down the base level of Q8 → Q8 is cut off → Q9 is turned off → the battery power supply path is cut off; the static current drops to <1μA (only the standby leakage current of Q7).
[0060] The voltage detection circuit monitors the battery voltage in real time, providing operators with intuitive feedback on the battery level. This design helps operators understand the battery status promptly, preventing coding failures or equipment damage due to insufficient battery power.
[0061] Figure 10 This is a schematic flowchart illustrating the method of using the above-mentioned encoding device provided by the present invention. The order of the steps in the flowchart can be changed or some can be omitted depending on different needs.
[0062] like Figure 10 As shown, the method includes: Step 310: Connect the fire alarm front end to be coded via a spring pin; Step 320: Press the read key in the key array, and the main control chip U1 sends a read command to the fire protection front end to be coded through a preset communication protocol; Step 330: Receive the address number and type number from the fire protection front-end to be coded, and display the code reading result on the display screen; Step 340: Input the address number corresponding to the fire protection front-end to be coded via the key array, and display the current address number on the display screen; Step 350: After inputting the information, press the write key in the key array to send the input address number to the fire protection front end to be coded; Step 360: Receive the write address result from the fire protection front-end to be coded and verify it; Step 370: After successful verification, the current address number is automatically incremented by 1, and the next address number to be written is displayed on the screen.
[0063] To facilitate understanding of the present invention, the following description further illustrates the usage method of the encoding device provided by the present invention, based on the principle of the usage method of the encoding device and the process of encoding the fire front-end equipment using the above-mentioned encoding device in the embodiments.
[0064] The operator connects the spring-loaded pin of the coding device to the bus terminal of the fire protection front-end (such as a fire detector) to be coded, without polarity. The spring-loaded pin design eliminates the need to distinguish between positive and negative terminals, simplifying on-site operation.
[0065] Read address operation (steps 320-330): Press the read button, and the main control chip U1 (model HC32L130J8TA) sends a read command to the fire front end through the preset communication protocol (optimized based on the fire protection industry standard Modbus protocol).
[0066] The fire alarm front end replies with its address number and type number (in the format "XXX-XX", such as "127-04" which means address 127 and type 04).
[0067] The main control chip U1 analyzes and replies with the following data: Verify the integrity of the data frame format; Perform CRC cyclic redundancy check; Failure to respond within 5 seconds will result in disqualification.
[0068] The verification result is displayed on a 6-digit LCD screen: if successful, the address and type are displayed (e.g., "127-04"); if unsuccessful, "Err" is displayed.
[0069] Write address operation (steps 340-370): Enter the target address number (1-252) using the key array, with the input order being high-order bits first (e.g., for address 127, press 1, 2, 7 in sequence).
[0070] Press the write button, and the main control chip U1 sends the address number to the fire front end.
[0071] After the fire alarm front-end is successfully written, it sends a confirmation message, and the main control chip U1 performs verification: Verify that the response data conforms to the pre-stored protocol specifications; CRC check passed; Failure to respond within 5 seconds will result in disqualification.
[0072] Verification successful: The screen displays "yes"; Automatically increment the current address number by 1 (e.g., 127 → 128) and display the next address number to be written.
[0073] Verification failed: "Err" is displayed, and you need to try again.
[0074] In addition, the method also includes: during the read and write process, the output level is detected in real time by a voltage detection circuit, and a short circuit is detected by a short circuit detection circuit, and the output of the main control chip U1 is stopped when a short circuit is detected.
[0075] Furthermore, the method also includes: detecting the key array through a key detection circuit, and when it is determined that there is no key operation for more than 10 seconds, the main control chip U1 enters sleep mode.
[0076] The specific implementation steps for rewriting the device type in the fire protection front-end coding equipment are as follows: Enter extended mode: In the initial state (screen displays "000-00"), the user enters the specific sequence "911" three times consecutively and presses the write key: The first time you type "911" and press the write key, the screen displays "Err". The second attempt to repeat the operation resulted in the screen still displaying "Err". The third repeat of the operation → the screen switches to 6 horizontal lines "------", indicating that the extended working mode has been successfully entered.
[0077] Type encoding writing: In extended mode (displayed as "------"), the user inputs the target type code (such as smoke detector code "04", heat detector code "05", etc.) via the key array. Press the write button, and the main control chip U1 will send the type code to the fire front-end equipment through the preset communication protocol; Successfully written: After the front-end device successfully receives and writes the data, it sends a confirmation command back to the encoder. The encoder verifies the response data (format compliance + CRC check) and passes → the screen displays "yes" → it automatically exits extended mode and restores the initial state "000-00".
[0078] Write failed: If no response is received from the front end within 5 seconds or the verification fails, the screen will display "000-00" but remain in extended mode. The user can re-enter the type code and retry the write operation.
[0079] Force exit extended mode: Users can press the clear button at any time to force exit extended mode and restore the screen to its initial state "000-00".
[0080] This invention requires three consecutive inputs of "911" to activate the extended mode, avoiding accidental entry due to misoperation (such as accidentally pressing the "9" or "1" keys).
[0081] The present invention also provides a computer storage medium, wherein the computer storage medium may store a program, which, when executed, may include some or all of the steps provided in the embodiments of the present invention. The storage medium may be a magnetic disk, an optical disk, read-only memory (ROM), or random access memory (RAM), etc.
[0082] Those skilled in the art will clearly understand that the techniques in the embodiments of the present invention can be implemented using software plus necessary general-purpose hardware platforms. Based on this understanding, the technical solutions in the embodiments of the present invention, or the parts that contribute to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium such as a USB flash drive, mobile hard drive, read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk, or other media capable of storing program code. It includes several instructions to cause a computer terminal (which may be a personal computer, server, or a second terminal, network terminal, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention.
[0083] The same or similar parts between the various embodiments in this specification can be referred to mutually. In particular, the terminal embodiments are basically similar to the method embodiments, so the description is relatively simple, and the relevant parts can be referred to the description in the method embodiments.
[0084] Although the present invention has been described in detail with reference to the accompanying drawings and preferred embodiments, the present invention is not limited thereto. Various equivalent modifications or substitutions can be made to the embodiments of the present invention by those skilled in the art without departing from the spirit and essence of the invention, and such modifications or substitutions should all be within the scope of the present invention. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should also be covered within the protection scope of the present invention.
Claims
1. A coding device for fire protection front-end, characterized in that, It includes a housing (110) and a display screen (120), a key array (130) and a spring pin (140) disposed on the housing (110). The housing (110) contains a main control chip U1. The key array (130) is connected to the input terminal of the main control chip U1. The display screen (120) is connected to the output terminal of the main control chip U1. The main control chip U1 is connected to the fire front end to be coded through the spring pin (140).
2. The coding device for fire protection front-end according to claim 1, characterized in that, It also includes a power module that powers the entire device, the power module including a USB charging port (150) disposed on the housing (110) and a battery disposed inside the housing (110), the USB charging port (150) being connected to the battery.
3. The coding device for fire protection front-end according to claim 2, characterized in that, It also includes a USB charging detection circuit set inside the housing (110). The USB charging detection circuit includes a diode D1, a resistor R1, a resistor R2, a transistor Q1 and a resistor R3. The first end of the resistor R1 and the positive terminal of the diode D1 are both connected to the power supply pin of the USB charging interface (150). The negative terminal of the diode D1 is connected to the power supply terminal of the fire front-end equipment. The second end of the resistor R1 is connected to the first end of the resistor R2 and the base of the transistor Q1. The second end of the resistor R2 and the emitter of the transistor Q1 are both grounded. The collector of the transistor Q1 is connected to the first end of the resistor R3 and the main control chip U1. The second end of the resistor R3 is connected to the VCC power supply.
4. The coding device for fire protection front-end according to claim 2, characterized in that, It also includes a key detection circuit set in the housing (110). The key detection circuit includes several pull-up resistors and several current-limiting resistors. Keys in the same column are connected to the VCC power supply through pull-up resistors, and keys in the same row are connected to the main control chip U1 through current-limiting resistors.
5. The coding device for fire protection front-end according to claim 2, characterized in that, It also includes a short-circuit protection circuit disposed in the housing (110), the short-circuit protection circuit including resistor R4, transistor Q2, resistor R5, resistor R6, transistor Q3, diode D2, resistor R7, resistor R8, transistor Q4, diode D3, diode D4, resistor R9, transistor Q5, resistor R11, resistor R12, transistor Q6, resistor R13, resistor R14 and resistor R15; The first terminal of resistor R4 is connected to the main control chip U1. The second terminal of resistor R4 is connected to the base of transistor Q2. The collector of transistor Q2 is connected to the first terminal of resistor R6 and the base of transistor Q3 through resistor R5. The emitter of transistor Q3, the second terminal of resistor R6, and the cathode of diode D2 are all connected to a 15V power supply. The collector of transistor Q3 and the anode of diode D2 are connected to the first terminals of resistors R7 and R8, and the emitter of transistor Q4. The second terminal of resistor R7 is connected to the cathode of diode D3 and the anode of diode D4. The anode of diode D3 is connected to the base of transistor Q5 and the first terminal of resistor R9. The collector of transistor Q5 is connected to... The second terminal of resistor R8 is connected to the base of transistor Q4. The collector of transistor Q4 is connected to the cathode of diode D4, the first terminal of resistor R11, and the spring pin (140). The second terminal of resistor R11 is connected to the main control chip U1 and the first terminal of resistor R12. The first terminal of resistor R13 is connected to the VCC power supply. The second terminal of resistor R13 is connected to the main control chip U1 and the collector of transistor Q6. The base of transistor Q6 is connected to the spring pin (140) and the first terminal of resistor R15 through resistor R14. The emitter of transistor Q2, the second terminal of resistor R9, the emitter of transistor Q5, the second terminal of resistor R12, the emitter of transistor Q6, and the second terminal of resistor R15 are all grounded.
6. The coding device for fire protection front-end according to claim 2, characterized in that, It also includes a voltage detection circuit disposed in the housing (110), the voltage detection circuit including transistor Q7, resistor R16, resistor R17, resistor R18, resistor R19, power button S1, transistor Q8, resistor R20, field effect transistor Q9, resistor R21, resistor R22, capacitor C1, capacitor C2, voltage regulator U2 and capacitor C3. The collector of transistor Q7 is connected to the main control chip U1 and the first terminal of resistor R16. The second terminal of resistor R16 is connected to the VCC power supply. The base of transistor Q7 is connected through resistor R17 to the first terminal of resistor R18 and the first terminal of power button S1. The second terminal of resistor R18 is connected to the first terminal of resistor R19 and the base of transistor Q8. The second terminal of resistor R19 is connected to the main control chip U1. The collector of transistor Q8 is connected to the first terminal of resistor R20 and the gate of MOSFET Q9. The second terminal of power button S1 and the MOSFET... The source of transistor Q9 is connected to the negative terminal of diode D1. The drain of transistor Q9 is connected to the first terminal of resistor R21, the first terminal of capacitor C1, the first terminal of capacitor C2, and the input terminal of voltage regulator U2. The second terminal of resistor R21 is connected to the main control chip U1 and the first terminal of resistor R22. The output terminal of voltage regulator U2 is connected to the VCC power output terminal. The emitters of transistors Q7 and Q8, the second terminal of resistor R22, the second terminal of capacitor C1, the second terminal of capacitor C2, and the second terminal of capacitor C3 are all grounded.
7. The coding device for fire protection front-end according to claim 1, characterized in that, It also includes a backlight panel consisting of resistor R23 and light-emitting diode D5. The first end of resistor R23 is connected to the main control chip U1, resistor R23 is connected to the positive terminal of light-emitting diode D5, and the negative terminal of diode D5 is grounded.
8. A method of using an encoding device according to any one of claims 1-7, characterized in that, include: Connect to the fire protection front end to be coded via a spring-loaded pin; Press the read key in the key array, and the main control chip U1 sends a read command to the fire front end to be coded through a preset communication protocol; Receive the address number and type number from the fire protection front-end to be coded, and display the code reading result on the screen; Input the address number corresponding to the fire protection front-end to be coded via the key array, and display the current address number on the screen; After inputting the information, press the write key in the key array to send the input address number to the fire protection front end to be coded; Receive the address writing result from the fire protection front end to be coded, and verify it; Once the verification is successful, the current address number will be automatically incremented by 1, and the next address number to be written will be displayed on the screen.
9. The method of use according to claim 8, characterized in that, Also includes: During the read and write process, the output level is detected in real time by the voltage detection circuit, and a short circuit is detected by the short circuit detection circuit. When a short circuit is detected, the output of the main control chip U1 is stopped.
10. The method of use according to claim 8, characterized in that, Also includes: The key array is detected by a key detection circuit, and the main control chip U1 enters sleep mode when it is determined that there is no key operation for more than 10 seconds.