My name is Samer and Im new to Arduino kit, i have a project in the university about ECG signal by using Arduino.
I have question about the Arduino ADC, according to the Doc the ADC working clock range (50KHz ~ 200KHz), and if i left the cpu clock to the default 8MHz and select the prescale 128 then the ADC clock will be 62500Hz and each sample take 13 ADC clock cycle to be converted then we will have 4808 sample/second, here my question arise, i have ECG signal and it’s usually frequency range between (1Hz ~ 150Hz) , does this sampling ratio will affect on the result accuracy or make distortion to the result ??
Aren’t there usually 10 (or more) signals measured in an ECG ? So if you want each captured signal to look like the real signal you have to sample it perhaps 7-10x it’s highest frequency. The Arduino only has 1 ADC and multiple inputs to it via a MUX. So for each signal you have to command the MUX to go to that channel, wait some time for the capacitors in the MUX and S&H amp to settle to the input voltage and then perform the A/D conversion. That’ll be more that 13 clocks and then you need to do it for all 10 channels. So I think the ADC needs to run about 150 Hz x 10 sa/signal x 10 signals = 15kHz. IIRC the whole switching and settling and ADC takes perhaps 20 clocks and that implies an ADC working clock of 300 kHz, faster than the spec. Perhaps you can get by w/less than 10x the 150 Hz, if not for all channels then for some. And perhaps my 20 clocks is too high but you need to look at it.
What sample rates are used on a real EKG machine ?
So why can the sampling rates (in the link) be so low ? I suspect that while the bandwidth of a standard EKG channel might be 150 Hz, the actual signal content of interest is much less, perhaps only 20 Hz. IIRC a F1 driver might get his heart rate up to 180 bpm (my heart would burst before that !) and so that’s only a beat frequency of 3 Hz. Perhaps the harmonics extend up to the 9’th harmonic … that’s only ~20 Hz. Why then is the BW set to 150 Hz … got me ?
PS - I think in actual machines the sample rate is pretty high. That’s because it’s easy to do and then they can implement various filters in software rather than in hardware (and that save’s $$s).
Thank you for your comments and information, my project like Holter monitor, which mean i have two inputs from the patient body and subtract these signals to get the difference which will be the input to the ADC,so i don’t need to use MUX.
you mentioned a good idea which is make a delay to the ADC conversion time by enforcing the ADC to take 40 clock cycle instead clock cycle for sampling conversion. so if i divide the 62500/40 i will get =~1500 sample/second .
what do you think does it applicable to set the conversion clock to 40 instead of 13. ??
but for your second post i think i need to check more about it.
With only 1 channel to be sampled and depending on how you intend to process the data … using an Aruduino, even with the “default” AnalogREead() function, should give you an sufficient sampling rate. More samples doesn’t hurt, it just imposes a higher computational rate. You should read this :
Hi Mike, my plan is to make two parts of the ECG system, the first part is the Instrument Amplifier and Wireless transmitter which are powered by Batteries, the second part is Micro controller (Arduino) with Receiver and they’re also powered by USB cable from PC. and the result will be displayed on the PC graphically. but to be honest i not sure which type of interference i will face in my solution.