Development of a Visual Electronic Stethoscope Based on AT89S52

Publisher:创新思维Latest update time:2012-11-20 Source: 21ic Keywords:AT89S52 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

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.

Keywords:AT89S52 Reference address:Development of a Visual Electronic Stethoscope Based on AT89S52

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

Design of Dual Fuzzy Temperature Controller Based on AT89S52
In modern industrial control, temperature control is very important and increasingly complex. Due to the characteristics of temperature control such as nonlinearity, large lag, time-varying, and unidirectional temperature rise, it is difficult to establish an accurate mathematical model in practical applications, and i
[Microcontroller]
Design of Dual Fuzzy Temperature Controller Based on AT89S52
Design of electronic alarm clock based on AT89S52 single chip microcomputer
1. System Function Requirements The task requirements of the computer clock are: once the system is running, it starts timing from 00:00:00, and displays the current values ​​of hours, minutes, and seconds on the digital tube. 2. System Overall Plan 1. Clarify the tasks Basic working principle: ever
[Microcontroller]
Design of electronic alarm clock based on AT89S52 single chip microcomputer
Design of a simple automatic control principle experimental system
  1 Introduction   The principle of automatic control is the most important professional course in the automation major of domestic universities. This professional course is very theoretical, and classroom teaching alone cannot achieve the ideal teaching effect. Therefore, all universities have set up experiments on
[Microcontroller]
Design of a simple automatic control principle experimental system
Design of a New Multi-rate Single-phase Watt-hour Meter
  1 Introduction   As the demand for electricity increases, the phenomenon of uneven electricity consumption in different time periods is becoming more and more serious. In order to reasonably regulate the power load and save energy, power companies have begun to encourage the use of multi-rate electricity meters. T
[Microcontroller]
Design of a New Multi-rate Single-phase Watt-hour Meter
Design of password lock based on single chip microcomputer control (including circuit diagram and source program)
Design of a password lock controlled by a single-chip microcomputer. The P1 pin of the AT89S52 single-chip microcomputer is connected to independent buttons S1-S8, which represent the number keys 0-5, the confirmation button, and the cancel button respectively. The single-chip microcomputer outputs 4 signals from P3
[Microcontroller]
Design of password lock based on single chip microcomputer control (including circuit diagram and source program)
AT89S52 MCU simulates I2C bus protocol to read and write AT24C04
      The I2C bus is a 2-wire bus. The data line is SDA and the clock line is SCL. The structure is simple.        AT24C04 is an EEPROM with an I2C bus interface. The size is 512*8 bits. The MCU AT89S52 itself does not have an I2C bus interface, so a program can be written to use the parallel port to simulate the I2C
[Microcontroller]
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号