Chapter 2. Integration of the distributed data server with the. vital sign meter

Similar documents
Downloaded from Elcodis.com electronic components distributor

CONTENTS. dspicpro4 KEY FEATURES 4 CONNECTING THE SYSTEM 5 INTRODUCTION 6

EasyPIC5 Development System

Embedded Systems Lab Lab 1 Introduction to Microcontrollers Eng. Dalia A. Awad

BIGdsPIC6. Development System. User manual

Manual of Board ET-PIC STAMP 18F8722-K22 ET-PIC STAMP 18F8722-K22

SBC44EC. Single board computer for 44 pin PLCC PICs

Display Real Time Clock (RTC) On LCD. Version 1.2. Aug Cytron Technologies Sdn. Bhd.

Mega128-Net Mega128-Net Mega128 AVR Boot Loader Mega128-Net

CONTENTS BIGAVR2 KEY FEATURES 4 CONNECTING THE SYSTEM 5 INTRODUCTION 6

Mega128-DEVelopment Board Progressive Resources LLC 4105 Vincennes Road Indianapolis, IN (317) (317) FAX

Figure 1.1: Some embedded device. In this course we shall learn microcontroller and FPGA based embedded system.

Variable Power Supply Digital Control Circuit Diagram Using Lm317

ET-PIC 24 WEB-V1. o Central Processing Unit (CPU) o System. o nanowatt Power Managed Modes. o Analog Features

MT2 Introduction Embedded Systems. MT2.1 Mechatronic systems

Lecture Objectives. Introduction to Computing Chapter 0. Topics. Numbering Systems 04/09/2017

BIG8051. Development system. User manual

DEVBOARD3 DATASHEET. 10Mbits Ethernet & SD card Development Board PIC18F67J60 MICROCHIP

Arduino Uno R3 INTRODUCTION

PVK40. User's manual. Feature Rich Development and Educational Kit for 40-pin Microchip PIC microcontrollers

SBC65EC. Ethernet enabled Single Board Computer

BSCB-2 BASIC STAMP CARRIER BOARD

Infineon C167CR microcontroller, 256 kb external. RAM and 256 kb external (Flash) EEPROM. - Small single-board computer (SBC) with an

Bolt 18F2550 System Hardware Manual

GPRS based SCADA implementation for multisensory security with SMS alerts.

Introduction to Microcontroller Apps for Amateur Radio Projects Using the HamStack Platform.

RFID: Read and Display V2010. Version 1.1. Sept Cytron Technologies Sdn. Bhd.

DEV-1 HamStack Development Board

eip-24/100 Embedded TCP/IP 10/100-BaseT Network Module Features Description Applications

BANGLADESH UNIVERSITY OF ENGINEERING & TECHNOLOGY (BUET) DHAKA TECHNICAL SPECIFICATION FOR SUPPLY AND INSTALLATION OF LABORATORY EQUIPMENTS (PKG1).

Circuit Diagram For Water Level Controller Using 8051 Microcontroller With Pin Configuration

Pic-Microcontroller Based Fully-Automatic Blood Pressure Monitor With Gsm Communication

MicroProcessor. MicroProcessor. MicroProcessor. MicroProcessor

JED MICROPROCESSORS PTY LTD

MICROCONTROLLER BASED LPG GAS DETECTOR USING GSM MODULE

Digital Circuits Part 2 - Communication

Linux Kernel Hacking Free Course, 3rd edition. HWMPS: Hardware Monitor & Protection System

Homework 5: Theory of Operation and Hardware Design Narrative Due: Friday, February 15, at NOON

DATA LOGGER SYSTEM. DMGOI, Kagal, Maharashtra, India

EasyAVR6 Development System

Ali Karimpour Associate Professor Ferdowsi University of Mashhad

EEE394 Microprocessor and Microcontroller Laboratory Lab #6

Architecture of Computers and Parallel Systems Part 6: Microcomputers

8051 Microcontroller

FIFTH SEMESTER DIPLOMA EXAMINATION IN ENGINEERING/ TECHNOLOGY-MARCH 2014 EMBEDDED SYSTEMS (Common for CT,CM) [Time: 3 hours] (Maximum marks : 100)

Ali Karimpour Associate Professor Ferdowsi University of Mashhad

SECURE DIGITAL ACCESS SYSTEM USING IBUTTON

ARDUINO UNO REV3 SMD Code: A The board everybody gets started with, based on the ATmega328 (SMD).

If It s Electronic, It Needs a Clock

