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.