Heart Alert

24
Wireless Heart Rate Monitor

description

Wireless Heart Rate Monitor. Heart Alert. On-Person Unit MC13213 (HCS08). 16 MHz Bus Frequency On Chip Resources 60K of Flash 4K of RAM Require Resources 15K of Flash 2K of RAM Timeslice Kernel Period: 50 ms. On-Person Unit Tasks. Start Task Waitforslice Task Timer Task - PowerPoint PPT Presentation

Transcript of Heart Alert

Wireless Heart Rate Monitor

On-Person Unit MC13213 (HCS08)

16 MHz Bus Frequency On Chip Resources

60K of Flash4K of RAM

Require Resources15K of Flash2K of RAM

Timeslice KernelPeriod: 50 ms

On-Person UnitTasks

Start Task Waitforslice Task Timer Task Sampling Task Rate Analysis Task Alert Task Sleep Task

On-Person UnitModule ListModule Tasks Public Functions and Data

Main1.cStartTask

WaitforsliceTimerTask

SamplingTaskRateAnalysisTask

AlertTaskTimerTask

TimeStampAlertFlag

Heart Rate Data

Start08.c

Timer.cCurrentCount()ResetCount()

Count

OCDelay.c GetmSCnt()

On-Person UnitModule ListModule Tasks Public Functions and Data

simple_phy.c UINT8 PDDataRequest(tTxPacket *);void PLMEMC13192ResetIndication();

mc13213.c

Several other freescale provided modules

necessary for SMAC

On-Person UnitStart Task

System InitializationCPUSMACADC

PeriodRun Once out of reset

Max Execution Time~100 ms

On-Person UnitWaitforslice Task

Waits for the remainder of the timeslice period to pass before exiting to the next task

Period50 ms (periodic)

On-Person UnitTimer Task

A timer used to deduce the period of the heart beat and thus how many beats per minuteAccuracy: ±50 ms

Period 50 ms (periodic)

Max Execution Time0.5 ms

On-Person UnitSampling Task

Turns on LED, Optical Sensor, Instrumentation Amplifier and takes 100 ADC samples

Period50 ms (periodic)

Max Execution Time8 ms3 ms (typical)

On-Person UnitRate Analysis Task

Analyze the heart rate data byAveraging the 100 ADC SamplesDeciding if period has occurredObtaining time elapsed since previous peakCalculating Heart Rate in beats per minuteComparing to acceptable rangeSetting Alert Flag

Period50 ms

Max Execution Time5 ms

On-Person UnitAlert Task

Will send the alert signal to the computer connected unit

PeriodOnce until disarmed (sporadic)

Max Execution Time1 ms

On-Person UnitSleep Task

Put the CPU into low power mode called WaitInternal Timer Module use as software

interrupt to wake the CPU

Period50 ms (periodic)

Max Execution Time25 ms

On-Person UnitCPU Load

Task Execution Time Task Period CPU Load

Timer Task 0.5 ms 50 ms 1%

Sampling Task 8 ms 50 ms 16%

Rate Analysis Task 5 ms 50 ms 10%

Alert Task 1 ms 50 ms 2%

Sleep Task 25 ms 50 ms 50%

Total CPU Load (max) 79%

Computer Connected UnitTasks

Start Task Waitforslice Task User Interface Task Alert Pole Task Send Alert Task

Computer Connected UnitModule ListModule Tasks Public Functions and Data

Main1.cStartTask

WaitforsliceUser InterfaceTask

AlertPoleTaskSendAlertTask

HRLimitsAlertFlag

Start08.c

OCDelay.c GetmSCnt()

On-Person UnitModule ListModule Tasks Public Functions and Data

simple_phy.c UINT8 PDDataRequest(tTxPacket *);void PLMEMC13192ResetIndication();

mc13213.c

SCIBIO9s12Dx.a12sci_open()sci_read()sci_write()

Several other Freescale provided modules necessary for SMAC

On-Person UnitStart Task

System InitializationCPUSMACSCI

PeriodRun Once out of reset

Max Execution Time~100 ms

On-Person UnitWaitforslice Task

Waits for the remainder of the timeslice period to pass before exiting to the next task

Period15 ms (periodic)

Computer Connected UnitUser Interface Task

Handles the acquisition of heart rate limits from the user

Period15 ms (periodic)

Max Execution Time3 ms

Computer Connected UnitAlert Pole Task

Poles for an alert from the on-person unit and sets an alert flag if an alert is received

Period15 ms

Max Execution Time1 ms

Computer Connected UnitSend Alert Task

Sends an alert to an emergency service

For project demonstration, an alert will be displayed on the terminal

Period 15 ms

Max Execution time 1 ms

Computer Connected UnitCPU Load

Task Execution Time Task Period CPU Load

User Interface Task

3 ms 15 ms 20%

Alert Pole Task 1 ms 15 ms 6.67%

Send Task 1 ms 15 ms 6.67%

Total CPU Load (max) 33.34%