A low-power lightning current waveform acquisition circuit and method

The lightning current waveform acquisition circuit, composed of an STM32L471 low-power processor and low-power integrated circuits, solves the problems of existing equipment being unable to fully acquire lightning current waveforms and high power consumption, and achieves lightning current waveform acquisition with low power consumption, long battery life and low false trigger rate.

CN116626376BActive Publication Date: 2026-02-24SHENYANG RAILWAY SIGNAL
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310776733.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-06-29
Publication Date
2026-02-24
Estimated Expiration
2043-06-29

AI Technical Summary

Technical Problem

To save hardware resources, existing lightning current acquisition equipment only collects the peak value of lightning current, which results in the inability to collect the complete lightning current waveform, affecting scientific analysis. At the same time, outdoor equipment is difficult to power, especially full waveform acquisition equipment, which has high power consumption and is difficult to operate for a long time.

Method used

A low-power lightning current waveform acquisition circuit, composed of an STM32L471 low-power processor and low-power integrated circuits, includes a protection circuit, an integration circuit, a signal conditioning circuit, a trigger circuit, a microprocessor circuit, a storage circuit, and a communication circuit. The signal conditioning and triggering circuits filter out interference signals, and combined with the analog-to-digital conversion and storage of the microprocessor, the complete acquisition and storage of the lightning current waveform is achieved.

Benefits of technology

It enables complete acquisition of lightning current waveforms under low power conditions, reducing the probability of false triggering, saving storage space, extending the device's battery life, and allowing the acquisition threshold to be set remotely, thereby reducing device cost and power consumption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116626376B_ABST
    Figure CN116626376B_ABST
Patent Text Reader

Abstract

A low-power lightning current waveform acquisition circuit belongs to the technical field of lightning protection, comprising a protection circuit, an integration circuit, a signal conditioning circuit, a trigger circuit, a microprocessor circuit, a storage circuit, a communication circuit and a power conversion circuit, the protection circuit is electrically connected with a lightning current signal sensor Rogowski coil and the integration circuit respectively, the integration circuit is electrically connected with the signal conditioning circuit and the trigger circuit respectively; the signal conditioning circuit and the trigger circuit are electrically connected with the microprocessor circuit; the storage circuit is electrically connected with the microprocessor circuit; the communication circuit is electrically connected with the microprocessor circuit; the power conversion circuit is electrically connected with the integration circuit, the signal conditioning circuit, the trigger circuit, the microprocessor circuit, the storage circuit and the communication circuit. The low-power function circuit composed of the STM32L471 low-power processor and other low-power integrated circuits realizes the acquisition, storage and transmission of the lightning current waveform.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of lightning protection technology, and in particular relates to a low-power lightning current waveform acquisition circuit and method. Background Technology

[0002] Lightning current waveforms are crucial data that must be considered in studying lightning activity patterns, designing lightning protection circuits, and upgrading lightning protection projects. These include lightning strike trigger time, peak current, current wavefront time, and half-wavelength time. Ensuring effective and scientific lightning protection decisions requires complete lightning current waveform data. However, current lightning current acquisition equipment, in an effort to save hardware resources, only analyzes and collects peak current data. This hinders technicians from conducting scientific analysis of lightning signals. Furthermore, lightning acquisition equipment installed in harsh outdoor environments often relies on batteries for power, while equipment that acquires the entire waveform typically requires significantly more power, which is also detrimental to accurate lightning data collection.

[0003] Therefore, mastering the complete lightning current waveform can provide theoretical and technical support for the design and evaluation of lightning protection circuits and projects, and provide data support for the analysis, handling, and liability determination of lightning damage accidents. Summary of the Invention

[0004] Based on the above-mentioned technical problems, this invention proposes a low-power lightning current waveform acquisition circuit and method, which realizes the acquisition, storage and transmission of lightning current waveform through a low-power functional circuit composed of an STM32L471 low-power processor and other low-power integrated circuits, so as to overcome the problems mentioned in the background art.

[0005] The present invention adopts the following technical solution:

[0006] A low-power lightning current waveform acquisition circuit includes a protection circuit, an integrating circuit, a signal conditioning circuit, a triggering circuit, a microprocessor circuit, a storage circuit, a communication circuit, and a power conversion circuit. The protection circuit is electrically connected to the Rogowski coil of the lightning current signal sensor and the integrating circuit. The integrating circuit is electrically connected to the signal conditioning circuit and the triggering circuit. The signal conditioning circuit and the triggering circuit are electrically connected to the microprocessor circuit. The storage circuit is electrically connected to the microprocessor circuit. The communication circuit is electrically connected to the microprocessor circuit. The power conversion circuit is electrically connected to the integrating circuit, the signal conditioning circuit, the triggering circuit, the microprocessor circuit, the storage circuit, and the communication circuit.

