A new type of visual electronic stethoscope is based on AT89S52 single-chip microcomputer, uses electret sound sensor to realize heart sound data acquisition system, and uses graphic LCD module to realize display. The system structure diagram of electronic stethoscope is introduced, and the hardware circuit principle and software flow are given. The system can intuitively display heart rate and heart sound waveform through LCD screen while performing routine heart auscultation.
Heart sounds are sounds that can reflect the normal or pathological state of the heart. They are formed by the opening and closing of the valves during the heartbeat and the vibrations generated by the movement of the myocardium and blood. Auscultation of heart sounds is an important basis for diagnosing heart diseases. The traditional method is to use a stethoscope to auscultate heart sounds, and the basis for diagnosis is mainly the experience of the physician. This method is relatively simple, but because the human ear's perception of sound is a comprehensive effect of sound intensity and frequency, some pathological characteristics are difficult to capture and the accuracy is poor. It is necessary to design a new electronic stethoscope to quantitatively and accurately analyze the auscultation sound. At present, there is still a large gap between the price and function of domestic electronic stethoscope products and those of foreign countries. Most of them only collect and amplify heart sounds. Although the stethoscope has been improved to a certain extent, it still cannot reflect the waveform of heart sounds well. The visual stethoscope developed in this paper realizes this function. It integrates auscultation and ECG signal monitoring functions, can record and display heart rate and phonocardiogram in real time, making diagnosis more accurate and convenient for medical teaching. At the same time, it has the advantages of storage, real-time display, simplicity and ease of use, low cost, and small size. This article introduces the structure and working principle of the visual stethoscope in detail.
1 Hardware Design
The system structure diagram of the visual stethoscope is shown in Figure 1. The visual stethoscope consists of two parts: acquisition processing and waveform display, which are specifically composed of a sound sensor, a signal conditioning sampling circuit, and a keyboard display circuit.
1.3 Signal Sampling
The heart sound frequency f is between 20Hz and 600Hz. According to Shannon's sampling theorem, as long as the sampling frequency is higher than or equal to twice the original frequency, the original waveform can be completely reproduced. Therefore, the conversion rate of the selected A/D converter should be above 1200Hz. Therefore, the serial A/D converter TLC0831 is selected in the design.
The working principle of the signal sampling circuit: the analog output signal of the conditioning circuit is converted into a digital quantity by an A/D converter, and then sent to the LCD screen for display by the single-chip microcomputer. [page]
1.4 Keyboard Display
This system uses the QH12864T dot matrix liquid crystal display (LCD) module of Jingdian Pengyuan. The module consists of the controller T6963C, the column driver T6A39, the row driver T6A40 and the interface with external devices. It can display characters (Chinese and Western characters), graphics, and can also display characters and graphics in a mixed manner.
The interface methods between LCD and single-chip microcomputer are divided into direct access mode and indirect control mode. The direct access mode is to connect the liquid crystal module as a memory to the data line, address line and control line of the CPU, and connect its data bus to the P0 port of 89S52. The chip selection and register selection signal lines are provided by the P2 port, and the read and write operations are controlled by the read and write operation signals of the single-chip microcomputer. This method is to access the liquid crystal display module in the way of accessing the memory. The indirect control method does not use the data system of the single-chip microcomputer, but uses its I/O port to realize communication with the display module, that is, the data line of the liquid crystal display module is connected to the P0 port of the single-chip microcomputer as the data bus, and the other three timing control signal lines are usually controlled by the unused I/O port in the P3 port of 89S52. This access method does not occupy the memory space of the CPU, its interface circuit is independent of the timing, and its timing is completely realized by software programming. The speed of the indirect control method is faster than the direct access method, so the indirect control method is adopted in this design, and the specific connection is shown in Figure 3.
The phonocardiogram of a normal person is shown in Figure 4, where s1 is the first heart sound, s2 is the second heart sound; Systole represents the cardiac systole, and Diastole represents the cardiac diastole.
The heart sound after the signal conditioning circuit becomes the waveform shown in FIG5 .
3 System Software Design
The LCD used in the system is in the graphics working mode. By establishing a coordinate system and using bit operations, the realistic display of the heart sound waveform is realized. The following is a detailed introduction to the algorithm of LCD display drawing programming and the continuous display of waveforms. [page]
3.1 Algorithms for Graphics Programming
The system uses a 128×64 dot matrix graphic LCD module. To draw the heart sound waveform, just draw points on the corresponding positions of the LCD according to the data converted by A/D. First, establish the display coordinate system as shown in Figure 6 on the LCD plane.
The figure shows the display buffer address corresponding to each location of the liquid crystal plane of the LCD in the graphic working mode. The data is in hexadecimal, and a coordinate system with the lower left corner as the origin of the coordinate is established. In this way, the values of the coordinates (X, Y) are all positive, which simplifies the algorithm. Among them, X represents 1 to 128 points, and Y represents the amplitude corresponding to each point. Since the value of A/D sampling is 0~255, and the row value of LCD is 0~63, the amplitude is reduced by a certain multiple, that is, Y=D/B, D is the digital value collected by A/D, and B is the multiple of the reduction of the number. It can be seen from the figure that when the amplitude Y is added by 1, the display buffer address K is reduced by 10H, thus obtaining the expression of the buffer address: K=X/8-10H*Y+0BF0H. The bit corresponding to the remainder of X divided by 8 in the buffer address byte is exactly the position of the point to be drawn. As long as it is set by using the bit operation command, the point can be drawn.
3.2 Waveform Display
The collected data is stored in RAM, which stores 8KB of waveform data. The LCD can only display 128 points at a time, so the horizontal display of the waveform can be controlled by changing the reading interval in RAM, that is, after displaying one data, the RAM address increases by N, and the signal waveform can be expanded or retracted by changing the size of N for easy observation.
If the amplitudes of two adjacent points are slightly different, the distance between the two points will be separated, resulting in discontinuous display and affecting the visual effect. Therefore, how to make the waveform display continuous is a very important issue in displaying signal waveforms. The solution to this problem in this system is: after each point is displayed on the LCD, the amplitude difference between it and the previous point, that is, the Y value difference, is determined. If it is greater than 8, several points are inserted between the two points (the X value remains unchanged, only the Y value changes) to make the two points continuous, and then the next point is displayed. Using this method, the display of heart sound waveforms can be well realized. The waveform display program flow chart is shown in Figure 7.
4 Conclusion
The visual stethoscope introduced in this article can display the heart rate and heart sound waveforms in real time, and can stretch, transform and replay the waveforms. It is intuitive and easy to operate, and is suitable for promotion and application in clinical teaching and medical fields.
Previous article:Integrated design and application of automobile protection system based on AT89C52
Next article:Design of program-controlled switching power supply based on AT89S52
Recommended ReadingLatest update time:2024-11-16 15:37
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
- The role of fast recovery diode
- How to efficiently dissipate heat from lithium-ion batteries?
- Thank you + my love
- EEWORLD University ---- ISO 7637
- EEWORLD University Hall----Basics of Motors and Traction (Petroleum University)
- ZigBee transmission based on self-powered switch
- TMS320DM642 Bootmode
- Single chip microcomputer drives 9013 transistor to realize infrared emission circuit diagram
- What are the characteristics of such a zero-pole system?
- SDR-Hackrf one