How to remove powerline noise from ecg signal

Hello everyone!
I’m new in processing. I would get ECG signal using ArduinoUno and AD3282 board. I get sketch from github and run my project. However, when I run processing programme, here appear power line noise (it was so high, the real signal was hard to see). I knew theoritically, in this case i must use IIR or FIR filter. But i can’t do it in Processing.
Do someone have sketch for filters, to remove this line noise?
thanks for answers.

possibly first start on the hardware,
is there any grounding concept?
what is the measuring concept? differential?


Are you sure is power noise? It could possibly be that you don’t have proper amplification or proper impedance matching.

For FFT, if you want to try this, load the data in a buffer in Minim and use the FFT and iFFT provided by the library. Your task would be to implement a filter in the frequency domain. Check the following links:



I think it is really power noise. Because this noise has the same(unchanged) shape. and even i dont connect ad3282 board i saw this noise.
And the second things i guess today L led always keeps on. I knew this shows pin 13. At the beginning i uploaded the sketch to “blink Led”. in this sketch i used pin 13. and now if I connect Led to this pin L led turn off and the noise also reduced. are there any connection between them.
the last one. Today i downloaded FIR filter codes and uploaded them to my arduino board for noise removal. Result:Any signal! even noises are all gone!