[0007] Furthermore, the protection circuit consists of a gas discharge tube and a varistor connected in series to clip input signals that exceed the design range.

[0008] Furthermore, the integrating circuit is composed of an operational amplifier, which integrates the signal output from the Rogowski coil to restore the waveform of the lightning current signal.

[0009] Furthermore, the signal conditioning circuit consists of a voltage divider circuit, a voltage follower circuit, and an amplitude shift circuit. The voltage follower circuit isolates the voltage divider circuit and the amplitude shift circuit. The amplitude shift circuit shifts the amplitude of the lightning signal to meet the signal input range of the microprocessor circuit.

[0010] Furthermore, the trigger circuit comprises a trigger level conditioning circuit, a voltage follower circuit, a bandpass filter circuit, and a comparator circuit, which isolate, filter, and judge the input signal. The trigger level conditioning circuit obtains a positive DC voltage signal from the microprocessor circuit, adjusts the positive DC voltage signal into a positive and negative DC voltage signal, and outputs it to the comparator circuit as a reference signal for lightning signal determination. The voltage follower circuit isolates the integrator circuit from the bandpass filter circuit. The filter circuit is a bandpass filter that filters the lightning signal, removing the power frequency signal and high-frequency interference signal from the lightning signal before sending it to the comparator circuit. The comparator circuit detects the lightning signal. When the amplitude of the input signal is within the upper and lower limits of the trigger threshold set by the preset trigger threshold circuit, the lightning signal is detected. m When the condition is met, the comparator circuit outputs a high-level signal to the microprocessor; otherwise, the comparator circuit outputs a low-level signal.

[0011] Furthermore, the microprocessor circuit consists of a microprocessor, an RTC clock circuit, and a clock circuit, which performs analog-to-digital conversion of the lightning current signal, acquires the lightning current trigger time, stores and transmits the lightning current data, and outputs a preset trigger level.

[0012] Furthermore, when storing the lightning current waveform, the microprocessor analyzes the lightning current waveform at time t in the cache to determine the data peak value and peak time t. p The cached time is greater than 0 and less than t p All t1 wavefront data are stored, and data with a time greater than t in the buffer is also stored. p Furthermore, the wave tail data less than t2 are collected at intervals, with the collection interval being math.floor(△t2 / △t1) to store the wave tail data, where △t1 is the half-width of the wave front, △t2 is the half-width of the wave tail, and math.floor means taking the whole number down.

[0013] A low-power lightning current waveform acquisition method using the aforementioned circuit includes the following steps:

[0014] Step S1: The circuit is powered on, and the microprocessor chip in the microprocessor circuit is initialized.

[0015] Step S2: Shutdown mode setting;

[0016] Step S21: Configure the microprocessor and power conversion circuit to connect the power control pin to make the output low level, and stop the power supply to the integration circuit, signal conditioning circuit and trigger circuit;

[0017] Step S22: Disable the microprocessor's ADC, DMA, and DAC;

[0018] Step S23: Proceed to step S5;

[0019] Step S3: Set the acquisition mode;

[0020] Step S31: Configure the I / O pins connecting the microprocessor and the power module to output a high level to provide operating power for the integration circuit, signal conditioning circuit, and trigger circuit;

[0021] Step S32: Configure the microprocessor's internal ADC and DMA, set the ADC conversion frequency, and enable the ADC conversion data to be automatically written to SRAM1 via DMA. After the data is full, it will be automatically overwritten from the beginning position of SRAM1.

[0022] Step S33: Configure the microprocessor's internal DAC to output a DC voltage signal according to the set trigger level;

[0023] Step S34: Proceed to step S4;

[0024] Step S4: Interruption check;

[0025] Step S41: If ADC_WKUP_FALSE=1 indicates a lightning current signal interruption, proceed to step S5;

[0026] Step S42: If RTC_CYCLE_WKUP_FALSE=1 indicates an RTC cycle interrupt, proceed to step S6;

[0027] Step S43: If RTC_Alarm_WKUP_FALSE=1 indicates an RTC alarm interruption, proceed to step S7;

[0028] Step S5: Extract the lightning current signal and send the lightning data;

[0029] Step S6: Feed the internal watchdog to prevent the microprocessor from restarting, set RTC_CYCLE_WKUP_FALSE=0, and proceed to step S43;

[0030] Step S7: Send heartbeat packets and resend unsuccessfully sent lightning current data;

[0031] Step S8: The microprocessor enters sleep mode and waits for an interrupt to wake it up.

[0032] Further, step S1 specifically includes:

[0033] Step S11: Allocate two data storage spaces in the SRAM storage area of the microprocessor chip STM32L471VGT6, namely SARM1 and SRAM2. SRAM1 is an array of M double bytes, and SRAM2 is an array of N double bytes, where N is an integer multiple of M.

