Quartz gyroscope digital circuit ADC / DAC synchronous acquisition system and method

By using a timer controlled by a microprocessor and a DMA semi-interrupt method in a quartz gyroscope digital circuit, synchronous acquisition of built-in ADC, plug-in ADC and built-in DAC is achieved, which solves the gap in signal processing of quartz gyroscope digital circuits and improves the detection accuracy and stability of the gyroscope.

CN116067354BActive Publication Date: 2025-09-05BEIJING CHENJING ELECTRONICS
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211567705.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-07
Publication Date
2025-09-05
Estimated Expiration
2042-12-07

AI Technical Summary

Technical Problem

In the prior art, the signal processing research of quartz gyroscope digital circuits is relatively blank, and there is a lack of effective ADC/DAC synchronous acquisition method, which affects the accuracy and performance of the gyroscope.

Method used

The first timer controlled by the microprocessor generates complementary PWM signals, synchronizes the acquisition of the built-in ADC and the plug-in ADC, triggers the built-in DAC output driver signal through the second timer, and combines the DMA semi-interrupt method to perform internal data transmission, realizes the synchronous acquisition of the built-in DAC and the plug-in ADC.

Benefits of technology

It improves the accuracy and stability of quartz gyroscope detection, simplifies the design, has good linearity and zero adjustment convenience, and enhances the real-time and accuracy of signal processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116067354B_ABST
    Figure CN116067354B_ABST
Patent Text Reader

Abstract

The present invention provides a quartz gyroscope digital circuit ADC / DAC synchronous acquisition system and method. The system includes: a microprocessor; a first timer, triggered by the microprocessor, which begins operation and generates two complementary PWM signals. One complementary PWM signal is used to control the microprocessor's built-in ADC to acquire the amplified and modulated displacement signal at the tuning fork drive end of the quartz gyroscope; an external ADC, controlled by the other complementary PWM signal, to acquire the amplified and modulated displacement signal at the tuning fork detection end of the quartz gyroscope; and a second timer, triggered by the first timer, which activates the built-in DAC to output a drive signal to the tuning fork drive end under the control of the microprocessor. The present invention achieves synchronous signal acquisition, improves the accuracy of quartz gyroscope detection, and has a simple design, convenient zeroing, and good stability and linearity.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of signal processing technology, and in particular to a quartz gyroscope digital circuit ADC / DAC synchronous acquisition system and method. Background Art

[0002] Quartz micromachined gyroscopes use a vibrating object to sense angular velocity. Compared to conventional gyroscopes, they offer advantages such as longer lifespan, smaller size, lighter weight, higher reliability, greater integration, easier control, and the ability to meet tactical-grade gyroscope specifications. Consequently, they are widely used in industrial control, aerospace, automotive, consumer electronics, and military applications. High-performance quartz micromachined gyroscopes rely not only on high-performance core inertial components but also on the coordination of peripheral signal detection and processing circuitry. Therefore, improving gyroscope signal processing capabilities is crucial for enhancing gyroscope performance.

[0003] Ensuring real-time signal acquisition and transmission between the drive and detection ends of a quartz tuning fork is crucial for improving quartz gyroscope accuracy. Optimizing the gyro's signal processing capabilities without changing the fork's structure is a key research goal. The operating principle of a quartz gyroscope's digital circuit is as follows: a low-noise current detection circuit detects the output current signal from the quartz gyroscope's drive fork. This output voltage signal is detected through a switched capacitor detection circuit. After analog-to-digital conversion, digital signal processing is performed to achieve closed-loop control of the quartz gyroscope's drive fork.

[0004] While much research has been done on silicon micromechanical gyroscope circuits, research on signal processing in quartz gyroscope digital circuits is relatively lacking. Therefore, implementing ADC / DAC acquisition in quartz gyroscope digital circuits is a critical issue that the industry urgently needs to address. Summary of the Invention

[0005] In view of the problems existing in the prior art, the present invention provides a quartz gyroscope digital circuit ADC / DAC synchronous acquisition system and method.

[0006] The present invention provides a quartz gyroscope digital circuit ADC / DAC synchronous acquisition system, comprising:

[0007] microprocessor;

[0008] a first timer, the first timer being connected to the microprocessor signal and starting to work when triggered by the microprocessor to generate two complementary PWM signals, one complementary PWM signal being used to control a built-in ADC of the microprocessor to acquire an amplified and modulated displacement signal at a tuning fork driving end of the quartz gyroscope;

[0009] an external ADC connected to the first timer signal, and configured to collect an amplified and modulated displacement signal from a tuning fork detection end of the quartz gyroscope under the control of another complementary PWM signal;

[0010] A second timer is connected to the first timer signal and to the built-in DAC signal of the microprocessor. The second timer starts working when triggered by the first timer, and starts the built-in DAC to output a driving signal to the tuning fork driving end under the control of the microprocessor.

[0011] A quartz gyro digital circuit ADC / DAC synchronous acquisition system provided by the present invention also includes a serial peripheral interface;

[0012] The first timer is connected to the microprocessor signal through the serial peripheral interface, and the microprocessor triggers the first timer to start working through the SPI CLK of the serial peripheral interface;

[0013] The external ADC communicates with the microprocessor via the serial peripheral interface.

