Development of controller for medical automatic film processor?

Publisher:快乐阳光Latest update time:2011-07-21 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

【Abstract】 This paper introduces the controller of medical X-ray automatic film processor based on AT89C52 single-chip microcomputer and peripheral chip design. The software and hardware design scheme of the film processor controller is given, and the application of temperature detection module and CPLD in the design is emphasized. Keywords: single-chip microcomputer, X-ray automatic film processor, temperature detection, CPLD


1 Introduction

Film processors are essential equipment for the imaging department of each hospital. The imaging department of a hospital has to develop a large amount of X-ray transmission films every day, which is a heavy workload. The film processing operation is difficult and requires high professional skills of the operators. In addition, the chemical liquid used during film processing is harmful to the human body. Therefore, most hospitals currently use medical automatic film processors. Imported automatic film processors have good effects, but are expensive. This article introduces a self-developed medical automatic film processor controller controlled by a microcomputer, mainly introducing its software and hardware design scheme, and focusing on the application of temperature detection module and CPLD (Complex Programmable Logic Device) in the design.

2 System Overview and Functional Requirements

The film processing process mainly consists of four parts: developing, fixing, rinsing and drying, as shown in Figure 1.


The film is first placed in a developing tank filled with developer solution for a certain period of time, then placed in a fixing tank filled with fixing solution for a certain period of time, then rinsed with clean water in a rinsing tank, and finally dried, and the film processing process is completed. The four processes have requirements for temperature and time, and the developing and fixing processes have requirements for the concentration of the solution.
The film processor has four states: cold machine, preheating, film processing and self-test. The cold machine state means that the system is powered on but not working; the preheating state means that there is no film in the machine but the working area is heated to a certain temperature, and when there is a film in, it can quickly heat up to the film processing temperature; the film processing process is carried out in the film processing state; in the self-test state, each actuator can be checked to see if it is normal.
The main functions of the controller are: (1) control the process of the entire film processing; (2) detect and control the temperature of the three working areas of developing, fixing and drying, the amount and level of the developing and fixing liquid, the speed of film processing (i.e. the time the film is in each working area) and the pump and valve; (3) determine the incoming and outgoing films and film models; (4) count the number of films of each model and the amount of liquid used; (5) internal clock, timed start and shutdown; (6) human-machine interface composed of keyboard and LCD display, easy to operate and can realize parameter setting.

3 Design of hardware system

The controller consists of three major parts: main control module, keyboard display module and actuator, as shown in Figure 2.

The main control module and keyboard display module are each controlled by an AT89C52 single-chip microcomputer, and serial communication is used between the two parts. The design uses dual CPUs, considering that the actuator is at the bottom of the chassis, and the distance between the main control module and the actuator should be as small as possible to improve system reliability. The LCD display and keyboard modules have more tasks to complete and have independent functions, so a single CPU can be used. In addition, the keyboard display module is separated from the main control module and can be placed on the top of the chassis for easy operation.

The keyboard display module is mainly composed of AT89C52 single-chip microcomputer, keyboard, LCD display and serial communication interface.
3.1 Main control module
The main control module includes AT89C52 single-chip microcomputer, temperature detection, film detection, temperature control, pump and valve control, motor speed control, serial communication interface, expansion RAM, real-time clock, decoding circuit and switching power supply. The structure of the main control module is shown in Figure 3.
Since the controller is required to be able to count the amount of liquid used and the number of films washed for each type and save the statistical data, an external non-volatile memory is required. Considering the price factor, a memory with a real-time clock is not used, but an NV SRAM and a separate real-time clock are used. The external memory uses the integrated circuit DS1225, whose storage capacity is 64K. The clock circuit uses the integrated circuit chip DS12887 of DALLAS. DS12887 can provide timing of year, month, day, hour, minute and second, timed alarm, a 100-year calendar, programmable interrupts and 114 bytes of non-volatile RAM. The integrated voltage regulator module is used in the temperature control of the film processor controller.
3.2 Application of CPLD in Design
CPLD is a new type of complex programmable logic device. This device has the characteristics of programmability and easy modification of implementation scheme. The use of CPLD devices greatly shortens the design cycle of products, improves the integration degree of the system, reliability and scalability, and has been widely used in the design of electronic products.
In the design, CPLD uses the integrated chip XC9572 of XiLinx. XC9572 has 72 macro units, which can be programmed multiple times and supports online programming. The functions implemented in CPLD include: decoding; output control quantity, interface for in/out chip detection and over-temperature detection; interrupt control; address latch.
The schematic diagram of interrupt control in CPLD is shown in Figure 4. INT1 is connected to the external interrupt pin INT1 of the CPU. The main control module has four external interrupt sources: real-time clock interrupt signal CLK_INT, over-temperature interrupt signal OV_TEM, in-chip interrupt signal POS_IN and out-chip interrupt signal POS OUT. When any of the interrupt sources is valid, the D flip-flop is cleared, INT1 is low level, and the CPU executes the interrupt program. In the interrupt program, the CPU identifies the corresponding interrupt source by reading the data of the I/O address unit corresponding to INT CE and performs the corresponding processing. Among them, INT_ is the enable signal for reading the interrupt source. When INT_CE is low, the interrupt source is read, and the D flip-flop is set, and INT1 returns to high level.