[0034] Step S12: Set the working clock of the microprocessor.

[0035] Step S13: Configure and enable the internal watchdog.

[0036] Step S14: Configure all I / O pins of the microprocessor as input mode.

[0037] Step S15: Configure the I / O pins connecting the microprocessor and the storage circuit to put the FALSH chip of the storage circuit in the low-power mode.

[0038] Step S16: Configure the I / O pins connecting the microprocessor and the communication circuit to make the pin controlling the power switch of the communication circuit output a high level to turn on the working power supply, send a heartbeat packet and receive a reply instruction.

[0039] Step S17: Set the lightning current trigger flag bit ADC_WKUP_FALSE = 0, the RTC cycle interrupt flag bit RTC_CYCLE_WKUP_FALSE = 0, and the RTC alarm interrupt flag bit RTC_Alarm_WKUP_FALSE = 0.

[0040] If MODE = 0, jump to Step S2; if MODE = 1, jump to Step S3.

[0041] Furthermore, the specific content of Step S5 is as follows:

[0042] Step S51: Obtain the position K1 in the SRAM1 data area where the current ADC conversion data is to be written, and take K2 points forward from position K1 as the starting position of the lightning current signal data.

[0043] Step S52: Continuously judge the position K3 where the ADC conversion data is written into the SRAM1 area. When both K2 >= K1 and K3 = M - K2 + KI - 1 are satisfied, take M points of data from the position M - K2 + K1 in SRAM1 and put them into SRAM2; when K2 < K1 and K3 = K1 - K2 - 1, take M points of data from the position K1 - K2 in SRAM1 and store them in SRAM2.

[0044] Step S53: Repeat step S52. When the amount of data stored in SRAM2 is N, stop storing data from SRAM1 to SRAM2. Obtain the current time information through the internal RTC as the trigger time of the lightning current signal. The extraction of one lightning current acquisition data ends.

[0045] Step S54: Turn on the power to the communication circuit and send lightning current data through the communication circuit. If the communication line fails and the transmission is unsuccessful, the lightning current data and time information are stored in the external FALSH; if the transmission is successful, no data is stored.

[0046] Step S55: Set ADC_WKUP_FALSE=0, turn off the power to the communication circuit, and proceed to step 42.

[0047] The beneficial effects of this invention are:

[0048] 1. The technical solution of this invention uses the STM32L471 low-power microprocessor with built-in ADC and DMA, combined with other low-power integrated circuits to realize the acquisition of lightning current waveform signals. When there is no lightning current signal, the microprocessor works in sleep mode to further reduce the power consumption of the microprocessor. Compared with external ADC combined with FPGA processor technology, it has the advantages of low cost and low power consumption.

[0049] 2. Based on the time and frequency domain characteristics of existing standard lightning current waveforms, this invention uses a signal conditioning circuit to perform low-pass filtering on the input lightning current signal to eliminate high-frequency transient interference, and band-pass filtering on the lightning current signal input to the trigger circuit to eliminate 50Hz power frequency signal interference and high-frequency transient signal interference. The two signals are isolated, reducing the probability of false triggering while ensuring the acquired waveform remains undistorted. The lightning current waveform data is stored by storing the entire wavefront data and the wavetail data intermittently, saving storage space.

[0050] 3. The trigger level of the trigger circuit used in this invention can be adjusted according to communication commands. The trigger threshold can be determined remotely based on historical data of false triggers, further reducing the probability of false triggers and facilitating maintenance.

[0051] 4. Compared with existing lightning current waveform acquisition systems, this invention has the advantages of low power consumption, long theoretical battery life, and remotely set acquisition threshold, while ensuring the integrity of the lightning current waveform acquisition. Attached Figure Description

[0052] Figure 1 This is a schematic diagram of the low-power lightning current waveform acquisition circuit of the present invention;

[0053] Figure 2 This is a schematic diagram of lightning current time analysis according to the present invention;

[0054] Figure 3This is a circuit diagram of the signal conditioning circuit of the present invention;

[0055] Figure 4 This is a circuit diagram of the trigger circuit of the present invention;

[0056] Figure 5 This is a flowchart of the logical judgment process of the present invention.

[0057] The markings in the diagram are: 1 for protection circuit, 2 for integration circuit, 3 for signal conditioning circuit, 4 for trigger circuit, 5 for microprocessor circuit, 6 for storage circuit, 7 for communication circuit, and 8 for power conversion circuit. Detailed Implementation

[0058] This invention provides a low-power lightning current acquisition circuit and method. The technical solutions in the embodiments of this invention will be clearly and completely described below. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.