[0014] According to the quartz gyroscope digital circuit ADC / DAC synchronous acquisition system provided by the present invention, the built-in ADC is also used to send the amplified and modulated displacement signal on the tuning fork driving end to the microprocessor;

[0015] The external ADC is also used to send the amplified and modulated displacement signal on the tuning fork detection end to the microprocessor;

[0016] The microprocessor processes the amplified and modulated displacement signals at the tuning fork driving end and the tuning fork detecting end, controls the built-in DAC to output the driving signal based on the processed amplified and modulated displacement signal at the tuning fork driving end, and controls the external ADC to output the angular velocity based on the processed amplified and modulated displacement signal at the tuning fork detecting end.

[0017] According to a quartz gyroscope digital circuit ADC / DAC synchronous acquisition system provided by the present invention, the external ADC, built-in ADC and built-in DAC use DMA semi-interrupt mode to perform internal data transmission;

[0018] The internal data transmission includes writing the amplified and modulated displacement signals acquired by the external ADC and the built-in ADC into a memory; sending the control instructions determined by the microprocessor in the memory based on the processed displacement signals acquired by the built-in ADC into the built-in DAC, so that the built-in DAC outputs the drive signal according to the control instructions; and sending the control instructions determined by the microprocessor in the memory based on the processed displacement signals acquired by the external ADC into the external ADC, so that the external ADC outputs the angular velocity according to the control instructions.

[0019] According to the present invention, a quartz gyro digital circuit ADC / DAC synchronous acquisition system further includes a DMA;

[0020] The DMA writes a half-amplified and modulated displacement signal acquired by the external ADC or the built-in ADC into the first area of ​​the memory, and at the same time, the microprocessor processes the amplified and modulated displacement signal previously written by the DMA to the second area of ​​the memory to generate the control instruction. The DMA simultaneously writes the control instruction to the second area and transfers the control instruction previously written in the first area to the built-in DAC or the external ADC;

[0021] After the DMA completes writing the amplified and modulated displacement signal to the first area, the external ADC or the built-in ADC generates a semi-interrupt, and the microprocessor enters an interrupt, processes the amplified and modulated displacement signal in the first area, and generates a control instruction. The DMA simultaneously writes the control instruction to the first area and transfers the control instruction previously written in the second area to the built-in DAC or the external ADC.

[0022] The DMA continues to write the other half of the amplified and modulated displacement signal acquired by the external ADC or the built-in ADC into the second area, while the microprocessor processes the amplified and modulated displacement signal previously written by the DMA to the first area of ​​the memory to generate the control instruction. The DMA simultaneously writes the control instruction to the first area and transfers the control instruction previously written into the second area to the built-in DAC or the external ADC.

[0023] After the DMA completes writing the amplified and modulated displacement signal to the second area, the external ADC or the built-in ADC generates a full interrupt, the microprocessor enters the interrupt, processes the amplified and modulated displacement signal in the second area to generate a control instruction, and the DMA simultaneously writes the control instruction to the second area and transfers the control instruction previously written in the first area to the built-in DAC or the external ADC.

[0024] The present invention also provides a quartz gyroscope digital circuit ADC / DAC synchronous acquisition method, comprising:

[0025] The microprocessor controls the built-in DAC of the microprocessor to output a sine wave signal as a driving signal, which is applied to the tuning fork driving end of the quartz gyroscope;

[0026] The microprocessor is configured to collect the amplified and modulated displacement signal at the tuning fork driving end through the built-in ADC of the microprocessor;

[0027] The amplified and modulated displacement signal at the tuning fork detection end of the quartz gyroscope is collected by an external ADC;

[0028] The clocks of the built-in DAC, built-in ADC and external ADC are from the same clock source.

[0029] According to a quartz gyroscope digital circuit ADC / DAC synchronous acquisition method provided by the present invention, the step of acquiring the amplified and modulated displacement signal on the tuning fork driving end by using the built-in ADC of the microprocessor includes:

[0030] The microprocessor triggers a first timer to start working, generates two complementary PWM signals, and uses one complementary PWM signal to control a built-in ADC of the microprocessor to collect an amplified and modulated displacement signal on a tuning fork driving end of the quartz gyroscope;

[0031] The step of collecting the amplified and modulated displacement signal on the tuning fork detection end of the quartz gyroscope by using an external ADC includes:

[0032] Using another complementary PWM signal to control the external ADC to collect the amplified and modulated displacement signal on the tuning fork detection end of the quartz gyroscope;

[0033] The step of controlling the built-in DAC of the microprocessor to output a sine wave signal as a driving signal by the microprocessor includes:

[0034] The first timer triggers the second timer to start working, and the built-in DAC is started to output a driving signal to the tuning fork driving end under the control of the microprocessor.

[0035] According to a quartz gyroscope digital circuit ADC / DAC synchronous acquisition method provided by the present invention, the step of triggering the first timer to start working by the microprocessor includes:

[0036] The microprocessor triggers the first timer to start working through the SPI CLK of the serial peripheral interface;

[0037] Also includes:

[0038] The external ADC communicates with the microprocessor via the serial peripheral interface.

[0039] According to a quartz gyroscope digital circuit ADC / DAC synchronous acquisition method provided by the present invention, the external ADC, built-in ADC and built-in DAC use DMA semi-interrupt mode to perform internal data transmission;

