Return to search

Utveckling av en kompakt BLE-modul i en portabel EKG : Med möjlighet till kontinuerlig dataöverföring / Development of a Compact BLE Module in an Portable ECG : With the possibility of continuous data transfer

Elektrodiagram eller EKG används inom sjukvården för att mäta hjärtats elektriska aktivitet med hjälp av flera elektroder som placeras ut på kroppen. Från mätningarna kan indikationer på hjärtsjukdomar och störningar i hjärtrytm upptäckas och sedan behandlas. Hjärt- och kärl-sjukdomar är den vanligaste dödsorsaken i Sverige och behovet av EKG undersökningar är stort. Vanligtvis är EKG-apparaterna stora, otympliga och begränsade till sjukhus då de är komplicerade och dyra. Linköpings universitets forskningsgrupp tillsammans med flera examensarbeten har då tagit fram en prototyp på en kompakt och portabel EKG. Den portabla EKG-apparaten kopplas med en sele som är integrerad med elektroder och ska brukas av främst kvinnor, då utbudet av användarvänliga EKG:s till kvinnor är litet. Den tidigare portabla EKG:en är uppbyggd av två moduler, EKG-modulen och Nordic Thingy52. EKG-modulen konstruerad på ett specialanpassat kretskort som utför den faktiska mätningen av elektroderna och uträkningar. Den är sedan ihopkopplad med Thingy52 som ansvarar för den trådlösa kommunikationen till andra enheter via Bluetooth Low Energy eller BLE som det också kallas. BLE-modulen som innefattade Thingy52 och den modifierade källkoden från tidigare arbeten, klarade av viss trådlös kommunikation men ansågs vara förlångsam och klarade inte av kontinuerlig dataöverföring. Från de tidigare arbetena uppkom då frågeställningar om det var möjligt att vidareutveckla den tidigare BLE-modulen genom att förbättra dataöverföring och införa fler funktioner. De mest väsentliga önskemål var att optimera modulens dataöverföring till att bli kontinuerlig, införa funktionalitet för att spara mätvärden som en typ av backup och introducera ett enklare digitalt filter för att filtrera bort brus och störningar på mätvärdena. Utöver detta skulle även ett kompaktare och mindre kretskort till BLE-modulen tas fram som skulle ersätta Thingy52. Projektet började med att införskaffa kunskap och förståelse om hur befintliga och tillkommande funktioner samt tjänster fungerar samt hur de ska implementeras. Val om vilka komponenter och utvecklingsmiljöer som skulle användas under projektet fastställdes. Valen resulterade i att fortsätta med tidigare System-on-chip, SoC nRF52832 från Nordic Semiconductor som Thingy52 är utformad runt. Detta ledde till att befintliga utvecklingskort kunde användas och kretsschema från Thingy52 kunde återanvändas till det nya kretsschemat. Innan det eget skapade kretskortet kunde beställas och testas behövdes verifiering av att den valda SoC klarade av kontinuerlig dataöverföring. Detta kunde utföras på utvecklingskort nRF52 SDK med samma typ av SoC. Verifieringen av dataöverföringen var mer tidskrävande än vad som hade räknats med och tyvärr blev det inte tid att beställa kretskortet och kunde inte testas i praktiken. Ett kretsschema utfördes ändå som har mindre dimensioner än Thingy52 och innehåller de önskade delarna. Under utveckling av BLE-funktionen valdes det att använda Nordic:s nya utvecklingsmiljö som förenklade programmering av avancerade funktioner, till exempel BLE. Valet av att byta utvecklingsmiljö resulterade dock i att tidigare programmeringskod som hanterade konfigurering och dataöverföring med EKG-modulen, behövdes konverteras om till ett nytt operativsystem efter att Nordic bytt till operativsystemet Zypher. Detta gav i följd att funktioner och bibliotek inte stödes eller inte fanns. Efter detta flyttades fokuset till att implementera och integrera lagringsfunktionen med BLE- och EKG-funktionerna. Multitrådning infördes för att kunna utföra och optimera BLE-modulens funktioner. Tidsbrist gjorde att endast platshållare för framtida implementering av digitala filter kunde utföras. Utifrån de testresultaten över BLE-modulen är det även svårt att garantera att SoC hinner utföra filtrering av mätdata under det redan begränsade tidsintervallet. Efter en del problem och många tester resulterade examensarbetet slutligen i ett kompakt kretsschema som skulle kunna ersätta Thingy52. En BLE-modul som kan utföra dataöverföring med viss kontinuerlighet och samtidigt lagra mätdata till ett SD-kort utan att påverka kommunikationen med EKG-modulen eller användargränssnittet. Slutprodukten har även många möjligheter att utökas i framtida arbeten. / Electrocardiography or ECG is used in healthcare to measure the electrical activity of the heart using several electrodes that are placed on the body. From the measurements, indications of heart diseases and heart rhythm disorders can be detected and then treated. Cardiovascular disease is the most common cause of death in Sweden and the need for ECG examinations is great. Usually the ECG devices are large, awkward, and limited to hospitals as they are complicated and expensive. Linköping University's research group together with several bachelor thesis projects has developed a prototype of a compact and portable ECG. The portable ECG device is connected to a bra that is integrated with electrodes and should be used mainly by women, as the range of user-friendly ECGs for women is small. The previously portable ECG is made up of two modules, the ECG module, and the Nordic Thingy52. The ECG module is designed on a specially adapted circuit board that performs the actual measurement of the electrodes and calculations. It is then paired with Thingy52 which is responsible for the wireless communication to other devices via Bluetooth Low Energy or BLE as it is also called. The BLE module, which included Thingy52 and the modified source code from previous work, managed some wireless communication but was considered too slow and could not handle continuous data transfer. From the previous work questions arose as to whether it was possible to further develop the previous BLE module by improving data transfer and introducing more features. The most desired features were to optimize the module's data transfer to become continuous, implement functionality to save measured values as a type of backup and implement a simple digital filter to filter out noise and disturbances of the measured values. In addition to this, a more compact and smaller circuit board for the BLE module would also be developed that would replace the Thingy52. The project began with acquiring knowledge and understanding of how existing and additional functions or services work and how they should be implemented. Choices about which components and development environments would be used during the project were determined. The choice resulted in continuing with the previous System-on-chip, SoC nRF52832 from Nordic Semiconductor around which Thingy52 is designed. As a result, existing development boards could be used and the circuit diagram from Thingy52 could be reused for the new circuit diagram. Before the self-created circuit board could be ordered and tested, verification was needed to determine that the selected SoC was capable of continuous data transfer. This could be done on development card nRF52 SDK with the same type of SoC. The verification of the data transfer was more time consuming than had been expected and unfortunately there was no time to order the circuit board and therefore could not be tested in practice. A circuit diagram was nevertheless performed which has smaller dimensions than Thingy52 and contains the desired parts. During the development of the BLE function, it was chosen to use Nordic's new development environment as it simplified programming of advanced functions, like BLE. The choice to change the development environment, however, resulted in the previous programming code, which handled configuration and data transfer with the ECG module, having to be converted to a new operating system after Nordic switched to the Zypher operating system. As a result, functions and libraries were not supported or did not exist. After this, the focus shifted to implementing and integrating the storage function with the BLE and ECG functions. The multithreading tool was introduced to perform and optimize the functions of the BLE module. Lack of time meant that only placeholders for future implementation of digital filters could be performed. Based on the test results over the BLE module, it is also difficult to guarantee that the SoC has time to perform filtering of measurement data during the already limited time interval. After some problems and many tests, the bachelor thesis project finally resulted in a compact circuit that could replace Thingy52. Also, a BLE module that can perform data transfer with some continuity and at the same time store measurement data to a SD card without affecting the communication with the ECG module or the user interface. The end product also has many opportunities to be expanded in future work.

Identiferoai:union.ndltd.org:UPSALLA1/oai:DiVA.org:liu-186657
Date January 2022
CreatorsAttrell, Henrik, Holmqvist, Mattias
PublisherLinköpings universitet, Elektroniska Kretsar och System
Source SetsDiVA Archive at Upsalla University
LanguageSwedish
Detected LanguageEnglish
TypeStudent thesis, info:eu-repo/semantics/bachelorThesis, text
Formatapplication/pdf
Rightsinfo:eu-repo/semantics/openAccess

Page generated in 0.0045 seconds