ARM's PWM module pulse width modulation and ultrasonic system design

Publisher:chenfengy818Latest update time:2020-03-24 Source: elecfansKeywords:arm Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

In recent years, information technology based on microelectronics and computer technology has developed rapidly, and ultrasonic non-destructive testing instruments have also gained unprecedented development momentum. In order to improve the reliability and efficiency of detection, the development of digital, intelligent, automated, and image-based ultrasonic instruments is an important trend in the development of non-destructive testing today. However, traditional ultrasonic detectors have problems such as poor accuracy, low precision, large size, high power consumption, and unfriendly human-machine interface. The ultrasonic emission and control circuit is based on an ARM-based ultrasonic detection system, with the arm microcontroller as the core, and is programmed in C language, which conveniently realizes the adjustment of the emission frequency and the excitation voltage pulse amplitude.


1 Overall design structure of ultrasonic detection system

The overall structural block diagram of the ARM-based ultrasonic detection system is shown in Figure 1. The system mainly consists of three parts: ultrasonic front-end transmitting and receiving circuits, DSP and ARM processor.

The ultrasonic front-end transmitting circuit is responsible for generating the excitation pulse voltage and the ultrasonic wave with adjustable repetition frequency. The receiving circuit first processes the reflected weak signal through the amplification, filtering and other circuits, and then collects the signal through the A/D conversion circuit and sends the collected signal to the DSP through the data buffer FIF0. The DSP
    
receives the data buffered by the A/D converter through FIF0, and mainly completes the signal processing algorithm with complex calculation structure to improve the accuracy and data processing capability of the ultrasonic flaw detection instrument.


The arm processor mainly completes two functions: one is the control function, which adjusts the width and repetition frequency of the excitation pulse and the amplification factor of the amplifier circuit; the other is to realize the real-time display, storage and external communication of the signal. The ARM microprocessor uses the 16/32-bit RISC microprocessor S3C2440A based on arm920T. Its core frequency is up to 400 MHz, with low power consumption, small size, many integrated peripherals, and good data processing capabilities. Therefore, it can be widely used in handheld devices.
    
2 Ultrasonic transmitting circuit  
According to the different conditions such as the material and thickness of the measured object, the frequency and transmitting voltage of the corresponding ultrasonic probe required are also different. The frequency of the transmitted ultrasonic wave is generally several MHz, the high-voltage excitation pulse is generally tens to hundreds of volts, and the rise time of the pulse does not exceed 100 ns. According to spectrum analysis, there is an optimal relationship between the excitation pulse width and the probe frequency. When the pulse width satisfies this relationship, the receiving signal quality of the receiving probe is the best. The relationship is:

In the formula, f0 is the probe frequency and 2a is the pulse width. The probe frequency selected in this design is 2.5 MHz, and the pulse width determined by formula (1) is 600 ns, so the discharge time should be controlled within 600 ns as much as possible.


There are many types of ultrasonic flaw detection methods. In practical applications, most of them use pulse reflection method, and their transmitting circuit mostly uses non-tuned type. The ultrasonic transmitting circuit is shown in Figure 2. The circuit consists of an adjustable high-voltage power supply, resistors R1 and R2, energy storage capacitor C, insulated gate bipolar transistor (IGBT) VQ, fast recovery diodes VD1, VD2 and probe. Let the diode equivalent resistance be R3 and the switch equivalent resistance be R4. The PWM module of the arm microprocessor generates pulses with adjustable frequency and duty cycle, which are sent to the gate of the switch tube VQ to form a control pulse V1 after passing through the IGBT drive and protection circuit. When V1 is a negative pulse, the IGBT is turned off, and the high-voltage power supply charges the capacitor C through R1 and VD2, and the charging time constant is τ1=C(R1+R3). When t>5τ1, the capacitor C is considered to be full. When V1 is a positive pulse, the IGBT is turned on, and the capacitor C discharges to the probe through the switch tube VQ, R2 and diode VD1, and the discharge time constant is τl=C(R2+R3+R4). When the ultrasonic probe is stimulated by a high-voltage negative pulse, it generates ultrasonic waves of a certain frequency.

Functions of components in the circuit:

1) Resistor R1 is used to limit the charging current of capacitor C from the high voltage power supply during charging, that is, to play a current limiting role and reduce the impact of the transmitting unit on the power supply during operation. From this point of view, the larger the resistance of resistor R1, the better. On the other hand, the repetition frequency f of the circuit is high. In order to fully charge capacitor C before triggering, CR1 < 1/5f must be satisfied. Therefore, it is necessary to select a suitable resistance value of resistor R1.