[0040] The internal data transmission includes writing the amplified and modulated displacement signals acquired by the external ADC and the built-in ADC into a memory, sending the control instructions determined by the microprocessor in the memory based on the processed displacement signals acquired by the built-in ADC into the built-in DAC, so that the built-in DAC outputs the drive signal according to the control instructions; and sending the control instructions determined by the microprocessor in the memory based on the processed displacement signals acquired by the external ADC into the external ADC, so that the external ADC outputs the angular velocity according to the control instructions.

[0041] A quartz gyroscope digital circuit ADC / DAC synchronous acquisition method according to the present invention also includes:

[0042] writing, by the DMA, a half-amplified and modulated displacement signal acquired by the external ADC or the built-in ADC into the first area of ​​the memory, and simultaneously processing the amplified and modulated displacement signal previously written by the DMA to the second area of ​​the memory by the microprocessor to generate the control instruction, and simultaneously writing the control instruction to the second area by the DMA, and transferring the control instruction previously written in the first area to the built-in DAC or the external ADC;

[0043] After the DMA completes writing the amplified and modulated displacement signal to the first area, the external ADC or the built-in ADC generates a semi-interrupt, and the microprocessor enters an interrupt, processes the amplified and modulated displacement signal in the first area to generate a control instruction, simultaneously writes the control instruction to the first area through the DMA, and transfers the control instruction previously written in the second area to the built-in DAC or the external ADC;

[0044] The other half of the amplified and modulated displacement signal acquired by the external ADC or the built-in ADC is continuously written into the second area via the DMA, while the microprocessor processes the amplified and modulated displacement signal previously written into the first area of ​​the memory by the DMA to generate the control instruction, simultaneously writes the control instruction into the first area via the DMA, and transfers the control instruction previously written into the second area to the built-in DAC or the external ADC;

[0045] After the DMA completes writing the amplified and modulated displacement signal to the second area, the external ADC or the built-in ADC generates a full interrupt, the microprocessor enters the interrupt, processes the amplified and modulated displacement signal in the second area to generate a control instruction, and simultaneously writes the control instruction to the second area through the DMA, and transfers the control instruction previously written in the first area to the built-in DAC or the external ADC.

[0046] The quartz gyroscope digital circuit ADC / DAC synchronous acquisition system and method provided by the present invention ensures synchronization between a built-in DAC and two other ADCs by triggering another timer through one timer. One timer generates two PWM signals to control the synchronization of the built-in ADC and the external ADC, thereby achieving synchronization of the built-in ADC, the built-in DAC, and the external ADC. Signals from the tuning fork driving end and the detection end are synchronously acquired, thereby improving the accuracy of quartz gyroscope detection. In addition, the signal driving and acquisition are achieved in a digital manner, which has a simple design, convenient zero adjustment, and good stability and linearity. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] In order to more clearly illustrate the technical solutions in the present invention or the prior art, a brief introduction is given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0048] Figure 1 This is a structural diagram of the quartz gyroscope digital circuit ADC / DAC synchronous acquisition system provided by the present invention;

[0049] Figure 2 This is a logic diagram of internal data transmission in the quartz gyro digital circuit ADC / DAC synchronous acquisition system provided by the present invention;

[0050] Figure 3 It is a schematic diagram of the amplitude curve of the quartz gyroscope three-frequency sweep in the quartz gyroscope digital circuit ADC / DAC synchronous acquisition system provided by the present invention;

[0051] Figure 4 It is a schematic diagram of the phase curve of the quartz gyroscope three-frequency sweep in the quartz gyroscope digital circuit ADC / DAC synchronous acquisition system provided by the present invention;

[0052] Figure 5 The present invention provides a flow chart of the ADC / DAC synchronous acquisition method for a quartz gyroscope digital circuit. DETAILED DESCRIPTION

[0053] To make the objectives, technical solutions, and advantages of the present invention more clear, the technical solutions of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the embodiments described are only some of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the present invention.

[0054] The following combination Figure 1 The present invention describes a quartz gyro digital circuit ADC / DAC synchronous acquisition system, comprising:

[0055] microprocessor;

[0056] The microprocessor (MCU) is a component of the quartz gyroscope. Optionally, the microprocessor is an ARM (Advanced RISC Machines, a general term for a type of microprocessor) main controller.

[0057] The microprocessor has built-in ADC (Analog to Digital Converter) and DAC (Digital to Analog Converter).

[0058] In digital quartz gyroscope circuits, phase noise in the driver circuit can seriously affect the phase stability of the digital drive circuit. In the detection circuit, the detection signal demodulation method can cause the phase noise of the drive signal in the driver circuit to affect the detection circuit.

[0059] Therefore, in order to achieve high precision, reliability and efficiency in the angular velocity measurement of the digital quartz gyroscope, this embodiment designs a digital circuit ADC / DAC synchronous acquisition solution based on an ARM main controller.

[0060] The quartz gyroscope digital circuit ADC / DAC synchronous acquisition system mainly includes the drive signal generation of the quartz gyroscope tuning fork drive end, the displacement signal acquisition of the quartz gyroscope tuning fork drive end, the high-precision signal output of the quartz gyroscope tuning fork detection end, and the internal data transmission of the ADC / DAC synchronous acquisition.

