Power measuring circuit and method
By designing a power measurement circuit containing multi-stage attenuation and delay subunits, the problems of signal damage and equipment damage in traditional high-power products are solved, and a more portable and efficient testing process is achieved.
Patent Information
- Application Number
- CN202411483394.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-23
- Publication Date
- 2025-02-28
AI Technical Summary
The testing of traditional high-power products relies on external inspection equipment, which leads to inconvenience and inefficiency in testing, and risks of signal damage and equipment damage.
A power measurement circuit is designed, including an attenuator, an ADC sampling converter, a power detector and a power display device, and the precise attenuation and stable transmission of the input signal is achieved through the combination of multi-stage attenuation and delay subunits.
Effectively avoids the problem of excessive signal damage to the detector or too weak, which improves the portability and efficiency of the test, reduces the risk of equipment damage, and ensures that the signal is within the optimal working range of the detector.
Smart Images

Figure CN119534989A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of power circuit measurement, and in particular to a power measurement circuit and method. Background Art
[0002] Traditional high-power product testing often relies too much on external detection equipment, which not only reduces the portability of the test, but also leads to low test efficiency. Since external equipment is usually large and inconvenient to move, on-site testing often faces the problem of inconvenient operation. In addition, improper selection of the attenuator's attenuation or misoperation may cause serious damage to the instrument or even burn it out. This risk is particularly evident in high-power test environments, because in the absence of real-time monitoring and automatic protection functions, the equipment may not be able to respond to emergencies in a timely manner, and it is difficult to ensure that the signal is within the detector's optimal operating range, which affects the final test results. Summary of the invention
[0003] One of the purposes of the present invention is to provide a power measurement circuit, which solves the shortcomings of the prior art power measurement circuit that high power signals are prone to damage detectors and it is difficult to ensure that the signal is within the optimal working range of the detector.
[0004] The present invention is implemented through the following technical scheme: a power measurement circuit, including an attenuator, an ADC sampling converter, a power detector and a power display device, wherein the attenuator is connected to the ADC sampling converter and is configured so that when a signal is input into the power measurement circuit, the attenuator is used to attenuate the input signal so that the input signal reaches a range suitable for ADC sampling after attenuation, thereby avoiding damage to the ADC sampling converter due to excessive signal or inaccurate measurement and reduced signal-to-noise ratio due to excessive signal; the ADC sampling converter is connected to the power detector and is configured to convert the attenuated analog signal into a digital signal, and transmit the digital signal to the power detector through an SPI interface; the power detector is composed of an MCU and its basic circuit, and is configured to receive a digital signal and detect its power, and report the detected power value to the power display device for display; the power display device is connected to the power detector and is configured to receive and display the power value reported by the power detector.
[0005] Furthermore, the power measurement circuit also includes a serial port driving subcircuit, which is connected to the power detector and configured to convert the logic level of the microcontroller in the power detector into the level required by the ADC sampling converter and the power display device, while enhancing the signal strength, improving the anti-interference ability, and ensuring the integrity and correctness of the data during transmission.
[0006] Furthermore, the attenuator includes at least two attenuation units; the attenuation units are capable of individually switching the connected attenuation levels, each attenuation unit has an insertion loss mode and an attenuation mode, and a delay subunit depending on the attenuation state, one delay subunit is connected to one attenuation unit, and the delay subunit is used to make the corresponding attenuation unit switch between the insertion loss mode and the attenuation mode at different speeds, when the attenuation unit switches from the attenuation mode to the insertion loss mode, the delay subunit introduces a delay to slow down the switching process, and when the attenuation unit switches from the insertion loss mode to the attenuation mode, the delay subunit does not introduce a delay or introduces a tiny delay to speed up the switching process.
[0007] Furthermore, the attenuation unit includes an attenuation network, a first series switch connected between the attenuation network and ground, a second series switch connected in series between the first series switch and ground and in parallel with a resistor, and a shunt switch connected between the input and output of the attenuator unit; the first series switch is closed to provide an attenuation state. When the first series switch is closed, the input signal passes through the attenuator unit and the signal is attenuated, and the attenuation unit is in an attenuation mode; when the first series switch is switched from a closed state to an open state, the second series switch in parallel with the resistor is used to provide a transition state during the switching process, gradually reducing the current and voltage changes in the attenuation network and reducing the amplitude of transient glitches; when the shunt switch is closed, the input signal bypasses the attenuator unit and is directly output, the signal strength remains unchanged, and the attenuation unit is in an insertion loss mode.
[0008] Furthermore, the attenuator unit also includes a control subunit for providing an intermediate control signal to switch the second series switch during the state transition of the attenuator unit. The control subunit is configured to provide a control signal to at least one of the second series switches. When the first series switch is switched at a predetermined timing, the transmission of the control signal of the second series switch is timed, and the state of the second series switch is changed by delaying the time, thereby ensuring that the current and voltage change smoothly during the switching process and optimizing the transient response.
[0009] Furthermore, the delay subunit includes a resistor and capacitor network and a bypass switch, wherein when the attenuation unit switches from the attenuation mode to the insertion loss mode, the resistor and capacitor network provides a switching delay; when the attenuator stage switches from the insertion loss mode to the attenuation mode, the bypass switch is used to bypass the resistor and capacitor network, thereby eliminating the switching delay.
[0010] Furthermore, the delay subunit is a digital logic operation delay subunit. When the attenuation unit switches from the attenuation mode to the insertion loss mode, the switching delay is controlled by the digital logic; when the attenuator stage switches from the insertion loss mode to the attenuation mode, the digital logic does not cause the switching delay.
[0011] On the other hand, the present invention provides a power measurement method, which includes: an input signal is sent into a power measurement circuit through a connection port, and the input signal is first attenuated by an attenuator to reduce the amplitude of the signal so that it is within the safe sampling range of an ADC; the ADC converter converts the analog signal attenuated by the attenuator into a digital signal; the digital signal is transmitted to a power detector through an SPI serial peripheral interface; the power detector receives the digital signal, performs power calculation, measures and calculates the power value of the input signal; the detector transmits the calculated power value result to a power display device through the SPI serial peripheral interface for display preparation; the power display device converts the received power value into a visual format.
[0012] Compared with the prior art, the present invention has the following advantages and beneficial effects:
[0013] 1. The present invention improves the attenuator and realizes multi-level attenuation of the input signal by setting multiple attenuation units, so that the power measurement circuit can flexibly provide accurate attenuation control and dynamically adjust the signal power to facilitate subsequent measurements.
[0014] 2. The present invention provides a transition state for the first series switch during the switching process through the interaction between the first series switch and the second series switch, thereby gradually reducing the current and voltage changes in the attenuation network, thereby reducing the amplitude of transient glitches, and by controlling the switching state of the second series switch, the current passing through the attenuation network can be adjusted to control the power change of the attenuator unit, which helps to keep the power of the attenuator unit within a preselected range, prevent power overshoot or undershoot, and further reduce the impact on the circuit. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] The drawings described herein are used to provide a further understanding of the embodiments of the present invention, constitute a part of this application, and do not constitute a limitation of the embodiments of the present invention. In the drawings:
[0016] Figure 1 A system structure diagram provided for exemplary embodiment 1 of the present invention.
[0017] Figure 2 A method flow chart provided for exemplary embodiment 2 of the present invention. DETAILED DESCRIPTION
[0018] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.
[0019] Embodiment 1:
[0020] This embodiment discloses a power measurement circuit. Figure 1 As shown, the power measurement circuit includes the following components:
[0021] Attenuator, ADC sampling converter, power detector, power display device and serial port driving circuit.
[0022] The attenuator is connected to the ADC sampling converter and is configured so that when the signal is input into the power measurement circuit, the attenuator is used to attenuate the input signal so that the input signal reaches a range suitable for ADC sampling after attenuation, thereby avoiding damage to the ADC sampling converter due to excessive signal or inaccurate measurement and reduced signal-to-noise ratio due to excessive signal.
[0023] Specifically, the attenuator includes at least two attenuation units, which are used in series, and each attenuation unit has its own first series switch and shunt switch. By controlling the closing and opening of these switches, different attenuation values can be combined. The total attenuation level is determined by the sum of the unit attenuation values of each attenuator unit. For example, if there are three units, and the unit attenuation value of each unit is 1 dB, 2 dB and 4 dB, then through different combinations, these units can provide attenuation levels from 0 dB to 7 dB. Those skilled in the art can flexibly configure the number of attenuation units according to specific circuit design requirements.
[0024] It should be noted that for a single attenuator unit, it has two working modes, attenuation mode and insertion loss mode. Its attenuation state is that when the first series switch is closed, the input signal passes through the attenuator unit and the signal is attenuated. For example, assuming that the unit attenuation value of the single attenuation unit is 1 dB, the input signal strength will be reduced by 1 dB. The insertion state is that when the shunt switch is closed, the input signal bypasses the attenuator unit and is directly output, and the input signal strength remains unchanged.
[0025] The combination of multiple attenuator units can be, now assume that there are four attenuator units configured, and their unit attenuation values are 1 dB, 2 dB, 4 dB and 8 dB respectively. By controlling the switch state of each unit, any attenuation value between 0 dB and 15 dB can be achieved. For example, to achieve 3 dB attenuation, close the first series switch of the 1 dB and 2 dB units (total attenuation value = 1 dB + 2 dB). To achieve 7 dB attenuation, close the first series switch of the 1 dB, 2 dB and 4 dB units (total attenuation value = 1 dB + 2 dB + 4 dB). To achieve 15 dB attenuation, close the first series switch of all units (total attenuation value = 1 dB + 2 dB + 4 dB + 8 dB).
[0026] That is, each attenuator unit can provide different attenuation states and insertion states through the control of the switch. By combining multiple such units, multi-level attenuation within a range can be achieved.
[0027] So from the above content, it can be seen that the attenuation unit is able to individually switch the connected attenuation level, each attenuation unit has an insertion loss mode and an attenuation mode, and a delay subunit depending on the attenuation state, a delay subunit is connected to an attenuation unit, and the delay subunit is used to make the corresponding attenuation unit switch between the insertion loss mode and the attenuation mode at different speeds. When the attenuation unit switches from the attenuation mode to the insertion loss mode, the delay subunit introduces a delay to slow down the switching process. When the attenuation unit switches from the insertion loss mode to the attenuation mode, the delay subunit does not introduce a delay or introduces a tiny delay to speed up the switching process.
[0028] Specifically, when the attenuator stage switches from attenuation mode to insertion loss mode, transient interference can be reduced by introducing a delay. Rapid switching may cause instantaneous voltage or current changes in the circuit, resulting in signal distortion or noise. Delayed switching can smooth these changes and ensure a stable signal.
[0029] In the present invention, the delay subunit can realize delay by using two methods: analog circuit control and digital logic circuit control.
[0030] In analog circuit control, the delay subunit includes a resistor-capacitor network and a bypass switch, wherein when the attenuation unit switches from an attenuation mode to an insertion loss mode, a switching delay is provided by the resistor-capacitor network; when the attenuator stage switches from an insertion loss mode to an attenuation mode, the bypass switch is used to bypass the resistor-capacitor network, thereby eliminating the switching delay.
[0031] In the digital logic circuit control, the digital logic built into the MCU is used to provide a delay signal. When the attenuation unit switches from the attenuation mode to the insertion loss mode, the MCU automatically sends a signal switching delay; when the attenuator stage switches from the insertion loss mode to the attenuation mode, the MCU does not send a signal and does not cause a switching delay.
[0032] It should be noted that signal integrity is critical for power measurement. By controlling the switching speed, signal reflection, resonance or other effects caused by sudden mode changes can be avoided, thereby improving the quality of the signal after attenuation. Generally speaking, the rapid switching of the attenuation unit will generate high-frequency noise. At the same time, when multiple attenuator units connected in series are combined to achieve a large attenuation value, the high-frequency noise generated by a single attenuation unit will be superimposed, and these noises may affect the surrounding circuits through electromagnetic radiation or coupling. By introducing delays through delay subunits, these high-frequency noises can be reduced, thereby reducing electromagnetic interference (EMI).
[0033] Therefore, by configuring a delay subunit in each attenuation unit and controlling the switching speed through the delay subunit, the switching from the attenuation mode to the insertion loss mode is slowed down, which can optimize the performance and reliability of the system, reduce various potential problems, and ensure the stable transmission and processing of the input signal.
[0034] Specifically, the attenuation unit may include an attenuation network, a first series switch connected between the attenuation network and ground, a second series switch connected in series between the first series switch and ground and in parallel with a resistor, and a shunt switch connected between the input and output of the attenuator unit.
[0035] The first series switch is closed to provide an attenuation state. When the first series switch is closed, the input signal passes through the attenuator unit, the signal is attenuated, and the attenuation unit is in an attenuation mode.
[0036] When the first series switch switches from a closed state to an open state, the second series switch connected in parallel with the resistor is used to provide a transition state during the switching process, gradually reducing the current and voltage changes in the attenuation network and reducing the amplitude of transient glitches.
[0037] When the shunt switch is closed, the input signal bypasses the attenuator unit and is directly output, the signal strength remains unchanged, and the attenuation unit is in insertion loss mode.
[0038] The attenuation unit may also include a control subunit for providing an intermediate control signal to switch the second series switch during the state transition of the attenuator unit. The control subunit is configured to provide a control signal to at least one of the second series switches. When the first series switch is switched at a predetermined timing, the transmission of the control signal of the second series switch is timed, and the state of the second series switch is changed by delaying the time, thereby ensuring that the current and voltage change smoothly during the switching process and optimizing the transient response.
[0039] Specifically, the biggest difference between the attenuation unit of the present invention and the common attenuation unit is that a two-stage series switch is provided. When the first series switch switches from a closed state to an open state, the second series switch works with the parallel resistor to provide a transition state. This design enables the attenuator to gradually reduce the changes in current and voltage when switching modes. At the same time, the second series switch can also reduce transient glitches. During the signal switching process, the transition state is introduced by the second series switch, and the current and voltage changes become smoother, thereby reducing interference with subsequent circuits and ensuring device stability. And because the second series switch can control the speed and amplitude of the switching, the risk of equipment damage caused by sudden current or voltage changes is reduced, which is particularly important in high-power applications.
[0040] In summary, the improvement of the attenuation unit successfully improved the system stability, and by reducing transient fluctuations, the second series switch enhanced the stability of the entire attenuator and protected other components from current shocks. At the same time, the design of the two-stage series switch allows the attenuator to flexibly switch between different working modes to meet the needs of different applications, improve the applicability of the system, and effectively extend the life of the equipment.
[0041] It should be noted that there are many ways to implement the attenuation network. Common attenuation networks include T-type attenuation network, π-type attenuation network, L-type attenuation network and variable attenuation network. Among them, the T-type attenuation network consists of two series resistors and one parallel resistor. This network form is similar to the letter "T", hence the name, which is suitable for signal attenuation in a wider frequency band. The π-type attenuation network consists of two parallel resistors and one series resistor. This network form is similar to the Greek letter "π", hence the name, which is suitable for signal attenuation in a wider frequency band. The L-type attenuation network consists of a series resistor and a parallel resistor. This network form is similar to the letter "L" and is suitable for simple attenuation requirements. The variable attenuation network uses a variable resistor (such as a rheostat) or a controllable element (such as a PIN diode, FET, etc.) to dynamically adjust the attenuation amount, which is suitable for occasions where flexible attenuation control is required. Those skilled in the art can select a specific type of attenuation network according to the actual measurement needs.
[0042] The ADC sampling converter is connected to the power detector and is configured to convert the attenuated analog signal into a digital signal and transmit the digital signal to the power detector through the SPI interface.
[0043] The power detector is composed of an MCU and its basic circuits, and is configured to receive a digital signal and detect its power, and report the detected power value to a power display device for display.
[0044] The power display device is connected to the power detector and is configured to receive and display the power value reported by the power detector.
[0045] The serial port driving circuit is connected to the power detector and is configured to convert the logic level of the microcontroller in the power detector into the level required by the ADC sampling converter and the power display device, while enhancing the signal strength, improving the anti-interference ability, and ensuring the integrity and correctness of the data during transmission.
[0046] Embodiment 2,
[0047] In this embodiment, a power measurement method is provided. Figure 2 As shown, the method comprises the following steps:
[0048] Step 1: The input signal is sent to the power measurement circuit through the connection port. The input signal is first attenuated by the attenuator to reduce the amplitude of the signal so that it is within the safe sampling range of the ADC.
[0049] Step 2: The ADC converter converts the analog signal attenuated by the attenuator into a digital signal.
[0050] Step 3: The digital signal is transmitted to the power detector via the SPI serial peripheral interface.
[0051] Step 4: The power detector receives the digital signal and performs power calculations to measure and calculate the power value of the input signal.
[0052] Step 5: The power detector transmits the calculated power value result to the power display device through the SPI serial peripheral interface for display preparation.
[0053] Step 6: The power display device converts the received power value into a visual format.
[0054] The specific implementation methods described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific implementation method of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A power measurement circuit, characterized in that: The power measurement circuit includes an attenuator, an ADC sampling converter, a power detector and a power display device, wherein: The attenuator is connected to the ADC sampling converter and is configured such that when a signal is input into the power measurement circuit, the attenuator is used to attenuate the input signal so that the input signal reaches a range suitable for ADC sampling after attenuation, thereby avoiding damage to the ADC sampling converter due to an excessively large signal or inaccurate measurement and reduced signal-to-noise ratio due to an excessively weak signal; The ADC sampling converter is connected to the power detector and is configured to convert the attenuated analog signal into a digital signal and transmit the digital signal to the power detector through the SPI interface; The power detector is composed of an MCU and its basic circuits, and is configured to receive a digital signal and detect its power, and report the detected power value to a power display device for display; The power display device is connected to the power detector and is configured to receive and display the power value reported by the power detector.
2. The power measurement circuit according to claim 1, characterized in that: The circuit also includes a serial port driving subcircuit, which is connected to the power detector and is configured to convert the logic level of the microcontroller in the power detector into the level required by the ADC sampling converter and the power display device, while enhancing the signal strength, improving the anti-interference ability, and ensuring the integrity and correctness of the data during transmission.
3. The power measurement circuit according to claim 1, characterized in that: The attenuator comprises at least two attenuation units; The attenuation units are capable of switching connected attenuation levels individually, each attenuation unit having an insertion loss mode and an attenuation mode, and a delay subunit depending on the attenuation state, one delay subunit being connected to one attenuation unit, The delay subunit is used to make the corresponding attenuation unit switch between the insertion loss mode and the attenuation mode at different speeds. When the attenuation unit switches from attenuation mode to insertion loss mode, the delay subunit introduces a delay to slow down the switching process. When the attenuation unit switches from the insertion loss mode to the attenuation mode, the delay subunit introduces no delay or introduces a tiny delay to make the switching process faster.
4. The power measurement circuit according to claim 3, characterized in that: The attenuation unit comprises: an attenuation network, and a first series switch connected between the attenuation network and ground, and a second series switch connected in series between the first series switch and ground and in parallel with the resistor, and a shunt switch connected between the input and output of the attenuator unit; The first series switch is closed to provide an attenuation state. When the first series switch is closed, the input signal passes through the attenuator unit, the signal is attenuated, and the attenuation unit is in an attenuation mode; When the first series switch switches from a closed state to an open state, the second series switch connected in parallel with the resistor is used to provide a transition state during the switching process, gradually reducing the current and voltage changes in the attenuation network and reducing the amplitude of the transient burr; When the shunt switch is closed, the input signal bypasses the attenuator unit and is directly output, the signal strength remains unchanged, and the attenuation unit is in insertion loss mode.
5. The power measurement circuit according to claim 4, characterized in that: The attenuator unit further includes a control subunit for providing an intermediate control signal to switch the second series switch during the state transition of the attenuator unit. The control subunit is configured to provide a control signal to at least one of the second series switches. When the first series switch is switched in a predetermined timing, the transmission of the control signal of the second series switch is timed, and the state of the second series switch is changed by delaying the time, thereby ensuring that the current and voltage change smoothly during the switching process and optimizing the transient response.
6. The power measurement circuit according to claim 3, characterized in that: The delay subunit includes a resistor-capacitor network and a bypass switch, wherein: The resistor-capacitor network provides a switching delay when the attenuation unit switches from attenuation mode to insertion loss mode; When the attenuator stage switches from the insertion loss mode to the attenuation mode, the bypass switch is used to bypass the resistor-capacitor network, thereby eliminating the switching delay.
7. The power measurement circuit according to claim 3, characterized in that: The delay subunit also includes digital logic operations, When the attenuation unit switches from the attenuation mode to the insertion loss mode, the switching delay is controlled by digital logic; When the attenuator stage switches from insertion loss mode to attenuation mode, the digital logic causes no switching delay.
8. A power measurement method, the power measurement method comprising: an input signal is sent into a power measurement circuit through a connection port, and the input signal is first attenuated by an attenuator to reduce the amplitude of the signal so that it is within the safe sampling range of an ADC; The ADC converter converts the analog signal attenuated by the attenuator into a digital signal; The digital signal is transmitted to the power detector via the SPI serial peripheral interface; The power detector receives the digital signal, performs power calculation, measures and calculates the power value of the input signal; The power detector transmits the calculated power value result to the power display device through the SPI serial peripheral interface for display preparation; The power display device converts the received power value into a visual format.