Development of controller for medical automatic film processor

Publisher:骄阳少年Latest update time:2010-12-24 Source: 电子设计信息网 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

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. The workload is heavy, and the film processing operation is difficult and requires high professional skills of the operators. In addition, the chemical liquid used in 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 they 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.

Film processing

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 fixer 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, preheat, film processing and self-test. The cold state means that the system is powered on but not working; the preheat state means that there is no film in the machine but the working area is heated to a certain temperature, and when a film is fed in, it can quickly heat up to the film processing temperature; the film processing process is carried out in the film processing state; the self-test state can check whether each actuator is normal.

The main functions of the controller are: (1) controlling the entire film processing process; (2) detecting and controlling the temperature of the three working areas of developing, fixing and drying, the amount and level of the developing and fixing liquid, the film processing speed (i.e. the time the film is in each working area) and the pumps and valves; (3) judging the incoming and outgoing films and the film models; (4) counting the number of films of each model processed and the amount of liquid used; (5) internal clock, timed start and shutdown; (6) human-machine interface consisting of a keyboard and a liquid crystal display, which is easy to operate and can realize parameter setting.

3 Hardware System Design

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

System structure diagram

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 they can use a single CPU. 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, liquid crystal display and serial communication interface. [page]

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, extended ram, real-time clock, decoding circuit and switching power supply modules. The structure of the main control module is shown in figure 3

Main control module structure

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, which has a storage capacity of 64K. The clock circuit uses the integrated circuit chip DS12887 of Dallas. DS12887 can provide year, month, day, hour, minute and second timing, timed alarm, a 100-year calendar, programmable interrupts and 114 bytes of non-volatile RAM. An 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 product design cycle, improves the system's integration, reliability and scalability, and has been widely used in electronic product design.

The cpld in the design uses the integrated chip xc9572 from xilinx. xc9572 has 72 macro units, can be programmed multiple times, and supports online programming. The functions implemented in the cpld include: decoding; output control quantity, in/out chip detection and over-temperature detection interface; interrupt control; address latch.

The schematic diagram of the interrupt control in the 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, chip input interrupt signal pos_in and chip output 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 level, the interrupt source is read, and the D flip-flop is set, and INT1 returns to high level.

Schematic diagram of interrupt control in cpld [page]

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.

Temperature detection circuit

The output signal of ad590 is converted into an inverted voltage signal by the first-stage amplifier lm324, where 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 provided 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:

program

According to the ambient temperature, the working temperature requirements of each temperature zone of the film processor and the input voltage range requirements of ADC0809, adjust rw1 and rw2. When adjusting, we follow the conversion rate of 35mv/℃, adjust the slope of v0 by adjusting rw1, and then adjust rw2 to meet the zero adjustment requirements.

ADC0809 is a single chip, CMOS, successive approximation, 8-bit analog/digital converter. The chip contains an 8-bit analog/digital converter, 8-channel multi-channel sensor and microcontroller compatible control logic. The selection of ADC conversion bits should fully ensure that its resolution is higher than the accuracy requirement 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 digital quantity, which is connected to the system data bus for CPU to read. [page]

4 Software System Design

soft

The software system is divided into two parts, the film processing main control module and the keyboard display module. The two parts communicate with each other according to a custom communication protocol. The software is designed in a modular way. 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, and interruption. The main program calls each submodule and is responsible for the film processing process control. In order to improve the reliability of the system, the main program adopts a loop execution method.

Main control process

Main control process

The output control module includes temperature control, speed control, flushing control, rehydration control and other switch quantity control. The temperature control module checks the temperature control table according to the difference between the actual temperature of the three working areas detected and the set temperature, 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 computer. The speed of the washing 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 operating time, we considered the reliability issue when designing the system. First of all, the machine is designed with a self-check function, and 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, ground wire processing, etc., 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 be restored to normal in the next loop.

6 Conclusion

The controller of the medical automatic film processor can meet the requirements of automatic film processing of hospital X-ray films, 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.

References

1 Ding Yuanjie, ed. Principles and Applications of Single-Chip Microcomputers. Beijing: Machinery Industry Press

Reference address:Development of controller for medical automatic film processor

Previous article:Application of FPGA in Voice Storage and Playback System
Next article:Application of Programmable Analog Devices in Small Signal Measurement Systems

Latest Embedded 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号