introduction
Ultrasound propagates in the human body. Due to the differences in acoustic properties of various tissues in the human body, ultrasound will produce physical characteristics such as reflection, refraction, scattering, diffraction, attenuation, and Doppler frequency shift caused by the relative movement between the sound source and the receiver at the interface between two different tissues. Different types of ultrasonic diagnostic instruments are used, and various scanning methods are adopted to receive these reflected and scattered signals, display the morphology of various tissues and their lesions, and combine pathology and clinical medicine to observe, analyze, and summarize different reflection laws, so as to make a diagnosis of the location, nature, and degree of functional impairment of the lesion. B-ultrasound is a display mode in ultrasonic diagnostic instruments.
The working process of B-ultrasound is as follows: when the probe receives the excitation pulse, it emits ultrasonic waves (at the same time, the probe is controlled by the focusing delay circuit to achieve acoustic focusing of the sound waves). After a period of delay, the probe receives the reflected echo signal, which is then processed by filtering, logarithmic amplification, etc. Then, the DSC circuit performs digital conversion to form a digital signal, which is further processed under the control of the CPU, and then synthesized with the image forming circuit and the measuring circuit to form a video signal and sent to the display, forming the B-ultrasound image we are familiar with, also known as a two-dimensional black and white ultrasound image.
In order to enhance the image resolution, B-ultrasound has more channels, mostly 16, 24, 48, 64 or even more channels. The electronic components of these channels are exactly the same, and the consistency of each channel is required to be good. Before assembling the whole machine, it is best to have testing means and methods to test all channels to eliminate problems in the device itself and the soldered circuit board. For this purpose, I designed the B-ultrasound detection tooling.
Tooling design requirements
This tooling design requires testing the AFE9624 ultrasound board with 24 channels and a 96-element probe. The AFE9624 includes a high-voltage transmitting circuit, relay switching, high-voltage analog switch switching, a preamplifier circuit, and a VGA circuit.
Launch tooling requirements
High-voltage transmitting circuit, high-voltage analog switch circuit, and relay switching circuit tests must be tested at the same time. It is necessary to design a transmitting tooling board, relay control test circuit, high-voltage analog control circuit, and probe interface high-voltage waveform measurement circuit. Specifically, it includes: high-voltage transmitting circuit tooling (referred to as transmitting tooling), 1~24 channel transmitting drive and switching circuit; high-voltage analog switch control circuit tooling (referred to as switch tooling), which controls the opening or closing of any channel. In actual use, it only controls the opening of a certain channel, and the other channels are closed. Correspondingly, the transmitting control also only opens the corresponding one channel, and the other drive settings are invalid; relay control test tooling (referred to as relay tooling), which provides control signals for opening or closing the relay group; the waveform measurement circuit tooling of the probe interface (referred to as probe waveform tooling), which includes a 96~1 switching circuit, so that the waveform of the transmitted array element position can be switched to the oscilloscope for display and measurement.
Receiving tooling requirements
VGA test: VGA test mainly verifies the function and accuracy of the amplifier circuit. It needs to provide each VGA analog input signal and detect it through an oscilloscope. The test signal can be applied through the probe interface, but the high-voltage analog switch must be controlled accordingly so that each VGA can obtain accurate input. Specifically, it includes: waveform generator tooling, which provides 96 analog sine waveforms with a frequency of 3.5MHz and an amplitude PP of 1V~1.2V. It can achieve load short-circuit protection and allow an output impedance of tens of ohms; high-voltage analog switch control and VGA gain control tooling (referred to as switch gain tooling), which provides control signals for the high-voltage analog switch circuit on AFE9624 and provides gain control signals for VGA. The gain control signal can be a sawtooth wave with a minimum amplitude value greater than 0.2V and a maximum value less than 2.5V. The sawtooth wave period is 50µs.
Hardware circuit design
Figure 1 shows the schematic diagram of the main control part in the design circuit of the transmitting and receiving tooling. The schematic diagram of the transmitting part is shown in Figure 2, and the schematic diagram of the receiving part is shown in Figure 3. It should be noted that some circuits of the transmitting and receiving parts are shared. These three circuits mainly include the microprocessor AT89S52 for controlling automatic detection, and the first two digits of the digital tube display the probe 00 or 01, that is, PROBE A or PROBE B. The last two digits of the digital tube display 1~96, that is, 1~96 channels. Alter's CPLD (EPM7064) is used to generate two pulses with opposite directions and dead time with a period of 20ms and a pulse width of 330ns, which are used for the transmitting waveform of the transmitting channel. The tooling board uses 18 8-channel high-voltage switches HV20220, of which 6 are used to control the dual 1~24 channel digital switch switching circuit, and the remaining 12 are used for the switching of the 96 array elements of the probe to select 1. The control circuits of transmission and reception are basically the same. What needs to be changed is the direction of the two double-pole double-throw switches S1 and S2. The transmission waveform of the receiving tool is a sine wave, which is generated by the function generator chip MAX038. This design has a communication interface between the microcontroller AT89S52 and the host computer. It can be programmed by the host computer and the tool can be controlled using a graphical interface. Only software programming is required. This article uses the two modes of power-on automatic detection and manual detection, and does not use the host computer control mode.
Figure 1 Schematic diagram of the main control part of the transmitting and receiving tooling design circuit
Both the transmitting and receiving tools need to control the transmitting waveform or receiving waveform, and then connect it to the actual B-ultrasound board to be tested through the adapter cables JP3~JP7 and JP10 to test the B-ultrasound board (the sockets of the JP3~JP7 and JP10 connecting cables are not shown in Figures 1 to 3).
Launch tooling design
In Figure 1, U1 (7400) NAND gate circuit and 12MHz crystal oscillator form a crystal oscillator, which provides clock signal to the global clock terminal 43 pin of EPM7064. The 21 pin and 25 pin of EPM7064 output two pulse signals with opposite directions of 20ms period, 330ns pulse width and 660ns dead time. After being driven by the same-direction amplifier U21 (74F07), IPA and INB are obtained and added to the double-pole double-throw switch S1 (in Figure 2, S1 needs to be turned to the transmitting position at this time). IPA is added to the three high-voltage switches HV20220 of U3, U4 and U5 through S1. All the outputs of the three high-voltage switches are connected together, and these three high-voltage switches are connected in the form of daisy petals, that is, the data input terminal DIN of the next switch is connected to the data output terminal DOUT of the previous switch. Under the control of the microprocessor AT89S52, the serial control signals of the switching circuits SDATA1, SCLK1, SLD1, and RESET1 are given, so that the input ends of the three high-voltage switches are closed in turn with their own output ends, such as pins 7 and 8 of U3. At this time, the IPA signal is sent to IP001. However, it should be noted that at the same time, only one of the 24 channels of the three high-voltage switches can be closed, and the rest are disconnected. The process of INB is exactly the same as that of IPA. When IP001 gets the IPA signal, IN001 also gets the INB signal. IP001~IP024 get the IPA signal in turn, and IN001~IN024 get the INB signal in turn. IP001~IP024 and IN001~IN024 are sent to the AFE9624 board of B-ultrasound through the adapters JP3 and JP4. On the AFE9624 board, the MD1211 drives the built-in field effect tube chip C6320, and obtains two waveforms with dead time, opposite directions, and synthesized after amplification by MD1211. Then, the 12 high-voltage switches HV20220 on the AFE9624 board are switched, and the output of probe A or probe B is selected according to the relay switching. Under the control of the microprocessor AT89S52, the relay group is turned on or off by the signal SRELAY: when SRELAY=0, probe A is turned on; when SRELAY=1, probe B is turned on. At the same time, the SDATA2, SCLK2, SLD2, and RESET2 serial control signals are sent out to control the high-voltage analog switch HV20220 on the AFE9624 board through the JP10 adapter. The signal amplified and controlled by the AFE9624 board is sent to the 12 high-voltage switches U12~U20 on the tooling board through the adapter cables JP5, JP6, and JP7 (only U18~U20 are shown in Figure 3), and finally through the double-pole double-throw switch S2 (which should be turned to the transmitting position at this time), the oscilloscope connected to the J3 end can see the required synthetic waveform. Under the control of the microprocessor AT89S52, U12~U20 gives SDATA3, SCLK3, SLD3, RESET3 serial control signals to achieve the purpose of 96 to 1.
Figure 2 Schematic diagram of the transmitting part of the transmitting and receiving tooling design circuit [page]
Receiving tooling design
In Figure 3, U25 (MAX038) is a function generator chip. Its 3rd pin A0 and 4th pin A1 are output waveform selection terminals. The output waveform selection is determined by the combination of logic address pins A0 and A1: when A1A0=10 or 11, a sine wave is output; when A1A0=00, a square wave is output; when A1A0=01, a triangle wave is output. The waveform switching can be completed within 0.3μs, but the output waveform has a delay time of 0.5μs. Pin 19 of MAX038 is the waveform output terminal. This design outputs a sine wave with a frequency of 3.5MHz and an amplitude PP of about 1V. This sine wave passes through the double-pole double-throw switch S2 (which should be turned to the receiving position at this time), and under the control of the microprocessor AT89S52, it gives SDATA3, SCLK3, SLD3, RESET3 serial control signals, controls U12~U20, and switches this sine wave to the (96 choose 1) probe, that is, PA0~PA95 respectively obtains this sine wave, and sends it to the AFE9624 board through the adapter JP5, JP6, JP7. According to the adapter JP5, JP6, JP7, it is connected to the probe and the microprocessor uses a relay to control its operation. The sine wave passes through 12 high-voltage switches HV20220 (the same set of high-voltage switches as when transmitting), and passes through the transmitting and receiving isolation circuits to obtain the receiving signal (here is the sine wave given by our tooling), and then amplified by the preamplifier circuit on the AFE9624 board, and sent to the IP001~IP024 terminals of U3~U5 and the IN001~IN024 terminals of U6~U8 on the transmitting tooling in Figure 2 through the adapter wires JP3 and JP4 on the tooling. Also under the control of the microprocessor AT89S52, the high-voltage switches are turned on in turn. At this time, the other ends IP and IN of the high-voltage switches obtain sine waves, which pass through the double-pole double-throw switch S1 (S1 needs to be turned to the receiving position at this time). Connecting a dual-trace oscilloscope to J1 can see the differential 2 sine waves. The emitter of transistor Q5 outputs the TGC gain control signal, which is sent to the gain control end of the preamplifier circuit on the AFE9624 board through the adapter wire JP10 to control the amplitude of the received signal.
Figure 3 Schematic diagram of the receiving part of the transmitting and receiving tooling design circuit
Software Design
This tooling uses CPLD to generate the transmission waveform, uses the microprocessor AT89S52 to control the entire tooling board, and also provides switching instructions for relays and high-voltage switches to the B-ultrasound board (AFE9624) to be tested.
Transmit waveform generation
The two pulse signals with opposite directions and a period of 20ms, a pulse width of 330ns, and a dead time of 660ns are written in Verilog HDL language and output from pins 21 and 25 of EPM7064. The source code is as follows:
module pwm(clock,pwm_out,pwm_out1);
input clock;
output pwm_out;
output pwm_out1;
reg [20:0] count;
reg pwm_reg;
reg pwm_reg1;
always @ (posedge clock)
begin
count=count+1;
if (count<4) //330ns pulse width
begin
pwm_reg=1;
pwm_reg1=1;
end
else if (count<12) //660ns dead time
begin
pwm_reg=0;
pwm_reg1=1;
end
else if(count<21'd16) //330ns negative pulse
begin
pwm_reg=0;
pwm_reg1=0;
end
else if(count==21'd240000)//12M crystal, 12000000/240000=50Hz, i.e. 20 milliseconds
begin
ount=21'd000000;
pwm_reg=1;
pwm_reg1=1;
end
else
begin
pwm_reg=0;
pwm_reg1=1;
end
end
assign pwm_out = pwm_reg;
assign pwm_out1=pwm_reg1;
endmodule
Microprocessor AT89S52 control code
[page]
The microprocessor AT89S52 is connected to three external touch switches S3, S4, and S5. S3 is connected to external interrupt 0 for relay control. Probe 1 (PROBE A) is selected by default when powered on. Press S3 to select probe 2 (PROBE B). Pressing it again will have no effect (to prevent the probe from being replaced under power). Probe 1 can only be selected after powering on again. S4 is connected to external interrupt 1. The 24 channels and 96 array elements are automatically detected every 2 seconds by default when powered on. If manual detection is required, press S4. At this time, each press of S4 will detect the next channel and array element. S5 is the reset switch. According to the hardware connection, the settings are as follows:
uchar m=0; //For selection of 96 array elements
uchar n=0; //Default selection probe 1
uchar l=0; //For 24 channel selection
uchar k;
sbit SDATA1= P1^0; //Shift data 1
sbit SCLK1= P1^1; //Shift clock 1
sbit SLD1= P1^2; //Shift lock
sbit RESET1=P1^3; //Reset 1
sbit SDATA3= P1^4; //Shift data 3
sbit SCLK3= P1^5; //Shift clock 3
sbit SLD3= P1^6; //Shift lock
sbit RESET3=P1^7; //Reset 3
sbit SDATA2= P0^0; //Shift data 2
sbit SCLK2= P0^1; //Shift clock 2
sbit SLD2= P0^2; //Shift lock
sbit RESET2=P0^3; //Reset 2
sbit SRELAY=P0^4; //Probe relay selection
Timer automatic detection subroutine
void serves_timer2() interrupt 5 using 0
{
EA=0;
TF2=0;
k=k+1;
if(k==40) //2 seconds
{ k=0;
m=m+1;
l=l+1;
if( m>96) m=1;
if (l>24) l=1;
DELAY1s( );
for (j=0;j<8;j++)
{
HV20220_1(l);
HV20220_2( m ) ;
HV20220_3(m);
}
}
else{}
EA=1;
}
In this program, if( m>96) m=1;if (l>24) l=1; That is: 96 array elements correspond to 24 channels. In the actual B-ultrasound process, when one channel is working, there will be 4 array elements arranged in a certain pattern working at the same time. This tool not only independently detects each of the 24 channels, but also detects each of the 96 array elements. Therefore, the detection of 96 array elements and 24 channels is run 4 times.
Touch switch S4 external interrupt 1 subroutine
void serves_int1() interrupt 2 using 2 // external interrupt 1
{
EA=0;
TR2=0; //stop counting
m=m+1;
l=l+1;
if( m>96) m=1;
if (l>24) l=1;
DELAY1s( );
for (j=0;j<8;j++)
{
HV20220_1(l);
HV20220_2( m ) ;
HV20220_3(m);
}
EA=1;
}
Touch switch S3 external interrupt 0 subroutine
void serves_int0() interrupt 0 using 0 // external interrupt 0
{
EA=0;
n=1; //display 01
SRELAY=1; //Select probe 2
DELAY1s( );
EA=1;
}
The tooling first detects probe 1. After all 96 array elements of probe 1 have passed the test, the power is turned off and the probe adapter is placed in the position of probe 2. The power is turned on and the touch button S3 is pressed. At this time, the first two digits of the digital tube display 01, which is the sign of selecting probe 2. The microprocessor controls the relay to transfer all channels to the measurement of probe 2.
[page]
Driving function of high voltage switch HV20220
Function HV20220_1(uchar dd): Turn on the 1-to-24 high voltage switch of the CPLD waveform generator (tooling).
Function HV20220_2(uchar dd): Turn on the high voltage switch on the main system board (AFE9624).
Function HV20220_3 (uchar dd) function: turn on the 96-to-1 high voltage switch on the probe (tooling).
Take driver HV20220_1 as an example, the other two are similar.
void HV20220_1(uchar dd)
{
uchar i;
SLD1=1;
for (i=0;i<96;i++) {
SCLK1=0;
data10=0;
SDATA1 = data10;
SCLK1=1;
_Nop( );
_Nop( );
}
for (i=0;i
SCLK1=0;
if (i==0) data10=1;
else data10=0;
SDATA1 = data10;
SCLK1=1;
_Nop( );
_Nop( );
}
RESET1=0;
_Nop( );
_Nop( );
RESET1=1;
_Nop( );
_Nop( );
_Nop( );
_Nop( );
RESET1=0;
_Nop( );
_Nop( );
SLD1=0;
_Nop( );
_Nop( );
_Nop( );
_Nop( );
SLD1=1;
}
Use the transmitting and receiving tools to detect the B-ultrasound channel
B-ultrasound transmission channel detection
After connecting the tooling and B-ultrasound, and the detection device, check that the switches S1 and S2 are in the "transmit" position, and the oscilloscope is connected to J3.
1. The AFE9624 tooling board display screen lights up completely, and after 3 seconds, it displays 0000 again.
2. After 2 seconds, the machine automatically enters the detection state, the display shows 0001, and then the oscilloscope shows positive and negative pulse waveforms, as shown in Figure 4, indicating that the circuit of channel 1 is normal.
Figure 4 Oscilloscope displays positive and negative pulse waveforms
3. After 2 seconds, it automatically enters the detection state again, and the display shows 0002, followed by the oscilloscope showing positive and negative pulse waveforms, indicating that the circuit of channel 2 is normal.
4. Continue to wait for the detection device to automatically repeat the above process until the display shows 0096, and then the oscilloscope shows positive and negative pulse waveforms, indicating that the circuit of channel 96 is normal. So far, it is confirmed that the transmission of probe 1 interface is working normally.
5. Turn off the power and plug the "probe adapter board" into the probe 2 of the "main control system probe board". After the detection device is connected, power on, click the trigger switch S3 on the tooling board, the display screen shows 0100, and then repeat the above 2 to 4 processes to confirm that the probe 2 interface transmission is working normally. During this process, the display screen shows numbers 0101 to 0196.
B-ultrasound receiving channel detection
After the connection between the tooling and the B-ultrasound detection device is completed, the switches S1 and S2 are in the "receiving" position, and the oscilloscope is connected to J1. Follow steps 1 to 5 in the B-ultrasound transmission channel detection. At this time, the waveform displayed by the oscilloscope is a sine wave, as shown in Figure 5.
Figure 5 Oscilloscope display detection waveform
Conclusion
This article introduces the design of tooling for fully automatic testing of B-ultrasound board AFE9624. After testing, it has met the design requirements and can provide reference for B-ultrasound testing designed by other manufacturers. According to the ideas of this article, based on the actual B-ultrasound interface, you only need to design various adapter boards or adapter cables to conduct comprehensive testing of the B-ultrasound board.
Previous article:Design of ADF4106 Phase-locked Frequency Synthesizer Based on Single-Chip Microcomputer Control
Next article:A method of constructing a high-precision PWM 12-bit D/A based on a single-chip microcomputer
Recommended ReadingLatest update time:2024-11-16 22:55
- Popular Resources
- Popular amplifiers
- Learn CPLD and Verilog HDL programming technology from scratch_Let beginners easily learn CPLD system design technology through practical methods
- Practical Electronic Components and Circuit Basics (4th Edition)_Explanation of basic circuit principles, introduction to electronic components, design of various circuits and practical circuit analysis
- FPGA Principle and Structure (Zhao Qian)
- EDA Technology Practical Tutorial--Verilog HDL Edition (Sixth Edition) (Pan Song, Huang Jiye)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- HPM6750 CAN and GPIO parallel data reading test, not implemented
- How to analyze this circuit
- Free application: the latest digital function generator, if you fail to apply, you can eat "chicken legs" and win gifts such as flexible ink screen
- [April 23 | Suzhou] High-speed digital and optical communication test seminar invites you to meet
- Selection of power supply decoupling capacitors
- 【Anxinke NB-IoT Development Board EC-01F-Kit】3. Serial port networking test
- STM32 DCMI driver OV2640 project source code
- Embedded USB driver-free device communication method based on WinUSB
- Generate random 0,1 signal
- Problems using Saber to simulate SPWM driving H-bridge via 2110