Implementation of analgesic instrument system based on LabVIEW and AVR microcontroller

Publisher:QingfangLatest update time:2012-09-11 Source: 电子设计工程 Keywords:LabVIEW Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
Pain treatment has always been one of the most difficult problems in clinical medicine. In the field of pain treatment, acupoint stimulation analgesia has always been highly respected, that is, by applying low-frequency pulse voltage to the acupoints to stimulate the nervous system, it releases opioid peptides and achieves the purpose of alleviating pain. Since the 1980s, electronic technology has been widely used in the field of disease diagnosis and treatment, and acupoint stimulation analgesia treatment instruments have become one of the research hotspots. The Korean instrument is a typical representative. With the development of portable and intelligent electronic technology, it is imperative to use the latest technology to innovate products and develop new analgesic medical devices.
In view of the requirements for the development of analgesic circuits and the characteristics of the human body's physiological response to low electrical frequencies, a medical device analgesic instrument with high precision, stability and reliability, strong anti-interference ability, low power consumption and strong scalability is designed based on LabVIEW and AVR microcontrollers.

1 System Overview
This system includes a host computer module, a communication module and a slave computer module. The host computer uses a human-computer interaction interface written in LabVIEW software, which is easy to use, has good visualization and scalability; the communication part uses a plug-and-play USB communication module, which has a fast data transmission rate and can meet the requirements of real-time feedback of the slave computer monitoring data; the slave computer module is mainly composed of a pulse generation circuit, a boost circuit and a complementary symmetrical pulse output circuit. The main control chip uses Atmega128 from ATMEL, which can receive host computer control commands, complete precise modulation of pulse intensity in various modes, and control symmetrical treatment pulse output. The boost circuit uses the MAX1771DC/DC boost chip from Maxim Integrated Products and the AD52 41 series digital potentiometer from AD to achieve precise and adjustable digital boost. The system function block diagram is shown in Figure 1.

a.jpg



2 System hardware and software and their components
2.1 Host computer LabVIEW human-computer interaction interface
The host computer software is used for user information management and real-time control of the system. This includes real-time display of data collected by the lower computer, as well as storage of user treatment data. The software is written in a graphical programming language, which has a short development time, strong versatility, accurate and simple data processing, strong portability, and a user-friendly interface design, making it easy to operate, with good visualization and scalability. The host computer flow chart is shown in Figure 2.

b.jpg [page]

The host computer can provide functions for managing patient information, selecting treatment modes, and controlling treatment intensity. It can also display treatment waveforms in real time, so that patients and medical staff can see the treatment status at a glance. Before the system is run, relevant patient information must be entered. The system will automatically generate a record report of the patient's treatment status after the treatment is completed, and provide a printing function, which can be used for medical comparative analysis and evaluation of the treatment effect of this system. Medical staff can choose the mode suitable for the patient from the seven treatment modes currently provided by the system according to the patient's condition, and control the stimulation intensity under different modes to achieve the best treatment effect. The operation interface is shown in Figure 3.

c.jpg


In addition, the system also has a series of modules such as music auxiliary module, timing function module, help system and extended function for users to choose, so as to maximize the operation efficiency.
2.2 Implementation of USB serial communication module
USB (Universal Serial Bus) interface is a new interface technology applied in the PC field in recent years. It is based on a single bus interface technology to meet the needs of various application fields; its plug-and-play, hot-swap support, easy expansion and other features greatly facilitate the use of users, and has gradually become the development trend of modern data transmission. The portability and high data transmission speed of USB are very suitable for this system.
The USB controller uses CH376, which can work in both host and device working modes, and the device working mode is fully compatible with CH372. It has a convenient built-in firmware mode and a flexible external firmware mode. In the built-in firmware mode, the relevant USB protocols are shielded, and the standard USB enumeration configuration process is automatically completed. The local controller does not need to do any processing at all, which simplifies the firmware programming of the single-chip microcomputer. The chip integrates major components such as PLL multiplier, USB interface SIE, data buffer, passive parallel interface, command interpreter, and general firmware program. It has 5 physical endpoints inside. The upload endpoint 2 is used as the sending endpoint of bulk data, and the download endpoint 2 is selected as the receiving endpoint of bulk data. In this case, the buffers of the upload and download endpoints each occupy 64 bytes.

d.jpg

[page]