[0061] Because both drive signal generation and displacement signal acquisition at the driver end can be achieved using the microprocessor's on-chip ADC and DAC, the detection end requires higher signal acquisition accuracy and therefore uses an external ADC. To ensure synchronous ADC / DAC signal acquisition, the clocks of the microprocessor's on-chip ADC and DAC and the external ADC must all be derived from the same clock source.

[0062] a first timer configured to be signal-connected to the microprocessor and to start operating when triggered by the microprocessor to generate two complementary PWM signals, wherein one complementary PWM (Pulse Width Modulation) signal is configured to control a built-in ADC of the microprocessor to acquire an amplified and modulated displacement signal from a tuning fork driving end of the quartz gyroscope;

[0063] To achieve synchronized ADC / DAC acquisition, the microprocessor first triggers the first timer, TIM1, to start. TIM1 is the master timer, which internally triggers the second timer, TIM2, to start. TIM1 and TIM2 start simultaneously.

[0064] an external ADC connected to the first timer signal, and configured to collect an amplified and modulated displacement signal from a tuning fork detection end of the quartz gyroscope under the control of another complementary PWM signal;

[0065] A second timer is connected to the first timer signal and to the built-in DAC signal of the microprocessor. The second timer starts working when triggered by the first timer, and starts the built-in DAC to output a driving signal to the tuning fork driving end under the control of the microprocessor.

[0066] TIM2 regularly activates the built-in DAC to periodically output a sine wave as a drive signal, which is applied to the tuning fork drive end of the quartz gyroscope. At the same time, TIM1 generates two complementary PWM signals, CH1N and CH3.

[0067] CH1N controls the external ADC through hardware, that is, the detection end ADC to periodically read the detection data.

[0068] CH3 is connected to the built-in ADC through hardware, triggering the built-in ADC to collect the displacement signal amplified and modulated by the driver under the control of the microprocessor.

[0069] Since TIM2 is triggered by TIMI, synchronization between the built-in DAC and the other two ADCs is guaranteed. Since both CH1N and CH3 are PWM signals generated by the master timer, synchronization between the built-in ADC, the built-in DAC, and the external ADC is guaranteed.

[0070] This embodiment ensures synchronization between the built-in DAC and two other ADCs by triggering one timer with another. One timer generates two PWM signals to control the synchronization of the built-in ADC and the external ADC, thereby achieving synchronization between the built-in ADC, the built-in DAC, and the external ADC. Signals from the tuning fork drive and detection ends are collected synchronously, improving the accuracy of quartz gyroscope detection. In addition, the use of digital methods for signal drive and collection simplifies the design, facilitates zero adjustment, and has good stability and linearity.

[0071] Based on the above embodiments, Figure 1 As shown, this embodiment also includes a serial peripheral interface;

[0072] The first timer is connected to the microprocessor signal through the serial peripheral interface, and the microprocessor triggers the first timer to start working through the SPI CLK of the serial peripheral interface;

[0073] The external ADC communicates with the microprocessor via the serial peripheral interface.

[0074] Because the external ADC requires hardware synchronization with the built-in ADC and DAC, and uses the Serial Peripheral Interface (SPI) for communication, enabling SPI is necessary to achieve ADC / DAC synchronous acquisition.

[0075] The SPI CLK and SPI MISO of the SPI are connected to the external ADC, and the SPI CLK triggers the first timer TIM1 to start working.

[0076] Based on the above embodiment, the built-in ADC in this embodiment is further used to send the amplified and modulated displacement signal on the tuning fork driving end to the microprocessor;

[0077] The external ADC is also used to send the amplified and modulated displacement signal on the tuning fork detection end to the microprocessor;

[0078] The external ADC outputs the amplified and modulated displacement signal on the tuning fork detection end through the SPI MISO of the SPI.

[0079] The microprocessor processes the amplified and modulated displacement signals at the tuning fork driving end and the tuning fork detecting end, controls the built-in DAC to output the driving signal based on the processed amplified and modulated displacement signal at the tuning fork driving end, and controls the external ADC to output the angular velocity based on the processed amplified and modulated displacement signal at the tuning fork detecting end.

[0080] The microprocessor processes the amplified and modulated displacement signals from both the tuning fork drive and detection terminals, including adjustments and filtering. Based on the processing results, the microprocessor controls the internal DAC to output the drive signal and the external ADC to output the angular velocity via the SPI CLK.

[0081] Based on the above embodiment, the external ADC, built-in ADC and built-in DAC in this embodiment use DMA (Direct Memory Access) semi-interrupt mode to perform internal data transmission;

[0082] The internal data transmission includes writing the amplified and modulated displacement signals acquired by the external ADC and the built-in ADC into a memory; sending the control instructions determined by the microprocessor in the memory based on the processed displacement signals acquired by the built-in ADC into the built-in DAC, so that the built-in DAC outputs the drive signal according to the control instructions; and sending the control instructions determined by the microprocessor in the memory based on the processed displacement signals acquired by the external ADC into the external ADC, so that the external ADC outputs the angular velocity according to the control instructions.

[0083] Since the startup timing control of the built-in ADC and DAC, and the external ADC depends on the hardware implementation, in order to ensure the stability and accuracy of ADC / DAC synchronous acquisition in the digital circuit, the internal data transmission of the external ADC and the built-in ADC and DAC must have a high update rate.

