Design of portable ECG monitoring system

This article refers to the address: http://

Electrocardiogram (ECG) is an important tool for the diagnosis of heart disease. Conventional electrocardiogram is a short-term ECG activity recorded by the hospital's electrocardiograph in a recumbent situation. Because of a large chance and suddenness in heart attack, routine ECG is performed during non-onset period to obtain disease information. The chance is very low. Therefore, it is of great practical significance to extend ECG monitoring from the bedside to the hospital to achieve real-time remote monitoring.

The rapid spread of the Internet, especially wireless networks, has led to the maturity of embedded technology applications. In addition, the importance of ECG monitoring for heart disease diagnosis also makes remote monitoring a reality.

This paper mainly studies and designs a practical portable mobile ECG monitoring system. Through the system, the patient's ECG signal can be wirelessly transmitted to the PC set in the hospital through the GPRS network anytime and anywhere, or the ECG data can be stored in the system first, and then the high-speed playback can be realized through the USB.

Overall design of the system

The portable mobile ECG monitoring system designed in this paper consists of three parts: ECG monitor, communication network and monitoring center (as shown in Figure 1). The working process is as follows:

Figure 1: Overall block diagram of a portable ECG monitoring system.
Figure 1: Overall block diagram of a portable ECG monitoring system.

The ECG monitor is carried by the patient, and the user's ECG data can be collected at any time through the adhesive electrode, amplified, filtered, A/D converted, and then stored in the serial flash memory. After storing the ECG data for a certain period of time, it can be wirelessly accessed via GPRS, and the data is transmitted to the host computer located in the monitoring center by using the wireless network. It can also be directly connected to the host computer via USB for local high-speed playback.

This article will focus on the design of the ECG monitor. Because it is a portable device, it must be designed to minimize power consumption, size, and cost. After repeated analysis and comparison, it was decided to use Z-World's industrial-grade control chip Rabbit3000 microprocessor as the main chip of the ECG monitor.

Although the Rabbit3000 is an 8-bit microprocessor, it has a memory space of 1M and a clock speed of 22M. It has a wealth of interface resources, a total of 40 parallel I / O line (shared with the serial port). In addition, the device consumes very little power, the processor clock can be driven by the 32.768KHz oscillator, and the main oscillator is powered down. At this point, the current is about 100μA, and the processor can still maintain the execution speed of 10,000 instructions per second.

System hardware design

In the overall hardware design, the Rabbit3000 high-performance microprocessor is the core, and the external interface is used to expand 512K parallel flash and 512K SRAM, the storage space reaches 1M, and the USB interface is extended. Serial Flash, A/D conversion and wireless module MC35 are extended with a serial interface. The following focuses on the hardware design of the wireless module and the USB module.

1. Wireless module MC35 hardware design

The wireless module is responsible for completing the wireless transmission of the ECG data. In order to achieve this function, the system uses the MC35 module of Siemens. This is Siemens' first GSM/GPRS module that supports GPRS. It is compact and easy to integrate into portable terminals. Through the serial port connection, the module is controlled and data transmitted using the AT command.

The MC35 module of Siemens has a 40-pin zero insertion force connector, which provides serial interface, audio interface, SIM interface, status pin, power interface and other interfaces through which the SIM card holder and antenna are connected. And the main controller is connected. The serial interfaces TXD0 and RXD0 of the MC35 are connected to the serial port B of the Rabbit3000, that is, pins TXB and RXB (PC4 and PC5) to implement communication with the MC35. The MC35's IGT pin is its enable pin and requires an open drain driver drive. The port E of the Rabbit3000 has a strong driving capability, so PE5 is selected as the startup control line of the MC35. There are power input pins, power output pins and charging pins in the MC35's power interface, where the charging pins can be used to charge the battery. The system is battery powered or externally charged. as shown in picture 2.

