An advanced physiological data logger for medical imaging applications
© Khan and Wahid; licensee Springer. 2012
Received: 8 August 2012
Accepted: 20 November 2012
Published: 26 December 2012
Skip to main content
© Khan and Wahid; licensee Springer. 2012
Received: 8 August 2012
Accepted: 20 November 2012
Published: 26 December 2012
The interest of physiological data sensing and recording using wireless body sensor network has increased in recent years due to the advancement of miniature and portable electronic devices. In this study, the design of a portable and rechargeable data logger with high data rate multiple wireless connectivity (Bluetooth and 2.4-GHz radio frequency) is discussed. The data are logged in micro secure digital (SD) cards and can be transferred to PC or Smartphone using SD card reader, USB interface, or Bluetooth wireless link. Analog signals can also be logged through an 8-channel analog-to-digital interface. A graphical LCD with touch screen is added for control and diagnosis. The hardware is generic and targeted for various medical imaging and data collection applications. The functionality of the prototype is later tested for wireless capsule endoscopy and skin temperature logging application.
Recent advances in miniature and portable bio-sensors, embedded processors, and wireless technologies have caused a rapid growth in sensing and recording physiological signals for medical applications. Bio-sensors convert body signals such as temperature, blood pressure, breathing , heartbeat [2–4], etc., to electrical signals to be processed, transmitted, and recorded in electronic devices . Data coming from implanted or external body sensors can be transmitted wirelessly to a portable and wearable data logger unit, thus giving the patient the freedom to do household works during continuous data recording without the hassle of cumbersome wired devices. After logging is completed, the data are transferred to a personal computer (PC) or Smartphone which may be later examined by physicians. In this article, a portable, battery-operated data logger unit having wireless connectivity with the bio-sensor is discussed. The design of the data logger is general and can be used for several medical applications. In this article, the prototype is demonstrated for video wireless capsule endoscopy (WCE)  and skin temperature logging application.
Several works are found in the literature related to data logging for medical applications. In , a data logger unit for storing galvanic skin response for autistic patients is discussed. The data logger receives data using RS232 interface and stores it in a 16-MB EEPROM. In , the design of a data logger is discussed for electrocardiogram (ECG) signals. The design converts the analog ECG signals to digital and stores them in 20-MB flash memory cards. An ECG signal data logger with custom-designed ASIC controller for multimedia card (MMC) is discussed in . In , a fetal and maternal heart beat signal recorder is discussed which detects signals using skin electrodes, converts them to digital, and stores in temporary SRAM for later transfer to PC by RS232 interface. A portable data logger with three body-fixed inertial sensors for monitoring the physical activities of Parkinson’s disease patients is proposed in . In , the design of a microcontroller-based portable data logger for medical application is described which contains three-electrode ECG circuit, three accelerometers, a pressure sensor, and a temperature sensor. The module can store data in 4-Mb flash memory in real-time or can send data to PC by a wired serial interface. A low power and small size design of an ECG signal recorder is described in  for the purpose of long-term portable recording. Data are stored in secure digital (SD) card and can be transferred to PC by an isolated RS232 interface. In , fetal movements are recorded continuously on several pregnant patients using fetal movement acceleration measurement recorder to study its suitability in long-term home monitoring application. The work in  presents an IP core for FPGA-based ECG data transmission using wired telephone line through modem interface. Note that, the above-discussed data loggers receive data from body sensors using wired connections which is not comfortable for patients. In , a microcontroller-based data logger is implemented by using a four-channel analog-to-digital converter (ADC) to measure sweat activity. Data are stored in an EEPROM with the capability of storing data for over 2 days when one measurement is taken per minute. An RF transceiver is used to export the data to a monitoring host PC. A wireless data logger for recording human movements is discussed in ; however, the data logger is not portable as it takes power from house AC line supply, thus restricts the patient’s movement near to the data logger. In , an ARM microcontroller-based wearable heart rate monitor system is described. It gathers ECE data and sends the data to a nearby PC wirelessly using Bluetooth. It does not have internal storage memory and thus the patient’s movements are restricted near the host PC. In , a Java2-based software for cell phone is developed to store laboratory data, such as blood pressure, blood urea nitrogen, creatinine, Hb A1c (glycosylated hemoglobin), and other pertinent comments, into a cell phone memory. However, the cell phone does not have any sensor connected with it for automatic data acquisition.
In order to make an advanced data logger that is useful to various medical image and video application, we consider the following design requirements.
The data logger must have both wired and wireless input connectivity so that it can be connected with various in-body sensors. For example, for accelerometer or heart monitoring system, it uses wired analog interface, whereas for applications like WCE, it uses wireless RF interface.
The logger must consume low power so that the battery runs for longer time. For example, in WCE, it must run continuously for at least 10 h.
The data rate of the wireless transceiver and the writing speed of the data logger must be high enough to support storing color video. For example, for QVGA resolution at 2 FPS and 80% CR, the required data rate of the wireless transceiver is at least 720 kbps. The writing speed in storage memory must be higher than 90 kB/s in this case.
The data logger should be able to communicate with the bio-sensor in real-time during logging and control various features of the sensor, such as, changing image resolution, data rate, data types, etc. The interface used for this interactive control operation must be easy to use.
Real-time viewing (RTV) of the data (i.e., images, charts, etc.) is another important feature. It will assist a physician performing diagnosis in real-time.
After data logging is completed, there must be easy and fast way to transfer the data to workstation PC or Smartphone for diagnostics. As a result, we propose to have multiple wired and wireless output (or transfer) connectivity such as, USB interface, micro SD, and Bluetooth.
To be wearable and easily portable, the physical size and weight of the data logger must be as less as possible.
To enable RTV of images, graphs, charts, texts, etc., during data logging, a 2.4″ graphical LCD  capable of displaying 320 × 240 pixels (QVGA) using 262,144 colors is chosen. The display also contains resistive touch area, enabling advanced and interactive user interface. The LCD connects with the MCU using hardware USART and it receives command from the MCU at a baud rate of 2 Mbps.
Comparison of different permanent memory storage device
Comparison of different wireless transceivers
A Bluetooth transceiver  is also connected with the MCU using hardware USART at 230-kbps baud. Data transmitted from wireless body sensor can be captured either by Nordic or by Bluetooth in the data logger and then can be uploaded wirelessly to personal computer or Smartphone using Bluetooth.
Analog data can also be taken in the data logger using the wired analog interface. The analog interface consists of multiplexed eight programmable ADC channels, eight analog comparators, and two digital-to-analog converter channels of the microcontroller. Analog data such as body temperature, blood pressure can be taken using the ADC channels and then the data can be saved in SD card and its real-time graphical plot can be displayed on LCD.
As the power source of the data logger, three 3.7V polymer lithium-ion battery, each having 2000-mAh rating are used in parallel, thus making total battery rating of 6000-mAh. The design also contains a 200-mA having 3.3–V output voltage boost converter  and an under voltage protection of 2.6 V. A 500-mA constant current battery charging circuit  using PC’s USB port is also included in the design so that recharging can be done without removing the batteries from the hardware. To indicate and monitor the charging level, the battery voltage is sampled using a potentiometer and fed to an ADC channel of the microcontroller.
To interact with the user, the design contains four push button switches. The button press is signaled to the MCU as interrupt. A buzzer is included in the design to generate small beep sounds.
The driver layer consists of low-level firmware for accessing different hardware peripherals. They are briefly described below.
The driver for graphical LCD contains functions for initializing the LCD, drawing pixels at any position by providing the co-ordinate and color information, setting background color and brightness, taking the LCD in low-power sleep and wake-up modes, etc. The touch screen driver functions provide the co-ordinate when a touch is made on the screen.
When any of the four keys (Up, Down, Enter, and Escape) is pressed, the program jumps to its corresponding interrupt routine and sets a flag for that particular key. By executing a get_key () function, the last key pressed is detected by reading the flags.
It contains functions for reading and writing data to the configuration registers of Nordic RF module using SPI, setting the RF module as transmitter or receiver, flashing, and checking the status of internal Fast in, Fast out (FIFO) buffers, sending and receiving data packets to/from other RF module, taking the module to power down and up mode, etc.
These functions initialize the Bluetooth device as slave, connect with nearby Bluetooth master devices (such as Smartphone or PC) when request is made, then send and receive data to/from master Bluetooth device using USART. It also contains functions to take the module in low-power sleep and wake-up modes.
To generate a “beep” sound, square pulses of 1 kHz are sent for the duration of 500 ms to the buzzer.
It contains functions for checking whether any SD card is present in the slot, selecting and initializing the SD card, checking the available memory space, etc. A DOS for embedded system  is implemented which handles file operations. Using DOS, data files can be created, read, written, and deleted. The DOS implements FAT16 file system and the maximum writing speed in SD card is found to be 115 kB/s when the MCU is running at 32 MHz.
This driver sends and receives data to/from PC. Data are transferred from the MCU using USART protocol and through an RS232-USB converter chip, data are packed according to USB protocol to transmit to PC through USB port.
It configures the ADC resolutions (such as 8, 10, 12 bit), reference voltage, channel gain, etc. It provides functions using which the corresponding digital data of an analog channel can be read and processed. It also contains functions to check battery voltages in the Power Supply module.
This layer contains the firmware designed for a specific data logging application. The proposed data logger is generic that encompasses many different medical applications such as ECG, heartbeat, capsule endoscopy, blood pressure, etc. In this study, we have implemented the firmware for capsule endoscopy application .
In capsule endoscopy, image data are transmitted wirelessly from the ingested capsule in compressed form. Our proposed compression algorithm consists of a novel color space, YEF , which is designed by analyzing the unique properties of endoscopic images for better compression. After converting RGB pixels to YEF color space, the compressor takes the difference of consecutive pixels (left pixel prediction) and then encodes the differences in variable length coding such as in Golomb-rice code. Based on the nature of endoscopic images, several sub-sampling schemes (such as YEF812) on the chrominance (E and F) components are applied. YEF812 sub-sampling means Y is not sub-sampled, E is sub-sampled after every 8 pixels, and V is sub-sampled after every 4 pixels. The sub-sampling is performed in horizontal direction only. A customized corner clipping scheme is also implemented to remove uninteresting corner area of the image to increase CR . The proposed algorithm works in raster scan fashion and can directly be interfaced with commercial image sensors, eliminating the need of buffer memory. The compressor has an average CR of 80.4% and reconstructed image quality have peak signal-to-noise ratio (PSNR) index of about 43 dB.
After data logging, data can be uploaded to PC or Smartphone using any of the following three methods: (1) by removing the SD cards from data logger, (2) using USB interface, and/or (3) using wireless Bluetooth link. When using USB or Bluetooth link, a file transfer protocol is implemented which sends at first the filename, then the file size, and then its data bytes. A PC software is developed to receive the data from the data logger by USB or by Bluetooth. After receiving compressed data, the PC software can decode and display the images as video at any given FPS.
From Figure 13, we see that several retries are required from 2.4 to 2.48 GHz channels due to interference in different environments. So, we have decided to operate the transceiver in a clear channel at 2.5 GHz which will cause minimum number of retries during data transmission. Note that, the Bluetooth device will not have any interference effect on Nordic transceiver as they work in a mutually exclusive way.
The data logger will go to channel selection mode after a configurable time (for instance, every after 30 min) or by user at anytime from selecting a menu option.
The data logger will send a command to the bio-sensor to set its transceiver at the first channel and the data logger will also set its transceiver to the first channel. Then the data logger will send some data-packets to the bio-sensor and log the number of retry required for that channel. This step will be done for all the available channels (in Nordic transceiver, a total of 126 channels starting from 2.4 to 2.526 GHz are available).
Then the channel which has minimum retries will be selected and the data logger will send a command containing the channel number to the bio-sensor so that both data logger and bio-sensor communicates at the same channel.
Power consumption in different modes
Power (mW) @ 3.3 V
Data logging in SD card
Data transfer to PC
Using SD card reader
Comparison with other data loggers
Sampling rate (writings speed)
Battery life (hour)
192 k pixel/sc (115 kbps)
2 Mbps link and Bluetooth
The medical implantable communication service (MICS) compatible RF transceiver, which works at 402–405 MHz frequency, is the most suitable for transmitting data through the human body . However, the MICS RF transceiver vendor, Zarlink , sells a low data rate (effective data rate around 500 kpbs ) transceiver (ZL70102) which is not sufficient even for 2 FPS capsule endoscopy application. Zarlink has a custom transceiver (ZL70081) having a data rate of 2.7 Mbps which is not available for public purchase. So, we used the RF transceiver by Nordic , which works at 2.4 GHz frequency band and having a data rate of 2 Mbps. However, the effective data rate with minimum header information is 1.68 Mbps. The studies in [37, 38] show that 2.4 GHz transceivers, such as Nordic, can effectively be used to get data wirelessly through animal body.
In this design, the Nordic transceiver was configured in auto acknowledgement mode. In auto acknowledge mode, after receiving a data packet, the receiver checks the CRC bits and detects whether there was any error during the transmission of the packet. If there was any error, then it requests the transmitter to resend the data packet again. This process goes on until the packet is transmitted successfully. So, in auto acknowledgement mode, no data loss happens, though the number of retries will decrease the overall data rate or application throughput. If the receiver is unable to detect error using CRC, then depending upon which bits get corrupted, the reconstructed image will have different distortions. The image compression algorithm [32, 33] used here is line-based differential coding (i.e., works row-by-row in raster scan fashion). In some cases, one row (or part of a row) of the image pixels may get corrupted if undetectable errors occurs in data packets. In worst case, the entire image frame may get corrupted.
Commercial capsule endoscopy products  such as PillCam SB, EndoCapsule, and MiroCam send images of size 256 × 256, 256 × 256, and 320 × 320, respectively. VGA (640 × 480) images are difficult to sent at 2 FPS because it requires very high data rate custom design RF transmitter. Though, some research works are available in the literature [39, 40] on high data rate (as high as 15 Mbps) transmitter for capsule endoscopy, however, they are not commercially available yet. So, the bottleneck of sending VGA images at 2 FPS is the RF transmitter. However, VGA images can be sent at lower FPS using the limited available bandwidth of the commercially available RF transmitters. In order to send VGA color images at 1 FPS, having 80% CR for 10 h, the memory space, the RF data rate, and the writing speed should be at least 6.2 GB, 1440 kbps, and 180 kB/s, respectively. To increase the size of memory capacity, the number of SD cards as shown in Figure 4 can be increased to more than 2. The MISO, MOSI, and SCK pins of the additional SD cards will be connected directly with the MCU’s MISO, MOSI, and SCK pins and extra SS pin from the MCU needs to connect with the additional SD cards SS pins. Moreover, memory capacity can be also increased without changing any hardware design. Secure Digital High Capacity (SDHC) cards can be used instead of SD cards which have a capacity of 32 GB and have higher writing speed than SD cards . In order to read/write data in SDHC, FAT32 file system needs to be implemented in the firmware instead of FAT16.
Engineering cost of the data logger
Time required (hours)
Number of personnel
Researcher (graduate student)
Specification and system design
Embedded system engineer (or similar)
Purchasing components, tools, and compilers
Prototyping, debugging, and testing
PCB design and testing
Manufacturing cost of the data logger
Hardware components (LCD, MCU, RF unit, Bluetooth unit, misc)
Programmer unit (one-time cost)
A small size FPGA-based capsule prototype is now under development where a novel image compression algorithm proposed in [32, 33] is implemented. After the final capsule prototype is developed, it will be inserted in pigs intestine  due to its relatively similar gastrointestinal functions in comparison to human and live images will be captured for more rigorous animal testing.
Testing the data logger with capsule endoscopy prototype in several human patients faces several challenges. A number of capsule prototypes need to be manufactured which requires significant amount of time, money, and human resource. Then the permission from Food and Drug Administration  needs to be taken for swallowing the prototype capsules in human. Moreover, it requires approval from hospital, managing a number of patients having gastrointestinal diseases, and involvement of gastroenterologist to evaluate the performance  and measuring the accuracy of their decision (fraction of correct decisions, false positives, false negatives, etc.) using statistical tools such as receiver operating characteristics analysis . These tasks are beyond the scope of the article and left for future exploration.
In this article, the design of a microcontroller-based portable data logger is presented that is targeted for general medical imaging and data collection application. It has high data rate wireless connectivity including Bluetooth, graphical display for real-time data viewing with state-of-the-art touch screen technology. The data are logged in micro SD cards and can be transferred to PC or Smartphone using card reader, USB interface, or Bluetooth wireless link. The features of the prototype are demonstrated for a WCE and skin temperature logging application.
This study was supported by the Natural Science and Engineering Research Council of Canada (NSERC) and the Canada Foundation for Innovation (CFI). The authors would like to give thanks to Mohammad Shamim Imtiaz for helping in collecting data from hospital environment and to Serge Nazerenko for his technical assistance in making the prototype.
This article is published under license to BioMed Central Ltd. This is an Open Access article distributed under the terms of the Creative Commons Attribution License (http://creativecommons.org/licenses/by/2.0), which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.