[0084] Optionally, internal data transmission also includes sending data received by SPI to memory and external communication, etc. DMA semi-interrupt is a mode similar to the ping pong structure.

[0085] In this paper, the internal data transmission between the external ADC and the built-in ADC and DAC adopts the DMA semi-interrupt transmission method, so that data transmission and data calculation are carried out in parallel, thereby improving the data transmission update rate.

[0086] Based on the above embodiments, Figure 2 As shown, this embodiment also includes DMA;

[0087] The DMA writes a half-amplified and modulated displacement signal acquired by the external ADC or the built-in ADC into the first area of ​​the memory, and at the same time, the microprocessor processes the amplified and modulated displacement signal previously written by the DMA to the second area of ​​the memory to generate the control instruction. The DMA simultaneously writes the control instruction to the second area and reads the control instruction previously written in the first area and transmits it to the built-in DAC or the external ADC;

[0088] After the DMA completes writing the amplified and modulated displacement signal to the first area, the external ADC or the built-in ADC generates a semi-interrupt, and the microprocessor enters an interrupt, processes the amplified and modulated displacement signal in the first area, and generates a control instruction. The DMA simultaneously writes the control instruction to the first area and reads the control instruction previously written in the second area and transmits it to the built-in DAC or the external ADC.

[0089] The DMA continues to write the other half of the amplified and modulated displacement signal acquired by the external ADC or the built-in ADC into the second area, while the microprocessor processes the amplified and modulated displacement signal previously written by the DMA to the first area of ​​the memory to generate the control instruction. The DMA simultaneously writes the control instruction into the first area and reads the control instruction previously written into the second area and transmits it to the built-in DAC or the external ADC.

[0090] After the DMA completes writing the amplified and modulated displacement signal to the second area, the external ADC or the built-in ADC generates a full interrupt, the microprocessor enters the interrupt, processes the amplified and modulated displacement signal in the second area to generate a control instruction, and the DMA simultaneously writes the control instruction to the second area and reads the control instruction previously written in the first area and transmits it to the built-in DAC or the external ADC.

[0091] The core algorithm for synchronized ADC / DAC acquisition runs primarily within the external ADC, built-in ADC, and built-in DAC interrupts. These interrupts are given the highest preemption priority to prevent other interrupts from interrupting them. The microprocessor also processes the signals within these interrupts.

[0092] The specific logic of internal data transmission based on DMA semi-interrupts is as follows: while the ADC and DAC are continuously converting data, data is written to or read from memory via DMA. Solid arrows represent actions executed simultaneously at one moment, while dashed arrows represent actions executed simultaneously at another moment. After the DMA completes writing or reading data to the first area, the ping area, a semi-interrupt is generated, and the MCU enters an interrupt to process the data in the ping area. At this point, the MCU has already completed processing the data in the second area, the pong area, in the previous interrupt handler. The DMA continues writing or reading data to or from the pong area, generating a full interrupt upon completion. The DMA returns to the ping area and restarts internal data transmission from the beginning. The CPU then enters an interrupt to process the data in the pong area, and the cycle repeats. This allows a single interrupt to process a batch of data, improving MCU execution efficiency and enabling high-speed signal acquisition.

[0093] The digital quartz gyroscope circuit signal using the digital ADC and DAC synchronization solution is tested. Specifically, the SPI_CLK, CH1N and SPI_MISO output signals of the external ADC are tested using a three-way probe of an oscilloscope.

[0094] The SPI_CLK output is a sine wave with a period of 100ns. The SPI CLK triggers the master timer TIM1 to generate a square wave with a period of 4μs (PWN signal CH1N) to control the external ADC. The phase difference between SPI_CLK and CH1N is constant: 40 SPI_CLK cycles equal one CH1N cycle, ensuring synchronization between the built-in ADC and DAC and the external ADC.

[0095] A frequency sweep test is conducted on a digital quartz gyroscope that adopts an ADC / DAC synchronous acquisition scheme to verify the stability and accuracy of the ADC / DAC synchronous acquisition in the digital circuit of the quartz gyroscope.

[0096] The gyroscope is subjected to a frequency sweep test within the ±25Hz range of the quartz-driven interdigital resonant frequency. The test conditions are: power supply mode is +5VDC±5%; operating temperature is 25℃±2℃; data acquisition mode is to collect real-time values ​​of the quartz gyroscope output during power-on; the test method is to install the quartz gyroscope on a tooling, place it on a vibration isolation turntable and statically test the output for 1800S, and repeat the above test three times.

[0097] Compare the amplitude and phase-frequency curve diagrams of the three-frequency sweep of the quartz gyroscope, as shown in the figure. Figure 3 and Figure 4 As shown, the amplitude and phase of the frequency response at the quartz tuning fork driver are constant, demonstrating the feasibility and effectiveness of using an ADC / DAC synchronization scheme to acquire and transmit signals from the driver and detection ends of the quartz tuning fork. This provides precise reference values ​​for the sine, cosine, and C0 compensation coefficients corresponding to the optimal compensation angle at the driver end of the quartz gyroscope, laying a solid foundation for digital quartz gyroscope compensation and further improving its measurement accuracy.