[0059] This invention provides a low-power lightning current acquisition circuit, such as... Figure 1 As shown, the circuit includes a protection circuit 1, an integrating circuit 2, a signal conditioning circuit 3, a trigger circuit 4, a microprocessor circuit 5, a storage circuit 6, a communication circuit 7, and a power conversion circuit 8. Specifically, the protection circuit 1 is electrically connected to the Rogowski coil of the lightning current signal sensor and the integrating circuit 2; the integrating circuit 2 is electrically connected to the signal conditioning circuit 3 and the trigger circuit 4; the signal conditioning circuit 3 and the trigger circuit 4 are together electrically connected to the microprocessor circuit 5; the communication circuit 7 is electrically connected to the microprocessor circuit 5; the storage circuit 6 is electrically connected to the microprocessor circuit 5; and the power conversion circuit 8 is electrically connected to the integrating circuit 2, the trigger circuit 4, the microprocessor circuit 5, the storage circuit 6, and the communication circuit 7.

[0060] Specifically, the protection circuit 1 is composed of a gas discharge tube and a varistor connected in series to clip input signals that exceed the design range, so as to avoid damage to the subsequent circuits; the integrator circuit 2 is composed of an operational amplifier to integrate the signal output by the Rogowski coil to restore the waveform of the lightning current signal.

[0061] Specifically, the signal conditioning circuit 3 is as follows: Figure 3As shown, it consists of a voltage divider circuit, a voltage follower circuit, and an amplitude shifting circuit. The voltage divider circuit is composed of resistors R1 and R2 connected in series. Pin 1 of resistor R1 is electrically connected to the output signal of integrator 2, pin 2 of resistor R1 is electrically connected to pin 1 of resistor R2, and pin 2 of resistor R2 is grounded. The voltage follower circuit isolates the voltage divider circuit from the amplitude shifting circuit. Further, the voltage follower circuit consists of operational amplifier U1B, capacitors C1 and C2. Pin 5 of operational amplifier U1B is electrically connected to pin 2 of voltage divider circuit R1, pins 6 and 7 of operational amplifier U1B are electrically connected, pin 4 of operational amplifier U1B is electrically connected to pin 1 of capacitor C1, pin 8 of operational amplifier U1B is electrically connected to pin 1 of capacitor C2, and capacitor C2... Pins 2 of C1 and C2 are grounded; the amplitude shifting circuit realizes the amplitude shifting of the lightning signal to meet the signal input range of the microprocessor circuit 5. Further, the amplitude shifting circuit is composed of operational amplifier U1A, resistors R3~R7, and capacitors C3~C5. Pin 2 of operational amplifier U1A is electrically connected to pin 1 of resistors R5 and R6. Pin 2 of resistor R5 is electrically connected to pin 7 of operational amplifier U1B. Pin 2 of resistor R6 is electrically connected to pin 1 of operational amplifier U1A and pin 1 of resistor R7. Pin 2 of resistor R7 is electrically connected to pin 1 of capacitor C5. Pin 2 of capacitor C5 is grounded. Pin 3 of operational amplifier U1A is electrically connected to pin 1 of resistors R3 and R4, capacitors C3 and C4. Pin 2 of resistor R3 is electrically connected to a 2.5V power supply. Pin 2 of resistor R4, capacitors C3 and C4 is grounded.

[0062] Specifically, the trigger circuit 4 is as follows: Figure 4 As shown, the circuit consists of a trigger level conditioning circuit, a voltage follower circuit, a bandpass filter circuit, and a comparator circuit. The trigger level conditioning circuit obtains a positive DC voltage signal from the microprocessor circuit 5, adjusts the positive DC voltage signal into a positive and negative DC voltage signal, and outputs it to the comparator circuit as a reference signal for lightning signal determination. The voltage follower circuit isolates the integrator circuit 2 from the bandpass filter circuit. The bandpass filter circuit filters the lightning signal, removing power frequency signals and high-frequency interference signals from the lightning signal before sending it to the comparator circuit, reducing the probability of false triggering. The comparator circuit detects the lightning signal. When the amplitude of the lightning signal exceeds the set trigger level, the output level of the comparator circuit changes from high level 1 to low level 0 and is transmitted to the microprocessor circuit 5.

[0063] Furthermore, the trigger level conditioning circuit comprises operational amplifier U3A, operational amplifier U3B, resistors R8, R9, R12, R15, and R16, and capacitors C6, C10, C13, and C14. Pin 3 of operational amplifier U3A is electrically connected to pin 1 of resistors R12, C13, and C14. Pin 2 of resistor R12 is electrically connected to the microprocessor circuit 5. Pins 2 of capacitors C13 and C14 are grounded. Pin 2 of operational amplifier U3A is connected to resistor R15. Pin 1 of resistor R16 is electrically connected; pin 2 of resistor R15 is grounded; pin 2 of resistor R16 is electrically connected to pin 1 of operational amplifier U3A; pin 5 of operational amplifier U3B is grounded; pin 6 of operational amplifier U3B is electrically connected to pin 1 of resistors R8 and R9; pin 2 of resistor R8 is electrically connected to pin 1 of operational amplifier U3A; pin 2 of resistor R9 is electrically connected to pin 7 of operational amplifier U3B; pin 4 of operational amplifier U3B is electrically connected to the -3.3V power supply and pin 1 of capacitor C10; pin 2 of capacitor C10 is grounded; pin 8 of operational amplifier U3B is electrically connected to the 3.3V power supply and pin 1 of capacitor C6; pin 2 of capacitor C6 is grounded.