To be familiar with the USART (RS-232) protocol. To be familiar with one type of internal storage system in PIC (EEPROM).

Lecture (02) PIC16F84 (I)

eip-10 Embedded TCP/IP 10-BaseT Network Module Features Description Applications

MICROCONTROLLER BASED SMART FAN SYSTEM

The industrial technology is rapidly moving towards ARM based solutions. Keeping this in mind, we are providing a Embedded ARM Training Suite.

Microcontroller. BV523 32bit Microcontroller. Product specification. Jun 2011 V0.a. ByVac Page 1 of 8

Controlling and Monitoring Of Industrial Parameters by Using GSM

ericssonz LBI-38616B MAINTENANCE MANUAL FOR MTD TM SERIES AND DATA RADIO LOGIC BOARD 19D902151G3 DESCRIPTION CIRCUIT ANALYSIS TABLE OF CONTENTS

PICado Alpha Development Board V1.0

CareVital Telehealth Solutions

PIC Microcontroller Introduction

Modules For Six Months Industrial Training On WIRELESS EMBEDDED SYSTEM DESIGN

Parallel-to-Serial and Serial-to-Parallel Converters

CHAPTER 1 Introduction of the tnano Board CHAPTER 2 tnano Board Architecture CHAPTER 3 Using the tnano Board... 8

Introducing: New Low-Cost & Low Pin Count PIC Microcontrollers for the 8-, 16- & 32-bit Markets

Lab 1 Introduction to Microcontroller

ARDUINO LEONARDO WITH HEADERS Code: A000057

Programming in the MAXQ environment

AX-12. PIC12F675 microcontroller Activity board

ICP05 IBOARD LITE ICP05. - iboard lite

An Arduino Controlled 1 Hz to 60 MHz Signal Generator

PC87435 Enhanced IPMI Baseboard Management Controller

RF4431 wireless transceiver module

Application Note. Energy Meter LAN Interface

PXA270 EPIC Computer with Power Over Ethernet & Six Serial Protocols SBC4670

DATA LOGGER GEOLOGGER G8 PLUS

Table 1 Brief Specifications

SBC45EC. Single board computer for 44 pin PLCC PICs

ARDUINO MICRO WITHOUT HEADERS Code: A000093

8051 Microcontroller memory Organization and its Applications

ECE 189A Senior Capstone December 16, 2014 Team Leader: Will Miller Charles Crain, Isaac Flores, Brian Phan, Sarah Pilkington

LIN bus board datasheet EB

Table of Contents. Introductory Material

Project Final Report Internet Ready Refrigerator Inventory Control System

DS1306. Serial Alarm Real Time Clock (RTC)

ARM 11 Based Industrial Dust Cleaner Using High Voltage Pulse Power Supply

Professional Radio GM Series. Controlhead Service Information

Manual of Board ET-ESP32 RS485

Easy Kit Board Manual

HDMI and Ethernet Extender via 2 Multimode Fibers LC Duplex Connector Extends HDMI+ 10/100M Ethernet Link Up To 800 Meters

CM5000 DATASHEET v0.1

melabs Serial LCD Firmware Version 1.0 2/7/07

SK18A. 18 Pins PIC START-UP KIT. User s Manual V1.1. Dec 2007

Exclusive 2.5 GHz Frequency Counter

keyestudio Keyestudio MEGA 2560 R3 Board

AC : DESIGN OF DATA ACQUISITION SYSTEM FOR COMPUTER ENGINEERING EDUCATION

MicroBolt. Microcomputer/Controller Featuring the Philips LPC2106 FEATURES

Renesas 78K/78K0R/RL78 Family In-Circuit Emulation

ZigBee Compliant Platform 2.4G RF Low Power Transceiver Module for IEEE Standard. DATA SHEET Version B

ARDUINO LEONARDO ETH Code: A000022

PIC-I/O Multifunction I/O Controller

Transcription:

Author: Kai-Wen Kan (2006-10-30); recommendation: Yeh-Liang Hsu (2007-10-31). Note: This article is Chapter 2 of Kai-Wen Kan s Master thesis Development and evaluation of a home telehealth system for diabetic patients. Chapter 2. Integration of the distributed data server with the vital sign meter This chapter describes the integration of the Distributed Data Server (DDS) with the vital sign meter. 2.1 Distributed Data Server The Distributed Data Server consists of a PIC_ SERVER v3 and a standard peripheral application board (PAB). 2.1.1 PIC_Server v3 As shown in Figure 2.1, the PIC_SERVER v3 is based upon three components: a microcontroller, an Ethernet controller, and an EEPROM chip. The major features of the three components are described below: 1

