Noises in AD8232 analog output

Hello everyone! I hope you I will get some help from you.

Recently I've bought an AD8232 Sparkfun sensor for Heart Monitoring (see the image below).

It works pretty good as an heart monitor, but I'm working on another project with this same sensor.
I'm trying to read (via analogRead) the action potential generated on my lower arm during a muscle contraction, on an Arduino Uno.
The problem is that plotting the values I've found that the wave has a strange shape, more like a sinusoidal noise in the background.
This is the wave form:


When the wave is aporoximately flat (less peaks) the muscle is relaxed. And even though I'm trying to stay as still as possible to reduce the noises caused by movement, sometimes the wave raises and then drops.
When I contract the muscle (taller peaks) the wave starts to raise (and so the contraction is detected) but then it slowly drops and starts acting like a sinusoid.
What can I do to stabilize the wave?
Is there any hardware/software filtering I can use?

I've seen some project using the same sensor and code and they are pretty much working. What could be my problem?

Arduno and sensor connection:

  • Arduino connected to USB
  • Sensor Output > Arduino A0
  • Sensor GND > Arduino GND
  • Sensor 3.3v > Arduino 3.3v

Code:

const int ANALOG_1 = A0;

setup() {
 Serial.begin(9600);
}

loop() {
 Serial.println(analogRead(ANALOG_1));
}

Thank you for the attention, if you need more information I'll give them as soon as possible.

I suspect you just need to high-pass filter so you only get the spikes (which I presume are muscle fibres firing).
I guess the DC and low frequencies are dominated by environmental noise - short of sitting in a faraday cage that's probably unavoidable.

Thank you very much for your answer.
Would it be better to filter with the code itself or some sort of device/shield?

External shielding is always a good idea. You could try sitting outdoors, running the sensor with a battery operated laptop.

Note: the sample rate of your program is determined by the Serial Baud rate, which is currently 9600 Baud and very low. Experiment with higher Baud rates to determine if artifacts are not being introduced by aliasing (look up the term, as well as the Sampling Theorem).

Thank you again for your suggestions.
I'll try everything I can and I'll update this post.

Last question: do you think that some noises and artifacts could be caused by the Arduino itself (in terms of malfunctions)? Is there any way to check if Arduino is giving me true Analog outputs?

  1. Probably not, if you have wired the project correctly (grounds connected?).
  2. Yes, apply a known voltage between the analog input and ground. Compare with your multimeter reading.

So, I tried doing some experiments with analog inputs and the Arduino boards actually gives me true analog values.
My next move is to read AD8232 output outdoors, with the sensor powered by a battery and arduino connected to a laptop and with an higher baud rate.
For the filtering part, do you know any Arduino shield you would recommend me?
I was thinking about implementing a simple RC circuit as high-pass filter, but I don't know if it would be better than a filtering shield (if it exists).