[0064] Furthermore, the voltage follower circuit consists of operational amplifier U5, capacitor C11, and capacitor C16. Pin 3 of operational amplifier U5 is electrically connected to the integrator circuit 2; pins 2 and 6 of operational amplifier U5 are electrically connected; pin 4 of operational amplifier U5 is electrically connected to the -3.3V power supply and pin 1 of capacitor C16; pin 2 of capacitor C16 is grounded; pin 7 of operational amplifier U5 is electrically connected to the 3.3V power supply and pin 1 of capacitor C11; and pin 2 of capacitor C16 is grounded.

[0065] Furthermore, the bandpass filter circuit consists of resistors R13 and R14, and capacitors C12 and C15. Pin 1 of capacitor C12 is electrically connected to pin 6 of operational amplifier U5, pin 2 of capacitor C12 is electrically connected to pins 1 of resistors R13 and R14, pin 2 of resistor R14 is grounded, pin 2 of resistor R13 is electrically connected to pin 1 of capacitor C15, and pin 2 of capacitor C15 is grounded.

[0066] Furthermore, the comparator circuit comprises comparator U4A, comparator U4B, resistors R10, R11, R17, and R18, capacitors C7, C8, C9, C17, C18, and C19, and diode D1. Pin 1 of comparator U4A is electrically connected to pin 7 of comparator U4B, pin 1 of resistor R10, and pin 1 of diode D1. Pin 2 of resistor R10 is electrically connected to a 3.3V power supply. Pin 2 of diode D1 is electrically connected to pin 1 of resistor R18, and pin 2 of resistor R18 is grounded. Pin 2 of comparator U4A is electrically connected to pin 1 of resistor R11, pin 1 of capacitor C8, and pin 1 of capacitor C9. Pin 2 of resistor R11 is electrically connected to pin 7 of operational amplifier U3B. Pins 2 of capacitors C8 and C9 are grounded. Pin 3 of comparator U4A... The comparator is electrically connected to pin 6 of the comparator U4B and pin 2 of the resistor R13. Pin 5 of the comparator U4B is electrically connected to pin 1 of the resistor R17, pin 1 of the capacitor C17, and pin 1 of the capacitor C18. Pin 2 of the resistor R17 is electrically connected to pin 1 of the operational amplifier U3A. Pins 2 of the capacitors C17 and C18 are grounded. Pin 4 of the comparator U4B is electrically connected to the -3.3V power supply and pin 1 of the capacitor C19. Pin 2 of the capacitor C19 is grounded. Pin 8 of the comparator U4A is electrically connected to the 3.3V power supply and pin 1 of the capacitor C7. Pin 2 of the capacitor C7 is grounded.

[0067] Furthermore, the microprocessor circuit 5 uses an STM32L471VGT6 microprocessor, which is based on the ARM Cortex-M4 core, operates at a frequency of up to 80MHz, and contains 128KB of high-speed SRAM, enabling temporary storage of lightning data. This processor also includes three 12-bit 5MHz sampling rate ADCs, two DACs, one independent RTC, and an internal watchdog timer, enabling the conversion of analog lightning signals into digital lightning signals, adjusting trigger levels, and recording the trigger time of lightning signals. It boasts advantages such as high integration and low cost.

[0068] Furthermore, the storage circuit 6 uses a W25Q128JVSIQ storage chip, which, under the control of a microprocessor, can realize the local storage of lightning data that was not successfully transmitted, and has the advantage of not losing data when power is off.

[0069] Furthermore, the communication circuit 7 uses a WH-LTE-7S4 module manufactured by Jinan Youren, which communicates with the microprocessor through the USART interface to realize remote interaction of lightning data and control commands.

[0070] Furthermore, the power conversion circuit 8 converts the externally supplied DC power supply to provide operating power for the integrating circuit 2, signal conditioning circuit 3, trigger circuit 4, microprocessor circuit 5, storage circuit 6, and communication circuit 7.

[0071] This invention also provides a low-power lightning current waveform acquisition method, such as... Figure 5 As shown, it includes the following steps:

[0072] Step S1: The circuit is powered on, and the microprocessor chip performs initialization settings. The specific steps are as follows:

[0073] Step S11: Two data storage spaces, SARM1 and SRAM2, are allocated in the SRAM storage area of ​​the STM32L471VGT6 microprocessor chip. SRAM1 is an M double-byte array and SRAM2 is an N double-byte array.

