PWM duty ratio measuring device
By designing the PWM conversion circuit and filter circuit, the PWM signal is converted into a DC voltage signal, and the analog display meter is input to display the duty cycle. This solves the problem of high cost of PWM duty cycle measurement in the existing technology and achieves high sensitivity. and low-cost measurement results.
Patent Information
- Application Number
- CN202311585478.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-24
- Publication Date
- 2024-10-18
AI Technical Summary
Existing PWM duty cycle measurement technology relies on high-performance microcontroller units (MCU) or analog-to-digital conversion (ADC) circuits, resulting in high costs.
A PWM duty cycle measurement device is designed. The PWM signal to be measured is converted into two PWM signals through a PWM conversion circuit, representing the low-level width and high-level width respectively, and converted into a DC voltage signal through a filter circuit. , input the analog display meter to display the duty cycle, avoiding complex logic control devices and integrated circuits, and reducing costs.
The sensitivity and accuracy of PWM duty cycle measurement are improved, the cost is reduced, and complex integrated circuits are not required, achieving low-cost, high-sensitivity duty cycle measurement.
Smart Images

Figure CN118795228A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of circuit technology, and in particular relates to a PWM duty cycle measurement device. Background Art
[0002] Pulse-Width Modulation (PWM), in current digital and analog circuit design, refers to a circuit design application technology that controls analog circuits by outputting PWM signals through the PWM module of a digital processor. By changing the proportion of the logical high and low levels of the PWM continuous pulse signal, the control effect of controlling the switching time of the analog circuit load and thus changing the load working state is achieved. The load opening can be determined by measuring the high and low level duty cycle of the PWM signal. Furthermore, the duty cycle of the PWM signal can be converted into the ratio of the average voltage value of the PWM signal to the amplitude of the PWM signal.
[0003] There are two PWM duty cycle detection methods in the prior art. The first method is to use the high-speed clock and edge interrupt function of the microcontroller unit (MCU), generate the first GPIO interrupt at the rising edge of the first general purpose input / output port (GPIO), and the timer starts counting under the high-speed clock, and then generates the second interrupt at the falling edge, saves the timer value at this time, and continues counting. Finally, the GPIO rising edge generates an interrupt to stop counting and save the timer value. The PWM duty cycle can be obtained by calculating the ratio of the two saved counter values. The second method is to use a low-pass filter to convert the PWM signal into a voltage signal, and then convert the electrical signal into a binary digital signal through an analog-to-digital converter (ADC) circuit, and then convert it into a decimal value that is easy to read through a digital processor and a display. It can be seen that the existing PWM duty cycle measurement technology solution relies on digital integrated circuits, which either requires a high-performance MCU or an ADC conversion element, and the cost of PWM duty cycle measurement is high. Summary of the invention
[0004] The embodiment of the present application provides a PWM duty cycle measurement device, which can solve the problem of high cost of PWM duty cycle measurement.
[0005] The PWM duty cycle measurement device provided in the embodiment of the present application may include:
[0006] A power supply circuit, used for providing an operating voltage for the PWM duty cycle measuring device;
[0007] a PWM conversion circuit, electrically connected to the power supply circuit, for converting the PWM signal to be measured into a first PWM signal and a second PWM signal, wherein the high level width of the first PWM signal indicates the low level width of the PWM signal to be measured, and the high level width of the second PWM signal indicates the high level width of the PWM signal to be measured;
[0008] a filter circuit, electrically connected to the power supply circuit and the PWM conversion circuit respectively, and configured to filter the first PWM signal into a first DC voltage signal and filter the second PWM signal into a second DC voltage signal;
[0009] An analog quantity display meter is electrically connected to the power supply circuit and the filter circuit respectively, and includes a dial, and a meter coil and a meter pointer rotating shaft connected to the dial, wherein the meter coil is used to receive the first DC voltage signal and the second DC voltage signal, and generate an Ampere force according to the first DC voltage signal and the second DC voltage signal to drive the pointer of the dial to rotate; the meter pointer rotating shaft is used to provide a working damping balanced with the Ampere force; and the dial is used to indicate the duty cycle of the PWM signal to be measured through a pointer.
[0010] The PWM duty cycle measuring device of the embodiment of the present application can first convert the PWM signal to be measured into two PWM signals through the PWM conversion circuit, and the high-level widths of the two PWM signals respectively indicate the low-level width and high-level width of the PWM signal to be measured; then, the two PWM signals can be filtered into two DC voltage signals through the filtering circuit, and input into the meter head coil of the analog display meter head, so that the meter head coil generates an Ampere force based on the two DC voltage signals to drive the pointer of the dial of the analog display meter head to rotate, and the meter head pointer rotation shaft of the analog display meter head provides a working damping balanced with the Ampere force, so that the duty cycle of the PWM signal to be measured is displayed through the dial. It can be seen that the PWM duty cycle measuring device of the embodiment of the present application does not need to set up a device responsible for logic control, and does not need a complex integrated circuit, so that the cost of PWM duty cycle measurement can be reduced.
[0011] In addition, since the PWM conversion circuit converts the PWM signal to be measured into two PWM signals, for a certain amount of duty cycle change, the voltage input to both ends of the meter coil will change twice. In this way, the change in PWM duty cycle can be amplified by two times, thereby improving the sensitivity of PWM duty cycle measurement. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] In order to more clearly illustrate the technical solution of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0013] Figure 1 It is one of the structural schematic diagrams of the PWM duty cycle measurement device provided in the embodiment of the present application;
[0014] Figure 2 is a schematic diagram of the structure of a dial provided in an embodiment of the present application;
[0015] Figure 3 This is the second structural schematic diagram of the PWM duty cycle measurement device provided in the embodiment of the present application;
[0016] Figure 4 This is one of the structural schematic diagrams of the rotating shaft of the pointer of the meter provided in the embodiment of the present application;
[0017] Figure 5a is a schematic structural diagram of a first card slot provided in an embodiment of the present application;
[0018] Figure 5b is a structural schematic diagram of a second card slot provided in an embodiment of the present application;
[0019] Figure 6 This is the third structural schematic diagram of the PWM duty cycle measurement device provided in the embodiment of the present application;
[0020] Figure 7 It is a flow chart of the PWM duty cycle measurement method provided in an embodiment of the present application. DETAILED DESCRIPTION
[0021] The features and exemplary embodiments of various aspects of the present application will be described in detail below. In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain the present application, rather than to limit the present application. For those skilled in the art, the present application can be implemented without the need for some of these specific details. The following description of the embodiments is only to provide a better understanding of the present application by illustrating the examples of the present application.
[0022] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "include..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0023] The PWM duty cycle measurement device provided in the embodiment of the present application is described in detail below through some embodiments and their application scenarios in combination with the accompanying drawings.
[0024] like Figure 1 As shown, the PWM duty cycle measurement device of the embodiment of the present application may include but is not limited to: a power supply circuit 10, a PWM conversion circuit 20, a filter circuit 30 and an analog display meter 40.
[0025] The power supply circuit 10 is electrically connected to other modules in the PWM duty cycle measurement device, and can be used to provide working voltage for other modules in the PWM duty cycle measurement device. In some embodiments, the power supply circuit 10 can be a voltage stabilizing circuit with 3 to 12V input and 3.3V output. In other embodiments, the power supply circuit 10 can be connected to a 3.3V power input as a working power supply.
[0026] The PWM conversion circuit 20 can be used to convert the PWM signal to be measured into a first PWM signal and a second PWM signal, wherein the high level width of the first PWM signal indicates the low level width of the PWM signal to be measured, and the high level width of the second PWM signal indicates the high level width of the PWM signal to be measured. It can be seen that the PWM conversion circuit 20 receives the same PWM signal input and outputs two PWM signals with complementary duty cycles, so that the change in the PWM duty cycle can be amplified by two times, thereby improving the sensitivity of the PWM duty cycle measurement.
[0027] The filter circuit 30 is electrically connected to the PWM conversion circuit 20, and is used to filter the first PWM signal into a first DC voltage signal, and filter the second PWM signal into a second DC voltage signal. Since the high level width of the first PWM signal indicates the low level width of the PWM signal to be measured, the first DC voltage signal can indicate the low level time of the PWM signal to be measured; the high level width of the second PWM signal indicates the high level width of the PWM signal to be measured, and the second DC voltage signal can indicate the high level time of the PWM signal to be measured.
[0028] In specific implementation, the filter circuit 30 may be an RC filter circuit, that is, the filter circuit 30 may be composed of a resistor and a capacitor. In some embodiments, the filter circuit 30 may be a low-pass filter group, which may include two low-pass filters, and the low-pass filter may also be called a low-pass filter circuit, and each low-pass filter circuit may include a resistor and a capacitor. The two outputs of the PWM conversion circuit 20 are respectively connected to the inputs of the two low-pass filter circuits in the filter circuit 30, and each low-pass filter circuit is used to filter the input PWM signal into a DC voltage signal.
[0029] The analog quantity display meter 40 is electrically connected to the filter circuit 30 , and may include, but is not limited to, a dial, a meter coil connected to the dial, and a meter pointer rotation shaft.
[0030] The analog quantity display meter 40 may be a pointer type meter, and the dial indicates the duty cycle of the PWM signal to be measured through the pointer. Figure 2 As shown, the display area of the dial is a 360-degree circumference. When there is no signal input, the pointer can point to the "fifty" scale; when there is a signal input, the pointer can rotate clockwise or counterclockwise according to the input signal. Specifically, when the duty cycle of the PWM signal to be measured is greater than 50%, the pointer of the dial can rotate clockwise to point to the scale corresponding to the duty cycle of the PWM signal to be measured; when the duty cycle of the PWM signal to be measured is less than 50%, the pointer of the dial can rotate counterclockwise to point to the scale corresponding to the duty cycle of the PWM signal to be measured. But it can be understood that, Figure 2 The dial is only an example and does not limit the specific form of the dial.
[0031] The two input ends of the meter coil are respectively connected to the outputs of the two low-pass filter circuits in the filter circuit 30. Specifically, the positive end of the meter coil can be connected to the low-pass filter circuit that outputs the second DC voltage signal, and the negative end of the meter coil can be connected to the low-pass filter circuit that outputs the first DC voltage signal.
[0032] The pointer rotating shaft of the meter head is used to provide working damping that is balanced with the Ampere force, so that the pointer of the dial can stably point to the duty cycle of the PWM signal to be measured.
[0033] The PWM duty cycle measuring device of the embodiment of the present application can first convert the PWM signal to be measured into two PWM signals through the PWM conversion circuit, and the high-level widths of the two PWM signals respectively indicate the low-level width and high-level width of the PWM signal to be measured; then, the two PWM signals can be filtered into two DC voltage signals through the filtering circuit 30, and input into the header coil of the analog display meter 40, so that the header coil generates an Ampere force based on the two DC voltage signals to drive the pointer of the dial of the analog display meter 40 to rotate, and the pointer rotation axis of the analog display meter 40 provides a working damping balanced with the Ampere force, so that the duty cycle of the PWM signal to be measured is displayed through the dial. It can be seen that the PWM duty cycle measuring device of the embodiment of the present application does not need to set up a device responsible for logic control, and does not need a complex integrated circuit, so that the cost of PWM duty cycle measurement can be reduced. In addition, since the PWM conversion circuit converts the PWM signal to be measured into two PWM signals, for a certain amount of duty cycle change, the voltage input to both ends of the meter coil will change twice. In this way, the change in PWM duty cycle can be amplified by two times, thereby improving the sensitivity of PWM duty cycle measurement.
[0034] The PWM conversion circuit 20 will be described in detail below.
[0035] In some embodiments, the PWM conversion circuit 20 may include a first conversion circuit and a second conversion circuit. That is, the PWM conversion circuit 20 includes two conversion circuits, so the PWM conversion circuit 20 may also be called a dual PWM conversion circuit.
[0036] The first conversion circuit may include a first resistor and a first conversion unit, wherein a first end of the first resistor is electrically connected to the power supply circuit, and a second end of the first resistor is grounded through the first conversion unit. The first conversion unit is used to convert the PWM signal to be measured into a first PWM signal; the first resistor is used to prevent the first conversion circuit from being short-circuited, and ensure the normal operation of the first conversion unit.
[0037] The second conversion circuit includes a second resistor and a second conversion unit, wherein a first end of the second resistor is electrically connected to the power supply circuit, and a second end of the second resistor is grounded through the second conversion unit. The second conversion unit is used to convert the PWM signal to be measured into a second PWM signal; the second resistor is used to prevent the second conversion circuit 22 from short-circuiting, thereby ensuring the normal operation of the second conversion unit.
[0038] That is, the two conversion circuits in the PWM conversion circuit 20 may be respectively composed of a resistor and a conversion unit. In some embodiments, the resistors in the two conversion circuits may be different resistors, and in this embodiment, the two conversion circuits are connected in parallel. In other embodiments, the resistors in the two conversion circuits may also be the same resistor, and in this embodiment, the two conversion circuits share a resistor, which can further reduce the PWM duty cycle measurement cost.
[0039] The first conversion unit is used to convert the first PWM signal whose high level width indicates the low level width of the PWM signal to be measured. Therefore, the first conversion unit can be a device that can convert a high level into a low level and a low level into a high level, that is, it can output a low level when a high level is input, and it can output a high level when a low level is input. The embodiment of the present application does not limit the specific form of the first conversion unit. In some embodiments, the first conversion unit can be an NPN transistor, wherein the base of the NPN transistor inputs the PWM signal to be measured, the collector of the NPN transistor is electrically connected to the first resistor and the filter circuit 30 respectively, and the emitter of the NPN transistor is grounded. In other embodiments, the first conversion unit can be an NMOS tube, but is not limited to this.
[0040] The second conversion unit is used to convert and obtain a second PWM signal whose high level width indicates the high level width of the PWM signal to be measured. Therefore, the second conversion unit can be a device that can maintain a high level as a high level and a low level as a low level, that is, it can output a high level when a high level is input, and it can output a low level when a low level is input. The embodiment of the present application does not limit the specific form of expression of the second conversion unit. In some embodiments, the second conversion unit can be a PNP transistor, wherein the base of the PNP transistor inputs the PWM signal to be measured, the emitter of the PNP transistor is electrically connected to the first resistor and the filter circuit 30 respectively, and the collector of the PNP transistor is grounded. In other embodiments, the second conversion unit can be a PMOS tube, but is not limited to this.
[0041] For easier understanding, see Figure 3 ,exist Figure 3 In the embodiment, the first resistor is a resistor R4, and the first conversion unit is an NPN transistor Q3; the second resistor is a resistor R3, and the second conversion unit is a PNP transistor Q4. The resistor R4 and the NPN transistor Q3 form a first PWM conversion circuit for converting the PWM signal to be measured into a first PWM signal; the resistor R3 and the NPN transistor Q4 form a second PWM conversion circuit for converting the PWM signal to be measured into a second PWM signal.
[0042] The following is a detailed description of the pointer rotation axis.
[0043] In some embodiments, Figure 4 As shown, the watch pointer rotating shaft may include a pointer shaft 41 connected to the pointer of the dial, and a clockwise hairspring 42 and a counterclockwise hairspring 43 arranged on the pointer shaft 41 .
[0044] The clockwise hairspring 42 is used to provide working damping that is balanced with the Ampere force when the duty cycle is higher than 50%. Specifically, when the duty cycle of the PWM signal to be measured is higher than 50%, when the pointer shaft 41 rotates clockwise under the action of the clockwise Ampere force of the meter coil, the clockwise hairspring 42 provides a resistance equal to the Ampere force and opposite in direction, so that the pointer of the dial stably points to the corresponding PWM duty cycle scale, thereby realizing the duty cycle display of the PWM signal to be measured.
[0045] The counterclockwise hairspring 43 is used to provide working damping that is balanced with the Ampere force when the duty cycle is less than 50%. Specifically, when the duty cycle of the PWM signal to be measured is less than 50%, when the rotating shaft rotates counterclockwise under the action of the counterclockwise Ampere force of the meter coil, a resistance equal to the Ampere force and opposite in direction is provided, so that the pointer of the dial stably points to the corresponding PWM duty cycle scale, and the duty cycle display of the PWM signal to be measured is realized.
[0046] In this embodiment, the rotating shaft of the pointer of the meter head adopts a double hairspring design, which provides 180° clockwise and counterclockwise torque respectively. When there is no signal input, the pointer points to the "fifty" scale under the action of the clockwise hairspring 42 and the counterclockwise hairspring 43; when there is a signal input, the pointer stably points to the corresponding PWM duty cycle scale under the action of the clockwise hairspring 42 or the counterclockwise hairspring 43, thereby improving the reliability of the PWM duty cycle display.
[0047] In some embodiments, Figure 4 As shown, the dial pointer rotation shaft may further include a first clamping groove 44 and a second clamping groove 45 provided on the pointer shaft 41 .
[0048] The first slot 44 can be combined with the clockwise hairspring 42. Specifically, the first slot 44 is used to engage with the hook of the clockwise hairspring 42 when the pointer shaft of the dial rotates clockwise, and to disengage from the clockwise hairspring 42 when the pointer shaft of the dial rotates counterclockwise. In this way, the clockwise hairspring 42 can be fixed, thereby improving the stability of the pointing direction of the dial pointer.
[0049] The second slot 45 can be combined with the counterclockwise hairspring 43. Specifically, the second slot 45 is used to engage with the hook of the counterclockwise hairspring 43 when the pointer shaft of the dial rotates counterclockwise, and to disengage from the clockwise hairspring 42 when the pointer shaft of the dial rotates clockwise. In this way, the clockwise hairspring 42 can be fixed, thereby improving the stability of the pointing direction of the dial pointer.
[0050] In some embodiments, the first card slot 44 may also be referred to as a clockwise card slot, and the second card slot 45 may also be referred to as a counterclockwise card slot. The present application embodiment does not limit the structure and location of the first card slot 44 and the second card slot 45. Figure 5a As shown, the first slot 44 can be designed to be concave on the right and smooth on the left; Figure 5b As shown, the second slot 45 can be designed to be concave on the left and smooth on the right, but is not limited thereto. Figure 4 As shown, the first card slot 44 and the second card slot 45 can be arranged on the same plane and straight line.
[0051] In the embodiment of the present application, the filter circuit 30 may be provided with at least one low-pass filter group, each of which includes two low-pass filter circuits respectively, for connecting the two outputs of the PWM conversion circuit 20. When the number of low-pass filter groups is greater than 1, different low-pass filter groups may be applicable to filtering PWM signals of different frequency ranges. In this way, a low-pass filter group matching the frequency of the PWM signal to be measured may be used to measure the PWM duty cycle, which may improve the accuracy of the PWM duty cycle measurement.
[0052] Each low-pass filter circuit in the low-pass filter group can be composed of a resistor and a capacitor. In specific implementation, different low-pass filter groups can be used for filtering PWM signals in different frequency ranges by setting capacitors with different capacitance values. The capacitance value of the capacitor of the low-pass filter group is negatively correlated with its applicable filtering frequency range, that is, the larger the capacitance value of the capacitor of the low-pass filter group, the smaller the maximum value of its applicable filtering frequency range, and vice versa.
[0053] The low-pass filter circuits of different low-pass filter groups can be independent of each other or share resistors to further reduce the PWM duty cycle measurement cost.
[0054] In some embodiments, the filtering circuit 30 may include a third resistor, a fourth resistor, and at least two filtering units, and the filtering frequency ranges of the at least two filtering units are different.
[0055] In this embodiment, the third resistor and the fourth resistor are respectively combined with each filtering unit to form a low-pass filter group, which is suitable for filtering PWM signals in different frequency ranges. It can be seen that in this embodiment, different low-pass filter groups share resistors.
[0056] To achieve the switching of the filtering frequency range of the filtering circuit 30, in the embodiment of the present application, as shown in FIG. Figure 3 and Figure 6As shown, the PWM duty cycle measurement device may further include a frequency switching switch 50, which is a multi-channel rotary switching switch, and is disposed between the resistor and the filter unit of the filter circuit 30. Thus, the filter unit connected to the third resistor and the fourth resistor may be switched by rotating the frequency switching switch, that is, different capacitor-resistor combinations may be selected to adapt to the measurement of PWM signals in different frequency ranges.
[0057] In a specific implementation, before measuring the PWM signal to be measured, the frequency of the PWM signal to be measured can be obtained first, and then the frequency switching switch 50 can be rotated so that the third resistor and the fourth resistor are connected to the target filtering unit in at least two filtering units, that is, the frequency switching switch 50 is rotated so that it connects the third resistor and the target filtering unit, and the fourth resistor and the target filtering unit, and the filtering frequency range of the target filtering unit includes the frequency of the PWM signal to be measured.
[0058] The third resistor and the target filter unit form a low-pass filter circuit for filtering the first PWM signal into a first DC voltage signal. The fourth resistor and the target filter unit form another low-pass filter circuit for filtering the second PWM signal into a second DC voltage signal.
[0059] In this embodiment, the filter circuit 30 is provided with a low-pass filter group suitable for different filtering frequency ranges, and the filtering unit connected to the third resistor and the fourth resistor can be switched by the frequency switching switch 50, so that the low-pass filtering range applicable to the filtering unit connected to the third resistor and the fourth resistor includes the frequency of the PWM signal to be measured. In this way, the filtering frequency range of the filter circuit 30 can be adapted to the frequency of the PWM signal to be measured, and the measurement reliability of the duty cycle of the PWM signal to be measured can be improved.
[0060] The embodiments of the present application do not limit the specific structure of the filter unit. In some embodiments, each filter unit includes two capacitors. Further, for each low-pass filter group, the third resistor can form a low-pass filter circuit with a capacitor in its filter unit, which can be used to convert the PWM signal to be measured into a first PWM signal; the fourth resistor can form another low-pass filter circuit with another capacitor in its filter unit, which can be used to convert the PWM signal to be measured into a second PWM signal.
[0061] In one example, the target filtering unit may include a first capacitor and a second capacitor. The frequency switching switch is used to conduct the third resistor and the first capacitor, as well as the fourth resistor and the second capacitor. The third resistor and the first capacitor constitute a low-pass filter circuit, which can be used to convert the PWM signal to be measured into a first PWM signal; the fourth resistor and the second capacitor constitute another low-pass filter circuit, which can be used to convert the PWM signal to be measured into a second PWM signal.
[0062] For easier understanding, see Figure 3 .exist Figure 3 , the third resistor is resistor R5, and the fourth resistor is R6. The number of filter units is 3, including [C1, C2], [C3, C5], and [C4, C6] respectively. In this example, the frequency switching switch 50 may include 3 channels, one of which is used to conduct R5 and C1, and R6 and C2; another channel is used to conduct R5 and C3, and R6 and C5; and another channel is used to conduct R5 and C4, and R6 and C6.
[0063] In the embodiment set of the present application, the PWM signal processed by the PWM conversion circuit 20 can be an original PWM signal or a shaped PWM signal.
[0064] In some embodiments, Figure 3 and Figure 6 As shown, the PWM duty cycle measurement device may further include: a PWM shaping circuit 60, which is electrically connected to the power supply circuit 10 and the PWM conversion circuit 20 respectively, and is used to convert the input PWM signal into a regular PWM signal to obtain a PWM signal to be measured.
[0065] In this embodiment, the input PWM signal is shaped by the PWM shaping circuit 60 and then input to the PWM conversion circuit 20 for processing. The PWM conversion circuit 20 processes the shaped PWM signal with a high signal recognition rate, thus improving the reliability of the PWM signal duty cycle measurement.
[0066] In some embodiments, as shown in FIG. 5 , the PWM shaping circuit may be a triode Schmitt shaping circuit, but is not limited thereto.
[0067] It should be noted that the various optional implementation modes introduced in the embodiments of the present application can be implemented in combination with each other or separately if they do not conflict with each other, and the embodiments of the present application are not limited to this.
[0068] like Figure 3 As shown, the PWM duty cycle measurement device provided in the embodiment of the present application may include: a power supply circuit 10, a PWM conversion circuit 20, a filter circuit 30, an analog display meter 40, a frequency switching switch 50 and a PWM shaping circuit 60.
[0069] for Figure 3 The PWM duty cycle measurement device shown in FIG. 1 and the PWM signal duty cycle measurement process can be referred to in FIG. Figure 7. The PWM signal is input to the input end of the PWM shaping circuit, which adjusts the PWM signal to a regular PWM signal with a certain amplitude, and converts it into a voltage analog quantity through a dual PWM conversion circuit and a filter circuit; the voltage analog quantity is input to the analog display meter, and the meter scale is a percentage. The PWM duty cycle can be obtained by reading the meter scale; the power supply circuit provides reference voltage and working current for other modules of the device; before the PWM signal reaches the filter circuit, the frequency switching switch selects the filter circuit of the appropriate frequency by toggling the switch to achieve smooth conversion of PWM signals of different frequencies. This device has low cost and no responsible logic control device, and can be used to measure the duty cycle of PWM signals, PWM control signal strength and other scenarios.
[0070] The measuring device of the embodiment of the present application performs double conversion on the PWM signal and uses the positive and negative pulse signals of the PWM pulse. Compared with using only the positive pulse signal, this can improve the accuracy of measuring high-frequency and low-duty-cycle PWM signals; using the positive and negative pulse signals of the PWM pulse, combined with the use of a reverse double hairspring in the meter head and a 360° circular dial on the dial, can improve the sensitivity of measuring changes in the PWM signal.
[0071] In addition to using basic resistors, capacitors, diodes, and triode components, the measuring device of the embodiment of the present application does not have integrated circuits such as an MCU controller, and does not require integrated circuit hardware design and software development. It has low cost and reliable operation; it has low operating power, stable and reliable operation, can be well arranged at the production site, and can work for a long time.
[0072] The above is only a specific implementation of the present application. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working processes of the systems, modules and units described above can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here. It should be understood that the protection scope of the present application is not limited to this. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in this application, and these modifications or replacements should be included in the protection scope of this application.
Claims
1. A PWM duty cycle measurement device, characterized in that: include: A power supply circuit, used for providing an operating voltage for the PWM duty cycle measuring device; a PWM conversion circuit, electrically connected to the power supply circuit, for converting the PWM signal to be measured into a first PWM signal and a second PWM signal, wherein the high level width of the first PWM signal indicates the low level width of the PWM signal to be measured, and the high level width of the second PWM signal indicates the high level width of the PWM signal to be measured; a filter circuit, electrically connected to the power supply circuit and the PWM conversion circuit respectively, and configured to filter the first PWM signal into a first DC voltage signal and filter the second PWM signal into a second DC voltage signal; An analog quantity display meter is electrically connected to the power supply circuit and the filter circuit respectively, and includes a dial, and a meter coil and a meter pointer rotating shaft connected to the dial, wherein the meter coil is used to receive the first DC voltage signal and the second DC voltage signal, and generate an Ampere force to drive the pointer of the dial to rotate according to the first DC voltage signal and the second DC voltage signal; the meter pointer rotating shaft is used to provide a working damping balanced with the Ampere force; and the dial is used to indicate the duty cycle of the PWM signal to be measured through a pointer.
2. The PWM duty cycle measuring device according to claim 1, characterized in that: The PWM conversion circuit includes a first conversion circuit and a second conversion circuit; The first conversion circuit includes a first resistor and a first conversion unit, wherein a first end of the first resistor is electrically connected to the power supply circuit, a second end of the first resistor is grounded through the first conversion unit, and the first conversion unit is used to convert the PWM signal to be measured into the first PWM signal; The second conversion circuit includes a second resistor and a second conversion unit, a first end of the second resistor is electrically connected to the power supply circuit, a second end of the second resistor is grounded through the second conversion unit, and the second conversion unit is used to convert the PWM signal to be measured into the second PWM signal.
3. The PWM duty cycle measuring device according to claim 2, characterized in that: The first conversion unit is an NPN transistor, wherein the base of the NPN transistor inputs the PWM signal to be measured, the collector of the NPN transistor is electrically connected to the first resistor and the filter circuit respectively, and the emitter of the NPN transistor is grounded.
4. The PWM duty cycle measuring device according to claim 2, characterized in that: The first conversion unit is a PNP transistor, wherein the base of the PNP transistor inputs the PWM signal to be measured, the emitter of the PNP transistor is electrically connected to the first resistor and the filter circuit respectively, and the collector of the PNP transistor is grounded.
5. The PWM duty cycle measuring device according to claim 1, characterized in that: The pointer rotating shaft of the watch head includes a pointer shaft connected to the pointer of the dial, and a clockwise hairspring and a counterclockwise hairspring arranged on the pointer shaft; Wherein, the clockwise hairspring is used to provide a working damping balanced with the Ampere force when the duty cycle is higher than 50%; the counterclockwise hairspring is used to provide a working damping balanced with the Ampere force when the duty cycle is less than 50%.
6. The PWM duty cycle measuring device according to claim 5, characterized in that: The meter pointer rotating shaft also includes a first clamping groove and a second clamping groove arranged on the pointer shaft; Wherein, the first slot is used to engage with the hook of the clockwise hairspring when the pointer shaft rotates clockwise; the second slot is used to engage with the hook of the counterclockwise hairspring when the pointer shaft rotates counterclockwise.
7. The PWM duty cycle measuring device according to claim 1, characterized in that: The filtering circuit comprises a third resistor, a fourth resistor and at least two filtering units, and the filtering frequency ranges of the at least two filtering units are different; The PWM duty cycle measurement device further includes a frequency switching switch, wherein the frequency switching switch is used to conduct the third resistor and a target filtering unit among the at least two filtering units, and the fourth resistor and the target filtering unit, wherein the filtering frequency range of the target filtering unit includes the frequency of the PWM signal to be measured; The third resistor and the target filtering unit are used to filter the first PWM signal into a first DC voltage signal; the fourth resistor and the target filtering unit are used to filter the second PWM signal into a second DC voltage signal.
8. The PWM duty cycle measuring device according to claim 7, characterized in that: The target filtering unit includes a first capacitor and a second capacitor; The frequency switching switch is used to conduct the third resistor and the first capacitor, and the fourth resistor and the second capacitor.
9. The PWM duty cycle measuring device according to claim 1, characterized in that: The PWM duty cycle measuring device further comprises: The PWM shaping circuit is electrically connected to the power supply circuit and the PWM conversion circuit respectively, and is used to convert the input PWM signal into a regular PWM signal to obtain the PWM signal to be measured.
10. The PWM duty cycle measuring device according to claim 9, characterized in that: The PWM shaping circuit is a triode Schmidt shaping circuit.
