Control trigger and output protection system and method of intense pulsed light therapeutic instrument
By implementing trigger recognition and output protection for the intense pulsed light therapy device through hardware circuitry, the problems of slow response and safety risks caused by software dependence are solved, thereby improving the device's response speed and safety and adapting to different treatment needs.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-15
- Publication Date
- 2026-03-10
AI Technical Summary
Existing intense pulsed light therapy devices rely on software for trigger detection and pulse control, resulting in high CPU resource consumption, slow response speed, and susceptibility to false triggering. Furthermore, when the microcontroller malfunctions, the pulse output becomes uncontrollable, posing a safety risk.
Hardware circuitry is used to implement trigger identification and output protection. The pulse output duration is limited by a hardware trigger identification module and a monostable unit, and the quasi-stable time is adjusted by a digitally adjustable resistor to avoid continuous software detection and microcontroller malfunction.
It improves trigger response speed, reduces device power consumption, avoids false triggering and device damage, enhances safety, and adapts to the pulse train duration requirements of different treatment scenarios.
Smart Images

Figure CN121645598A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the field of medical equipment technology improvement, and particularly relates to a control trigger and output protection system and method of intense pulsed light therapy instrument. BACKGROUND
[0002] The intense pulsed light therapy instrument is a medical instrument for treating human skin diseases or improving skin conditions by emitting multiple wavelengths of intense light at a time or periodically. Its traditional working mode is as follows: the pulse width, sub-pulse interval, pulse train length, energy parameters, etc. are set through a touch screen, and then a handle button or a foot pedal is used as a trigger signal. After the single-chip microcomputer receives the trigger signal, a pulse signal is output to control the xenon lamp power supply, and finally the xenon lamp on the handle releases light energy.
[0003] In the prior art, the trigger signal detection and pulse output control of the intense pulsed light therapy instrument depend on the software of the single-chip microcomputer, and the following technical defects exist: When the software detects the pressing and releasing state of the foot pedal or the handle button, the CPU resources of the single-chip microcomputer are continuously occupied, resulting in slow trigger response speed, and the software running process is easily disturbed, which may cause false triggering problems; If the single-chip microcomputer program is out of control, the pulse train output will be out of control, causing the xenon lamp to release light energy for a long time, which not only may damage the equipment, but also may cause burns and other safety risks to the human skin, and cannot guarantee the safety of the treatment process.
[0004] To solve the above technical defects of the prior art, the present application proposes a control trigger and output protection scheme based on a hardware circuit to improve the trigger response speed, avoid false triggering, and improve the safety of equipment use by limiting the pulse output time through hardware. SUMMARY
[0005] The present application aims to provide a control trigger and output protection system and method of intense pulsed light therapy instrument, which aims to solve the technical problems of high CPU resource occupation, slow response, easy false triggering, and high safety risk caused by single-chip microcomputer out of control leading to pulse output out of control in the prior art intense pulsed light therapy instrument.
[0006] The present application is implemented as follows: a control trigger and output protection system of intense pulsed light therapy instrument, which comprises a hardware trigger recognition module, a single-chip microcomputer U8, a hardware output protection module, a foot pedal switch K1, a handle case K2, and a NOT gate U9. The hardware trigger recognition module is used to receive the switching information of the foot switch K1 and the handle button K2, and determine whether it is a valid trigger based on a preset logic condition. The preset logic condition is: when the first switch is in the pressed state, the second switch changes from the released state to the pressed state, and a pulse-shaped valid trigger signal is generated. The microcontroller U8 is used to connect with the hardware trigger recognition module, receive the valid trigger signal, and generate a corresponding pulse control sequence according to the user-set parameters; The hardware output protection module is used to connect to the microcontroller U8 and limit the maximum output duration of the pulse control sequence; The foot switch K1 and the handle K2 are used to input operation signals; The NOT gate U9 is used to connect the input terminal to the trigger signal of the hardware trigger identification module, and the output terminal to the trigger terminal of the hardware output protection module, and to trigger the hardware output protection module to output a quasi-stable pulse.
[0007] A further technical solution of the present invention is: the hardware trigger recognition module includes a first D flip-flop U1, a second D flip-flop U4, a first AND gate U2, a second AND gate U3, a third AND gate U5, a fourth AND gate U6, and an OR gate U7. The signal output terminal of the foot switch K1 is connected to one input terminal of the first AND gate U2 and the D terminal of the first D flip-flop U1, respectively. The signal output terminal of the handle button K2 is connected to one input terminal of the third AND gate U5 and the D terminal of the second D flip-flop U4, respectively. The first D flip-flop U1 One terminal is connected to the other input terminal of the first AND gate U2, the output terminal of the first AND gate U2 is connected to one input terminal of the second AND gate U3, and the other input terminal of the second AND gate U3 is connected to the signal of the handle button K2; The second D flip-flop U4 One terminal is connected to the other input terminal of the third AND gate U5, the output terminal of the third AND gate U5 is connected to one input terminal of the fourth AND gate U6, and the other input terminal of the fourth AND gate U6 is connected to the signal of the foot switch K1; The outputs of the second AND gate U3 and the fourth AND gate U6 are both connected to the input of the OR gate U7, and the output of the OR gate U7 is connected to the trigger signal receiver of the microcontroller. The clock output terminal CP of the microcontroller U8 is connected to the clock terminals of the first D flip-flop U1 and the second D flip-flop U4 respectively, and is used to provide clock signals for the D flip-flops.
[0008] A further technical solution of the present invention is as follows: the hardware output protection module includes a monostable unit U10 and an AND gate U11. The trigger terminal of the monostable unit U10 is connected to the output terminal of the NOT gate U9, and the output terminal of the monostable unit U10 is connected to one input terminal of the AND gate U11. The other input terminal of the AND gate U11 is connected to the pulse output terminal of the microcontroller, and the output terminal of the AND gate U11 is connected to the control terminal of the xenon lamp power supply for controlling the pulse output of the xenon lamp power supply.
[0009] A further technical solution of the present invention is as follows: the monostable unit U10 includes a digitally adjustable resistor chip R1, a resistor R2, and a capacitor C1. The communication interface of the microcontroller U8 is connected to the control terminal of the digitally adjustable resistor chip R1 via IIC or SPI communication. One end of the digitally adjustable resistor chip R1 is connected to the power supply VCC, and the other end of the digitally adjustable resistor chip R1 is connected to one end of the capacitor C1 via the resistor R2. The digitally adjustable resistor R1 is used to adjust the quasi-stable time of the monostable unit U10, thereby setting the maximum output duration.
[0010] A further technical solution of the present invention is as follows: the quasi-stable time of the monostable unit U10 is calculated by the formula T=1.1×(R1+R2)×C1, where R1 is the resistance value of the digitally adjustable resistor, R2 is the resistance value of the fixed resistor, and C1 is the capacitance of the capacitor in the monostable unit; the digitally adjustable resistor chip is an AD5245 chip, and the microcontroller communicates with the AD5245 chip through the IIC or SPI communication protocol to set the resistance value of the digitally adjustable resistor.
[0011] A further technical solution of the present invention is: the triggering logic of the hardware triggering identification module satisfies the following: only when the foot switch K1 and the handle button K2 are pressed at the same time, or one of them is in the pressed state and the other is switched from the released state to the pressed state, will the OR gate U7 output a valid trigger pulse to the microcontroller.
[0012] Another objective of this invention is to provide a control triggering and output protection method for an intense pulsed light therapy device, applied to the aforementioned control triggering and output protection system. The control triggering and output protection method includes the following steps: S1. The user sets the target output time T of the pulse train of the intense pulsed light therapy device via the display screen. target ; S2. The microcontroller receives the pulse train output time T set by the user through the human-machine interface. target According to the metastable time formula T=1.1×(R1+R2)×C1 of the monostable unit, calculate the target resistance value R1target of the digital adjustable resistor, where R2 is the fixed resistance value and C1 is the capacitance value in the monostable module. S3. The microcontroller sends a control command to the digital adjustable resistor chip through the communication interface to adjust the resistance value of the digital adjustable resistor to R1target, and writes the resistance value into the non-volatile register to achieve power-off retention. S4. The hardware trigger recognition module detects the operation signals of the foot switch K1 and the handle button K2. When the preset trigger conditions are met, it outputs a valid trigger pulse to the microcontroller. S5. After the microcontroller detects a valid trigger pulse through an external interrupt, it outputs a pulse train of the corresponding duration from the pulse output interface to the fifth AND gate U11 according to the pulse train target output time Ttarget set by the user; at the same time, the monostable unit U10 outputs a high-level pulse of duration T to the fifth AND gate U11. S6 and the fifth AND gate U11 perform an AND operation on the pulse train output by the microcontroller and the high-level pulse output by the monostable unit, and output the final control pulse to the xenon lamp power supply to control the xenon lamp power supply to release light energy for the corresponding duration.
[0013] A further technical solution of the present invention is that the preset starting conditions in step S4 include: Condition A: The foot switch K1 and the handle button K2 are both pressed simultaneously; Condition B: The foot switch K1 is in the pressed state, and the handle button K2 changes from the released state to the pressed state; Condition C: The handle button K2 is in the pressed state, and the foot switch K1 switches from the released state to the pressed state.
[0014] A further technical solution of the present invention is: the process of the microcontroller sending control commands to the digitally adjustable resistor in step S3 includes: S31. Send the 0x00 command to the digital adjustable resistor chip, instructing it to write to the real-time control register; S32. Send the position value of the digital adjustable resistor calculated based on the target resistance value R1target. The position value is calculated using the formula "position value = target resistance value × 255 ÷ maximum resistance value of digital adjustable resistor". S33. Send the 0x01 command to the digital adjustable resistor chip, instructing the current resistance value to be written to the non-volatile register.
[0015] A further technical solution of the present invention is: when the microcontroller program malfunctions in step S5 and the duration of the output pulse train exceeds T target, the high-level pulse output by the monostable unit U10 will become low-level after the duration T ends, causing the fifth AND gate U11 to stop outputting control pulses and limiting the maximum output duration of the xenon lamp power supply.
[0016] The beneficial effects of this invention are: trigger recognition is achieved through hardware circuitry, eliminating the need for continuous software detection, avoiding the occupation of microcontroller CPU resources, improving trigger response speed, and reducing device power consumption. The hardware logic only outputs a valid signal when "two buttons are pressed at the same time" or "one button is pressed and one triggers". Single button operation will not trigger, which completely solves the problem of software detection being prone to false triggering. Hardware-level pulse duration limiting is achieved through a monostable unit, which can forcibly limit the maximum output duration of the xenon lamp even if the microcontroller program malfunctions, thus preventing equipment damage and human injury. By dynamically adjusting the metastable time of the monostable module using a digitally adjustable resistor, the pulse train duration can be matched to the needs of different treatment scenarios without the need to change the hardware, making it widely applicable. Attached Figure Description
[0017] Figure 1 This is a schematic diagram of the overall structure of the control triggering and output protection circuit provided in an embodiment of the present invention; Figure 2 This is a schematic diagram of the circuit structure of the monostable unit provided in an embodiment of the present invention; Figure 3 This is a flowchart of the control triggering and output protection method of the intense pulsed light therapy device provided in the embodiments of the present invention. Detailed Implementation
[0018] Embodiments of the present invention are described in detail below, examples of which are illustrated in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain the present invention, and should not be construed as limiting the present invention.
[0019] In the description of this invention, it should be understood that the terms "length," "width," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," and "outer," etc., indicating orientation or positional relationships, are based on the orientation or positional relationships shown in the accompanying drawings and are only for the convenience of describing the invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of the invention. Furthermore, in the description of this invention, "a plurality of" means two or more, unless otherwise explicitly specified.
[0020] This invention implements the recognition logic of foot pedal and handle buttons through hardware circuitry, which speeds up response, prevents false triggering, and reduces overall power consumption.
[0021] The signal is triggered only when the foot pedal and button are pressed simultaneously, or when the foot pedal (button) is pressed, the button (foot pedal) is released, and then pressed again.
[0022] 2. Limit the pulse train emission time through hardware to reduce safety hazards.
[0023] like Figures 1-2 As shown, the control triggering and output protection system of the intense pulsed light therapy device provided by the present invention includes a hardware triggering identification module, a microcontroller U8, a hardware output protection module, a foot switch K1, a handle button K2, and a NOT gate U9. The hardware trigger recognition module receives the switching information from the foot switch K1 and the handle button K2, and determines whether a valid trigger is achieved based on preset logic conditions. The preset logic conditions are: when the first switch is in the pressed state, and the second switch changes from the released state to the pressed state, a pulse-shaped valid trigger signal is generated. The module consists of a first D flip-flop U1, a second D flip-flop U4, a first AND gate U2, a second AND gate U3, a third AND gate U5, a fourth AND gate U6, and an OR gate U7. It detects the operation signals of the foot switch K1 and the handle button K2, and outputs a valid trigger pulse to the microcontroller only when the preset trigger conditions are met. The hardware trigger recognition module implements trigger condition judgment through hardware logic, outputting a valid trigger pulse only in the following three cases, and the OR gate U7 outputs a high-level pulse: Case a: Foot switch K1 and handle button K2 are pressed simultaneously, i.e., high level 1 state; Case b: When foot switch K1 is in the pressed state, handle button K2 changes from the released state (i.e., low level 0) to the pressed state. Case c: The handle button K2 is in the pressed state, and the foot switch K1 changes from the released state to the pressed state; When K1 or K2 is pressed individually, the OR gate U7 outputs a low level of 0, which does not generate a valid trigger pulse and avoids false triggering.
[0024] The microcontroller U8 is used to connect with the hardware trigger recognition module, receive the valid trigger signal, and generate a corresponding pulse control sequence according to the user-set parameters. As the control core, its clock terminal provides a clock signal for the D flip-flop, the communication interface is connected to a digital adjustable resistor chip to adjust the monostable unit time, the pulse output interface outputs a pulse train, and at the same time, it receives the valid trigger pulse of the trigger recognition circuit through an external interrupt. The hardware output protection module is used to connect to the microcontroller U8 and limit the maximum output duration of the pulse control sequence; it realizes the quasi-stable state pulse output through the RC charging and discharging principle, and its quasi-stable state time can be adjusted by a digitally adjustable resistor to limit the maximum output duration of the pulse train; The foot switch K1 and the handle K2 are used to input operation signals; The NOT gate U9 is used to connect the input terminal to the trigger signal of the hardware trigger recognition module and the output terminal to the trigger terminal of the hardware output protection module, triggering the hardware output protection module to output a quasi-stable pulse. Trigger recognition is achieved through hardware circuitry, eliminating the need for continuous software detection, avoiding the occupation of microcontroller CPU resources, improving trigger response speed, and reducing device power consumption.
[0025] The hardware trigger recognition module includes a first D flip-flop U1, a second D flip-flop U4, a first AND gate U2, a second AND gate U3, a third AND gate U5, a fourth AND gate U6, and an OR gate U7. The signal output terminal of the foot switch K1 is connected to one input terminal of the first AND gate U2 and the D terminal of the first D flip-flop U1, respectively. The signal output terminal of the handle button K2 is connected to one input terminal of the third AND gate U5 and the D terminal of the second D flip-flop U4, respectively. The first D flip-flop U1 One terminal is connected to the other input terminal of the first AND gate U2, the output terminal of the first AND gate U2 is connected to one input terminal of the second AND gate U3, and the other input terminal of the second AND gate U3 is connected to the signal of the handle button K2; The second D flip-flop U4 One terminal is connected to the other input terminal of the third AND gate U5, the output terminal of the third AND gate U5 is connected to one input terminal of the fourth AND gate U6, and the other input terminal of the fourth AND gate U6 is connected to the signal of the foot switch K1; The outputs of the second AND gate U3 and the fourth AND gate U6 are both connected to the input of the OR gate U7, and the output of the OR gate U7 is connected to the trigger signal receiver of the microcontroller. The clock output terminal CP of the microcontroller U8 is connected to the clock terminals of the first D flip-flop U1 and the second D flip-flop U4 respectively, and is used to provide clock signals for the D flip-flops.
[0026] The hardware output protection module includes a monostable multivibrator U10 and an AND gate U11. The trigger terminal of the monostable multivibrator U10 is connected to the output terminal of the NOT gate U9, and the output terminal of the monostable multivibrator U10 is connected to one input terminal of the AND gate U11. The other input terminal of the AND gate U11 is connected to the pulse output terminal of the microcontroller, and the output terminal of the AND gate U11 is connected to the control terminal of the xenon lamp power supply to control the pulse output of the xenon lamp power supply. The xenon lamp power supply receives the control pulse from the AND gate U11 and drives the xenon lamp to release light energy. The output duration is determined by the AND operation result of the microcontroller pulse train and the monostable multivibrator module pulse.
[0027] The monostable unit U10 includes a digitally adjustable resistor chip R1, a resistor R2, and a capacitor C1. The communication interface of the microcontroller U8 is connected to the control terminal of the digitally adjustable resistor chip R1 via IIC or SPI communication. One end of the digitally adjustable resistor chip R1 is connected to the power supply VCC, and the other end of the digitally adjustable resistor chip R1 is connected to one end of the capacitor C1 via the resistor R2. The digitally adjustable resistor R1 is used to adjust the quasi-stable time of the monostable unit U10, thereby setting the maximum output duration. The digitally adjustable resistor chip R1 uses an AD5245 chip and communicates with the microcontroller via IIC or SPI protocol, receiving resistance control commands from the microcontroller and adjusting its own resistance to change the RC parameters of the monostable unit.
[0028] The quasi-stable time of the monostable unit U10 is calculated using the formula T = 1.1 × (R1 + R2) × C1, where R1 is the resistance of the digitally adjustable resistor, R2 is the resistance of the fixed resistor, and C1 is the capacitance of the capacitor in the monostable unit. The high-level pulse output from U10 is ANDed with the pulse train output from the microcontroller via the fifth AND gate (U11) to control the xenon lamp power supply. When the microcontroller is working normally, the duration of its output pulse train is consistent with the target time set by the user, the duration of the high-level pulse output by the monostable module is matched with it, and the fifth AND gate outputs control pulses normally. When the microcontroller program malfunctions and the pulse train duration exceeds the target time, the high-level pulse of the monostable module will turn low after the duration T ends, causing the fifth AND gate to stop outputting and forcing the xenon lamp power supply to stop working, thus achieving hardware-level protection.
[0029] The triggering logic of the hardware trigger recognition module satisfies the following condition: only when the foot switch K1 and the handle button K2 are pressed simultaneously, or when one of them is in the pressed state and the other is switched from the released state to the pressed state, will the OR gate U7 output a valid trigger pulse to the microcontroller.
[0030] Keys K1 and K2 represent the switching signals of the foot switch and the handle button, respectively; U1 and U4 are D flip-flops, U2, U3, U5, U6, and U11 are AND gates, U7 is an OR gate, U8 represents the microcontroller, U9 is an NOT gate, U10 is a monostable unit, the microcontroller clock CP provides the clock for the flip-flops; the microcontroller communication interface controls the digital adjustable resistor chip, adjusting the metastable time of the monostable module through the RC charging and discharging principle; the microcontroller pulse output interface outputs a pulse sequence. The functions of a single button press are as follows: Condition 1: K1 is pressed and K2 is released. Pressing is represented by a high level of 1, and releasing is represented by 0. U2-Y = K1&U1-~Q; When K2 is released and K1 is pressed, U7-Y outputs 0. Similarly, when K1 is released and K2 is pressed, U7-Y outputs 0; Conclusion 1: Pressing either button K1 or K2 alone will not trigger the output pulse signal of U7; The functions of pressing the two buttons are as follows: Condition 2: K1 changes from being released to being pressed, and K2 is in the pressed state. Conclusion 2: When K2 is in the pressed state, K1 changes from released to pressed, and U7-Y outputs a pulse; Similarly, when K1 is in the pressed state, K2 changes from released to pressed, and U7-Y outputs a pulse; After receiving the U7-Y pulse signal, the microcontroller considers it a valid trigger signal; To prevent the microcontroller program from malfunctioning and causing prolonged pulse output, the solution uses a monostable unit to limit the maximum pulse output. The limiting time can be dynamically set as needed to meet the requirements of different pulse train outputs. The maximum pulse time output by the monostable module = 1.1*(R1+R2)*C1; To make the maximum pulse time adjustable, a variable resistor chip is used, and the resistance value of the variable resistor is set through the microcontroller communication interface (IIC or SPI). The maximum pulse time output by the final monostable module is 1.1*(R1+R2)*C1; The maximum output time of a typical pulse train is 200ms, and R1 can be set to 8.898KΩ; C1 = 20uf. The maximum pulse time of the monostable unit output = 1.1 * (8.898 + 0.2) KΩ * 20uf = 200.1 ms; The pulse output from the monostable unit and the pulse output from the microcontroller are passed through AND gate U11 to control the xenon lamp power supply; Even if the microcontroller program malfunctions, causing the pulse train output by the microcontroller to last too long, the monostable module can limit it to within the set pulse time; limiting its output time through hardware ensures safety and reliability. The steps to complete one pulse train output are as follows: Step 1: The user sets the pulse train time via the display screen, for example, 200ms. After receiving the setting parameters from the display screen, the microcontroller calculates the resistance value corresponding to 200ms output from the monostable module: R1 = 200ms / 1.1 / 20uf - R2 = 8890. The position of the digital resistor adjustment = target resistance value × 255 ÷ maximum resistance value; therefore, the position = 8.890 * 255 / 10 = 226.7. A 0x00 command is sent to the digital adjustable resistor AD5245, indicating that it is written to the real-time control register. The calculated position value of 227 is sent. A 0x01 command is sent to write to the non-volatile register, so that the current resistance value can be saved even after power failure. The resistance value is adjusted through the above steps.
[0031] Step 2: After the microcontroller's I / O interface detects a trigger pulse through an external interrupt, it outputs a 200ms pulse train to U11-A according to the parameters set by the user; at the same time, the monostable unit outputs a high-level pulse with a high-level duration of 200.1ms. Step 3: Complete the pulse time output through the above steps.
[0032] Another objective of this invention is to provide a control triggering and output protection method for an intense pulsed light therapy device, applied to the aforementioned control triggering and output protection system. The control triggering and output protection method is detailed below: S1. The user sets the target output time Ttarget of the intense pulsed light therapy device via the human-machine interface display; for example, the target output time is 200ms. S2. The microcontroller receives the pulse train output time Ttarget set by the user through the human-machine interface, and calculates the target resistance value R1target of the digital adjustable resistor according to the metastable time formula of the monostable unit T=1.1×(R1+R2)×C1, where R2 is the fixed resistance value and C1 is the capacitance in the monostable module. It also calculates the corresponding position value of the digital adjustable resistor, which is: position value = target resistance value × 255 ÷ maximum resistance value. S3. The microcontroller sends a control command to the digital adjustable resistor chip through the communication interface to adjust the resistance value of the digital adjustable resistor to R1target, and writes the resistance value into the non-volatile register to achieve power-off retention; the microcontroller sends a control command to the AD5245 chip, with the 0x00 command written into the real-time register and the position value, and the 0x01 command written into the non-volatile register to adjust the digital adjustable resistor to the target resistance value; S4. The hardware trigger recognition module detects the operation signals of the foot switch K1 and the handle button K2. When the preset trigger conditions are met, it outputs a valid trigger pulse to the microcontroller. S5. After the microcontroller detects a valid trigger pulse through an external interrupt, it outputs a pulse train of the corresponding duration from the pulse output interface to the fifth AND gate U11 according to the pulse train target output time Ttarget set by the user; at the same time, the monostable unit U10 outputs a high-level pulse of duration T to the fifth AND gate U11. S6 and the fifth AND gate U11 perform an AND operation on the pulse train output by the microcontroller and the high-level pulse output by the monostable unit, and output the final control pulse to the xenon lamp power supply to control the xenon lamp power supply to release light energy for the corresponding duration; the fifth AND gate outputs a control pulse to the xenon lamp power supply to control the xenon lamp to release light energy, completing one pulse output.
[0033] The preset departure conditions in step S4 include: Condition A: The foot switch K1 and the handle button K2 are both pressed simultaneously; Condition B: The foot switch K1 is in the pressed state, and the handle button K2 changes from the released state to the pressed state; Condition C: The handle button K2 is in the pressed state, and the foot switch K1 switches from the released state to the pressed state.
[0034] The process of the microcontroller sending control commands to the digitally adjustable resistor in step S3 includes: S31. Send the 0x00 command to the digital adjustable resistor chip, instructing it to write to the real-time control register; S32. Send the position value of the digital adjustable resistor calculated based on the target resistance value R1target. The position value is calculated using the formula "position value = target resistance value × 255 ÷ maximum resistance value of digital adjustable resistor". S33. Send the 0x01 command to the digital adjustable resistor chip, instructing the current resistance value to be written to the non-volatile register.
[0035] When the microcontroller program malfunctions in step S5, causing the duration of the output pulse train to exceed T target, the high-level pulse output by the monostable unit U10 will become low-level after the duration T ends, causing the fifth AND gate U11 to stop outputting control pulses and limiting the maximum output duration of the xenon lamp power supply.
[0036] Example 1: System Hardware Selection and Connection In this embodiment, the hardware components are selected as follows: The U8 microcontroller uses the STM32F103C8T6 chip and features IIC / SPI communication interfaces, external interrupt functions, and multiple I / O interface outputs. D flip-flops U1 and U4: Use 74HC74 chips and a dual D flip-flop structure to meet clock triggering requirements; AND gates U2, U3, U5, U6 and U11: Use 74HC08 chip, four two-input AND gates to implement logical AND operation; OR gate U7: Uses the 74HC32 chip, a quad-input OR gate, to implement logical OR operations; NOT gate U9: Uses a 74HC04 chip, a hex inverter, to achieve signal inversion; Monostable Unit U10: Uses 74HC123 chip, retriggered monostable trigger; Digital adjustable resistor chip: model AD5245, 10KΩ range, communicates via IIC / SPI protocol; Fixed resistor R2: 0.2KΩ, capacitor C1: 20μF.
[0037] The connection method of each component strictly follows Figure 1 The structure shown is as follows, wherein: The microcontroller's PA0 pin serves as the clock input CP, which is connected to the CLK pins of U1 and U4. The microcontroller's IIC / SPI interface (SDA / PB7, SCL / PB6) is connected to the SDA / SCL pin of the monostable multivibrator U10; The microcontroller's PB0 pin is used as a pulse output terminal and connected to terminal A of U11; The output of U9 is connected to the trigger terminal TRIG of U10, and the output of U10 is connected to the B terminal of U11. The output of U11 is connected to the control signal input of the xenon lamp power supply.
[0038] Example 2: This embodiment takes a user-set pulse train target output time of 200ms as an example to explain the control process in detail: Setting parameters: The user inputs "pulse train time = 200ms" through an input device such as a touch screen, and the display sends this parameter to the microcontroller; Resistance calculation: The microcontroller uses the formula T=1.1×(R1+R2)×C1. Substituting T=200ms, R2=0.2KΩ, and C1=20μF, we can calculate R1=(200ms÷(1.1×20μF)). 0.2KΩ = 8.898KΩ; Further calculation of the position value of the digital adjustable resistor: The maximum resistance of the monostable unit U10 is 10KΩ, and the position value = 8.898KΩ × 255 ÷ 10KΩ ≈ 227; Resistance adjustment: The microcontroller sends a 0x00 command to the monostable unit U10 via the IIC / SPI interface, indicating that the real-time control register should be written. Send position value 227 to monostable unit U10 and adjust its resistance to 8.898KΩ; Send the 0x01 command to the monostable unit U10 to write the current resistance value into the non-volatile register, thus achieving power-off retention.
[0039] Trigger detection: The user first presses the handle button K2 and keeps it pressed, then presses the foot switch K1; the trigger recognition circuit detects the signal of "K2 pressed, K1 changed from loose to pressed", and after the logic operation of the first D flip-flop U1, AND gate U2, AND gate U3, and OR gate U7, it outputs a high-level pulse to the microcontroller's external interrupt pin PA1. Pulse Output: The microcontroller detects a valid trigger pulse via an external interrupt and outputs a 200ms pulse train from the PB0 pin. The pulse train has a frequency of 50Hz and a duty cycle of 50%. The PB0 pin signal is output to the A terminal of AND gate U11, and simultaneously triggers the monostable unit U10 to output a high-level pulse with a duration of 1.1×(8.898KΩ+0.2KΩ)×20μF≈200.1ms. U11 performs an AND operation on the "200ms pulse train" and the "200.1ms high level", and outputs a 200ms control pulse to the xenon lamp power supply. Under the action of the control pulse, the xenon lamp power supply drives the xenon lamp to release 200ms of intense light, completing one treatment operation. Runaway protection test: If the microcontroller program runs out of control, causing the PB0 pin to continuously output a high level for more than 200ms, when the high-level pulse output by the monostable unit U10 changes to a low level after 200.1ms, the AND gate U11 will stop outputting control pulses, and the xenon lamp power supply will immediately stop working to prevent the xenon lamp from emitting light for a long time.
[0040] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A control trigger and output protection system for an intense pulsed light therapy device, characterized in that, The control trigger and output protection system comprises a hardware trigger identification module, a single-chip microcomputer U8, a hardware output protection module, a foot switch K1, a handle switch K2 and a NOT gate U9. The hardware trigger identification module is configured to receive switch information of the foot switch K1 and the handle switch K2, and determine whether it is a valid trigger based on a preset logic condition. The preset logic condition is that when the first switch is in a pressed state, the second switch changes from a released state to a pressed state, and then a pulse-form valid trigger signal is generated. The single-chip microcomputer U8 is configured to be connected with the hardware trigger identification module, receive the valid trigger signal, and generate a corresponding pulse control sequence according to user setting parameters. The hardware output protection module is configured to be connected with the single-chip microcomputer U8, and limit the maximum output duration of the pulse control sequence. The foot switch K1 and the handle switch K2 are configured to input operation signals. The NOT gate U9 is configured to be connected with the trigger signal of the hardware trigger identification module at an input end, and be connected with the trigger end of the hardware output protection module at an output end, and trigger the hardware output protection module to output a temporary stable state pulse.
2. The control trigger and output protection system of the intense pulsed light treatment instrument according to claim 1, wherein, The hardware trigger identification module comprises a first D flip-flop U1, a second D flip-flop U4, a first AND gate U2, a second AND gate U3, a third AND gate U5, a fourth AND gate U6 and an OR gate U7. The signal output end of the foot switch K1 is connected with one input end of the first AND gate U2 and the D end of the first D flip-flop U1 respectively. The signal output end of the handle switch K2 is connected with one input end of the third AND gate U5 and the D end of the second D flip-flop U4 respectively. The first D flip-flop U1 has The other input terminal of the first AND gate U2 is connected with the terminal, one input terminal of the second AND gate U3 is connected with the output terminal of the first AND gate U2, and the other input terminal of the second AND gate U3 is connected with the signal of the handle button K2. The other input terminal of the second D flip-flop U4 is connected to the output terminal of the first D flip-flop U3, and the output terminal of the second D flip-flop U4 is connected to the input terminal of the second NOR gate U7. The other input terminal of the third AND gate U5 is connected to the output terminal of the second NOR gate U7, and the output terminal of the third AND gate U5 is connected to one input terminal of the fourth AND gate U6. The output end of the second AND gate U3 and the output end of the fourth AND gate U6 are both connected with the input end of the OR gate U7. The output end of the OR gate U7 is connected with the trigger signal receiving end of the single-chip microcomputer. The clock output end CP of the single-chip microcomputer U8 is connected with the clock end of the first D flip-flop U1 and the second D flip-flop U4 respectively, so as to provide a clock signal for the D flip-flop.
3. The control trigger and output protection system of the intense pulsed light treatment instrument according to claim 2, wherein, The hardware output protection module comprises a monostable multivibrator U10 and a fifth AND gate U11. The trigger end of the monostable multivibrator U10 is connected with the output end of the NOT gate U9. The output end of the monostable multivibrator U10 is connected with one input end of the fifth AND gate U11. The other input end of the fifth AND gate U11 is connected with the pulse output end of the single-chip microcomputer. The output end of the fifth AND gate U11 is connected with the control end of the xenon lamp power supply, so as to control the pulse output of the xenon lamp power supply.
4. The control trigger and output protection system of the intense pulsed light treatment instrument according to claim 3, wherein, The monostable multivibrator U10 comprises a digital adjustable resistance chip R1, a resistor R2 and a capacitor C1. The communication interface of the single-chip microcomputer U8 is connected with the control end of the digital adjustable resistance chip R1 through IIC or SPI communication. One end of the digital adjustable resistance chip R1 is connected with a power supply VCC. The other end of the digital adjustable resistance chip R1 is connected with one end of the capacitor C1 through the resistor R2. The digital adjustable resistance chip R1 is used to adjust the temporary stable state time of the monostable multivibrator U10, so as to set the maximum output duration.
5. The control trigger and output protection system of the intense pulsed light treatment instrument according to claim 4, wherein, The monostable unit U10's transient state time is calculated by the formula T=1.1×(R1+R2)×C1, wherein R1 is the resistance value of the digital adjustable resistor, R2 is the resistance value of the fixed resistor, and C1 is the capacitance of the capacitor in the monostable unit; the digital adjustable resistor chip is an AD5245 chip, and the single-chip microcomputer communicates with the AD5245 chip through IIC or SPI communication protocol to set the resistance value of the digital adjustable resistor.
6. The control trigger and output protection system of the intense pulsed light treatment instrument according to claim 5, wherein, The trigger logic of the hardware trigger recognition module meets: only when the foot switch K1 and the handle button K2 are pressed at the same time, or one is in the pressed state and the other is switched from the released state to the pressed state, or the gate U7 outputs a valid trigger pulse to the single-chip microcomputer.
7. A control trigger and output protection method for intense pulsed light therapy apparatus, characterized in that, The control trigger and output protection system of any one of claims 1-6, the control trigger and output protection method comprising the following steps: S1, the user sets the pulse train target output time T of the intense pulsed light therapeutic instrument through the display screen target ; S2, the single-chip microcomputer receives the pulse train output time T set by the user through the man-machine interface target According to the transient state time formula T=1.1×(R1+R2)×C1 of the monostable unit, the target resistance R1target of the digital adjustable resistor is calculated, wherein R2 is a fixed resistance value, and C1 is the capacitance in the monostable module. S3, the single-chip microcomputer sends a control command to the digital adjustable resistor chip through the communication interface, adjusts the resistance value of the digital adjustable resistor to R1target, and writes the resistance value into the non-volatile register to realize power failure saving; S4, the hardware trigger recognition module detects the operation signals of the foot switch K1 and the handle button K2, and outputs a valid trigger pulse to the single-chip microcomputer when the preset trigger condition is met; S5, after the single-chip microcomputer detects the valid trigger pulse through external interruption, according to the pulse train target output time Ttarget set by the user, the single-chip microcomputer outputs a pulse train with a corresponding time length from the pulse output interface to the fifth AND gate U11; at the same time, the monostable unit U10 outputs a high-level pulse with a time length of T to the fifth AND gate U11; S6, the fifth AND gate U11 performs AND operation on the pulse train output by the single-chip microcomputer and the high-level pulse output by the monostable unit, and outputs the final control pulse to the xenon lamp power supply to control the xenon lamp power supply to release light energy with a corresponding time length.
8. The control triggering and output protection method of the intense pulsed light therapeutic instrument according to claim 7, characterized in that, The preset trigger conditions in step S4 include: Condition A: the foot switch K1 and the handle button K2 are pressed at the same time; Condition B: the foot switch K1 is in the pressed state, and the handle button K2 is switched from the released state to the pressed state; Condition C: the handle button K2 is in the pressed state, and the foot switch K1 is switched from the released state to the pressed state.
9. The control triggering and output protection method of the intense pulsed light therapeutic instrument according to claim 8, characterized in that, The process of the single-chip microcomputer sending a control command to the digital adjustable resistor in step S3 includes: S31, send 0x00 command to the digital adjustable resistor chip, indicating writing into real-time control register; S32, send the digital adjustable resistor position value calculated according to the target resistance value R1target, the position value is calculated by the formula "position value=target resistance value×255÷digital adjustable resistor maximum resistance value"; S33, send 0x01 command to the digital adjustable resistor chip, indicating writing the current resistance value into the non-volatile register.
10. The control triggering and output protection method of the intense pulsed light therapeutic instrument according to claim 9, wherein, When the pulse train length output by the single-chip microcomputer program exceeds Ttarget due to loss of control, the high-level pulse output by the monostable unit U10 will become low after the time length T ends, so that the fifth AND gate U11 stops outputting the control pulse, limiting the maximum output time length of the xenon lamp power supply.