[0074] Specifically, N is an integer multiple of M;

[0075] Step S12: Set the operating clock of the microprocessor;

[0076] Step S13: Configure and enable the internal watchdog;

[0077] Step S14: Configure all I / O pins of the microprocessor to input mode;

[0078] Step S15: Configure the I / O pins connecting the microprocessor and the storage circuit 6 to put the FLASH chip of the storage circuit 6 into a low-power mode;

[0079] Step S16: Configure the I / O pins connecting the microprocessor and the communication circuit 7 to make the pin controlling the power switch of the communication circuit 7 output a high level to turn on the working power, send heartbeat packets and receive reply commands;

[0080] Specifically, the data in the heartbeat packet includes the address of the low-power lightning current acquisition circuit;

[0081] Specifically, the response instruction data includes the address, time information, operating mode, and trigger level of the low-power lightning current acquisition circuit. The operating time information includes year, month, day, weekday, hour, minute, and second information, which is received and written into the microprocessor's internal RTC register, and the microprocessor's internal RTC periodic interrupt and alarm clock interrupt are configured; the operating mode is divided into standby mode and acquisition mode, with the operating mode flag MODE=0 when in standby mode and MODE=1 when in acquisition mode;

[0082] Specifically, the standby mode means that the integrating circuit 2, the signal conditioning circuit 3, and the comparator circuit are not powered on, and all I / O pins of the microprocessor chip are configured as analog input mode, and the microprocessor's internal ADC, DMA, and DAC are turned off.

[0083] Specifically, the acquisition mode involves powering on the integrator circuit 2, signal conditioning circuit 3, and comparator circuit, and then activating the microprocessor chip's ADC, DMA, and DAC.

[0084] Specifically, if the low-power lightning current acquisition circuit does not receive a return instruction after a timeout, it sets MODE=1 (acquisition mode) and writes the default time information into the internal RTC register.

[0085] Step S17: Set the lightning current trigger flag ADC_WKUP_FALSE=0, the RTC cycle interrupt flag RTC_CYCLE_WKUP_FALSE=0, and the RTC alarm interrupt flag RTC_Alarm_WKUP_FALSE=0.

[0086] If MODE=0, proceed to step S2; if MODE=1, proceed to step S3.

[0087] Step S2: Shutdown mode setting, the specific steps are as follows:

[0088] Step S21: Configure the microprocessor and power conversion circuit 8 to connect the power control pin to make the output low level, and stop the power supply to the integration circuit 2, signal conditioning circuit 3, and trigger circuit 4;

[0089] Step S22: Disable the microprocessor's ADC, DMA, and DAC;

[0090] Step S23: Proceed to step S5;

[0091] Step S3: Set the acquisition mode. The specific steps are as follows:

[0092] Step S31: Configure the I / O pins connected to the microprocessor and the power module to output a high level, providing operating power for the integration circuit 2, signal conditioning circuit 3, and trigger circuit 4;

[0093] Step S32: Configure the microprocessor's internal ADC and DMA, set the ADC conversion frequency, and enable the ADC conversion data to be automatically written to SRAM1 via DMA. After the data is full, it will be automatically overwritten from the beginning position of SRAM1.

[0094] Step S33: Configure the microprocessor's internal DAC to output a DC voltage signal according to the set trigger level;

[0095] Step S34: Proceed to step S4;

[0096] Step S4: Interrupt judgment, the specific steps are as follows:

[0097] Step S41: If ADC_WKUP_FALSE = 1, it is a lightning current signal interruption, and enter Step S5;

[0098] Step S42: If RTC_CYCLE_WKUP_FALSE = 1, it is a RTC cycle interruption, and enter Step S6;

[0099] Step S43: If RTC_Alarm_WKUP_FALSE = 1, it is a RTC alarm interruption, and enter Step S7;

[0100] Step S5: Extract the lightning current signal and send lightning data, the specific steps are as follows:

[0101] Step S51: Obtain the position K1 of the ADC conversion data to be written into the SRAM1 data area at the current moment, and take K2 points forward from position K1 as the starting position of the lightning current signal data;

[0102] Step S52: Continuously judge the position K3 of the ADC conversion data written into the SRAM1 area. When both K2 >= K1 and K3 = M - K2 + K1 - 1 are established, take M points of data from the position M - K2 + K1 of SRAM1 and put them into SRAM2; when K2 < K1 and K3 = K1 - K2 - 1, take M points of data from the position K1 - K2 of SRAM1 and store them in SRAM2;

[0103] Step S53: Repeat Step S52. When the amount of data stored in SRAM2 is N, stop storing data from SRAM1 to SRAM2, obtain the current time information through the internal RTC as the triggering time of the lightning current signal, and the extraction of the lightning current acquisition data ends;