[0098] The following describes the quartz gyroscope digital circuit ADC / DAC synchronous acquisition method provided by the present invention. The quartz gyroscope digital circuit ADC / DAC synchronous acquisition method described below and the quartz gyroscope digital circuit ADC / DAC synchronous acquisition system described above can refer to each other.

[0099] like Figure 5 As shown, the method includes:

[0100] Step 501: Controlling a built-in DAC of the microprocessor to output a sine wave signal as a driving signal, and applying the signal to a tuning fork driving end of a quartz gyroscope;

[0101] Step 502: collecting the amplified and modulated displacement signal at the tuning fork driving end through the built-in ADC of the microprocessor;

[0102] Step 503: collecting the amplified and modulated displacement signal at the tuning fork detection end of the quartz gyroscope through an external ADC;

[0103] The clocks of the built-in DAC, built-in ADC and external ADC are from the same clock source.

[0104] The built-in ADC sends the amplified and modulated displacement signal on the tuning fork driving end to the microprocessor, and the external ADC sends the amplified and modulated displacement signal on the tuning fork detecting end to the microprocessor.

[0105] The microprocessor processes the amplified and modulated displacement signals at the tuning fork driving end and the tuning fork detecting end, including adjustment and filtering. Based on the processed amplified and modulated displacement signals at the tuning fork driving end and the tuning fork detecting end, the microprocessor controls the built-in DAC to output the driving signal, and finally controls the external ADC to output the angular velocity.

[0106] This embodiment improves the accuracy of quartz gyroscope detection by synchronizing the clocks of the built-in ADC, built-in DAC, and external ADC, and synchronously collecting signals from the tuning fork driving end and the detection end. In addition, the signal driving and collection are realized digitally, which has a simple design, convenient zero adjustment, and good stability and linearity.

[0107] Based on the above embodiment, the step of collecting the amplified and modulated displacement signal on the tuning fork driving end by using the built-in ADC of the microprocessor in this embodiment includes:

[0108] The microprocessor triggers a first timer to start working, generates two complementary PWM signals, and uses one complementary PWM signal to control a built-in ADC of the microprocessor to collect an amplified and modulated displacement signal on a tuning fork driving end of the quartz gyroscope;

[0109] The step of collecting the amplified and modulated displacement signal on the tuning fork detection end of the quartz gyroscope by using an external ADC includes:

[0110] Using another complementary PWM signal to control the external ADC to collect the amplified and modulated displacement signal on the tuning fork detection end of the quartz gyroscope;

[0111] The step of controlling the built-in DAC of the microprocessor to output a sine wave signal as a driving signal by the microprocessor includes:

[0112] The first timer triggers the second timer to start working, and the built-in DAC is started to output a driving signal to the tuning fork driving end under the control of the microprocessor.

[0113] This embodiment ensures synchronization between the built-in DAC and two other ADCs by triggering one timer. One timer generates two PWM signals to control the synchronization of the built-in ADC and the external ADC, thereby achieving synchronization between the built-in ADC, the built-in DAC, and the external ADC. Signals from the tuning fork drive and detection ends are collected synchronously, improving the accuracy of quartz gyroscope detection.

[0114] Based on the above embodiment, the step of triggering the first timer to start working by the microprocessor in this embodiment includes:

[0115] The microprocessor triggers the first timer to start working through the SPI CLK of the serial peripheral interface;

[0116] Also includes:

[0117] The external ADC communicates with the microprocessor via the serial peripheral interface.

[0118] Because the external ADC requires hardware synchronization with the built-in ADC and DAC, and the external ADC uses SPI for communication, SPI must be enabled to achieve ADC / DAC synchronous acquisition.

[0119] The SPI CLK and SPI MISO of the SPI are connected to the external ADC, and the SPI CLK triggers the first timer TIM1 to start working.

[0120] On the basis of the above embodiment, the external ADC, built-in ADC and built-in DAC in this embodiment use DMA semi-interrupt mode to perform internal data transmission;

[0121] The internal data transmission includes writing the amplified and modulated displacement signals acquired by the external ADC and the built-in ADC into a memory; sending the control instructions determined by the microprocessor in the memory based on the processed displacement signals acquired by the built-in ADC into the built-in DAC, so that the built-in DAC outputs the drive signal according to the control instructions; and sending the control instructions determined by the microprocessor in the memory based on the processed displacement signals acquired by the external ADC into the external ADC, so that the external ADC outputs the angular velocity according to the control instructions.

[0122] Since the startup timing control of the built-in ADC and DAC, and the external ADC depends on the hardware implementation, in order to ensure the stability and accuracy of ADC / DAC synchronous acquisition in the digital circuit, the internal data transmission of the external ADC and the built-in ADC and DAC must have a high update rate.

[0123] Optionally, internal data transmission also includes sending data received by SPI to memory and external communication, etc. DMA semi-interrupt is a mode similar to the ping pong structure.

[0124] In this paper, the internal data transmission between the external ADC and the built-in ADC and DAC adopts the DMA semi-interrupt transmission method, so that data transmission and data calculation are carried out in parallel, thereby improving the data transmission update rate.

[0125] Based on the above embodiment, this embodiment also includes:

