1

I am working on an ECG signal processing project to detect heart arrhythmia in real time and notify the doctor via SMS , initially I was using a raspberry pi 3 b+ for the processing an AD8232 ECG acquisition sensor to get the ECG signal and a SIM808 GSM module to send SMS messages since the websites providing that service are not available in my country,hardware however I just discovered that the Pi does not contain an ADC and that I will need to use an external module to perform the conversion. I have an STM32 F4 so I thought I might use it's ADC and perform the signal processing there as well since it contains a digital signal processing which is faster, and then send the results to the Pi, the results are the features of the signal needed for the classification we're using SVM. Finally it will send the SMS to the doctor.

To sum up, my questions is how can I communicate between the Pi and the STM32 to share these features?

I am sharing a lot of details about the project because I need an opinion about this solution – finally one more question for those who have used ECG sensors are these Healthy Pads reusable? healthy pads

  • The I2C bus seems like an obvious possibility - have you looked into it? – dlu Apr 3 '18 at 21:47
  • I am new to all this so I didn't know were to start but I'll check it – Abyr Apr 3 '18 at 21:49
0

A quick look at the STM32 F4 info on Wikipedia shows that it has I2C and SPI interfaces as well as a lot of GPIO pins. At first thought I2C or SPI seem like a better choice than GPIO both for economy of pins and because they handle a lot of the inter-device protocol issues for you so that you can focus on getting the data you need from the STM32.

You sound like you have given this a fair bit of thought and you must be pretty comfortable with a lot of this project...

So, at the risk of stating the obvious and hoping that I'm not way off base, a good way to start might be to block out the functionality and where the responsibilities lie – for example it sounds like you're planning to do EKG capture on the STM32 and communication with the SIM808 and, I assume, coordinate things and provide the user interface with the Pi – so the next step could be to decide how the devices exchange information and build a simple mock up to test the interfaces. Try to minimize the coupling between components so that you can test each one on its own.

I'll stop for now, it feels like too much unasked for advice, but feel free to ask more questions. Hopefully others will jump in as well.

  • I know about the fact that stm32 has an I2C and and SPI interfaces and that these are communication protocols , but didn't know how to choose between them , what .questions should be answered to know which is the best for my application and also I wasn't sure that I could transfer features through these interfaces it seemed like a lot of data to be shared – Abyr Apr 3 '18 at 22:20
  • This may help: Tradeoffs when considering SPI or I2C? - you have hardware for both so it may come down to speed and noise, both of which seem to favor SPI. I haven't looked at the libraries so that may also be a factor. – dlu Apr 3 '18 at 22:29
  • What about UART and USART can I consider using one of them in this application and why – Abyr Apr 4 '18 at 10:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.