[0104] Step S54: Turn on the power of communication circuit 7, send the lightning current data through communication circuit 7. When the communication line fails and the sending is unsuccessful, store the lightning current data and the time information into the external FALSH; when the sending is successful, do not store the data.

[0105] Step S55: Set ADC_WKUP_FALSE = 0, turn off the power of communication circuit 7, and enter Step 42;

[0106] Step S6: Feed the internal watchdog to prevent the microprocessor from restarting, set RTC_CYCLE_WKUP_FALSE = 0, and enter Step S43;

[0107] Step S7: Send the heartbeat packet and resend the lightning current data that was not successfully sent. The specific working method is as follows:

[0108] Step S71: Power on the communication module, send heartbeat data, and receive return instructions. If the instruction is received successfully, parse the return instruction to extract time calibration information, operating mode, and trigger level. Write the time calibration information to the RTC and reset the RTC's alarm time. Set parameters according to the new operating mode and adjust the microprocessor's DAC output according to the trigger level.

[0109] Step S72: If a return command is successfully received, determine whether there is any lightning current data that was not successfully sent. If there is lightning current data, clear the lightning current data from the external FALSH after successful transmission.

[0110] Step S73: Proceed to step S8;

[0111] Step S8: The microprocessor enters sleep mode and waits for an interrupt to wake it up;

[0112] Specifically, there are three types of interrupts that will wake the microprocessor from sleep mode: ADC lightning current acquisition trigger interrupt, RTC cycle interrupt and RTC alarm clock interrupt.

[0113] Specifically, the watchdog timer inside the microprocessor is fed not only during RTC cycle interrupts but also according to the program execution time.

Claims