2) Resistor R2 has two functions: one is to adjust the discharge time and transmission power, and the other is to act as a damping resistor to adjust the ultrasonic pulse width. The smaller the resistance of R2, the smaller the transmission power and the narrower the transmission pulse; the larger the resistance of R2, the greater the transmission power and the wider the transmission pulse.


3) Fast recovery diodes Vd1 and Vd2 filter out the charging pulse, so that point A only has the negative voltage excitation pulse during discharge.

When charging, the relationship between the current i and the voltage UR is shown in equations (2) to (3).

The developed circuit board can excite the probe to generate 0.5-10 MHz ultrasonic waves, the excitation pulse voltage can reach up to 830 V, and the pulse rise time is less than 50 ns.


3 Generation of PWM pulses based on ARM

The arm embedded processor is a high-performance processor with extremely low power consumption and low cost. It has fast computing speed, high precision, and is easy to transplant to real-time operating systems, making it a real-time multi-tasking system. The S3C2440A embedded PWM pulse module contains 4-channel 16-bit timers with programmable duty cycle, frequency, and polarity, and has automatic reload and double buffering functions. The main frequency FCLK is up to 400M-Hz, and the PCLK used by APB bus devices is up to 68 MHz. The specific process is: first, turn on the automatic reload function, and set the various parameters of the PWM pulse through the PWM register, such as the timer configuration register (TCFGn), timer control register (TCON), timer count buffer register (TCNTBn), timer comparison buffer register (TCMPBn), timer count observation counter (TCNTOn), etc. Secondly, set the manual update bit of the corresponding timer, and then set the start bit. After the waiting time, the timer starts to count down. When the values ​​of TCNTn and TCMPn are the same, the logic level of TOUTn changes from low to high. When TCNTn is 0, TCNTn is automatically reloaded with the value of TCNTBn. If you want to reset the initial value of TCNTn, you must perform a manual update.


By using TCMPBn to perform the PWM function, the PWM frequency is determined by TCNTBn. The double buffering function allows the ISR or other programs to rewrite TCMPBn at any time point in the current PWM cycle for the next PWM cycle.


4 High voltage power supply and its control

The ultrasonic transmitting circuit has high requirements for the excitation voltage pulse, which requires a certain amplitude, and the pulse width is required to be as small as possible, and a certain transmitting power is required, which determines the sensitivity of ultrasonic flaw detection and is also related to the depth of flaw detection of the workpiece. If you want to penetrate a thicker workpiece, you need to convert a larger electrical power into sound power. The transmitting power is:

Where uA0 is the instantaneous voltage when the capacitor is discharged, C is the capacitance, t is the discharge time, and P is the effective power.


When the discharge time constant is determined, the discharge time and C are determined. Therefore, increasing the transmitting voltage is the main way to increase the transmitting power. From the discharge voltage formula, it can be seen that in addition to the influence of each resistor in the circuit, the voltage of the high-voltage power supply is a major factor. But the voltage cannot be too high, otherwise it will accelerate the aging of the piezoelectric chip. Generally, the transmitting voltage does not exceed 1 800 V.


The high voltage power supply module of Ultravoh Company in the United States is used here. The model of the "V" series is 1V12-P0.4 power supply module, which can fully meet the needs of this design. Its input voltage is 12 V, output voltage is 0-1 000 V, control voltage is 0-5 V, and power is 0.4 W. It has low power consumption, small size, light weight, and is equipped with output voltage monitoring and self-protection circuits. The high voltage power supply control circuit is shown in Figure 3.

The control signal output by the arm microprocessor can output a 0-5 V control signal V2 after D/A conversion, and the corresponding high-voltage power supply module can output a voltage of 0-1 000 V.


5 Simulation and Analysis

In order to verify whether this design can meet the needs of the experiment, the circuit is simulated by software. Because t=5τ1, which is about 500μs, the charging capacitor is considered to be fully charged, so the switching frequency is set to 1kHz. The simulation results are shown in Figures 4 and 5.

[1] [2]
Keywords:arm Reference address:ARM's PWM module pulse width modulation and ultrasonic system design

Previous article:Lesson 20 SPI protocol detailed explanation and bare metal program development analysis
Next article:tiny4412 development board GPIO test

Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号