[0126] writing, by the DMA, a half-amplified and modulated displacement signal acquired by the external ADC or the built-in ADC into the first area of ​​the memory, and simultaneously processing the amplified and modulated displacement signal previously written by the DMA to the second area of ​​the memory by the microprocessor to generate the control instruction, and simultaneously writing the control instruction to the second area by the DMA, and transferring the control instruction previously written in the first area to the built-in DAC or the external ADC;

[0127] After the DMA completes writing the amplified and modulated displacement signal to the first area, the external ADC or the built-in ADC generates a semi-interrupt, and the microprocessor enters an interrupt, processes the amplified and modulated displacement signal in the first area to generate a control instruction, simultaneously writes the control instruction to the first area through the DMA, and transfers the control instruction previously written in the second area to the built-in DAC or the external ADC;

[0128] The other half of the amplified and modulated displacement signal acquired by the external ADC or the built-in ADC is continuously written into the second area via the DMA, while the microprocessor processes the amplified and modulated displacement signal previously written into the first area of ​​the memory by the DMA to generate the control instruction, simultaneously writes the control instruction into the first area via the DMA, and transfers the control instruction previously written into the second area to the built-in DAC or the external ADC;

[0129] After the DMA completes writing the amplified and modulated displacement signal to the second area, the external ADC or the built-in ADC generates a full interrupt, the microprocessor enters the interrupt, processes the amplified and modulated displacement signal in the second area to generate a control instruction, and simultaneously writes the control instruction to the second area through the DMA, and transfers the control instruction previously written in the first area to the built-in DAC or the external ADC.

[0130] In this paper, the internal data transmission between the external ADC and the built-in ADC and DAC adopts the DMA semi-interrupt transmission method, so that data transmission and data calculation are carried out in parallel, thereby improving the data transmission update rate.

[0131] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, i.e., they may be located in one location or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of the present embodiment. Persons of ordinary skill in the art will be able to understand and implement the present invention without inventive effort.

[0132] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary general hardware platform, or of course, by hardware. Based on this understanding, the essence of the above technical solution or the part that contributes to the existing technology can be embodied in the form of a software product. The computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or certain parts of the embodiments.

[0133] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention.

Claims

1. A quartz gyroscope digital circuit ADC / DAC synchronous acquisition system, characterized in that: include: microprocessor; a first timer, the first timer being connected to the microprocessor signal and starting to work when triggered by the microprocessor to generate two complementary PWM signals, one complementary PWM signal being used to control a built-in ADC of the microprocessor to acquire an amplified and modulated displacement signal at a tuning fork driving end of the quartz gyroscope; an external ADC connected to the first timer signal, and configured to collect an amplified and modulated displacement signal from a tuning fork detection end of the quartz gyroscope under the control of another complementary PWM signal; A second timer is connected to the first timer signal and to the built-in DAC signal of the microprocessor. The second timer starts working when triggered by the first timer, and starts the built-in DAC to output a driving signal to the tuning fork driving end under the control of the microprocessor.

2. The quartz gyro digital circuit ADC / DAC synchronous acquisition system according to claim 1, characterized in that: Also includes a serial peripheral interface; The first timer is connected to the microprocessor signal through the serial peripheral interface, and the microprocessor triggers the first timer to start working through the SPI CLK of the serial peripheral interface; The external ADC communicates with the microprocessor via the serial peripheral interface.

3. The quartz gyro digital circuit ADC / DAC synchronous acquisition system according to claim 1, characterized in that: The built-in ADC is also used to send the amplified and modulated displacement signal on the tuning fork driving end to the microprocessor; The external ADC is also used to send the amplified and modulated displacement signal on the tuning fork detection end to the microprocessor; The microprocessor processes the amplified and modulated displacement signals at the tuning fork driving end and the tuning fork detecting end, controls the built-in DAC to output the driving signal based on the processed amplified and modulated displacement signal at the tuning fork driving end, and controls the external ADC to output the angular velocity based on the processed amplified and modulated displacement signal at the tuning fork detecting end.

4. The quartz gyro digital circuit ADC / DAC synchronous acquisition system according to claim 3, characterized in that: The external ADC, built-in ADC and built-in DAC use DMA semi-interrupt mode to perform internal data transmission; The internal data transmission includes writing the amplified and modulated displacement signals acquired by the external ADC and the built-in ADC into the memory; sending the control instructions determined by the microprocessor in the memory based on the processed displacement signals acquired by the built-in ADC into the built-in DAC, so that the built-in DAC outputs the drive signal according to the control instructions; and sending the control instructions determined by the microprocessor in the memory based on the processed displacement signals acquired by the external ADC into the external ADC, so that the external ADC outputs the angular velocity according to the control instructions.