3.3 Temperature detection module
The temperature detection circuit is shown in Figure 5. The temperature sensor uses AD590, and the working range is -55℃~+155℃. It has good linearity and constant current transmission characteristics, which is convenient for long-distance transmission. The output current of AD590 is proportional to the absolute temperature. When the power supply is +4V~+30V, the output current increases by 1μA for every 1K increase in absolute temperature. The current change range is very small, so a 9.8kΩ resistor and a 511Ω adjustable resistor are connected to increase the current conversion range to meet the requirements of the LM324 operational amplifier.
The output signal of AD590 is converted into an inverted voltage signal by the first-stage amplifier LM324, in which the 510Ω adjustable resistor RW1 is used to adjust the slope of the current-voltage conversion. The signal is amplified into a stable voltage signal by the second-stage amplifier, and the adjustable resistor RW2 has a zero adjustment function. Vref=+5V is the reference voltage, which is given by the power module LM317.
According to the characteristics of AD590, when the temperature is the absolute temperature xK, the output current of AD590 is xμA. Let the output voltage of the first-stage amplifier be v1 and the output voltage of the second-stage amplifier be v0, then:

Adjust RW1 and RW2 according to the ambient temperature, the operating temperature requirements of each temperature zone of the film processor, and the input voltage range requirements of ADC0809. When adjusting, we adjust the slope of v0 by adjusting RW1 according to the conversion rate of 35mV/℃, and then adjust RW2 to meet the zero adjustment requirements.
ADC0809 is a single-chip, CMOS, successive comparison, 8-bit analog/digital converter. The chip contains an 8-bit analog/digital converter, an 8-channel multiplexer and a control logic compatible with the microcontroller. The selection of ADC conversion bits should fully ensure that its resolution is higher than the accuracy requirements of the system, and there is a certain margin to meet the nonlinear requirements of other links, especially the sensor elements.
The conversion accuracy of ADC0809 is ±0.4%, and the conversion time is 128μs. ADC0809 converts the analog quantity output by the second-stage amplifier into a digital quantity, connects it to the system's data bus, and is read by the CPU.

4 Design of software system

The software system is divided into two parts, the main control module of film processing and the keyboard display module. The two parts communicate according to the custom communication protocol. The software design adopts modular design. The main control part is shown in Figure 6. It consists of modules such as initialization, serial communication, clock management, data storage, input scanning, film input detection, film output detection, output control, interruption, etc. The main program calls each submodule to control the film processing process. In order to improve the reliability of the system, the main program adopts a loop execution method. The
output control module includes temperature control, speed control, flushing control, fluid replenishment control and other switch quantity controls. The temperature control module checks the temperature control table according to the difference between the actual temperature and the set temperature of the three working areas detected, and uses the difference method to obtain the output control quantity. The temperature control table is measured in advance by experiment and solidified in the single-chip microcomputer. The speed of the film processing motor is divided into four gears, and the output control quantity is obtained by looking up the table according to the set value.

5 Measures to improve system reliability

Since the hospital has very high requirements for film processing quality and reliability, the film processing machine itself is expensive and has a long running time, we considered the reliability issue when designing the system. First of all, the machine is designed with a self-check function, so ordinary operators can check whether each actuator is normal. The design of the printed circuit board also takes into account anti-interference measures, such as power supply filtering and ground wire processing, to improve the reliability of the circuit board. In addition, there is a watchdog circuit in the system to reset the system when the program runs away. In terms of software, the main program is executed in a loop, and the output port is refreshed and the input port is read in each loop. In this way, when the program fails in a certain loop, it can return to normal in the next loop.



6 Conclusion

This medical automatic film processor controller can meet the requirements of automatic film processing in hospitals, reduce the workload of film processing, and improve the quality and efficiency of film processing. The reliability requirements of the system are taken into consideration in the design, and measures are taken in both hardware and software design to improve reliability. At the same time, the system has certain flexibility and expandability.

Reference address:Development of controller for medical automatic film processor?

Previous article:Design of medical imaging system based on ADI 20-bit DAC
Next article:ECG Remote Monitoring and Cloud Computing

Latest Industrial Control Articles
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号