This paper uses the general driver NIVISA that comes with LabVIEW as the underlying driver of the USB device, and uses the block transfer nodes in the program, namely VISA READ and VISA WRITE, to easily realize the transmission and reception of data and complete the communication requirements between the upper computer and the lower computer.
2.3 Lower computer master boost output circuit
The lower computer controls the pulse generation module and the boost module to perform corresponding operations according to the control commands received from the upper computer, and feeds back information to the upper computer.
With the Atmega128 microcontroller as the lower computer control core, the program outputs PWM stimulation pulses with variable frequency and variable duty cycle. The Atmega128 chip has a PWM wave output pin, and programming it can achieve high-quality PWM wave output. Programming TWI to control the output resistance of the AD5241 chip to modulate the MAX1771 DC-DC boost circuit to achieve multi-level adjustable boost, and the symmetrical pulse module can achieve the output of a stable pulse wave. The output pulse is captured by the built-in AD of Atmega128. Considering that the amplitude of the output signal is between 12 and 100V, and the reference voltage selected by the AD module is 5.0V, the output voltage is connected to the analog input channel through a resistor divider, and then the collected analog voltage value is transmitted to the host computer and multiplied by the corresponding multiples to achieve the reproduction of the output intensity. The function realization flow chart of the lower computer is shown in Figure 5.

e.jpg



3 Output pulse waveform
The upper computer operation interface is connected to the lower computer system through the USB module for system testing. The upper computer control interface is used to send corresponding control instructions to the lower computer to achieve digital boost intensity adjustment and symmetrical pulse waveform output. Figure 6 shows the output waveform of mode 2 (100Hz square wave, 0.2ms pulse width) captured by two channels of Tektronix TDS2014 oscilloscope.

g.jpg



4 Conclusion
This system is based on the combination of the PC-based upper computer control interface and the waveform-generating lower computer, realizing precise and adjustable digital boost and real-time controllable mutually symmetrical pulse output. The adjustment of the pulse output waveform and voltage range can meet the needs of different users. The use of digital potentiometers instead of analog potentiometers makes the control of the system more flexible and convenient. The complementary symmetrical output circuit can ensure the stability of the output voltage and the safety of the user. USB communication makes the connection between the upper computer and the lower computer more convenient and fast, which is conducive to the rapid response and intelligent diagnosis and treatment of the system. This system has good stability, high security, easy-to-operate interface, and broad application prospects.

Keywords:LabVIEW Reference address:Implementation of analgesic instrument system based on LabVIEW and AVR microcontroller

Previous article:Tire mold inner diameter measurement system based on AVR microcontroller
Next article:Design and implementation of a robot fish voice control system based on AVR and 51 single-chip microcomputer

Recommended ReadingLatest update time:2024-11-16 17:48

Using ZLGCAN Interface Function Library in LabVIEW
1. Overview The Virtual CAN Interface (VCI) function library is an application program interface specifically provided for the use of ZLGCAN devices on PCs. The functions in the library are exported from ControlCAN.dll and can be used directly in LabVIEW7.0 without any additional operations. The use process
[Test Measurement]
Biofluid Perifusion System Automates Cell Secretion Analysis
Biorep Biofluid Perfusion System Challenge: Improve the throughput and reproducibility of cell secretion assays, which are commonly used to analyze pancreatic islet cells in type 1 diabetes research. Solution: Using NI LabVIEW software and CompactRIO hardware, we created an automated biofluid perfusion system that
[Test Measurement]
Biofluid Perifusion System Automates Cell Secretion Analysis
Using NI PXI and LabVIEW Real-Time Module to effectively simplify hardware-in-the-loop simulation system
Author(s): Averna Thales - Canada, Aerospace Division Industry: Aerospace/Avionics Products: Software, PXI/CompactPCI, Real-Time The Challenge: Create a hardware-in-the-loop platform that has a deterministic loop rate of 1,000 times per second, can manage thousands of I/O ports, can ac
[Test Measurement]
Using NI PXI and LabVIEW Real-Time Module to effectively simplify hardware-in-the-loop simulation system
Labview serial port error: -1073807253, -1073807252, 1073676294
In a recent project, serial communication is used to realize upload and download communication between FPGA and host computer. There is no problem in downloading data to FPGA, but there are always errors when uploading data from FPGA to labview. Problem: FPGA uploads data to FPGA sometimes successfully, but sometime
[Test Measurement]
FCT (Functional Circuit Test) Test System Based on PXI and LabVIEW
Challenge: Through PXI control board and LabVIEW software, a relatively complete PCB board functional test (FCT) system is built. The system can realize comprehensive and fully automatic testing of audio, video and various static parameters (voltage, current, frequency). For newly developed and produced PCB boards, the
[Test Measurement]
FCT (Functional Circuit Test) Test System Based on PXI and LabVIEW
Application of LabVIEW and MATLAB in Digital Antenna Array Test
Introduction Digital antenna array is the product of the combination of antenna and digital signal processing technology. It has many advantages such as flexible working mode, excellent anti-interference performance and super angular resolution. Therefore, it has been widely used in military and civilian fields.
[Test Measurement]
Application of LabVIEW and MATLAB in Digital Antenna Array Test
Local variables and global variables in Labview
The scope of a local variable is the entire VI and it is used to transfer data within a single VI. The scope of a global variable is the entire computer, and it is mainly used to share data between multiple VIs.  
[Test Measurement]
Local variables and global variables in Labview
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号