1. A low-power lightning current waveform acquisition circuit, characterized in that: The circuit includes a protection circuit (1), an integrating circuit (2), a signal conditioning circuit (3), a trigger circuit (4), a microprocessor circuit (5), a storage circuit (6), a communication circuit (7), and a power conversion circuit (8). The protection circuit (1) is electrically connected to the Rogowski coil of the lightning current signal sensor and the integrating circuit (2). The integrating circuit (2) is electrically connected to the signal conditioning circuit (3) and the trigger circuit (4). The signal conditioning circuit (3) and the trigger circuit (4) are electrically connected to the microprocessor circuit (5). The storage circuit (6) is electrically connected to the microprocessor circuit (5). The communication circuit (7) is electrically connected to the microprocessor circuit (5). The power conversion circuit (8) is electrically connected to the integrating circuit (2), the signal conditioning circuit (3), the trigger circuit (4), the microprocessor circuit (5), the storage circuit (6), and the communication circuit (7). The trigger circuit (4) consists of a trigger level conditioning circuit, a voltage follower circuit, a bandpass filter circuit, and a comparator circuit. It isolates, filters, and judges the input signal. The trigger level conditioning circuit obtains a positive DC voltage signal from the microprocessor circuit (5), adjusts the positive DC voltage signal into a positive and negative DC voltage signal, and outputs it to the comparator circuit as a reference signal for lightning signal judgment. The voltage follower circuit isolates the integrator circuit (2) from the bandpass filter circuit. The filter circuit is a bandpass filter that filters the lightning signal. It filters out the power frequency signal and high-frequency interference signal in the lightning signal and sends it to the comparator circuit. The comparator circuit detects the lightning signal. When the amplitude of the input signal is within the upper and lower limits of the trigger threshold set by the preset trigger threshold circuit, the signal is considered to be in the range of V. m When the condition is met, the comparator circuit outputs a high-level signal to the microprocessor; otherwise, the comparator circuit outputs a low-level signal. The microprocessor circuit (5) consists of a microprocessor, an RTC clock circuit, and a clock circuit, and is used for analog-to-digital conversion of lightning current signals, acquisition of lightning current trigger time, storage and transmission of lightning current data, and output of preset trigger levels. When storing lightning current waveforms, the microprocessor analyzes the lightning current waveform at time t in the cache, and analyzes the data peak value and peak time t. p The cached time is greater than 0 and less than t p All t1 wavefront data are stored, and data with a time greater than t in the buffer is also stored. p Furthermore, the wave tail data less than t2 are collected at intervals, with the collection interval being math.floor(△t2 / △t1) to store the wave tail data, where △t1 is the half-width of the wave front, △t2 is the half-width of the wave tail, and math.floor means taking the whole number down. The lightning current waveform acquisition method using a lightning current waveform acquisition circuit includes the following steps: Step S1: The circuit is powered on, and the microprocessor chip of the microprocessor circuit (5) is initialized; Step S2: Shutdown mode setting; Step S21: Configure the microprocessor and power conversion circuit (8) to connect the power control pin to make the output low level, and stop the power supply of the integration circuit (2), signal conditioning circuit (3), and trigger circuit (4); Step S22: Disable the microprocessor's ADC, DMA, and DAC; Step S23: Proceed to step S5; Step S3: Set the acquisition mode; Step S31: Configure the I / O pins connected to the microprocessor and the power module to output a high level, providing working power for the integration circuit (2), signal conditioning circuit (3), and trigger circuit (4); Step S32: Configure the microprocessor's internal ADC and DMA, set the ADC conversion frequency, and enable the ADC conversion data to be automatically written to SRAM1 via DMA. After the data is full, it will be automatically overwritten from the beginning position of SRAM1. Step S33: Configure the microprocessor's internal DAC to output a DC voltage signal according to the set trigger level; Step S34: Proceed to step S4; Step S4: Interruption check; Step S41: If ADC_WKUP_FALSE=1 indicates a lightning current signal interruption, proceed to step S5; Step S42: If RTC_CYCLE_WKUP_FALSE=1 indicates an RTC cycle interrupt, proceed to step S6; Step S43: If RTC_Alarm_WKUP_FALSE=1 indicates an RTC alarm interruption, proceed to step S7; Step S5: Extract the lightning current signal and send the lightning data; Step S6: Feed the internal watchdog to prevent the microprocessor from restarting, set RTC_CYCLE_WKUP_FALSE=0, and proceed to step S43; Step S7: Send heartbeat packets and resend unsuccessfully sent lightning current data; Step S8: The microprocessor enters the sleep mode and waits to be woken up by an interruption; The specific steps of step S1 are as follows: Step S11: Two data storage spaces are opened in the SRAM storage area of the microprocessor chip STM32L471VGT6, namely SARM1 and SRAM2. SRAM1 is an array of M double bytes, and SRAM2 is an array of N double bytes. N is an integer multiple of M; Step S12: Set the working clock of the microprocessor; Step S13: Configure and enable the internal watchdog; Step S14: Configure all I / O pins of the microprocessor to the input mode; Step S15: Configure the I / O pins of the microprocessor connected to the storage circuit (6) to put the FALSH chip of the storage circuit (6) in the low-power mode; Step S16: Configure the I / O pins of the microprocessor connected to the communication circuit (7) to make the pin controlling the power switch of the communication circuit (7) output a high level to turn on the working power supply, send a heartbeat packet and receive a reply instruction; Step S17: Set the lightning current trigger flag ADC_WKUP_FALSE = 0, the RTC cycle interruption flag RTC_CYCLE_WKUP_FALSE = 0, and the RTC alarm interruption flag RTC_Alarm_WKUP_FALSE = 0. If MODE = 0, jump to step S2; if MODE = 1, jump to step S3; The specific steps of step S5 are as follows: Step S51: Obtain the position K1 of the ADC conversion data to be written into the SRAM data area at the current moment, and take K2 points forward from position K1 as the starting position of the lightning current signal data; Step S52: Continuously judge the position K3 of the ADC conversion data written into the SRAM1 area. When both K2 >= K1 and K3 = M - K2 + K1 - 1 are established, take M points of data from the M - K2 + K1 position of SRAM1 and put them into SRAM2; when K2 < K1 and K3 = K1 - K2 - 1, take M points of data from the K1 - K2 position of SRAM1 and store them in SRAM2; Step S53: Repeat step S52. When the amount of data stored in SRAM2 is N, stop storing data from SRAM1 to SRAM2, obtain the current time information through the internal RTC as the trigger time of the lightning current signal, and the extraction of the lightning current acquisition data ends; Step S54: Turn on the power supply of the communication circuit (7), send the lightning current data through the communication circuit (7), and store the lightning current data and the time information in the external FALSH when the transmission fails due to a communication line fault; if the transmission is successful, do not store the data; Step S55: Set ADC_WKUP_FALSE = 0, turn off the power supply of the communication circuit (7), and enter step 42.

2. The low-power lightning current waveform acquisition circuit according to claim 1, characterized in that: The protection circuit (1) is composed of a gas discharge tube and a varistor connected in series, and clips the input signal exceeding the designed range.

3. The low-power lightning current waveform acquisition circuit according to claim 1, characterized in that: The integration circuit (2) is composed of an operational amplifier. The integration circuit (2) integrates the signal output by the Rogowski coil and restores the waveform of the lightning current signal.

4. The low-power lightning current waveform acquisition circuit according to claim 1, characterized in that: The signal conditioning circuit (3) consists of a voltage divider circuit, a voltage follower circuit, and an amplitude shift circuit. The voltage follower circuit isolates the voltage divider circuit and the amplitude shift circuit. The amplitude shift circuit shifts the amplitude of the lightning signal to meet the signal input range of the microprocessor circuit (5).

Citation Information

Patent Citations

  • Radar data storage method and device

    CN109061585A

  • Multi-channel lightning current information acquisition board card

    CN111190048A