Hey guys! Im new to the world of programming. My university project is an electronic Stethoscope, that displays BPM from audio alone.
I have recently acquired a FEZ cerbuino Bee, and have completed the hardware side. I need to implement a program that reads the analogue pin A0, performs an fft and displays the graph in Visual studio (i didnt have enough of a budget to buy a gadgeteer LCD).
Could I have some guidance please? im stuggling to make this work
If all you’re doing is heartbeat counting, you probably don’t even need an FFT. You can probably measure signal power or energy and determine if it’s a heartbeat from that. Probably no need to decompose the signal into its frequency components unless you’re doing something really fancy.
Great feedback guys, many thanks!
Unfortunately I cannot afford that gadgeteer module, the uni is very strict that everyone has the same budget to spend. it does look appealing though
You raise an interesting point iggmoe, it may well be feasible to just count peak amplitude, but the problem that arises is that breathing is quite audible in a chest cavity, i would need a way to differentiate lung from heart sounds, and the frequency spectrum of each is different, hence why i thought an fft?
Your idea of sending the values to excel and having it plot them appeals to me a great deal, that way the computing power of my laptop is used, and the cerbuino is merely a medium from hardware to laptop. How would i go about actually computing an fft, and sending the variables to excel? or ought i do the fft within excel and not visual studio?
Hmmm, bandpass filtering your signal in hardware should make your software development easier. Once the signal is filtered, signal power/energy should get you heartbeats, I think. And if you absolutely have to do an FFT, doing it on the PC side should be easier than on the microcontroller side, since the full .NET framework already has support for complex numbers and such.
I have, in hardware, implemented a low pass filter to cut-off the excess signals, and an amplifier to get enough amplitude to be detected by the fez processor. When attaching a n oscilloscope to the output from my system, i can quite clearly see the peaks that occur when my heart beats.
A crude but acceptable alternate would be to simply display the analogue output on the computer screen, much like the oscilloscope does?a doctor could use that to count teh peaks for bpm, and diagnose heart murmurs. Or am i underestimating the difficulty of such a task?
And wow justin that looks impressive! Yes, if I could see your code thatd be fantastic, with no budget left to spend I must provide the ouput on my laptop, in one form or the other
@ ks09aao - it’s given me an idea to show off a couple of modules…whats our time frame?
I can happily give you the code but without the modules it would be useless…
But as i said, i have a cunning plan…
shoot me an email justin at ingenuitymicro dot com
@ ks09aao - Out of curiosity, what was the budget you were given? Kinda interesting to see how much a university thinks a project like this should cost.
my budget was 45 pounds, the vast majority of which went on the processor and stethoscope im afraid, my supervisor insisted I get very specific ones!
Left me very little left to play with, Id have liked an LCD screen for an ouput and cut out the laptop altogether