Main Content

DNN Based Homemade ECG

Due to High cost of ECG this project aims to be cost-effective still be able to perform early detection of Heart Problems

According to the WHO, Heart disease is major part of deaths among the adults, and the treatment is very expensive which is not affordable by the poor people, So what if we try to build one using cheap products yet satisfying results.

The aim of this project is to develop a functional and cost-effective device that can detect heart patologies. This device will allow people to diagnosis their heart themselves which is both cost-effective and easy.


We are proposing to build a small yet effective and low-cost portable device, which can do ECG in real time. It consist of a main board with high processing power (like the STM32F429ZI) to read the ECG signal and a Raspberry Pi Display to show the Real-time results of the analysis.

Nowadays ECG equipments are both expensive and bulky. They are designed to output highly reliable clean pulses of the heart. Our device is designed for as we say a FIRST-AID KIT that is helpful in emergency situations, furthermore the output signal will be analyzed by a software, the data do not need to be clean & in detail in emergency. By Simply downgrading some level of detail & filtering, the device becomes portable. Voila…….

This will allow ECG to be easily & remotely done simply by powered using batteries or even if available renewable energy sources (ex:- solar, wind etc) due to its low power consumption.


The AD8232 ECG Module has leads which can be connected to the patient body. This leads measure the spikes in voltage levels in the body as the heart beats which is related to heart behaviour. The signal we will receive will be amplified and measured with the help of ADS1115 Analogue to digital converter.

After that the digital data will be processed by the STM32F429ZI microcontroller. The microcontroller will be running a simple neural network, previously trained on Google Colab with an extensive dataset, that will analyse and try to classify the heart signal, and will detect possible problems based on the signal.

In Future we will also have visual representation of received data in addition of the output of the neural network, for the patient/doctor to view the results of analysis.”

Link to article