Skip to content

PacePlusPlus/PacePlusPlus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pace++ 💖

Pace++ is a simulated pacemaker built to visually and functionally represent the various functions of modern pacemakers today. The following project is based of Boston Scientific's pacemaker specifications.

Through model-based code generation and a python gui, we created the following features:

  • 7 unique pacemaker modes (AOO, VOO, AAI, VVI, AOOR, VOOR, AAIR, VVIR)
  • Real-time electrocardiogram display
  • Local encrypted data storages

Technology Stack

Python | Matlab Simulink | Customtkinter | NXP FRDM K64F Board | J-Link

Showcase

DCM

Intro Screen Dark
The FRDM-K64F Board

Intro Screen Dark
The Intro Screen in Dark Mode

Intro Screen Dark
The Intro Screen in Dark Mode

Intro Screen Dark
Display of Heartrate in Dark Mode

Simulink

Intro Screen Dark
General Overview of the Simulink Stateflow

Intro Screen Dark
Overview of the Parameter Processing

Intro Screen Dark
Overview of the Pacemaker Modes

Development Process

Modeling with MATLAB Simulink

Central to modelling our pacemaker's functionality was the use of MATLAB Simulink, which allowed us to generate code iteratively and quickly flash our code into our board.

Through user-set parameters, our Simulink code allow for pacing of both the atrium and ventricle alongside rate adaptive pacing with a in-built accelerometer.

All important user-set data and electrocardiogram data was framed. The resulting packet was sent through a micro-usb to the device controller monitor.

Device Controller Monitor (DCM)

Through python's tkinter, we created a secure interface that allows for the modification of the pacemaker. Our GUI allows for:

  • Real-time display of the simulated heartbeat
  • Patient data to be saved and modified
  • Encryption of patient data
  • Serial communication to the K64F board

Validation

To test and validate our pacemaker mode function, we employed Heartview, a McMaster created cardiac simulation tool that was pre-flashed onto our board.

Installation

Prerequisites

  1. Python 3.18 or later
  2. MATLAB Simulink 2023 or later

Python Libraries

pip install customtkinter matplotlib serial cyrptography 

MATLAB Simulink Libraries

In MATLAB, write the following in to the terminal:

open([codertarget.freedomk64f.internal.getSpPkgRootDir,
'/src/mw_sdk_interface.c']);

Upon opening the device change the following line:

{ GPIO_MAKE_PIN(GPIOA_IDX, 0),  MW_NOT_USED},// PTA0, D8

into the following:

{ GPIO_MAKE_PIN(GPIOC_IDX, 12),  MW_NOT_USED},// PTC12, D8

Contributors

Christopher Nazarian Himanshu Singh Matthew Galuszka Shaan Suthar Varun Kothandaraman Shivan Guar

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published