Two points to note when designing: This system uses battery power. Since the MC35 needs to provide 2A peak current in the uplink transmission, this will cause a sudden drop in voltage. Therefore, design a circuit with a large enough capacitance to prevent the voltage from dropping suddenly. In the design of the SIM card circuit, you need to pay attention to the problem of electromagnetic compatibility, otherwise it will affect the communication effect of the MC35, and even cause the MC35 to not work properly.

Figure 2: Hardware connection diagram of the MC35 module.
Figure 2: Hardware connection diagram of the MC35 module.

2. USB module hardware design

The USB module is responsible for the local high-speed playback of ECG data, which provides another means of data transmission. The usual serial port RS-232 uses only one line for data transmission, while the USB transmission uses the differential signals on the D+ and D- lines to transmit data with the host, which fully guarantees the reliability of data transmission. This system uses NXP's PDIUSBD12 for USB transmission.

PDIUSBD12 (hereinafter referred to as D12) is a cost-effective USB chip from NXP, which fully complies with the specifications of USB1.l. It is one of the most used chips on the USB1.1 protocol device. It is a pure USB interface chip that requires external microprocessor control.

This system uses the Rabbit3000 microprocessor to control the USB chip D12 to complete the USB transmission. At this time, D12 is a peripheral of the microcontroller. The data transmission between the D12 and the Rabbit3000 is realized by an 8-bit data line, that is, the D12 parallel port data lines D0-D7 are directly connected to the Rabbit3000 data lines D0-D7.

The INT_N pin of D12 is connected to the Rabbit3000 multiplexed pin INT0A as the external interrupt input of the Rabbit3000. When D12 needs to operate, an interrupt request is issued using the INT_N pin, and the Rabbit3000 immediately responds to the interrupt and operates on it. RD_N and WR_N of D12 are respectively connected to the IORD and IOWR of Rabbit3000 to control the direction of data transmission. The RESET_N of D12 is connected to the multiplexed pin PE4 of Rabbit3000. The Rabbit3000 can use this pin to send a low level to D12. After RESET_N is set low, D12 is automatically reset. CS_N of D12 is connected to the multiplexed pin PE7 of Rabbit3000, and this chip can be used to control chip selection. As shown in Figure 3.

Figure 3: PDIUSBD12 module hardware connection diagram.
Figure 3: PDIUSBD12 module hardware connection diagram.

D12 has two data bus modes: multi-address/data bus mode and single-address data bus mode. The system adopts a single address data bus mode, which connects the ALE of D12 to ground, and A0 is connected with the address bus A0 of Rabbit3000. Under the premise that the chip select signal is valid (ie PE7=0), when A0=1, the CPU sends a command to D12. When A0=0, the CPU writes data to D12 or reads data from D12. Therefore, address 0xE001 is the send command address, and address 0xE000 is the read/write data address.

System software design

Software design draws on the design ideas of software engineering. The layered and modular design approach is used to facilitate the organization, maintenance and upgrade of the code. Moreover, even if the hardware system platform is replaced later, most of the code can be reused. The overall structure of the software is shown in Figure 4. The following focuses on the software design of the wireless module and the USB module.

1. Wireless module software design

The wireless module MC35 is connected to the serial port B of the Rabbit3000, and sends an AT command to the MC35 through the serial port to perform dialing, setting, and the like.

The communication protocol between the MC35 and the gateway is PPP (Point-to-Point Protocol). The PPP protocol is a data link layer protocol based on the TCP/IP protocol stack. It is used to transmit data packets between two peer entities. Designed for simple connection, it is mainly used for WAN connection, but it can also be used in dial-up connection of LAN. The MC35 itself does not support the PPP protocol. To dial the Internet through the MC35, you must write a program to implement the PPP protocol, and also implement the TCP/IP protocol.

Initialize the MC35 module after booting. It should be noted that when initializing the MC35 module, it is necessary to give the IGT pin a low level and keep it for 120~140ms to complete the initialization operation. Then start the MC35 and log in to the Monternet gateway to establish a connection with the service provider.