Microcontroller Ethernet controller EEPROM Figure 2.1 PIC_SERVER v3 (1) Microcontroller The PIC18F6X2X series from Microchip Technology Inc. is used for the microcontroller of the PIC_SERVER v3. The PIC18F6X2X series, which includes PIC18F6527, PIC18F6621, PIC18F6622, PIC18F6627 and PIC18F6722, is available in 64-pined Thin Quad FlatPack (TQFP). The PIC18F6X2X has two RS-232 serial channels, 54 I/O pins, 12 channels for 10 bit A/D conversion, 3,936 bytes SRAM, and 128K bytes Flash ROM for programming. Table 2.1 lists the major specifications of PIC18F6722. 2

Table 2.1 Specifications of PIC18F6722 Package 64-pin TQFP Size(L W H, mm) 12 12 1.1 Program Memory Flash 128K (bytes) Single-Word Instructions 65536 DATA Memory (bytes) SRAM 3936 EEPROM 512 I/O pins 54 10 bit A/D (ch) 12 CCP/ECCP (PWM) 2/3 Timers 8/16-bit 2/3 (2) Ethernet controller The RTL8019AS Ethernet controller from Realtek Semiconductor Corp. is a full-duplex Ethernet controller with plug-and-play function. It supports the standard of Ethernet II and IEEE802.3 and has 16K byte SRAM built in. (3) EEPROM The 24LC512 EEPROM from Microchip Technology Inc. is a 64K 8 (512 Kbit) Serial Electrically Erasable PROM, capable of operation across a broad voltage range (1.8V to 5.5V). The webpage of the DDS is stored in the 24LC512 EEPROM. 2.1.2 The peripheral application board The PIC_SERVER v3 is a controller module with Internet capability. With power supplied externally, it operates as an independent web server. As shown in Figure 2.2, the purpose of the PAB is to provide an expanded platform to the PIC_SERVER v3 for data acquisition, processing and storage. By combining the PIC_SERVER v3 with the PAB, the DDS becomes the core component in the PTMS structure. There are four major sections on the PAB, which are: power, storage, a real-time clock (RTC), and a RS-232 converter. The major features of the four sections are described below: 3

LM2930 LM2940 RS-232 MMC RS-232 RTC Battery Figure 2.2 Peripheral application board (1) Power The power section shown in Figure 2.2 uses three low voltage regulators (LM2940/LM3940). Two LM2940 voltage regulators generate stable +5V DC power output from 6.25V up to 26V DC input. One is for the main ICs (including the PIC_SERVER v3) and the other is for a LCD backlight. A voltage of 3.3V power from a LM3940 voltage regulator is provided for the Multi Media Card (MMC). (2) Storage The Multi Media Card (MMC) is a standard flash memory card. The MMC is about the size of a postage stamp: 24 mm 32 mm 1.5 mm. An MMC card is used for storing media within the DDS, in a form that can be accessed by the DDS. The voltage requirement for MMC operation is 3.3V from a LM3940 voltage regulator. The storage capacity of the MMC ranges from 16Mb to 512Mb. (3) Real-time clock The Dallas DS1302 used as a time recorder for the DDS is a real-time clock (RTC) operated via a 32K oscillator and low voltage power. The PAB supports two 4

kinds of the power voltage: +5V from the voltage regulator and +3V from a battery connected to it. If the +5V power voltage is shut down, the battery still provides power to the RTC to avoid data storage errors. (4) RS-232 converter MAX232 is a dual driver/receiver that includes a capacitive voltage generator to supply EIA-232 voltage levels from a single 5-V supply. Each receiver converts EIA-232 inputs to 5-V TTL/CMOS levels for the PIC_SERVER v3. These receivers have a typical threshold of 1.3 V and a typical hysteresis of 0.5 V, and can accept ±30-V inputs. Each driver converts TTL/CMOS input levels for the PIC_SERVER v3 into EIA-232 levels. 2.2 Integration of DDS with the vital sign meter This section describes the hardware specifications of the vital sign meter, the integration of the DDS with the vital sign meter, and the flow chart of measurement results, retrieval, and storage. The event driven device and the storage format in the DDS are also presented. 2.2.1 Specifications of TaiDoc TD-3250 This study uses TaiDoc TD-3250 (Figure 2.3), which is a 2-in-1 blood glucose and pressure meter certificated and approved by the Food and Drug Administration (FDA) as a vital sign meter. TaiDoc TD-3250 is compact in size and easy to use. Another advantage of TaiDoc TD-3250 is that it contains memory space for recording up to 352 measurement data and a RS-232 serial port for data transmission. Table 2.2 lists the major specifications of TaiDoc TD-3250. 5

