How to save an ECG signal data into an SD card !?

Hello all,

I'm a new Arduino user, and I'd like some help from you please. (This is my first attempt in the Arduino world)

I have an analog output of my ECG signal and I want to save that signal data into an SD card.
My breadboard circuit consists of an instrumentation amplifier cascaded to a bandpass filter.

I have an Arduino Uno and a Wireless SD shield.
I don't know how to connect my circuit with the Arduino.

I'm not really good at programming or writing a code as well, so if you could give me a code example I would be very thankful for you :slight_smile:

Any help would be very appreciated.

I don't know how to connect my circuit with the Arduino.

Then, you have no data to save to the SD card, so your post title is misleading.

How do you know that the circuit you have works? What kind of output does it produce?

PaulS:

I don't know how to connect my circuit with the Arduino.

Then, you have no data to save to the SD card, so your post title is misleading.

How do you know that the circuit you have works? What kind of output does it produce?

My circuit works in the lab and my signal is produced in the oscilloscope, I have and ECG signal output.
The thing is, I'm using the Arduino because I need to save my signal for 24 hours therefore, I have to carry my circuit and the Arduino with me for a 24 hours.

I'll power the circuit and the Arduino with a battery in order to carry them with me throughout the day.

will that work ?

My circuit works in the lab and my signal is produced in the oscilloscope

It is not produced in the scope. It is displayed on the scope. So, unless you tell us something about the signal - amplitude, frequency, etc., you are on your own.

PaulS:

My circuit works in the lab and my signal is produced in the oscilloscope

It is not produced in the scope. It is displayed on the scope. So, unless you tell us something about the signal - amplitude, frequency, etc., you are on your own.

Yes you got what I meant, the signal displayed on the scope.

The ECG signal amplitude range is 0.05mV - 3mV
and it frequency range 0.01Hz - 300Hz

Given that the range of voltages that the Arduino can measure (slowly) on an analog pin is 0 to 5.0V (for 5.0V Arduinos), your voltages range from 1/100000th to 60/100000th of the range from 0 to 1023. The Arduino would need to return values from 0.0123 to 0.6138 to represent the signal that you want to input to it. Given that signal, the Arduino will consistently return 0.

this has some info that will help http://www.instructables.com/id/Muscle-EMG-Sensor-for-a-Microcontroller/
there is plenty of info on the net for this sort of thing just search ECG ARDUINO

daniellyall:
this has some info that will help http://www.instructables.com/id/Muscle-EMG-Sensor-for-a-Microcontroller/
there is plenty of info on the net for this sort of thing just search ECG ARDUINO

Thank you very much, the info in the link clarified a lot of things for me :slight_smile:

What I need now is some help in writing a code to programme the Arduino to save the signal into a file in the SD card.
For instance, my signal output is connected to Analog input A0.

If any one has a code that may be useful or a link that I might find a useful information, please post it :slight_smile:

Again your help is very appreciated :slight_smile:

hi A_Aldhalia

I face the same problem of saving the analog signal coming from AD8232... Please if you get the solution post it to me

thanks in advance

Ayham

A_Aldhalia:
It is not produced in the scope. It is displayed on the scope. So, unless you tell us something about the signal - amplitude, frequency, etc., you are on your own.

Yes you got what I meant, the signal displayed on the scope.

The ECG signal amplitude range is 0.05mV - 3mV
and it frequency range 0.01Hz - 300Hz

PaulS:
Given that the range of voltages that the Arduino can measure (slowly) on an analog pin is 0 to 5.0V (for 5.0V Arduinos), your voltages range from 1/100000th to 60/100000th of the range from 0 to 1023. The Arduino would need to return values from 0.0123 to 0.6138 to represent the signal that you want to input to it. Given that signal, the Arduino will consistently return 0.

@OP

Things are slowly coming under your control. Why are you diverting? @PaulS has been guiding/helping you; others will join soon to make your project successful.

So, you have fast (300 Hz compare to slowly varying DC) varying DC signal. You are sure that the signal is all along uni-polar -- the signal does not make an excursion below the 0V line. Check again the polarity of the signal by changing the coupling mode of the scope to AC.

You have said that the signal has gone through an instrument amplifier (IA). What is the signal level after the amplifier (the gain of the amplifier)? Do you have dual bias voltage (+ and -) for your IA? If not, what is the value of the single supply? What is the type number of your IA?

The frequency of the signal: 0.01 Hz to 300 Hz. Tell us, how often you need to sample/digitize it so that you will be able to reproduce the signal when it will be fed to the input of a DAC? Theoretically, it is ....... times; practically, it is .......... times.

You are saying that your SD Shield is of wireless type. Please, give a link to this shield.

Ayham, the original poster is probably not reading this 4 years later. Start your own thread. You could put a link to this one and to anything else that your research has found.

If you can clearly say why the existing tutorials available online don't suit your specific project, we can help you better.

Time for me to retire either from this thread or from the Fo......?

How have I failed to see that the thread is 4 years old!

The Forum Owner/Administrator may do something so that the original posted date comes/remains along with the name of the person who started the thread.

I've fallen into that trap many times before. It just shows that you are a long-term contributor who is good at working on questions, not on dates.

MorganS:
I've fallen into that trap many times before. It just shows that you are a long-term contributor who is good at working on questions, not on dates.

Very much appreciated. Healing always comes this way when someone falls in trauma!

The forum software warns when a thread being replied to has not seen activity in some time. It really could do a better job of alerting people reading that reply that the reply is to ancient history.