To address the shortcomings of traditional ward call systems, this paper designs a PLC -based ward call system. When a patient requests assistance from medical staff by pressing a button, the ward call system transmits the relevant request information to the host computer system via power line carrier. Medical staff then provide appropriate assistance to the patient based on the current request information.
1. System Overall Scheme and Working Principle
This paper designs the hardware circuit of a ward call system based on its actual functional requirements. The system hardware circuit mainly consists of a power supply module, a power line carrier transmission module, a power line carrier reception module, a clock module, a data display module, a call button module, a serial port module, and a watchdog module. The overall hardware circuit is shown in Figure 1.
Figure 1 Hardware structure diagram of the ward call system
The system designed in this paper effectively solves the problems of traditional ward call systems, such as complex structure, high construction difficulty, and poor scalability. When a patient needs help from medical staff, the patient transmits the call request information to the corresponding attending physician or nurse through the ward call system. After receiving the request information, the attending physician or on-duty nurse responds accordingly through the ward call system, thereby stabilizing the patient's emotions and improving the overall level of medical services.
2. Hardware design of the control system
The ward call hardware circuit mainly consists of the following functional modules: power line carrier transmitting module, power line carrier receiving module, power supply module, serial port module, and human-computer interaction module.
2.1 Power Module
For any system, the overall stability of the power supply module determines the overall reliability and stability of the system. Due to system size limitations and actual functional requirements, this paper designs a high-performance switching power supply. The power supply uses the TOP224Y chip developed by POWER Corporation as the main control chip, and its circuit is shown in Figure 2.
Figure 2 Switching power supply design circuit
The working principle of the switching power supply is as follows: A 220V AC power supply, after passing through a rectifier bridge and filter capacitor, outputs a fluctuating DC power supply. This power supply is directly output to the drain pin of the TOP224Y chip, turning on the TOP224Y chip. The power supply voltage forms a circuit with the source of the transformer Q20 primary coil, and the secondary coil of Q20 outputs the power supply voltage. Simultaneously, the system uses rectifier diodes and filter capacitors to rectify and filter the output power supply voltage. To ensure a stable output voltage, the system uses the transformer secondary coil to sample the output power supply voltage. When the sampled voltage is greater than 12V, the optocoupler conducts, and the TOP224Y chip turns off its drain pin, thereby reducing the output voltage of the switching power supply. Since the transformer primary coil has an energy storage function, it is prone to generating high-frequency spikes during the high-frequency switching process of the TOP224Y. To ensure normal system operation, an absorption circuit consisting of resistor R28, capacitor C32, and diode D36 is designed to absorb these spikes, effectively preventing damage to the TOP224Y chip caused by these spikes.
2.2 Power Line Carrier Transmission Module
In the ward call system, data communication between patients and on-duty nurses uses power lines for data transmission. When a patient makes a request via the call request button, the microcontroller sends the requested bed information and needs to the corresponding attending physician or on-duty nurse through the power line carrier transmission module. Since power lines are primarily used for transmitting electrical energy, and hospitals have a large number of medical devices, the hospital power grid contains significant harmonic noise. To ensure the normal operation of the ward call system designed in this paper, a push-pull drive circuit is used to drive the power line carrier transmission module, as shown in Figure 3. Compared to traditional single-tube drives, the power line carrier transmission module designed in this paper features longer data transmission distance and stronger anti-interference capabilities. Furthermore, the system uses a 12V power supply to drive the power line carrier transmission module, improving the signal-to-noise ratio of the system's data transmission.
Figure 3 Power line carrier transmission module
The power line carrier transmission module works as follows: When the ward call system needs to transmit data, the Atmega64 microcontroller sends the data to be transmitted to the BWP08A module via a serial port. The BWP08A then outputs the received data bit by bit through the VO pin. To increase the transmission distance of the power line carrier data, the system performs push-pull amplification on the data output from VO. The amplified data is coupled to the primary coil of transformer T1 through capacitor C14, and then transmitted remotely via the power line through the secondary coil of the transformer. Due to the high harmonic noise in the hospital's power lines, a clamping circuit composed of D10 and D11 is used for protection to ensure the stability and reliability of the system's data transmission. This prevents external noise from damaging the power line carrier transmission module and improves the overall stability of the system.
2.3 Power Line Carrier Receiver Module
When the attending physician or on-call nurse receives a patient's request, they must promptly respond via power line carrier to stabilize the patient's emotions. Due to the poor power quality in hospitals and the high transmission resistance on power lines, the quality of power line carrier data transmission is severely affected. Therefore, considering the characteristics of my country's power grid, this system is designed with a power line carrier receiving circuit as shown in Figure 4.
Figure 4 Power line carrier receiver module
In Figure 4, capacitors C19 and C20 and inductor L4 are connected in parallel. The resonant frequency T is f = 120kHz. According to equation (1), the values of the capacitors and inductors can be determined. Frequency calculation formula:
3. Software Design
3.1 Software Overall Architecture Design
To meet the functional requirements of the ward call system software, this system constructs a multi-functional state machine system. The system software program adopts a modular design, using timers to schedule the processing of each functional module. Simultaneously, the system software has strong portability and scalability, reducing subsequent system maintenance costs. The main flowchart of the system software is shown in Figure 5.
Figure 5. Main Program Flowchart
3.2 Power Line Carrier Transmission Module
When a patient presses the call button, the Atmega64 microcontroller stores the current bed information and request information in the serial port transmit buffer, enables the serial port interrupt, and transmits the data to the BWP08A power line carrier chip via the serial port interrupt. The BWP08A then transmits the received data to the attending physician or on-call nurse via the power line. To ensure the synchronization of power line carrier data transmission, the BWP08A chip first sends 40 bits of data all "1"s before transmitting the information. Then, the BWP08A sends a synchronization frame header of 0x09 and 0xAF, effectively ensuring the overall synchronization of power line carrier data transmission. The BWP08A outputs the received data bit by bit through the VO pin. After each bit of data is sent, the bit counter is decremented by 1. When the bit counter reaches 0, the data for that bit has been sent. At the same time, the internal counter of the BWP08A is decremented by 1. After the BWP08A has finished transmitting the received data, it sets the current sending state to receiving state, thereby ensuring the accuracy of the data received by the BWP08A. Its program flowchart is shown in Figure 6.
Figure 6 Flowchart of the power line carrier transmission module
3.3 Power Line Carrier Receiver Module
When the attending physician or on-call nurse receives a patient's request, they send a corresponding response signal through the ward call system to stabilize the patient's emotions. Therefore, the ward call terminal device needs to have a data receiving and processing module. When the ward call system receives a response, the BWP08A first uses the power line carrier receiving module for data reception and processing. Every 8 bits of data received, the BWP08A chip transmits the data to the Atmega64 microcontroller via serial port. After the BWP08A completes data reception, the Atmega64 sets the data reception completion flag, and the main program parses the received data and executes the corresponding actions. The flowchart of the power line carrier receiving software program is shown in Figure 7.
Figure 7 Flowchart of Power Line Carrier Receiver Module
4. Experimental Results and Comparative Analysis
To verify the ward call system designed in this paper, this project built a ward call system based on power line carrier based on the above discussion. The system circuit is shown in Figure 8.
Figure 8. Physical diagram of the power line carrier ward call system
Because hospitals have numerous nonlinear electronic devices, which generate high harmonic noise, the transmission module was tested to verify the overall stability of the ward call system. The waveforms before and after carrier data coupling are shown in Figures 9 and 10. As can be seen from the figures, the performance of the carrier transmission module discussed in this paper meets the system's functional requirements.
Figure 9. Before power line carrier transmission coupling
Figure 10 After power line carrier transmission coupling
To ensure the system can accurately receive response data, the power line carrier receiving module was tested to guarantee that the ward call system can accurately receive response data even in environments with high harmonic noise. The waveform diagrams of its receiving port are shown in Figures 11 and 12.
Figure 11 Power line carrier received waveform
Figure 12 Power line carrier reception and processing waveforms
To verify the overall performance of the ward call system, this project deployed the designed system in a large hospital and tested it under both no-load and loaded conditions. The experimental results are shown in Tables 1 and 2. The results indicate that the designed ward call system can effectively transmit over approximately 1400m under no-load conditions; when all large electrical equipment in the hospital is activated, the effective transmission distance reaches approximately 1100m. Analysis of the experimental results shows that the designed ward call system meets the various functional requirements of the hospital.
Table 1 Analysis of No-Load Measurement Results
Table 2 Analysis of Measurement Results of High-Power Loads Outside the Power Line
5. Conclusion
This paper designs the overall architecture of a ward call system based on the functional requirements of a hospital, and designs the hardware circuitry and software program accordingly. Since the system uses power line carrier for remote data transmission, remote data communication can be achieved simply by connecting the ward call system to the hospital's power lines. This system effectively solves the problems of low extension capacity, poor scalability, difficult construction, and high cost associated with traditional ward call systems. While not perfect, the system is simple to install, easy to operate, and readily expandable, making it highly valuable for practical use and widespread adoption.