After successful login, the MC35 has two working states: data transmission status and idle status. The MC35 typically has a current of 15mA in the idle state, and the MC35 also supports multiple sleep modes in the idle state. To reduce power consumption, the system has enabled the MC35's sleep function and is set to sleep mode 7. In this sleep mode, the current can be reduced to about 3 mA.

Figure 4: Overall structure of the ECG monitoring system software.
Figure 4: Overall structure of the ECG monitoring system software.

2. USB module software design

The USB interface is very simple and convenient for the user, but from the developer's point of view, the biggest drawback is that the complexity of the protocol is increased, which leads to the complexity of the USB design. USB software design includes three aspects: firmware design, driver design and host-side application design.

a. Firmware design

The firmware is the program code that is fixed in the microcontroller and can be designed in assembly language or C language. It runs on the microprocessor and is used to respond to host requests. That is, it completes the enumeration process and host communication with the USB controller. The USB protocol stipulates that any transmission process is initiated and controlled by the host. In the enumeration process, the host establishes a control transmission process through the default pipe of the endpoint 0 of the USB controller, and D12 responds to the request of the host, mainly sending a specific description. Characters (such as device descriptors, configuration descriptors, interface descriptors, endpoint descriptors, string descriptors, and vendor descriptors) are given to the host. The host learns the configuration and capabilities of the device from the obtained descriptors and completes the configuration of the USB device. After the enumeration process is finished, the host can transfer data with D12.

The firmware programming of this system is written in standard C language. When designing the firmware program, it should be noted that the interrupt output of D12 is level trigger, and the interrupt of Rabbit3000 is triggered by rising edge or falling edge. When designing the program, use the falling edge plus the delay to keep the low level for a while to achieve the same effect.

b. Driver design

In Windows, any communication with a USB peripheral must be driven by a device driver that makes it possible for applications to access hardware devices. The USB driver is written in hardware and is a core model. Microsoft's DDK provides a more detailed explanation in this regard.

c. Application design

This system uses VB to write the upper computer application. It is mainly responsible for realizing the reading of ECG data from the ECG monitor using the USB interface, and saving the ECG data to the database, while drawing the ECG waveform on the PC screen.

Summary of this article

The portable mobile ECG monitor developed in this paper can accurately depict the ECG waveform on the computer screen. It can be used as a clinical diagnosis basis by the doctors of the Second Affiliated Hospital of China Medical University. The system is practical and small. Economically convenient. The patient can monitor the heart in real time whenever and wherever possible, regardless of time and space. The wireless transmission function of the system can transmit the ECG data to the hospital for diagnosis in real time, which greatly improves the emergency efficiency.

EV Home Charger

Our EV home charger is cutting edge EV Charger designed to charge electric vehicles both at residential and commercial locations.

Brief overview:

  • Application: Our EV charger are used to recharge electric vehicles conveniently at home as residential EV chargers, allowing our customers to start their day with a full battery or top up as needed.

  • Type of our electric car charger for home:

    • Level 2 Chargers: Our chargers require a dedicated 240-volt circuit and offer significantly faster charging speeds compared to Level 1 chargers. They are the most common choice for residential EV charging.
  • Connectivity: Our modern home EV charging station come with Bluetooth and Wi-Fi connectivity, allowing users to monitor and control charging remotely through smartphone apps, providing convenience and enables users to take advantage of off-peak electricity rates.

  • Cost: The total cost of our electric car charger can be very competitive with high end quality assurance.

  • Benefits: Our EV Home Chargers offer several advantages, including the convenience of charging at home, cost savings compared to public charging stations, and the ability to start each day with a fully charged battery.

  • Environmental Impact: By charging at home,we can reduce our carbon footprint compared to using fossil fuels. Let's contribute to a cleaner environment together!

Ev Home Charger,Ac Ev Charger,Ev Charging Wall Box,Electric Car Charger

EMoreShare International Trade (Suzhou) Co., Ltd , https://www.emoreshare.com