1 6 2 3 5 4 1. BP/BG Meter 2. Pressure Cuff 3. Lancet Device 4. Lancets 5. Test Strips 6. Strips Box Figure 2.3 Parts of TaiDoc TD-3250 set Table 2.2 Specifications of TaiDoc TD-3250 Model TaiDoc TD-3250 Power source Four AAA batteries Size(L W H, mm) 76 60 30 Display Liquid crystal display with 4x32 segment Memory 352 measurement results with date and time Operating temperature From 10 C to 40 C Blood pressure function Blood glucose function Pressure range Heart rate Ketone warning Strip linear range 30~280mmHg 40~200per minute >240mg/dl 20~600mg/dl TaiDoc supports a management interface for users to download measurement results from the TD-3250 and to edit them. Figure 2.4 shows a sample of downloading results from the TD-3250. The information related to blood pressure and blood glucose is divided into two tab layers. Those layers include measurement data, systolic blood pressure, diastolic blood pressure, heart rate, and blood glucose. The management interface also provides databases for users to manage and edit measurement results for different patients, as shown in Figure 2.5. 6

Figure 2.4 Downloading results Figure 2.5 Patient database 7

2.2.2 Hardware connection Both TaiDoc TD-3250 and the DDS support EIA RS-232 serial interface standard for data transmission. A standard 2.5mm stereo audio cable is used to connect TD-3250 to the DDS to transfer/receive data (Figure 2.6). The DDS has dual RS-232 driver/receiver ports: COMA and COMB; COMB is used as a connector to link TD-3250 for data transmission. 3 1. BP/BG Meter 2. DDS 3. Connection Cable 1 2 Figure 2.6 Portable vital sign data recorder Figure 2.7 shows the connection cable between TD-3250 and the DDS. The left half of Figure 2.7 displays the RS-232 connector for the TD-3250 which is a standard 2.5mm stereo audio connector. Pin 1 of the audio connector is defined as the signal ground, pin 2 is defined as the transmitter port, and the pin 3 is defined as receiver port. The right half of Figure 2.7 displays the RS-232 connector for the DDS, which is a standard R-J11 connector. Pin 1 and 6 are obsolete, pin 2 is defined as transmitter port, pins 3 and 4 are defined as signal ground, and pin 5 is defined as receiver port. 8

1 2 3 3 1 2 Rx GND Tx Front 1 2 3 4 5 6 Tx Rx GND The connector of the TD-3250 The connection of the DDS Figure 2.7 Electrical connections between TD-3250 and the DDS 2.2.3 Data retrieval and storage Figure 2.8 displays a flow chart of data retrieval and storage. Figure 2.9 shows the main program for data retrieval and storage. The details are described as follows: 9

Trigger to read Check Connect Check_connect( ) Yes Read index of the results Function: READ_MEMO( ) No Break Read data in order Read memory data Function: READ_DATA( i, j ) Judge vital sign type and time information Function: device_judgment( ) / storage_time( ) Store result in MMC Function: MMC_Write( ) Data judgment Function: data_judgment( ) No Is counter(j) equal to index? Yes Out of setting range? No Clear memory space Function: delete_data( ) Yes Send SMS Function: I2C_W( ) Finish read Figure 2.8 The flow chart of data retrieval and storage 10

Figure 2.9 Main program of data retrieval and storage (1) Connection checking and retrieval of memory index The DDS is triggered to read the measurement results of the TD-3250 by the push of a button, First it executes a sub function (line 181 in Figure 2.9) to check the connection between the two devices. The sub function for checking the connection is shown in Figure 2.10. Line 73 contains the command that the DDS sends to TD3250, and the hex code 0xA5 from line 81 is an ending code that TD3250 returns back. If the DDS does not recieve the ending code, it means that the connection has failed. At this time, the DDS does not continue with regular functioning, and the loop breaks. If the connection is successful, the DDS executes another sub function (line 185 in Figure 2.9) to request the index for all the measurement data stored in TD-3250. The sub function of reading the index number is shown in Figure 2.11. Line 94 is the command that the DDS sends to TD3250 and the hex code 0xA5 in line 103 is an ending code that TD3250 returns back. 11