5. The quartz gyro digital circuit ADC / DAC synchronous acquisition system according to claim 4, characterized in that: Also includes DMA; The DMA writes a half-amplified and modulated displacement signal acquired by the external ADC or the built-in ADC into the first area of ​​the memory, and at the same time, the microprocessor processes the amplified and modulated displacement signal previously written by the DMA to the second area of ​​the memory to generate the control instruction. The DMA simultaneously writes the control instruction to the second area and transfers the control instruction previously written in the first area to the built-in DAC or the external ADC; After the DMA completes writing the amplified and modulated displacement signal to the first area, the external ADC or the built-in ADC generates a semi-interrupt, and the microprocessor enters an interrupt, processes the amplified and modulated displacement signal in the first area, and generates a control instruction. The DMA simultaneously writes the control instruction to the first area and transfers the control instruction previously written in the second area to the built-in DAC or the external ADC. The DMA continues to write the other half of the amplified and modulated displacement signal acquired by the external ADC or the built-in ADC into the second area, while the microprocessor processes the amplified and modulated displacement signal previously written by the DMA to the first area of ​​the memory to generate the control instruction. The DMA simultaneously writes the control instruction to the first area and transfers the control instruction previously written into the second area to the built-in DAC or the external ADC. After the DMA completes writing the amplified and modulated displacement signal to the second area, the external ADC or the built-in ADC generates a full interrupt, the microprocessor enters the interrupt, processes the amplified and modulated displacement signal in the second area to generate a control instruction, and the DMA simultaneously writes the control instruction to the second area and transfers the control instruction previously written in the first area to the built-in DAC or the external ADC.

6. A quartz gyroscope digital circuit ADC / DAC synchronous acquisition method, characterized in that: include: The microprocessor controls the built-in DAC of the microprocessor to output a sine wave signal as a driving signal, which is applied to the tuning fork driving end of the quartz gyroscope; The microprocessor is configured to collect the amplified and modulated displacement signal at the tuning fork driving end through the built-in ADC of the microprocessor; The amplified and modulated displacement signal at the tuning fork detection end of the quartz gyroscope is collected by an external ADC; The clocks of the built-in DAC, built-in ADC and external ADC are from the same clock source.

7. The quartz gyro digital circuit ADC / DAC synchronous acquisition method according to claim 6, characterized in that: The step of collecting the amplified and modulated displacement signal on the tuning fork driving end through the built-in ADC of the microprocessor includes: The microprocessor triggers a first timer to start working, generates two complementary PWM signals, and uses one complementary PWM signal to control a built-in ADC of the microprocessor to collect an amplified and modulated displacement signal on a tuning fork driving end of the quartz gyroscope; The step of collecting the amplified and modulated displacement signal on the tuning fork detection end of the quartz gyroscope by using an external ADC includes: Using another complementary PWM signal to control the external ADC to collect the amplified and modulated displacement signal on the tuning fork detection end of the quartz gyroscope; The step of controlling the built-in DAC of the microprocessor to output a sine wave signal as a driving signal by the microprocessor includes: The first timer triggers the second timer to start working, and the built-in DAC is started to output a driving signal to the tuning fork driving end under the control of the microprocessor.

8. The quartz gyro digital circuit ADC / DAC synchronous acquisition method according to claim 7, characterized in that: The step of triggering the first timer to start working by the microprocessor includes: The microprocessor triggers the first timer to start working through the SPICLK of the serial peripheral interface; Also includes: The external ADC communicates with the microprocessor via the serial peripheral interface.

9. The quartz gyro digital circuit ADC / DAC synchronous acquisition method according to claim 7, characterized in that: The external ADC, built-in ADC and built-in DAC use DMA semi-interrupt mode to perform internal data transmission; The internal data transmission includes writing the amplified and modulated displacement signals acquired by the external ADC and the built-in ADC into a memory; sending the control instructions determined by the microprocessor in the memory based on the processed displacement signals acquired by the built-in ADC into the built-in DAC, so that the built-in DAC outputs the drive signal according to the control instructions; and sending the control instructions determined by the microprocessor in the memory based on the processed displacement signals acquired by the external ADC into the external ADC, so that the external ADC outputs the angular velocity according to the control instructions.

10. The quartz gyro digital circuit ADC / DAC synchronous acquisition method according to claim 9, characterized in that: Also includes: writing, by the DMA, a half-amplified and modulated displacement signal acquired by the external ADC or the built-in ADC into the first area of ​​the memory, and simultaneously processing the amplified and modulated displacement signal previously written by the DMA to the second area of ​​the memory by the microprocessor to generate the control instruction, and simultaneously writing the control instruction to the second area by the DMA, and transferring the control instruction previously written in the first area to the built-in DAC or the external ADC; After the DMA completes writing the amplified and modulated displacement signal to the first area, the external ADC or the built-in ADC generates a semi-interrupt, and the microprocessor enters an interrupt, processes the amplified and modulated displacement signal in the first area to generate a control instruction, simultaneously writes the control instruction to the first area through the DMA, and transfers the control instruction previously written in the second area to the built-in DAC or the external ADC; The other half of the amplified and modulated displacement signal acquired by the external ADC or the built-in ADC is continuously written into the second area via the DMA, while the microprocessor processes the amplified and modulated displacement signal previously written into the first area of ​​the memory by the DMA to generate the control instruction, simultaneously writes the control instruction into the first area via the DMA, and transfers the control instruction previously written into the second area to the built-in DAC or the external ADC; After the DMA completes writing the amplified and modulated displacement signal to the second area, the external ADC or the built-in ADC generates a full interrupt, the microprocessor enters the interrupt, processes the amplified and modulated displacement signal in the second area to generate a control instruction, and simultaneously writes the control instruction to the second area through the DMA, and transfers the control instruction previously written in the first area to the built-in DAC or the external ADC.

Citation Information

Patent Citations

  • Digital drive loop control circuit for quartz tuning fork gyroscope

    CN103697874A

  • Control circuit

    JP2010230439A