Figure 2.10 Sub function of checking the connection Figure 2.11 Sub function of reading the index number (2) Retrieval of measurement data and judgment of device type After the DDS receives the index number, it executes a sub function (line 193 in Figure 2.9) to read the measurement data stored in TD-3250 in order. Figure 2.12 shows the sub function of reading storage data. Lines 54 and 55 are the commands for reading and the calculation of memory placed with a different index. In line 62, the DDS receives the measurement data from TD-3250 and puts it into a buffer (READ_buffer). After the DDS receives the measurement data, it executes two sub functions (line 198 and 200 in Figure 2.9) to judge the type of the data (blood pressure or blood glucose), and to decode the storage date. Figure 2.13 shows these two sub functions. 12

Figure 2.12 Sub function of reading storage data Figure 2.13 Sub function of device judgment and date decoding (3) Data storage, event alert and memory clean After the DDS finishes the sub function of device judgment, it executes another two sub functions (line 201 and 202 in Figure 2.9) to write the measurement data to the MMC, and to evaluate the measurement data. The sub functions of data storage and data evaluation are shown in Figure 2.14 and Figure 2.15. The measurement data is stored by year and month. Details of the data format are described in Section 2.2.5. If measurement 13

data is out of setting range, then the parameter local_action (line 202 in Figure 2.9) is set to 1 (otherwise the parameter is set to 0). A counter i (line 188 in Figure 2.9) is used to keep track of the number of data sets received. The loop breaks when the counter equals the index, as shown in the flows chart in Figure 2.8. After the DDS finishes the loop for data retrieval and storage, the parameter local_action is set to 1. The DDS then executes a sub function for the Event Driven Device (EDD) to send an alarm message to the caregiver or doctor. The sub function of event trigger is shown in Figure 2.16. A detailed description of the EDD is presented in Section 2.2.4. At last, the DDS executes a sub function (Figure 2.17) to clean the memory of TD-3250. Figure 2.14 Sub function of data storage 14

Figure 2.15 Sub function of data evaluation Figure 2.16 Sub function of event trigger 15

Figure 2.17 Sub function of memory clean 2.2.4 Event driven device In this study, the EDD is a wireless transmission device that transmits text messages via public equipment. When the alert occurs, such as an out of range measurement result, the DDS prompts the EDD to send a short message to a specific person (caregiver or doctor) via the I2C interface. The EDD consists of a Global System Mobile (GSM) and a control unit. The control unit consists of a PIC18F452 microchip and a MAX232 converter. Figure 2.18 shows the overall architecture. Figure 2.19 and Figure 2.20 show the circuit schematics of the control unit. The core of control unit is the PIC18F452 which combines with other electric components including resistors, capacitors, a crystal oscillator, an LED and a MAX232 converter. The PIC18F452 receives commands (the sub function of I2C_W()) from the DDS via the I2C interface, and prompts the GSM to send a short message via RS-232 interface. The standard voltage of RS-232 interface is 12V, but the PIC18F452 only supports the TTL voltage of 5V. An A MAX232 converter is used to raise the TTL voltage of the PIC18F452 from 5V to 12V, the circuit schematic is shown in Figure 2.20. 16

I2C DDS PIC18F452 TTL MAX232 RS232 GSM EDD Figure 2.18 Architecture of EDD Figure 2.19 Schematic I (PIC18F452) 17

Figure 2.20 Schematic II (MAX232 converter) 2.2.5 MMC data format All storage media needs an efficient data structure system. The File Allocation Table (FAT) is one data structure used to manage media data in a storage device. Currently there are three FAT file system types: FAT12, FAT16 and FAT32. FAT16 for the MMC is used in the DDS. In this study, a 128MB MMC is used to store the measurement of VSP. The file type used in the DDS is a text file. Table 2.3 lists the data structure in a text file. Figure 2.21 shows the file structure in the MMC. A month s worth of data is stored in a text file; the title of the text file is named by the corresponding month. The text files for all 12 months are stored in a folder; the title of the folder is named by the corresponding year. Table 2.3 The data structure of a month text file Day Time Device Type Measurement results A Systolic pressure Diastolic pressure Heart rate 1. Day: from 1 to 31 2. Time: for example 14:30 3. Device type: A: Blood pressure and heart rate B: Blood glucose B Blood glucose 18

Figure 2.21 The file structure in the MMC 19